db_clusters
Creates, updates, deletes, gets or lists a db_clusters resource.
Overview
| Name | db_clusters |
| Type | Resource |
| Id | aws.neptune.db_clusters |
Fields
The following fields are returned by SELECT queries:
- describe_db_clusters
| Name | Datatype | Description |
|---|---|---|
allocated_storage | integer | AllocatedStorage always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed. |
associated_roles | string | Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf. |
automatic_restart_time | string | Time at which the DB cluster will be automatically restarted. |
availability_zones | string | Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. |
backup_retention_period | integer | Specifies the number of days for which automatic DB snapshots are retained. |
character_set_name | string | Not supported by Neptune. |
clone_group_id | string | Identifies the clone group to which the DB cluster is associated. |
cluster_create_time | string | Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC). |
copy_tags_to_snapshot | boolean | If set to true, tags are copied to any snapshot of the DB cluster that is created. |
cross_account_clone | boolean | If set to true, the DB cluster can be cloned across accounts. |
db_cluster_arn | string | The Amazon Resource Name (ARN) for the DB cluster. |
db_cluster_identifier | string | Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster. |
db_cluster_members | string | Provides the list of instances that make up the DB cluster. |
db_cluster_option_group_memberships | string | Not supported by Neptune. |
db_cluster_parameter_group | string | Specifies the name of the DB cluster parameter group for the DB cluster. |
db_subnet_group | string | Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group. |
database_name | string | Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster. |
db_cluster_resource_id | string | The Amazon Region-unique, immutable identifier for the DB cluster. This identifier is found in Amazon CloudTrail log entries whenever the Amazon KMS key for the DB cluster is accessed. |
deletion_protection | boolean | Indicates whether or not the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. |
earliest_restorable_time | string | Specifies the earliest time to which a database can be restored with point-in-time restore. |
enabled_cloudwatch_logs_exports | string | A list of the log types that this DB cluster is configured to export to CloudWatch Logs. Valid log types are: audit (to publish audit logs to CloudWatch) and slowquery (to publish slow-query logs to CloudWatch). See Publishing Neptune logs to Amazon CloudWatch logs. |
endpoint | string | Specifies the connection endpoint for the primary instance of the DB cluster. |
engine | string | Provides the name of the database engine to be used for this DB cluster. |
engine_version | string | Indicates the database engine version. |
global_cluster_identifier | string | Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a global database. |
hosted_zone_id | string | Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. |
iam_database_authentication_enabled | boolean | True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. |
io_optimized_next_allowed_modification_time | string | The next time you can modify the DB cluster to use the iopt1 storage type. |
kms_key_id | string | If StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB cluster. |
latest_restorable_time | string | Specifies the latest time to which a database can be restored with point-in-time restore. |
master_username | string | Not supported by Neptune. |
multi_az | boolean | Specifies whether the DB cluster has instances in multiple Availability Zones. |
network_type | string | The network type of the DB cluster. Valid Values: IPV4 – The DB cluster uses only IPv4 addresses for communication. DUAL – The DB cluster uses both IPv4 and IPv6 addresses for communication. |
pending_modified_values | string | This data type is used as a response element in the ModifyDBCluster operation and contains changes that will be applied during the next maintenance window. |
percent_progress | string | Specifies the progress of the operation as a percentage. |
port | integer | Specifies the port that the database engine is listening on. |
preferred_backup_window | string | Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod. |
preferred_maintenance_window | string | Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). |
read_replica_identifiers | string | Contains one or more identifiers of the Read Replicas associated with this DB cluster. |
reader_endpoint | string | The reader endpoint for the DB cluster. The reader endpoint for a DB cluster load-balances connections across the Read Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Neptune distributes the connection requests among the Read Replicas in the DB cluster. This functionality can help balance your read workload across multiple Read Replicas in your DB cluster. If a failover occurs, and the Read Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Read Replicas in the cluster, you can then reconnect to the reader endpoint. |
replication_source_identifier | string | Not supported by Neptune. |
serverless_v2_scaling_configuration | string | Shows the scaling configuration for a Neptune Serverless DB cluster. For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide. |
status | string | Specifies the current state of this DB cluster. |
storage_encrypted | boolean | Specifies whether the DB cluster is encrypted. |
storage_type | string | The storage type used by the DB cluster. Valid Values: standard – ( the default ) Provides cost-effective database storage for applications with moderate to small I/O usage. iopt1 – Enables I/O-Optimized storage that's designed to meet the needs of I/O-intensive graph workloads that require predictable pricing with low I/O latency and consistent I/O throughput. Neptune I/O-Optimized storage is only available starting with engine release 1.3.0.0. |
vpc_security_groups | string | Provides a list of VPC security groups that the DB cluster belongs to. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_clusters | select | region | DBClusterIdentifier, Filters, MaxRecords, Marker | Returns information about provisioned DB clusters, and supports pagination. This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters. |
create_db_cluster | insert | DBClusterIdentifier, region | AvailabilityZones, BackupRetentionPeriod, CharacterSetName, CopyTagsToSnapshot, DatabaseName, DBClusterParameterGroupName, VpcSecurityGroupIds, DBSubnetGroupName, Engine, EngineVersion, Port, MasterUsername, MasterUserPassword, OptionGroupName, PreferredBackupWindow, PreferredMaintenanceWindow, ReplicationSourceIdentifier, Tags, StorageEncrypted, KmsKeyId, PreSignedUrl, EnableIAMDatabaseAuthentication, EnableCloudwatchLogsExports, DeletionProtection, ServerlessV2ScalingConfiguration, GlobalClusterIdentifier, StorageType, NetworkType | Creates a new Amazon Neptune DB cluster. You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon Neptune DB instance. Note that when you create a new cluster using CreateDBCluster directly, deletion protection is disabled by default (when you create a new production cluster in the console, deletion protection is enabled by default). You can only delete a DB cluster if its DeletionProtection field is set to false. |
add_role_to_db_cluster | update | DBClusterIdentifier, RoleArn, region | FeatureName | Associates an Identity and Access Management (IAM) role with an Neptune DB cluster. |
modify_db_cluster | update | DBClusterIdentifier, region | NewDBClusterIdentifier, ApplyImmediately, BackupRetentionPeriod, DBClusterParameterGroupName, VpcSecurityGroupIds, Port, MasterUserPassword, OptionGroupName, PreferredBackupWindow, PreferredMaintenanceWindow, EnableIAMDatabaseAuthentication, CloudwatchLogsExportConfiguration, EngineVersion, AllowMajorVersionUpgrade, DBInstanceParameterGroupName, DeletionProtection, CopyTagsToSnapshot, ServerlessV2ScalingConfiguration, StorageType, NetworkType | Modify a setting for a DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. |
delete_db_cluster | delete | DBClusterIdentifier, region | SkipFinalSnapshot, FinalDBSnapshotIdentifier | The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified DB cluster are not deleted. Note that the DB Cluster cannot be deleted if deletion protection is enabled. To delete it, you must first set its DeletionProtection field to False. |
copy_db_cluster_snapshot | exec | SourceDBClusterSnapshotIdentifier, TargetDBClusterSnapshotIdentifier, region | KmsKeyId, PreSignedUrl, CopyTags, Tags | Copies a snapshot of a DB cluster. To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. |
promote_read_replica_db_cluster | exec | DBClusterIdentifier, region | Not supported. | |
remove_role_from_db_cluster | exec | DBClusterIdentifier, RoleArn, region | FeatureName | Disassociates an Identity and Access Management (IAM) role from a DB cluster. |
restore_db_cluster_from_snapshot | exec | DBClusterIdentifier, SnapshotIdentifier, region | AvailabilityZones, Engine, EngineVersion, Port, DBSubnetGroupName, DatabaseName, OptionGroupName, VpcSecurityGroupIds, Tags, KmsKeyId, EnableIAMDatabaseAuthentication, EnableCloudwatchLogsExports, DBClusterParameterGroupName, DeletionProtection, CopyTagsToSnapshot, ServerlessV2ScalingConfiguration, StorageType, NetworkType | Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group. If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group. |
restore_db_cluster_to_point_in_time | exec | DBClusterIdentifier, SourceDBClusterIdentifier, region | RestoreType, RestoreToTime, UseLatestRestorableTime, Port, DBSubnetGroupName, OptionGroupName, VpcSecurityGroupIds, Tags, KmsKeyId, EnableIAMDatabaseAuthentication, EnableCloudwatchLogsExports, DBClusterParameterGroupName, DeletionProtection, ServerlessV2ScalingConfiguration, StorageType, NetworkType | Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group. This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance action to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in DBClusterIdentifier. You can create DB instances only after the RestoreDBClusterToPointInTime action has completed and the DB cluster is available. |
start_db_cluster | exec | DBClusterIdentifier, region | Starts an Amazon Neptune DB cluster that was stopped using the Amazon console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API. | |
stop_db_cluster | exec | DBClusterIdentifier, region | Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains the DB cluster's metadata, including its endpoints and DB parameter groups. Neptune also retains the transaction logs so you can do a point-in-time restore if necessary. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
DBClusterIdentifier | string | The DB cluster identifier of the Neptune DB cluster to be stopped. This parameter is stored as a lowercase string. |
RoleArn | string | The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole. |
SnapshotIdentifier | string | The identifier for the DB snapshot or DB cluster snapshot to restore from. You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB snapshot. Constraints: Must match the identifier of an existing Snapshot. |
SourceDBClusterIdentifier | string | The identifier of the source DB cluster from which to restore. Constraints: Must match the identifier of an existing DBCluster. |
SourceDBClusterSnapshotIdentifier | string | The identifier of the DB cluster snapshot to copy. This parameter is not case-sensitive. If the source DB cluster snapshot is in a different region or owned by another account, specify the snapshot ARN. Constraints: Must specify a valid system snapshot in the "available" state. Specify a valid DB snapshot identifier. Example: my-cluster-snapshot1 |
TargetDBClusterSnapshotIdentifier | string | The identifier of the new DB cluster snapshot to create from the source DB cluster snapshot. This parameter is not case-sensitive. Constraints: Must contain from 1 to 63 letters, numbers, or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: my-cluster-snapshot2 |
region | string | AWS region (default: us-east-1) |
AllowMajorVersionUpgrade | boolean | A value that indicates whether upgrades between different major versions are allowed. Constraints: You must set the allow-major-version-upgrade flag when providing an EngineVersion parameter that uses a different major version than the DB cluster's current version. |
ApplyImmediately | boolean | A value that specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter is set to false, changes to the DB cluster are applied during the next maintenance window. The ApplyImmediately parameter only affects NewDBClusterIdentifier values. If you set the ApplyImmediately parameter value to false, then changes to NewDBClusterIdentifier values are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of the ApplyImmediately parameter. Default: false |
AvailabilityZones | array | Provides the list of EC2 Availability Zones that instances in the restored DB cluster can be created in. |
BackupRetentionPeriod | integer | 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 |
CharacterSetName | string | (Not supported by Neptune) |
CloudwatchLogsExportConfiguration | object | The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB cluster. See Using the CLI to publish Neptune audit logs to CloudWatch Logs. |
CopyTags | boolean | True to copy all tags from the source DB cluster snapshot to the target DB cluster snapshot, and otherwise false. The default is false. |
CopyTagsToSnapshot | boolean | If set to true, tags are copied to any snapshot of the restored DB cluster that is created. |
DBClusterIdentifier | string | The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn't case-sensitive. Constraints: If supplied, must match an existing DBClusterIdentifier. |
DBClusterParameterGroupName | string | The name of the DB cluster parameter group to associate with the new DB cluster. Constraints: If supplied, must match the name of an existing DBClusterParameterGroup. |
DBInstanceParameterGroupName | string | The name of the DB parameter group to apply to all instances of the DB cluster. When you apply a parameter group using DBInstanceParameterGroupName, parameter changes aren't applied during the next maintenance window but instead are applied immediately. Default: The existing name setting Constraints: The DB parameter group must be in the same DB parameter group family as the target DB cluster version. The DBInstanceParameterGroupName parameter is only valid in combination with the AllowMajorVersionUpgrade parameter. |
DBSubnetGroupName | string | The DB subnet group name to use for the new DB cluster. Constraints: If supplied, must match the name of an existing DBSubnetGroup. Example: mySubnetgroup |
DatabaseName | string | Not supported. |
DeletionProtection | boolean | A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. |
EnableCloudwatchLogsExports | array | The list of logs that the restored DB cluster is to export to CloudWatch Logs. |
EnableIAMDatabaseAuthentication | boolean | True to enable mapping of Amazon Identity and Access Management (IAM) accounts to database accounts, and otherwise false. Default: false |
Engine | string | The database engine to use for the new DB cluster. Default: The same as source Constraint: Must be compatible with the engine of the source |
EngineVersion | string | The version of the database engine to use for the new DB cluster. |
FeatureName | string | The name of the feature for the DB cluster that the IAM role is to be disassociated from. For the list of supported feature names, see DescribeDBEngineVersions. |
Filters | array | A filter that specifies one or more DB clusters to describe. Supported filters: db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list will only include information about the DB clusters identified by these ARNs. engine - Accepts an engine name (such as neptune), and restricts the results list to DB clusters created by that engine. For example, to invoke this API from the Amazon CLI and filter so that only Neptune DB clusters are returned, you could use the following command: |
FinalDBSnapshotIdentifier | string | The DB cluster snapshot identifier of the new DB cluster snapshot created when SkipFinalSnapshot is set to false. Specifying this parameter and also setting the SkipFinalSnapshot parameter to true results in an error. Constraints: Must be 1 to 255 letters, numbers, or hyphens. First character must be a letter Cannot end with a hyphen or contain two consecutive hyphens |
GlobalClusterIdentifier | string | The ID of the Neptune global database to which this new DB cluster should be added. |
KmsKeyId | string | The Amazon KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster. The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same Amazon account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key. You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different than the KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key identified by the KmsKeyId parameter. If you do not specify a value for the KmsKeyId parameter, then the following will occur: If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster. If the DB cluster is not encrypted, then the restored DB cluster is not encrypted. If DBClusterIdentifier refers to a DB cluster that is not encrypted, then the restore request is rejected. |
Marker | string | An optional pagination token provided by a previous DescribeDBClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. |
MasterUserPassword | string | Not supported by Neptune. |
MasterUsername | string | Not supported by Neptune. |
MaxRecords | integer | The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved. Default: 100 Constraints: Minimum 20, maximum 100. |
NetworkType | string | The network type of the DB cluster. Valid Values: IPV4 – ( the default ) The DB cluster uses only IPv4 addresses for communication. DUAL – The DB cluster uses both IPv4 and IPv6 addresses for communication. The DB subnet group associated with the cluster must support IPv6. |
NewDBClusterIdentifier | string | The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value 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-cluster2 |
OptionGroupName | string | (Not supported by Neptune) |
Port | integer | The port number on which the new DB cluster accepts connections. Constraints: Value must be 1150-65535 Default: The same port as the original DB cluster. |
PreSignedUrl | string | Not currently supported. |
PreferredBackupWindow | string | 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 Amazon 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. |
PreferredMaintenanceWindow | string | 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 Amazon Region, occurring on a random day of the week. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Constraints: Minimum 30-minute window. |
ReplicationSourceIdentifier | string | The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica. |
RestoreToTime | string (date-time) | The date and time to restore the DB cluster to. Valid Values: Value must be a time in Universal Coordinated Time (UTC) format Constraints: Must be before the latest restorable time for the DB instance Must be specified if UseLatestRestorableTime parameter is not provided Cannot be specified if UseLatestRestorableTime parameter is true Cannot be specified if RestoreType parameter is copy-on-write Example: 2015-03-07T23:45:00Z |
RestoreType | string | 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. If you don't specify a RestoreType value, then the new DB cluster is restored as a full copy of the source DB cluster. |
ServerlessV2ScalingConfiguration | object | Contains the scaling configuration of a Neptune Serverless DB cluster. For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide. |
SkipFinalSnapshot | boolean | Determines whether a final DB cluster snapshot is created before the DB cluster is deleted. If true is specified, no DB cluster snapshot is created. If false is specified, a DB cluster snapshot is created before the DB cluster is deleted. You must specify a FinalDBSnapshotIdentifier parameter if SkipFinalSnapshot is false. Default: false |
StorageEncrypted | boolean | Specifies whether the DB cluster is encrypted. |
StorageType | string | Specifies the storage type to be associated with the DB cluster. Valid values: standard, iopt1 Default: standard |
Tags | array | The tags to be applied to the restored DB cluster. |
UseLatestRestorableTime | boolean | A value that is set to true to restore the DB cluster to the latest restorable backup time, and false otherwise. Default: false Constraints: Cannot be specified if RestoreToTime parameter is provided. |
VpcSecurityGroupIds | array | A list of VPC security groups that the new DB cluster belongs to. |
SELECT examples
- describe_db_clusters
Returns information about provisioned DB clusters, and supports pagination. This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters.
SELECT
allocated_storage,
associated_roles,
automatic_restart_time,
availability_zones,
backup_retention_period,
character_set_name,
clone_group_id,
cluster_create_time,
copy_tags_to_snapshot,
cross_account_clone,
db_cluster_arn,
db_cluster_identifier,
db_cluster_members,
db_cluster_option_group_memberships,
db_cluster_parameter_group,
db_subnet_group,
database_name,
db_cluster_resource_id,
deletion_protection,
earliest_restorable_time,
enabled_cloudwatch_logs_exports,
endpoint,
engine,
engine_version,
global_cluster_identifier,
hosted_zone_id,
iam_database_authentication_enabled,
io_optimized_next_allowed_modification_time,
kms_key_id,
latest_restorable_time,
master_username,
multi_az,
network_type,
pending_modified_values,
percent_progress,
port,
preferred_backup_window,
preferred_maintenance_window,
read_replica_identifiers,
reader_endpoint,
replication_source_identifier,
serverless_v2_scaling_configuration,
status,
storage_encrypted,
storage_type,
vpc_security_groups
FROM aws.neptune.db_clusters
WHERE region = '{{ region }}' -- required
AND DBClusterIdentifier = '{{ DBClusterIdentifier }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;
INSERT examples
- create_db_cluster
- Manifest
Creates a new Amazon Neptune DB cluster. You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon Neptune DB instance. Note that when you create a new cluster using CreateDBCluster directly, deletion protection is disabled by default (when you create a new production cluster in the console, deletion protection is enabled by default). You can only delete a DB cluster if its DeletionProtection field is set to false.
INSERT INTO aws.neptune.db_clusters (
DBClusterIdentifier,
region,
AvailabilityZones,
BackupRetentionPeriod,
CharacterSetName,
CopyTagsToSnapshot,
DatabaseName,
DBClusterParameterGroupName,
VpcSecurityGroupIds,
DBSubnetGroupName,
Engine,
EngineVersion,
Port,
MasterUsername,
MasterUserPassword,
OptionGroupName,
PreferredBackupWindow,
PreferredMaintenanceWindow,
ReplicationSourceIdentifier,
Tags,
StorageEncrypted,
KmsKeyId,
PreSignedUrl,
EnableIAMDatabaseAuthentication,
EnableCloudwatchLogsExports,
DeletionProtection,
ServerlessV2ScalingConfiguration,
GlobalClusterIdentifier,
StorageType,
NetworkType
)
SELECT
'{{ DBClusterIdentifier }}',
'{{ region }}',
'{{ AvailabilityZones }}',
'{{ BackupRetentionPeriod }}',
'{{ CharacterSetName }}',
'{{ CopyTagsToSnapshot }}',
'{{ DatabaseName }}',
'{{ DBClusterParameterGroupName }}',
'{{ VpcSecurityGroupIds }}',
'{{ DBSubnetGroupName }}',
'{{ Engine }}',
'{{ EngineVersion }}',
'{{ Port }}',
'{{ MasterUsername }}',
'{{ MasterUserPassword }}',
'{{ OptionGroupName }}',
'{{ PreferredBackupWindow }}',
'{{ PreferredMaintenanceWindow }}',
'{{ ReplicationSourceIdentifier }}',
'{{ Tags }}',
'{{ StorageEncrypted }}',
'{{ KmsKeyId }}',
'{{ PreSignedUrl }}',
'{{ EnableIAMDatabaseAuthentication }}',
'{{ EnableCloudwatchLogsExports }}',
'{{ DeletionProtection }}',
'{{ ServerlessV2ScalingConfiguration }}',
'{{ GlobalClusterIdentifier }}',
'{{ StorageType }}',
'{{ NetworkType }}'
RETURNING
allocated_storage,
associated_roles,
automatic_restart_time,
availability_zones,
backup_retention_period,
character_set_name,
clone_group_id,
cluster_create_time,
copy_tags_to_snapshot,
cross_account_clone,
db_cluster_arn,
db_cluster_identifier,
db_cluster_members,
db_cluster_option_group_memberships,
db_cluster_parameter_group,
db_subnet_group,
database_name,
db_cluster_resource_id,
deletion_protection,
earliest_restorable_time,
enabled_cloudwatch_logs_exports,
endpoint,
engine,
engine_version,
global_cluster_identifier,
hosted_zone_id,
iam_database_authentication_enabled,
io_optimized_next_allowed_modification_time,
kms_key_id,
latest_restorable_time,
master_username,
multi_az,
network_type,
pending_modified_values,
percent_progress,
port,
preferred_backup_window,
preferred_maintenance_window,
read_replica_identifiers,
reader_endpoint,
replication_source_identifier,
serverless_v2_scaling_configuration,
status,
storage_encrypted,
storage_type,
vpc_security_groups
;
# Description fields are for documentation purposes
- name: db_clusters
props:
- name: DBClusterIdentifier
value: "{{ DBClusterIdentifier }}"
description: Required parameter for the db_clusters resource.
- name: region
value: "{{ region }}"
description: Required parameter for the db_clusters resource.
- name: AvailabilityZones
value: "{{ AvailabilityZones }}"
description: A list of EC2 Availability Zones that instances in the DB cluster can be created in.
description: A list of EC2 Availability Zones that instances in the DB cluster can be created in.
- name: BackupRetentionPeriod
value: {{ BackupRetentionPeriod }}
description: 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
description: 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
- name: CharacterSetName
value: "{{ CharacterSetName }}"
description: (Not supported by Neptune)
description: (Not supported by Neptune)
- name: CopyTagsToSnapshot
value: {{ CopyTagsToSnapshot }}
description: If set to true, tags are copied to any snapshot of the DB cluster that is created.
description: If set to true, tags are copied to any snapshot of the DB cluster that is created.
- name: DatabaseName
value: "{{ DatabaseName }}"
description: Not supported by Neptune.
description: Not supported by Neptune.
- name: DBClusterParameterGroupName
value: "{{ DBClusterParameterGroupName }}"
description: The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default is used. Constraints: If supplied, must match the name of an existing DBClusterParameterGroup.
description: The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default is used. Constraints: If supplied, must match the name of an existing DBClusterParameterGroup.
- name: VpcSecurityGroupIds
value: "{{ VpcSecurityGroupIds }}"
description: A list of EC2 VPC security groups to associate with this DB cluster.
description: A list of EC2 VPC security groups to associate with this DB cluster.
- name: DBSubnetGroupName
value: "{{ DBSubnetGroupName }}"
description: A DB subnet group to associate with this DB cluster. Constraints: Must match the name of an existing DBSubnetGroup. Must not be default. Example: mySubnetgroup
description: A DB subnet group to associate with this DB cluster. Constraints: Must match the name of an existing DBSubnetGroup. Must not be default. Example: mySubnetgroup
- name: Engine
value: "{{ Engine }}"
description: The name of the database engine to be used for this DB cluster. Valid Values: neptune
description: The name of the database engine to be used for this DB cluster. Valid Values: neptune
- name: EngineVersion
value: "{{ EngineVersion }}"
description: The version number of the database engine to use for the new DB cluster. Example: 1.2.1.0
description: The version number of the database engine to use for the new DB cluster. Example: 1.2.1.0
- name: Port
value: {{ Port }}
description: The port number on which the instances in the DB cluster accept connections. Default: 8182
description: The port number on which the instances in the DB cluster accept connections. Default: 8182
- name: MasterUsername
value: "{{ MasterUsername }}"
description: Not supported by Neptune.
description: Not supported by Neptune.
- name: MasterUserPassword
value: "{{ MasterUserPassword }}"
description: Not supported by Neptune.
description: Not supported by Neptune.
- name: OptionGroupName
value: "{{ OptionGroupName }}"
description: (Not supported by Neptune)
description: (Not supported by Neptune)
- name: PreferredBackupWindow
value: "{{ PreferredBackupWindow }}"
description: 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 Amazon Region. To see the time blocks available, see Neptune Maintenance Window in the Amazon Neptune User Guide. 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.
description: 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 Amazon Region. To see the time blocks available, see Neptune Maintenance Window in the Amazon Neptune User Guide. 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.
- name: PreferredMaintenanceWindow
value: "{{ PreferredMaintenanceWindow }}"
description: 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 Amazon Region, occurring on a random day of the week. To see the time blocks available, see Neptune Maintenance Window in the Amazon Neptune User Guide. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Constraints: Minimum 30-minute window.
description: 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 Amazon Region, occurring on a random day of the week. To see the time blocks available, see Neptune Maintenance Window in the Amazon Neptune User Guide. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Constraints: Minimum 30-minute window.
- name: ReplicationSourceIdentifier
value: "{{ ReplicationSourceIdentifier }}"
description: The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.
description: The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.
- name: Tags
value: "{{ Tags }}"
description: The tags to assign to the new DB cluster.
description: The tags to assign to the new DB cluster.
- name: StorageEncrypted
value: {{ StorageEncrypted }}
description: Specifies whether the DB cluster is encrypted.
description: Specifies whether the DB cluster is encrypted.
- name: KmsKeyId
value: "{{ KmsKeyId }}"
description: The Amazon KMS key identifier for an encrypted DB cluster. The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same Amazon account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key. If an encryption key is not specified in KmsKeyId: If ReplicationSourceIdentifier identifies an encrypted source, then Amazon Neptune will use the encryption key used to encrypt the source. Otherwise, Amazon Neptune will use your default encryption key. If the StorageEncrypted parameter is true and ReplicationSourceIdentifier is not specified, then Amazon Neptune will use your default encryption key. Amazon KMS creates the default encryption key for your Amazon account. Your Amazon account has a different default encryption key for each Amazon Region. If you create a Read Replica of an encrypted DB cluster in another Amazon Region, you must set KmsKeyId to a KMS key ID that is valid in the destination Amazon Region. This key is used to encrypt the Read Replica in that Amazon Region.
description: The Amazon KMS key identifier for an encrypted DB cluster. The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same Amazon account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key. If an encryption key is not specified in KmsKeyId: If ReplicationSourceIdentifier identifies an encrypted source, then Amazon Neptune will use the encryption key used to encrypt the source. Otherwise, Amazon Neptune will use your default encryption key. If the StorageEncrypted parameter is true and ReplicationSourceIdentifier is not specified, then Amazon Neptune will use your default encryption key. Amazon KMS creates the default encryption key for your Amazon account. Your Amazon account has a different default encryption key for each Amazon Region. If you create a Read Replica of an encrypted DB cluster in another Amazon Region, you must set KmsKeyId to a KMS key ID that is valid in the destination Amazon Region. This key is used to encrypt the Read Replica in that Amazon Region.
- name: PreSignedUrl
value: "{{ PreSignedUrl }}"
description: This parameter is not currently supported.
description: This parameter is not currently supported.
- name: EnableIAMDatabaseAuthentication
value: {{ EnableIAMDatabaseAuthentication }}
description: If set to true, enables Amazon Identity and Access Management (IAM) authentication for the entire DB cluster (this cannot be set at an instance level). Default: false.
description: If set to true, enables Amazon Identity and Access Management (IAM) authentication for the entire DB cluster (this cannot be set at an instance level). Default: false.
- name: EnableCloudwatchLogsExports
value: "{{ EnableCloudwatchLogsExports }}"
description: A list of the log types that this DB cluster should export to CloudWatch Logs. Valid log types are: audit (to publish audit logs) and slowquery (to publish slow-query logs). See Publishing Neptune logs to Amazon CloudWatch logs.
description: A list of the log types that this DB cluster should export to CloudWatch Logs. Valid log types are: audit (to publish audit logs) and slowquery (to publish slow-query logs). See Publishing Neptune logs to Amazon CloudWatch logs.
- name: DeletionProtection
value: {{ DeletionProtection }}
description: A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is enabled.
description: A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is enabled.
- name: ServerlessV2ScalingConfiguration
value: "{{ ServerlessV2ScalingConfiguration }}"
description: Contains the scaling configuration of a Neptune Serverless DB cluster. For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide.
description: Contains the scaling configuration of a Neptune Serverless DB cluster. For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide.
- name: GlobalClusterIdentifier
value: "{{ GlobalClusterIdentifier }}"
description: The ID of the Neptune global database to which this new DB cluster should be added.
description: The ID of the Neptune global database to which this new DB cluster should be added.
- name: StorageType
value: "{{ StorageType }}"
description: The storage type for the new DB cluster. Valid Values: standard – ( the default ) Configures cost-effective database storage for applications with moderate to small I/O usage. When set to standard, the storage type is not returned in the response. iopt1 – Enables I/O-Optimized storage that's designed to meet the needs of I/O-intensive graph workloads that require predictable pricing with low I/O latency and consistent I/O throughput. Neptune I/O-Optimized storage is only available starting with engine release 1.3.0.0.
description: The storage type for the new DB cluster. Valid Values: standard – ( the default ) Configures cost-effective database storage for applications with moderate to small I/O usage. When set to standard, the storage type is not returned in the response. iopt1 – Enables I/O-Optimized storage that's designed to meet the needs of I/O-intensive graph workloads that require predictable pricing with low I/O latency and consistent I/O throughput. Neptune I/O-Optimized storage is only available starting with engine release 1.3.0.0.
- name: NetworkType
value: "{{ NetworkType }}"
description: The network type of the DB cluster. Valid Values: IPV4 – ( the default ) The DB cluster uses only IPv4 addresses for communication. DUAL – The DB cluster uses both IPv4 and IPv6 addresses for communication. The DB subnet group associated with the cluster must support IPv6.
description: The network type of the DB cluster. Valid Values: IPV4 – ( the default ) The DB cluster uses only IPv4 addresses for communication. DUAL – The DB cluster uses both IPv4 and IPv6 addresses for communication. The DB subnet group associated with the cluster must support IPv6.
UPDATE examples
- add_role_to_db_cluster
- modify_db_cluster
Associates an Identity and Access Management (IAM) role with an Neptune DB cluster.
UPDATE aws.neptune.db_clusters
SET
-- No updatable properties
WHERE
DBClusterIdentifier = '{{ DBClusterIdentifier }}' --required
AND RoleArn = '{{ RoleArn }}' --required
AND region = '{{ region }}' --required
AND FeatureName = '{{ FeatureName}}';
Modify a setting for a DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
UPDATE aws.neptune.db_clusters
SET
-- No updatable properties
WHERE
DBClusterIdentifier = '{{ DBClusterIdentifier }}' --required
AND region = '{{ region }}' --required
AND NewDBClusterIdentifier = '{{ NewDBClusterIdentifier}}'
AND ApplyImmediately = {{ ApplyImmediately}}
AND BackupRetentionPeriod = '{{ BackupRetentionPeriod}}'
AND DBClusterParameterGroupName = '{{ DBClusterParameterGroupName}}'
AND VpcSecurityGroupIds = '{{ VpcSecurityGroupIds}}'
AND Port = '{{ Port}}'
AND MasterUserPassword = '{{ MasterUserPassword}}'
AND OptionGroupName = '{{ OptionGroupName}}'
AND PreferredBackupWindow = '{{ PreferredBackupWindow}}'
AND PreferredMaintenanceWindow = '{{ PreferredMaintenanceWindow}}'
AND EnableIAMDatabaseAuthentication = {{ EnableIAMDatabaseAuthentication}}
AND CloudwatchLogsExportConfiguration = '{{ CloudwatchLogsExportConfiguration}}'
AND EngineVersion = '{{ EngineVersion}}'
AND AllowMajorVersionUpgrade = {{ AllowMajorVersionUpgrade}}
AND DBInstanceParameterGroupName = '{{ DBInstanceParameterGroupName}}'
AND DeletionProtection = {{ DeletionProtection}}
AND CopyTagsToSnapshot = {{ CopyTagsToSnapshot}}
AND ServerlessV2ScalingConfiguration = '{{ ServerlessV2ScalingConfiguration}}'
AND StorageType = '{{ StorageType}}'
AND NetworkType = '{{ NetworkType}}'
RETURNING
allocated_storage,
associated_roles,
automatic_restart_time,
availability_zones,
backup_retention_period,
character_set_name,
clone_group_id,
cluster_create_time,
copy_tags_to_snapshot,
cross_account_clone,
db_cluster_arn,
db_cluster_identifier,
db_cluster_members,
db_cluster_option_group_memberships,
db_cluster_parameter_group,
db_subnet_group,
database_name,
db_cluster_resource_id,
deletion_protection,
earliest_restorable_time,
enabled_cloudwatch_logs_exports,
endpoint,
engine,
engine_version,
global_cluster_identifier,
hosted_zone_id,
iam_database_authentication_enabled,
io_optimized_next_allowed_modification_time,
kms_key_id,
latest_restorable_time,
master_username,
multi_az,
network_type,
pending_modified_values,
percent_progress,
port,
preferred_backup_window,
preferred_maintenance_window,
read_replica_identifiers,
reader_endpoint,
replication_source_identifier,
serverless_v2_scaling_configuration,
status,
storage_encrypted,
storage_type,
vpc_security_groups;
DELETE examples
- delete_db_cluster
The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified DB cluster are not deleted. Note that the DB Cluster cannot be deleted if deletion protection is enabled. To delete it, you must first set its DeletionProtection field to False.
DELETE FROM aws.neptune.db_clusters
WHERE DBClusterIdentifier = '{{ DBClusterIdentifier }}' --required
AND region = '{{ region }}' --required
AND SkipFinalSnapshot = '{{ SkipFinalSnapshot }}'
AND FinalDBSnapshotIdentifier = '{{ FinalDBSnapshotIdentifier }}'
;
Lifecycle Methods
- copy_db_cluster_snapshot
- promote_read_replica_db_cluster
- remove_role_from_db_cluster
- restore_db_cluster_from_snapshot
- restore_db_cluster_to_point_in_time
- start_db_cluster
- stop_db_cluster
Copies a snapshot of a DB cluster. To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
EXEC aws.neptune.db_clusters.copy_db_cluster_snapshot
@SourceDBClusterSnapshotIdentifier='{{ SourceDBClusterSnapshotIdentifier }}' --required,
@TargetDBClusterSnapshotIdentifier='{{ TargetDBClusterSnapshotIdentifier }}' --required,
@region='{{ region }}' --required,
@KmsKeyId='{{ KmsKeyId }}',
@PreSignedUrl='{{ PreSignedUrl }}',
@CopyTags={{ CopyTags }},
@Tags='{{ Tags }}'
;
Not supported.
EXEC aws.neptune.db_clusters.promote_read_replica_db_cluster
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@region='{{ region }}' --required
;
Disassociates an Identity and Access Management (IAM) role from a DB cluster.
EXEC aws.neptune.db_clusters.remove_role_from_db_cluster
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@RoleArn='{{ RoleArn }}' --required,
@region='{{ region }}' --required,
@FeatureName='{{ FeatureName }}'
;
Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group. If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
EXEC aws.neptune.db_clusters.restore_db_cluster_from_snapshot
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@SnapshotIdentifier='{{ SnapshotIdentifier }}' --required,
@region='{{ region }}' --required,
@AvailabilityZones='{{ AvailabilityZones }}',
@Engine='{{ Engine }}',
@EngineVersion='{{ EngineVersion }}',
@Port='{{ Port }}',
@DBSubnetGroupName='{{ DBSubnetGroupName }}',
@DatabaseName='{{ DatabaseName }}',
@OptionGroupName='{{ OptionGroupName }}',
@VpcSecurityGroupIds='{{ VpcSecurityGroupIds }}',
@Tags='{{ Tags }}',
@KmsKeyId='{{ KmsKeyId }}',
@EnableIAMDatabaseAuthentication={{ EnableIAMDatabaseAuthentication }},
@EnableCloudwatchLogsExports='{{ EnableCloudwatchLogsExports }}',
@DBClusterParameterGroupName='{{ DBClusterParameterGroupName }}',
@DeletionProtection={{ DeletionProtection }},
@CopyTagsToSnapshot={{ CopyTagsToSnapshot }},
@ServerlessV2ScalingConfiguration='{{ ServerlessV2ScalingConfiguration }}',
@StorageType='{{ StorageType }}',
@NetworkType='{{ NetworkType }}'
;
Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group. This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance action to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in DBClusterIdentifier. You can create DB instances only after the RestoreDBClusterToPointInTime action has completed and the DB cluster is available.
EXEC aws.neptune.db_clusters.restore_db_cluster_to_point_in_time
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@SourceDBClusterIdentifier='{{ SourceDBClusterIdentifier }}' --required,
@region='{{ region }}' --required,
@RestoreType='{{ RestoreType }}',
@RestoreToTime='{{ RestoreToTime }}',
@UseLatestRestorableTime={{ UseLatestRestorableTime }},
@Port='{{ Port }}',
@DBSubnetGroupName='{{ DBSubnetGroupName }}',
@OptionGroupName='{{ OptionGroupName }}',
@VpcSecurityGroupIds='{{ VpcSecurityGroupIds }}',
@Tags='{{ Tags }}',
@KmsKeyId='{{ KmsKeyId }}',
@EnableIAMDatabaseAuthentication={{ EnableIAMDatabaseAuthentication }},
@EnableCloudwatchLogsExports='{{ EnableCloudwatchLogsExports }}',
@DBClusterParameterGroupName='{{ DBClusterParameterGroupName }}',
@DeletionProtection={{ DeletionProtection }},
@ServerlessV2ScalingConfiguration='{{ ServerlessV2ScalingConfiguration }}',
@StorageType='{{ StorageType }}',
@NetworkType='{{ NetworkType }}'
;
Starts an Amazon Neptune DB cluster that was stopped using the Amazon console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API.
EXEC aws.neptune.db_clusters.start_db_cluster
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@region='{{ region }}' --required
;
Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains the DB cluster's metadata, including its endpoints and DB parameter groups. Neptune also retains the transaction logs so you can do a point-in-time restore if necessary.
EXEC aws.neptune.db_clusters.stop_db_cluster
@DBClusterIdentifier='{{ DBClusterIdentifier }}' --required,
@region='{{ region }}' --required
;