Ada lebih banyak AWS SDK contoh yang tersedia di GitHub repo SDKContoh AWS Dokumen
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Amazon DocumentDB contoh menggunakan AWS CLI
Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan Amazon DocumentDB. AWS Command Line Interface
Tindakan adalah kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.
Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.
Topik
Tindakan
Contoh kode berikut menunjukkan cara menggunakanadd-tags-to-resource
.
- AWS CLI
-
Untuk menambahkan satu atau beberapa tag ke sumber daya tertentu
add-tags-to-resource
Contoh berikut menambahkan tiga tag kesample-cluster
. Satu tag (CropB
) memiliki nama kunci tetapi tidak memiliki nilai.aws docdb add-tags-to-resource \ --resource-name
arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster
\ --tags Key="CropA",Value="Apple" Key="CropB" Key="CropC",Value="Corn"Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menandai Sumber Daya Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat AddTagsToResource
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanapply-pending-maintenance-action
.
- AWS CLI
-
Untuk melakukan tindakan pemeliharaan yang tertunda selama jendela pemeliharaan berikutnya
apply-pending-maintenance-action
Contoh berikut menyebabkan semua tindakan pembaruan sistem dilakukan selama jendela pemeliharaan terjadwal berikutnya.aws docdb apply-pending-maintenance-action \ --resource-identifier
arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster
\ --apply-actionsystem-update
\ --opt-in-typenext-maintenance
Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menerapkan Pembaruan Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ApplyPendingMaintenanceAction
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancopy-db-cluster-parameter-group
.
- AWS CLI
-
Untuk menduplikasi grup parameter cluster DB yang ada
copy-db-cluster-parameter-group
Contoh berikut membuat salinan dari kelompok parametercustom-docdb3-6
bernamacustom-docdb3-6-copy
. Saat membuat salinan itu menambahkan tag ke grup parameter baru.aws docdb copy-db-cluster-parameter-group \ --source-db-cluster-parameter-group-identifier
custom-docdb3-6
\ --target-db-cluster-parameter-group-identifiercustom-docdb3-6-copy
\ --target-db-cluster-parameter-group-description"Copy of custom-docdb3-6"
\ --tags Key="CopyNumber",Value="1" Key="Modifiable",Value="Yes"Output:
{ "DBClusterParameterGroup": { "DBParameterGroupFamily": "docdb3.6", "DBClusterParameterGroupArn": "arn:aws:rds:us-east-1:12345678901:cluster-pg:custom-docdb3-6-copy", "DBClusterParameterGroupName": "custom-docdb3-6-copy", "Description": "Copy of custom-docdb3-6" } }
Untuk informasi selengkapnya, lihat Menyalin Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CopyDbClusterParameterGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancopy-db-cluster-snapshot
.
- AWS CLI
-
Untuk membuat salinan snapshot
copy-db-cluster-snapshot
Contoh berikut membuat salinansample-cluster-snapshot
bernamasample-cluster-snapshot-copy
. Salinan memiliki semua tag asli ditambah tag baru dengan nama kunciCopyNumber
.aws docdb copy-db-cluster-snapshot \ --source-db-cluster-snapshot-identifier
sample-cluster-snapshot
\ --target-db-cluster-snapshot-identifiersample-cluster-snapshot-copy
\ --copy-tags \ --tags Key="CopyNumber",Value="1"Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menyalin Snapshot Cluster di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CopyDbClusterSnapshot
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-db-cluster-parameter-group
.
- AWS CLI
-
Untuk membuat grup parameter cluster Amazon DocumentDB
create-db-cluster-parameter-group
Contoh berikut membuat kelompok parameter cluster DBsample-parameter-group
menggunakandocdb3.6
keluarga.aws docdb create-db-cluster-parameter-group \ --db-cluster-parameter-group-name
sample-parameter-group
\ --db-parameter-group-familydocdb3.6
\ --description"Sample parameter group based on docdb3.6"
Output:
{ "DBClusterParameterGroup": { "Description": "Sample parameter group based on docdb3.6", "DBParameterGroupFamily": "docdb3.6", "DBClusterParameterGroupArn": "arn:aws:rds:us-west-2:123456789012:cluster-pg:sample-parameter-group", "DBClusterParameterGroupName": "sample-parameter-group" } }
Untuk informasi selengkapnya, lihat Membuat Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CreateDbClusterParameterGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-db-cluster-snapshot
.
- AWS CLI
-
Untuk membuat snapshot cluster Amazon DocumentDB manual
create-db-cluster-snapshot
Contoh berikut membuat snapshot cluster Amazon DB bernama sample-cluster-snapshot.aws docdb create-db-cluster-snapshot \ --db-cluster-identifier
sample-cluster
\ --db-cluster-snapshot-identifiersample-cluster-snapshot
Output:
{ "DBClusterSnapshot": { "MasterUsername": "master-user", "SnapshotCreateTime": "2019-03-18T18:27:14.794Z", "AvailabilityZones": [ "us-west-2a", "us-west-2b", "us-west-2c", "us-west-2d", "us-west-2e", "us-west-2f" ], "SnapshotType": "manual", "DBClusterSnapshotArn": "arn:aws:rds:us-west-2:123456789012:cluster-snapshot:sample-cluster-snapshot", "EngineVersion": "3.6.0", "PercentProgress": 0, "DBClusterSnapshotIdentifier": "sample-cluster-snapshot", "Engine": "docdb", "DBClusterIdentifier": "sample-cluster", "Status": "creating", "ClusterCreateTime": "2019-03-15T20:29:58.836Z", "Port": 0, "StorageEncrypted": false, "VpcId": "vpc-91280df6" } }
Untuk informasi selengkapnya, lihat Membuat Snapshot Kluster Manual di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CreateDbClusterSnapshot
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-db-cluster
.
- AWS CLI
-
Untuk membuat cluster Amazon DocumentDB
create-db-cluster
Contoh berikut membuat cluster Amazon DocumentDBsample-cluster
bernama dengan jendela pemeliharaan pilihan pada hari Minggu antara 20:30 dan 11:00.aws docdb create-db-cluster \ --db-cluster-identifier
sample-cluster
\ --enginedocdb
\ --master-user
name master-user \ --master-user-password
password \ --preferred-maintenance-windowSun:20:30-Sun:21:00
Output:
{ "DBCluster": { "DBClusterParameterGroup": "default.docdb3.6", "AssociatedRoles": [], "DBSubnetGroup": "default", "ClusterCreateTime": "2019-03-18T18:06:34.616Z", "Status": "creating", "Port": 27017, "PreferredMaintenanceWindow": "sun:20:30-sun:21:00", "HostedZoneId": "ZNKXH85TT8WVW", "DBClusterMembers": [], "Engine": "docdb", "DBClusterIdentifier": "sample-cluster", "PreferredBackupWindow": "10:12-10:42", "AvailabilityZones": [ "us-west-2d", "us-west-2f", "us-west-2e" ], "MasterUsername": "master-user", "BackupRetentionPeriod": 1, "ReaderEndpoint": "sample-cluster.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "StorageEncrypted": false, "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "DbClusterResourceId": "cluster-L3R4YRSBUYDP4GLMTJ2WF5GH5Q", "MultiAZ": false, "Endpoint": "sample-cluster.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "EngineVersion": "3.6.0" } }
Untuk informasi selengkapnya, lihat Membuat Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CreateDbCluster
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-db-instance
.
- AWS CLI
-
Untuk membuat instance cluster Amazon DocumentDB
Kode
create-db-instance
contoh berikut membuat instancesample-cluster-instance-2
di cluster Amazon DocumentDB.sample-cluster
aws docdb create-db-instance \ --db-cluster-identifier
sample-cluster
\ --db-instance-classdb.r4.xlarge
\ --db-instance-identifiersample-cluster-instance-2
\ --enginedocdb
Output:
{ "DBInstance": { "DBInstanceStatus": "creating", "PendingModifiedValues": { "PendingCloudwatchLogsExports": { "LogTypesToEnable": [ "audit" ] } }, "PubliclyAccessible": false, "PreferredBackupWindow": "00:00-00:30", "PromotionTier": 1, "EngineVersion": "3.6.0", "BackupRetentionPeriod": 3, "DBInstanceIdentifier": "sample-cluster-instance-2", "PreferredMaintenanceWindow": "tue:10:28-tue:10:58", "StorageEncrypted": false, "Engine": "docdb", "DBClusterIdentifier": "sample-cluster", "DBSubnetGroup": { "Subnets": [ { "SubnetAvailabilityZone": { "Name": "us-west-2a" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-4e26d263" }, { "SubnetAvailabilityZone": { "Name": "us-west-2c" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-afc329f4" }, { "SubnetAvailabilityZone": { "Name": "us-west-2d" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-53ab3636" }, { "SubnetAvailabilityZone": { "Name": "us-west-2b" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-991cb8d0" } ], "DBSubnetGroupDescription": "default", "SubnetGroupStatus": "Complete", "VpcId": "vpc-91280df6", "DBSubnetGroupName": "default" }, "DBInstanceClass": "db.r4.xlarge", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ], "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster-instance-2", "DbiResourceId": "db-XEKJLEMGRV5ZKCARUVA4HO3ITE" } }
Untuk informasi selengkapnya, lihat Menambahkan Instans Amazon DocumentDB ke Cluster di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CreateDbInstance
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-db-subnet-group
.
- AWS CLI
-
Untuk membuat grup subnet Amazon DocumentDB
create-db-subnet-group
Contoh berikut membuat grup subnet Amazon DocumentDB bernama.sample-subnet-group
aws docdb create-db-subnet-group \ --db-subnet-group-description
"a sample subnet group"
\ --db-subnet-group-namesample-subnet-group
\ --subnet-ids"subnet-29ab1025"
"subnet-991cb8d0"
"subnet-53ab3636"
Output:
{ "DBSubnetGroup": { "SubnetGroupStatus": "Complete", "DBSubnetGroupName": "sample-subnet-group", "DBSubnetGroupDescription": "a sample subnet group", "VpcId": "vpc-91280df6", "DBSubnetGroupArn": "arn:aws:rds:us-west-2:123456789012:subgrp:sample-subnet-group", "Subnets": [ { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-53ab3636", "SubnetAvailabilityZone": { "Name": "us-west-2d" } }, { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-991cb8d0", "SubnetAvailabilityZone": { "Name": "us-west-2b" } }, { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-29ab1025", "SubnetAvailabilityZone": { "Name": "us-west-2c" } } ] } }
Untuk informasi selengkapnya, lihat Membuat Grup Subnet Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat CreateDbSubnetGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-db-cluster-parameter-group
.
- AWS CLI
-
Untuk menghapus grup parameter cluster Amazon DocumentDB
delete-db-cluster-parameter-group
Contoh berikut menghapus grup parameter Amazonsample-parameter-group
DocumentDB.aws docdb delete-db-cluster-parameter-group \ --db-cluster-parameter-group-name
sample-parameter-group
Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menghapus Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DeleteDbClusterParameterGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-db-cluster-snapshot
.
- AWS CLI
-
Untuk menghapus snapshot cluster Amazon DocumentDB
delete-db-cluster-snapshot
Contoh berikut menghapus snapshot cluster Amazonsample-cluster-snapshot
DocumentDB.aws docdb delete-db-cluster-snapshot \ --db-cluster-snapshot-identifier
sample-cluster-snapshot
Output:
{ "DBClusterSnapshot": { "DBClusterIdentifier": "sample-cluster", "AvailabilityZones": [ "us-west-2a", "us-west-2b", "us-west-2c", "us-west-2d" ], "DBClusterSnapshotIdentifier": "sample-cluster-snapshot", "VpcId": "vpc-91280df6", "DBClusterSnapshotArn": "arn:aws:rds:us-west-2:123456789012:cluster-snapshot:sample-cluster-snapshot", "EngineVersion": "3.6.0", "Engine": "docdb", "SnapshotCreateTime": "2019-03-18T18:27:14.794Z", "Status": "available", "MasterUsername": "master-user", "ClusterCreateTime": "2019-03-15T20:29:58.836Z", "PercentProgress": 100, "StorageEncrypted": false, "SnapshotType": "manual", "Port": 0 } }
Untuk informasi selengkapnya, lihat Menghapus Snapshot Cluster di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DeleteDbClusterSnapshot
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-db-cluster
.
- AWS CLI
-
Untuk menghapus cluster Amazon DocumentDB
delete-db-cluster
Contoh berikut menghapus cluster Amazon DocumentDB.sample-cluster
Tidak ada cadangan cluster yang dibuat sebelum menghapusnya. NOTE: Anda harus menghapus semua instance yang terkait dengan cluster sebelum Anda dapat menghapusnya.aws docdb delete-db-cluster \ --db-cluster-identifier
sample-cluster
\ --skip-final-snapshotOutput:
{ "DBCluster": { "DBClusterIdentifier": "sample-cluster", "DBSubnetGroup": "default", "EngineVersion": "3.6.0", "Engine": "docdb", "LatestRestorableTime": "2019-03-18T18:07:24.610Z", "PreferredMaintenanceWindow": "sun:20:30-sun:21:00", "StorageEncrypted": false, "EarliestRestorableTime": "2019-03-18T18:07:24.610Z", "Port": 27017, "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ], "MultiAZ": false, "MasterUsername": "master-user", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "Status": "available", "PreferredBackupWindow": "10:12-10:42", "ReaderEndpoint": "sample-cluster.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "AvailabilityZones": [ "us-west-2c", "us-west-2b", "us-west-2a" ], "Endpoint": "sample-cluster.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "DbClusterResourceId": "cluster-L3R4YRSBUYDP4GLMTJ2WF5GH5Q", "ClusterCreateTime": "2019-03-18T18:06:34.616Z", "AssociatedRoles": [], "DBClusterParameterGroup": "default.docdb3.6", "HostedZoneId": "ZNKXH85TT8WVW", "BackupRetentionPeriod": 1, "DBClusterMembers": [] } }
Untuk informasi selengkapnya, lihat Menghapus Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DeleteDbCluster
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-db-instance
.
- AWS CLI
-
Untuk menghapus instance Amazon DocumentDB
delete-db-instance
Contoh berikut menghapus instance Amazon DocumentDB.sample-cluster-instance-2
aws docdb delete-db-instance \ --db-instance-identifier
sample-cluster-instance-2
Output:
{ "DBInstance": { "DBSubnetGroup": { "Subnets": [ { "SubnetAvailabilityZone": { "Name": "us-west-2a" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-4e26d263" }, { "SubnetAvailabilityZone": { "Name": "us-west-2c" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-afc329f4" }, { "SubnetAvailabilityZone": { "Name": "us-west-2d" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-53ab3636" }, { "SubnetAvailabilityZone": { "Name": "us-west-2b" }, "SubnetStatus": "Active", "SubnetIdentifier": "subnet-991cb8d0" } ], "DBSubnetGroupName": "default", "DBSubnetGroupDescription": "default", "VpcId": "vpc-91280df6", "SubnetGroupStatus": "Complete" }, "PreferredBackupWindow": "00:00-00:30", "InstanceCreateTime": "2019-03-18T18:37:33.709Z", "DBInstanceClass": "db.r4.xlarge", "DbiResourceId": "db-XEKJLEMGRV5ZKCARUVA4HO3ITE", "BackupRetentionPeriod": 3, "Engine": "docdb", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ], "AutoMinorVersionUpgrade": true, "PromotionTier": 1, "EngineVersion": "3.6.0", "Endpoint": { "Address": "sample-cluster-instance-2.corcjozrlsfc.us-west-2.docdb.amazonaws.com", "HostedZoneId": "ZNKXH85TT8WVW", "Port": 27017 }, "DBInstanceIdentifier": "sample-cluster-instance-2", "PreferredMaintenanceWindow": "tue:10:28-tue:10:58", "EnabledCloudwatchLogsExports": [ "audit" ], "PendingModifiedValues": {}, "DBInstanceStatus": "deleting", "PubliclyAccessible": false, "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster-instance-2", "DBClusterIdentifier": "sample-cluster", "AvailabilityZone": "us-west-2c", "StorageEncrypted": false } }
Untuk informasi selengkapnya, lihat Menghapus Instans Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DeleteDbInstance
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-db-subnet-group
.
- AWS CLI
-
Untuk menghapus grup subnet Amazon DocumentDB
delete-db-subnet-group
Contoh berikut menghapus grup subnet Amazonsample-subnet-group
DocumentDB.aws docdb delete-db-subnet-group \ --db-subnet-group-name
sample-subnet-group
Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menghapus Grup Subnet Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DeleteDbSubnetGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-cluster-parameter-groups
.
- AWS CLI
-
Untuk melihat detail satu atau beberapa grup parameter cluster Amazon DocumentDB
describe-db-cluster-parameter-groups
Contoh berikut menampilkan detail untuk grup parameter cluster Amazon DocumentDB.custom3-6-param-grp
aws docdb describe-db-cluster-parameter-groups \ --db-cluster-parameter-group-name
custom3-6-param-grp
Output:
{ "DBClusterParameterGroups": [ { "DBParameterGroupFamily": "docdb3.6", "DBClusterParameterGroupArn": "arn:aws:rds:us-east-1:123456789012:cluster-pg:custom3-6-param-grp", "Description": "Custom docdb3.6 parameter group", "DBClusterParameterGroupName": "custom3-6-param-grp" } ] }
Untuk informasi selengkapnya, lihat Melihat Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbClusterParameterGroups
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-cluster-parameters
.
- AWS CLI
-
Untuk melihat daftar parameter terperinci untuk grup parameter cluster Amazon DocumentDB.
describe-db-cluster-parameters
Contoh berikut mencantumkan parameter untuk grup parameter Amazon DocumentDB custom3-6-param-grp.aws docdb describe-db-cluster-parameters \ --db-cluster-parameter-group-name
custom3-6-param-grp
Output:
{ "Parameters": [ { "DataType": "string", "ParameterName": "audit_logs", "IsModifiable": true, "ApplyMethod": "pending-reboot", "Source": "system", "ApplyType": "dynamic", "AllowedValues": "enabled,disabled", "Description": "Enables auditing on cluster.", "ParameterValue": "disabled" }, { "DataType": "string", "ParameterName": "tls", "IsModifiable": true, "ApplyMethod": "pending-reboot", "Source": "system", "ApplyType": "static", "AllowedValues": "disabled,enabled", "Description": "Config to enable/disable TLS", "ParameterValue": "enabled" }, { "DataType": "string", "ParameterName": "ttl_monitor", "IsModifiable": true, "ApplyMethod": "pending-reboot", "Source": "user", "ApplyType": "dynamic", "AllowedValues": "disabled,enabled", "Description": "Enables TTL Monitoring", "ParameterValue": "enabled" } ] }
Untuk informasi selengkapnya, lihat Melihat Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbClusterParameters
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-cluster-snapshot-attributes
.
- AWS CLI
-
Untuk mencantumkan nama dan nilai atribut snapshot Amazon DocumentDB
describe-db-cluster-snapshot-attributes
Contoh berikut mencantumkan nama atribut dan nilai untuk snapshot Amazonsample-cluster-snapshot
DocumentDB.aws docdb describe-db-cluster-snapshot-attributes \ --db-cluster-snapshot-identifier
sample-cluster-snapshot
Output:
{ "DBClusterSnapshotAttributesResult": { "DBClusterSnapshotAttributes": [ { "AttributeName": "restore", "AttributeValues": [] } ], "DBClusterSnapshotIdentifier": "sample-cluster-snapshot" } }
Untuk informasi selengkapnya, lihat D escribeDBCluster SnapshotAttributes di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbClusterSnapshotAttributes
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-cluster-snapshots
.
- AWS CLI
-
Untuk menggambarkan snapshot Amazon DocumentDB
describe-db-cluster-snapshots
Contoh berikut menampilkan detail untuk snapshot Amazon DocumentDB.sample-cluster-snapshot
aws docdb describe-db-cluster-snapshots \ --db-cluster-snapshot-identifier
sample-cluster-snapshot
Output:
{ "DBClusterSnapshots": [ { "AvailabilityZones": [ "us-west-2a", "us-west-2b", "us-west-2c", "us-west-2d" ], "Status": "available", "DBClusterSnapshotArn": "arn:aws:rds:us-west-2:123456789012:cluster-snapshot:sample-cluster-snapshot", "SnapshotCreateTime": "2019-03-15T20:41:26.515Z", "SnapshotType": "manual", "DBClusterSnapshotIdentifier": "sample-cluster-snapshot", "DBClusterIdentifier": "sample-cluster", "MasterUsername": "master-user", "StorageEncrypted": false, "VpcId": "vpc-91280df6", "EngineVersion": "3.6.0", "PercentProgress": 100, "Port": 0, "Engine": "docdb", "ClusterCreateTime": "2019-03-15T20:29:58.836Z" } ] }
Untuk informasi selengkapnya, lihat D escribeDBCluster Snapshots di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbClusterSnapshots
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-clusters
.
- AWS CLI
-
Untuk mendapatkan informasi rinci tentang satu atau beberapa cluster Amazon DocumentDB.
describe-db-clusters
Contoh berikut menampilkan detail untuk cluster Amazon DocumentDB.sample-cluster
Dengan menghilangkan--db-cluster-identifier
parameter Anda bisa mendapatkan informasi hingga 100 cluster.aws docdb describe-db-clusters --db-cluster-identifier
sample-cluster
Output:
{ "DBClusters": [ { "DBClusterParameterGroup": "default.docdb3.6", "Endpoint": "sample-cluster.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "PreferredBackupWindow": "00:00-00:30", "DBClusterIdentifier": "sample-cluster", "ClusterCreateTime": "2019-03-15T20:29:58.836Z", "LatestRestorableTime": "2019-03-18T20:28:03.239Z", "MasterUsername": "master-user", "DBClusterMembers": [ { "PromotionTier": 1, "DBClusterParameterGroupStatus": "in-sync", "IsClusterWriter": false, "DBInstanceIdentifier": "sample-cluster" }, { "PromotionTier": 1, "DBClusterParameterGroupStatus": "in-sync", "IsClusterWriter": true, "DBInstanceIdentifier": "sample-cluster2" } ], "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "Engine": "docdb", "ReaderEndpoint": "sample-cluster.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "DBSubnetGroup": "default", "MultiAZ": true, "AvailabilityZones": [ "us-west-2a", "us-west-2c", "us-west-2b" ], "EarliestRestorableTime": "2019-03-15T20:30:47.020Z", "DbClusterResourceId": "cluster-UP4EF2PVDDFVHHDJQTYDAIGHLE", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "BackupRetentionPeriod": 3, "HostedZoneId": "ZNKXH85TT8WVW", "StorageEncrypted": false, "EnabledCloudwatchLogsExports": [ "audit" ], "AssociatedRoles": [], "EngineVersion": "3.6.0", "Port": 27017, "Status": "available" } ] }
Untuk informasi selengkapnya, lihat Menjelaskan Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbClusters
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-engine-versions
.
- AWS CLI
-
Untuk daftar versi mesin Amazon DocumentDB yang tersedia
describe-db-engine-versions
Contoh berikut mencantumkan semua versi mesin Amazon DocumentDB yang tersedia.aws
docdb
describe-db-engine-versions \ --engine docdbOutput:
{ "DBEngineVersions": [ { "DBEngineVersionDescription": "DocDB version 1.0.200837", "DBParameterGroupFamily": "docdb3.6", "EngineVersion": "3.6.0", "ValidUpgradeTarget": [], "DBEngineDescription": "Amazon DocumentDB (with MongoDB compatibility)", "SupportsLogExportsToCloudwatchLogs": true, "Engine": "docdb", "ExportableLogTypes": [ "audit" ] } ] }
Untuk informasi selengkapnya, lihat escribeDBEngineVersi D di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbEngineVersions
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-instances
.
- AWS CLI
-
Untuk menemukan informasi tentang instans Amazon DocumentDB yang disediakan
describe-db-instances
Contoh berikut menampilkan detail tentang instance Amazon DocumentDB.sample-cluster-instance
Dengan menghilangkan--db-instance-identifier
parameter, Anda mendapatkan informasi hingga 100 instance.aws docdb describe-db-instances \ --db-instance-identifier
sample-cluster-instance
Output:
{ "DBInstances": [ { "Endpoint": { "HostedZoneId": "ZNKXH85TT8WVW", "Address": "sample-cluster-instance.corcjozrlsfc.us-west-2.docdb.amazonaws.com", "Port": 27017 }, "PreferredBackupWindow": "00:00-00:30", "DBInstanceStatus": "available", "DBInstanceClass": "db.r4.large", "EnabledCloudwatchLogsExports": [ "audit" ], "DBInstanceIdentifier": "sample-cluster-instance", "DBSubnetGroup": { "Subnets": [ { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-4e26d263", "SubnetAvailabilityZone": { "Name": "us-west-2a" } }, { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-afc329f4", "SubnetAvailabilityZone": { "Name": "us-west-2c" } }, { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-53ab3636", "SubnetAvailabilityZone": { "Name": "us-west-2d" } }, { "SubnetStatus": "Active", "SubnetIdentifier": "subnet-991cb8d0", "SubnetAvailabilityZone": { "Name": "us-west-2b" } } ], "DBSubnetGroupName": "default", "SubnetGroupStatus": "Complete", "DBSubnetGroupDescription": "default", "VpcId": "vpc-91280df6" }, "InstanceCreateTime": "2019-03-15T20:36:06.338Z", "Engine": "docdb", "StorageEncrypted": false, "AutoMinorVersionUpgrade": true, "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster-instance", "PreferredMaintenanceWindow": "tue:08:39-tue:09:09", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ], "DBClusterIdentifier": "sample-cluster", "PendingModifiedValues": {}, "BackupRetentionPeriod": 3, "PubliclyAccessible": false, "EngineVersion": "3.6.0", "PromotionTier": 1, "AvailabilityZone": "us-west-2c", "DbiResourceId": "db-A2GIKUV6KPOHITGGKI2NHVISZA" } ] }
Untuk informasi selengkapnya, lihat Menjelaskan Instans Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbInstances
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-db-subnet-groups
.
- AWS CLI
-
Untuk mengambil daftar deskripsi subnet Amazon DocumentDB
describe-db-subnet-groups
Contoh berikut menjelaskan rincian untuk subnet Amazon DocumentDB bernama.default
aws docdb describe-db-subnet-groups \ --db-subnet-group-name
default
Output:
{ "DBSubnetGroups": [ { "VpcId": "vpc-91280df6", "DBSubnetGroupArn": "arn:aws:rds:us-west-2:123456789012:subgrp:default", "Subnets": [ { "SubnetIdentifier": "subnet-4e26d263", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2a" } }, { "SubnetIdentifier": "subnet-afc329f4", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2c" } }, { "SubnetIdentifier": "subnet-53ab3636", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2d" } }, { "SubnetIdentifier": "subnet-991cb8d0", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2b" } } ], "DBSubnetGroupName": "default", "SubnetGroupStatus": "Complete", "DBSubnetGroupDescription": "default" } ] }
Untuk informasi selengkapnya, lihat Menjelaskan Grup Subnet di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeDbSubnetGroups
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-engine-default-cluster-parameters
.
- AWS CLI
-
Untuk menjelaskan informasi parameter mesin dan sistem default untuk Amazon DocumentDB
describe-engine-default-cluster-parameters
Contoh berikut menampilkan detail untuk informasi parameter engine dan sistem default untuk grup parameter Amazon DocumentDB.docdb3.6
aws docdb describe-engine-default-cluster-parameters \ --db-parameter-group-family
docdb3.6
Output:
{ "EngineDefaults": { "DBParameterGroupFamily": "docdb3.6", "Parameters": [ { "ApplyType": "dynamic", "ParameterValue": "disabled", "Description": "Enables auditing on cluster.", "Source": "system", "DataType": "string", "MinimumEngineVersion": "3.6.0", "AllowedValues": "enabled,disabled", "ParameterName": "audit_logs", "IsModifiable": true }, { "ApplyType": "static", "ParameterValue": "enabled", "Description": "Config to enable/disable TLS", "Source": "system", "DataType": "string", "MinimumEngineVersion": "3.6.0", "AllowedValues": "disabled,enabled", "ParameterName": "tls", "IsModifiable": true }, { "ApplyType": "dynamic", "ParameterValue": "enabled", "Description": "Enables TTL Monitoring", "Source": "system", "DataType": "string", "MinimumEngineVersion": "3.6.0", "AllowedValues": "disabled,enabled", "ParameterName": "ttl_monitor", "IsModifiable": true } ] } }
Untuk informasi selengkapnya, lihat DescribeEngineDefaultClusterParametersdi Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeEngineDefaultClusterParameters
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-event-categories
.
- AWS CLI
-
Untuk menggambarkan semua kategori acara Amazon DocumentDB
describe-event-categories
Contoh berikut mencantumkan semua kategori untuk jenis sumber peristiwa Amazon DocumentDB.db-instance
aws docdb describe-event-categories \ --source-type
db-cluster
Output:
{ "EventCategoriesMapList": [ { "SourceType": "db-cluster", "EventCategories": [ "failover", "maintenance", "notification", "failure" ] } ] }
Untuk informasi selengkapnya, lihat Melihat Kategori Acara di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeEventCategories
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-events
.
- AWS CLI
-
Untuk membuat daftar acara Amazon DocumentDB
describe-events
Contoh berikut mencantumkan semua acara Amazon DocumentDB selama 24 jam terakhir (1440 menit).aws docdb describe-events \ --duration
1440
Perintah ini tidak menghasilkan output. Output:
{ "Events": [ { "EventCategories": [ "failover" ], "Message": "Started cross AZ failover to DB instance: sample-cluster", "Date": "2019-03-18T21:36:29.807Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "SourceIdentifier": "sample-cluster", "SourceType": "db-cluster" }, { "EventCategories": [ "availability" ], "Message": "DB instance restarted", "Date": "2019-03-18T21:36:40.793Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster", "SourceIdentifier": "sample-cluster", "SourceType": "db-instance" }, { "EventCategories": [], "Message": "A new writer was promoted. Restarting database as a reader.", "Date": "2019-03-18T21:36:43.873Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "availability" ], "Message": "DB instance restarted", "Date": "2019-03-18T21:36:51.257Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "failover" ], "Message": "Completed failover to DB instance: sample-cluster", "Date": "2019-03-18T21:36:53.462Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "SourceIdentifier": "sample-cluster", "SourceType": "db-cluster" }, { "Date": "2019-03-19T16:51:48.847Z", "EventCategories": [ "configuration change" ], "Message": "Updated parameter audit_logs to enabled with apply method pending-reboot", "SourceIdentifier": "custom3-6-param-grp", "SourceType": "db-parameter-group" }, { "EventCategories": [ "configuration change" ], "Message": "Applying modification to database instance class", "Date": "2019-03-19T17:55:20.095Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "availability" ], "Message": "DB instance shutdown", "Date": "2019-03-19T17:56:31.127Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "configuration change" ], "Message": "Finished applying modification to DB instance class", "Date": "2019-03-19T18:00:45.822Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "availability" ], "Message": "DB instance restarted", "Date": "2019-03-19T18:00:53.397Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "availability" ], "Message": "DB instance shutdown", "Date": "2019-03-19T18:23:36.045Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "EventCategories": [ "availability" ], "Message": "DB instance restarted", "Date": "2019-03-19T18:23:46.209Z", "SourceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "SourceIdentifier": "sample-cluster2", "SourceType": "db-instance" }, { "Date": "2019-03-19T18:39:05.822Z", "EventCategories": [ "configuration change" ], "Message": "Updated parameter ttl_monitor to enabled with apply method immediate", "SourceIdentifier": "custom3-6-param-grp", "SourceType": "db-parameter-group" }, { "Date": "2019-03-19T18:39:48.067Z", "EventCategories": [ "configuration change" ], "Message": "Updated parameter audit_logs to disabled with apply method immediate", "SourceIdentifier": "custom3-6-param-grp", "SourceType": "db-parameter-group" } ] }
Untuk informasi selengkapnya, lihat Melihat Acara Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeEvents
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-orderable-db-instance-options
.
- AWS CLI
-
Untuk menemukan opsi instans Amazon DocumentDB, Anda dapat memesan
describe-orderable-db-instance-options
Contoh berikut mencantumkan semua opsi instance untuk Amazon DocumentDB untuk suatu wilayah.aws
docdb
describe-orderable-db-instance-options \ --engine docdb \ --regionus-east-1
Output:
{ "OrderableDBInstanceOptions": [ { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.16xlarge", "LicenseModel": "na", "Engine": "docdb" }, { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.2xlarge", "LicenseModel": "na", "Engine": "docdb" }, { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.4xlarge", "LicenseModel": "na", "Engine": "docdb" }, { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.8xlarge", "LicenseModel": "na", "Engine": "docdb" }, { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.large", "LicenseModel": "na", "Engine": "docdb" }, { "Vpc": true, "AvailabilityZones": [ { "Name": "us-east-1a" }, { "Name": "us-east-1b" }, { "Name": "us-east-1c" }, { "Name": "us-east-1d" } ], "EngineVersion": "3.6.0", "DBInstanceClass": "db.r4.xlarge", "LicenseModel": "na", "Engine": "docdb" } ] }
Untuk informasi selengkapnya, lihat Menambahkan Instans Amazon DocumentDB ke Cluster di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribeOrderableDbInstanceOptions
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandescribe-pending-maintenance-actions
.
- AWS CLI
-
Untuk membuat daftar tindakan pemeliharaan Amazon DocumentDB Anda yang tertunda
describe-pending-maintenance-actions
Contoh berikut mencantumkan semua tindakan pemeliharaan Amazon DocumentDB Anda yang tertunda.aws docdb describe-pending-maintenance-actions
Output:
{ "PendingMaintenanceActions": [] }
Untuk informasi selengkapnya, lihat Memelihara Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat DescribePendingMaintenanceActions
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanfailover-db-cluster
.
- AWS CLI
-
Untuk memaksa cluster Amazon DocumentDB melakukan failover ke replika
failover-db-cluster
Contoh berikut menyebabkan instance utama di cluster sampel klaster Amazon DocumentDB mengalami failover ke replika.aws docdb failover-db-cluster \ --db-cluster-identifier
sample-cluster
Output:
{ "DBCluster": { "AssociatedRoles": [], "DBClusterIdentifier": "sample-cluster", "EngineVersion": "3.6.0", "DBSubnetGroup": "default", "MasterUsername": "master-user", "EarliestRestorableTime": "2019-03-15T20:30:47.020Z", "Endpoint": "sample-cluster.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "AvailabilityZones": [ "us-west-2a", "us-west-2c", "us-west-2b" ], "LatestRestorableTime": "2019-03-18T21:35:23.548Z", "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "PreferredBackupWindow": "00:00-00:30", "Port": 27017, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "StorageEncrypted": false, "ClusterCreateTime": "2019-03-15T20:29:58.836Z", "MultiAZ": true, "Status": "available", "DBClusterMembers": [ { "DBClusterParameterGroupStatus": "in-sync", "IsClusterWriter": false, "DBInstanceIdentifier": "sample-cluster", "PromotionTier": 1 }, { "DBClusterParameterGroupStatus": "in-sync", "IsClusterWriter": true, "DBInstanceIdentifier": "sample-cluster2", "PromotionTier": 2 } ], "EnabledCloudwatchLogsExports": [ "audit" ], "DBClusterParameterGroup": "default.docdb3.6", "HostedZoneId": "ZNKXH85TT8WVW", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "BackupRetentionPeriod": 3, "DbClusterResourceId": "cluster-UP4EF2PVDDFVHHDJQTYDAIGHLE", "ReaderEndpoint": "sample-cluster.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "Engine": "docdb" } }
Untuk informasi selengkapnya, lihat Amazon DocumentDB Failover di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat FailoverDbCluster
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-tags-for-resource
.
- AWS CLI
-
Untuk mencantumkan semua tag pada sumber daya Amazon DocumentDB
list-tags-for-resource
Contoh berikut mencantumkan semua tag di cluster Amazonsample-cluster
DocumentDB.aws docdb list-tags-for-resource \ --resource-name
arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster
Output:
{ "TagList": [ { "Key": "A", "Value": "ALPHA" }, { "Key": "B", "Value": "" }, { "Key": "C", "Value": "CHARLIE" } ] }
Untuk informasi selengkapnya, lihat Daftar Tag di Sumber Daya Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ListTagsForResource
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanmodify-db-cluster-parameter-group
.
- AWS CLI
-
Untuk memodifikasi grup parameter cluster Amazon DocumentDB DB
modify-db-cluster-parameter-group
Contoh berikut memodifikasi grupcustom3-6-param-grp
parameter cluster Amazon DocumentDB dengan mengaturaudit_logs
duattl_monitor
parameter dan diaktifkan. Perubahan diterapkan pada reboot berikutnya.aws docdb modify-db-cluster-parameter-group \ --db-cluster-parameter-group-name
custom3-6-param-grp
\ --parametersParameterName=audit_logs,ParameterValue=enabled,ApplyMethod=pending-reboot
\ParameterName=ttl_monitor,ParameterValue=enabled,ApplyMethod=pending-reboot
Output:
{ "DBClusterParameterGroupName": "custom3-6-param-grp" }
Untuk informasi selengkapnya, lihat Memodifikasi Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ModifyDbClusterParameterGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanmodify-db-cluster-snapshot-attribute
.
- AWS CLI
-
Contoh 1: Untuk menambahkan atribut ke snapshot Amazon DocumentDB
modify-db-cluster-snapshot-attribute
Contoh berikut menambahkan empat nilai atribut ke snapshot cluster Amazon DocumentDB.aws docdb modify-db-cluster-snapshot-attribute \ --db-cluster-snapshot-identifier
sample-cluster-snapshot
\ --attribute-namerestore
\ --values-to-add123456789011
123456789012
123456789013
Output:
{ "DBClusterSnapshotAttributesResult": { "DBClusterSnapshotAttributes": [ { "AttributeName": "restore", "AttributeValues": [ "123456789011", "123456789012", "123456789013" ] } ], "DBClusterSnapshotIdentifier": "sample-cluster-snapshot" } }
Contoh 2: Untuk menghapus atribut dari snapshot Amazon DocumentDB
modify-db-cluster-snapshot-attribute
Contoh berikut menghapus dua nilai atribut dari snapshot cluster Amazon DocumentDB.aws docdb modify-db-cluster-snapshot-attribute \ --db-cluster-snapshot-identifier
sample-cluster-snapshot
\ --attribute-namerestore
\ --values-to-remove123456789012
Output:
{ "DBClusterSnapshotAttributesResult": { "DBClusterSnapshotAttributes": [ { "AttributeName": "restore", "AttributeValues": [ "123456789011", "123456789013" ] } ], "DBClusterSnapshotIdentifier": "sample-cluster-snapshot" } }
Untuk informasi selengkapnya, lihat M odifyDBCluster SnapshotAttribute di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ModifyDbClusterSnapshotAttribute
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanmodify-db-cluster
.
- AWS CLI
-
Untuk memodifikasi cluster Amazon DocumentDB
modify-db-cluster
Contoh berikut memodifikasi klaster Amazonsample-cluster
DocumentDB dengan membuat periode retensi untuk pencadangan otomatis 7 hari, dan mengubah jendela pilihan untuk pencadangan dan pemeliharaan. Semua perubahan diterapkan di jendela pemeliharaan berikutnya.aws docdb modify-db-cluster \ --db-cluster-identifier
sample-cluster
\ --no-apply-immediately \ --backup-retention-period7
\ --preferred-backup-window18:00-18:30
\ --preferred-maintenance-windowsun:20:00-sun:20:30
Output:
{ "DBCluster": { "Endpoint": "sample-cluster.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "DBClusterMembers": [ { "DBClusterParameterGroupStatus": "in-sync", "DBInstanceIdentifier": "sample-cluster", "IsClusterWriter": true, "PromotionTier": 1 }, { "DBClusterParameterGroupStatus": "in-sync", "DBInstanceIdentifier": "sample-cluster2", "IsClusterWriter": false, "PromotionTier": 2 } ], "HostedZoneId": "ZNKXH85TT8WVW", "StorageEncrypted": false, "PreferredBackupWindow": "18:00-18:30", "MultiAZ": true, "EngineVersion": "3.6.0", "MasterUsername": "master-user", "ReaderEndpoint": "sample-cluster.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "DBSubnetGroup": "default", "LatestRestorableTime": "2019-03-18T22:08:13.408Z", "EarliestRestorableTime": "2019-03-15T20:30:47.020Z", "PreferredMaintenanceWindow": "sun:20:00-sun:20:30", "AssociatedRoles": [], "EnabledCloudwatchLogsExports": [ "audit" ], "Engine": "docdb", "DBClusterParameterGroup": "default.docdb3.6", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster", "BackupRetentionPeriod": 7, "DBClusterIdentifier": "sample-cluster", "AvailabilityZones": [ "us-west-2a", "us-west-2c", "us-west-2b" ], "Status": "available", "DbClusterResourceId": "cluster-UP4EF2PVDDFVHHDJQTYDAIGHLE", "ClusterCreateTime": "2019-03-15T20:29:58.836Z", "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "Port": 27017 } }
Untuk informasi selengkapnya, lihat Memodifikasi Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ModifyDbCluster
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanmodify-db-instance
.
- AWS CLI
-
Untuk memodifikasi instance Amazon DocumentDB
modify-db-instance
Contoh berikut memodifikasi instance Amazonsample-cluster2
DocumentDB dengan mengubahdb.r4.4xlarge
kelas instansnya menjadi dan tingkat promosinya menjadi.5
Perubahan diterapkan segera tetapi hanya dapat dilihat setelah status instance tersedia.aws docdb modify-db-instance \ --db-instance-identifier
sample-cluster2
\ --apply-immediately \ --db-instance-classdb.r4.4xlarge
\ --promotion-tier5
Output:
{ "DBInstance": { "EngineVersion": "3.6.0", "StorageEncrypted": false, "DBInstanceClass": "db.r4.large", "PreferredMaintenanceWindow": "mon:08:39-mon:09:09", "AutoMinorVersionUpgrade": true, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "PreferredBackupWindow": "18:00-18:30", "EnabledCloudwatchLogsExports": [ "audit" ], "AvailabilityZone": "us-west-2f", "DBInstanceIdentifier": "sample-cluster2", "InstanceCreateTime": "2019-03-15T20:36:06.338Z", "Engine": "docdb", "BackupRetentionPeriod": 7, "DBSubnetGroup": { "DBSubnetGroupName": "default", "DBSubnetGroupDescription": "default", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-4e26d263", "SubnetAvailabilityZone": { "Name": "us-west-2a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-afc329f4", "SubnetAvailabilityZone": { "Name": "us-west-2c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-53ab3636", "SubnetAvailabilityZone": { "Name": "us-west-2d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-991cb8d0", "SubnetAvailabilityZone": { "Name": "us-west-2b" }, "SubnetStatus": "Active" } ], "VpcId": "vpc-91280df6" }, "PromotionTier": 2, "Endpoint": { "Address": "sample-cluster2.corcjozrlsfc.us-west-2.docdb.amazonaws.com", "HostedZoneId": "ZNKXH85TT8WVW", "Port": 27017 }, "DbiResourceId": "db-A2GIKUV6KPOHITGGKI2NHVISZA", "DBClusterIdentifier": "sample-cluster", "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "PendingModifiedValues": { "DBInstanceClass": "db.r4.4xlarge" }, "PubliclyAccessible": false, "DBInstanceStatus": "available" } }
Untuk informasi selengkapnya, lihat Memodifikasi Instans Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ModifyDbInstance
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanmodify-db-subnet-group
.
- AWS CLI
-
Untuk memodifikasi grup subnet Amazon DocumentDB
modify-db-subnet-group
Contoh berikut memodifikasi grup subnetsample-subnet-group
dengan menambahkan subnet yang ditentukan dan deskripsi baru.aws docdb modify-db-subnet-group \ --db-subnet-group-name
sample-subnet-group
\ --subnet-idssubnet-b3806e8f
subnet-53ab3636
subnet-991cb8d0
\ --db-subnet-group-description"New subnet description"
Output:
{ "DBSubnetGroup": { "DBSubnetGroupName": "sample-subnet-group", "SubnetGroupStatus": "Complete", "DBSubnetGroupArn": "arn:aws:rds:us-west-2:123456789012:subgrp:sample-subnet-group", "VpcId": "vpc-91280df6", "DBSubnetGroupDescription": "New subnet description", "Subnets": [ { "SubnetIdentifier": "subnet-b3806e8f", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2a" } }, { "SubnetIdentifier": "subnet-53ab3636", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2c" } }, { "SubnetIdentifier": "subnet-991cb8d0", "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2b" } } ] } }
Untuk informasi selengkapnya, lihat Memodifikasi Grup Subnet Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ModifyDbSubnetGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanreboot-db-instance
.
- AWS CLI
-
Untuk me-reboot instans Amazon DocumentDB
reboot-db-instance
Contoh berikut me-reboot instance Amazon DocumentDB.sample-cluster2
aws docdb reboot-db-instance \ --db-instance-identifier
sample-cluster2
Perintah ini tidak menghasilkan output. Output:
{ "DBInstance": { "PreferredBackupWindow": "18:00-18:30", "DBInstanceIdentifier": "sample-cluster2", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ], "DBSubnetGroup": { "VpcId": "vpc-91280df6", "Subnets": [ { "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2a" }, "SubnetIdentifier": "subnet-4e26d263" }, { "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2c" }, "SubnetIdentifier": "subnet-afc329f4" }, { "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2d" }, "SubnetIdentifier": "subnet-53ab3636" }, { "SubnetStatus": "Active", "SubnetAvailabilityZone": { "Name": "us-west-2b" }, "SubnetIdentifier": "subnet-991cb8d0" } ], "SubnetGroupStatus": "Complete", "DBSubnetGroupName": "default", "DBSubnetGroupDescription": "default" }, "PendingModifiedValues": {}, "Endpoint": { "Address": "sample-cluster2.corcjozrlsfc.us-west-2.docdb.amazonaws.com", "HostedZoneId": "ZNKXH85TT8WVW", "Port": 27017 }, "EnabledCloudwatchLogsExports": [ "audit" ], "StorageEncrypted": false, "DbiResourceId": "db-A2GIKUV6KPOHITGGKI2NHVISZA", "AutoMinorVersionUpgrade": true, "Engine": "docdb", "InstanceCreateTime": "2019-03-15T20:36:06.338Z", "EngineVersion": "3.6.0", "PromotionTier": 5, "BackupRetentionPeriod": 7, "DBClusterIdentifier": "sample-cluster", "PreferredMaintenanceWindow": "mon:08:39-mon:09:09", "PubliclyAccessible": false, "DBInstanceClass": "db.r4.4xlarge", "AvailabilityZone": "us-west-2d", "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:sample-cluster2", "DBInstanceStatus": "rebooting" } }
Untuk informasi selengkapnya, lihat Mem-boot ulang Amazon DocumentDB ILnstance di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat RebootDbInstance
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanremove-tags-from-resource
.
- AWS CLI
-
Untuk menghapus tag dari sumber daya Amazon DocumentDB
remove-tags-from-resource
Contoh berikut menghapus tag dengan kunci bernamaB
dari cluster Amazonsample-cluster
DocumentDB.aws docdb remove-tags-from-resource \ --resource-name
arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster
\ --tag-keysB
Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Menghapus Tag dari Amazon D ocumentDBResource di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat RemoveTagsFromResource
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanreset-db-cluster-parameter-group
.
- AWS CLI
-
Untuk mengatur ulang nilai parameter yang ditentukan ke defaultnya di grup parameter Amazon DocumentDB
reset-db-cluster-parameter-group
Contoh berikut me-reset parameterttl_monitor
dalam grupcustom3-6-param-grp
parameter Amazon DocumentDB ke nilai defaultnya.aws docdb reset-db-cluster-parameter-group \ --db-cluster-parameter-group-name
custom3-6-param-grp
\ --parametersParameterName=ttl_monitor,ApplyMethod=immediate
Output:
{ "DBClusterParameterGroupName": "custom3-6-param-grp" }
Untuk informasi selengkapnya, lihat judul di Panduan Pengembang Amazon DocumentDB.
Untuk mengatur ulang nilai parameter yang ditentukan atau semua ke defaultnya di grup parameter Amazon DocumentDB
reset-db-cluster-parameter-group
Contoh berikut me-reset semua parameter dalam grupcustom3-6-param-grp
parameter Amazon DocumentDB ke nilai defaultnya.aws docdb reset-db-cluster-parameter-group \ --db-cluster-parameter-group-name
custom3-6-param-grp
\ --reset-all-parametersOutput:
{ "DBClusterParameterGroupName": "custom3-6-param-grp" }
Untuk informasi selengkapnya, lihat Menyetel ulang Grup Parameter Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat ResetDbClusterParameterGroup
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanrestore-db-cluster-from-snapshot
.
- AWS CLI
-
Untuk memulihkan cluster Amazon DocumentDB dari snapshot otomatis atau manual
restore-db-cluster-from-snapshot
Contoh berikut membuat cluster Amazon DocumentDB barusample-cluster-2019-03-16-00-01-restored
bernama dari snapshot.rds:sample-cluster-2019-03-16-00-01
aws docdb restore-db-cluster-from-snapshot \ --db-cluster-identifier
sample-cluster-2019-03-16-00-01-restored
\ --enginedocdb
\ --snapshot-identifierrds:sample-cluster-2019-03-16-00-01
Output:
{ "DBCluster": { "ClusterCreateTime": "2019-03-19T18:45:01.857Z", "HostedZoneId": "ZNKXH85TT8WVW", "Engine": "docdb", "DBClusterMembers": [], "MultiAZ": false, "AvailabilityZones": [ "us-west-2a", "us-west-2c", "us-west-2b" ], "StorageEncrypted": false, "ReaderEndpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "Endpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "Port": 27017, "PreferredBackupWindow": "00:00-00:30", "DBSubnetGroup": "default", "DBClusterIdentifier": "sample-cluster-2019-03-16-00-01-restored", "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster-2019-03-16-00-01-restored", "DBClusterParameterGroup": "default.docdb3.6", "DbClusterResourceId": "cluster-XOO46Q3RH4LWSYNH3NMZKXPISU", "MasterUsername": "master-user", "EngineVersion": "3.6.0", "BackupRetentionPeriod": 3, "AssociatedRoles": [], "Status": "creating", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ] } }
Untuk informasi selengkapnya, lihat Memulihkan dari Snapshot Cluster di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat RestoreDbClusterFromSnapshot
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanrestore-db-cluster-to-point-in-time
.
- AWS CLI
-
Untuk memulihkan cluster Amazon DocumentDB ke snapshot point-in-time manual
restore-db-cluster-to-point-in-time
Contoh berikut menggunakansample-cluster-snapshot
untuk membuat cluster Amazon DocumentDB barusample-cluster-pit
, menggunakan waktu restorable terbaru.aws docdb restore-db-cluster-to-point-in-time \ --db-cluster-identifier
sample-cluster-pit
\ --source-db-cluster-identifierarn:aws:rds:us-west-2:123456789012:cluster:sample-cluster
\ --use-latest-restorable-timeOutput:
{ "DBCluster": { "StorageEncrypted": false, "BackupRetentionPeriod": 3, "MasterUsername": "master-user", "HostedZoneId": "ZNKXH85TT8WVW", "PreferredBackupWindow": "00:00-00:30", "MultiAZ": false, "DBClusterIdentifier": "sample-cluster-pit", "DBSubnetGroup": "default", "ClusterCreateTime": "2019-04-03T15:55:21.320Z", "AssociatedRoles": [], "DBClusterParameterGroup": "default.docdb3.6", "DBClusterMembers": [], "Status": "creating", "AvailabilityZones": [ "us-west-2a", "us-west-2d", "us-west-2b" ], "ReaderEndpoint": "sample-cluster-pit.cluster-ro-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "Port": 27017, "Engine": "docdb", "EngineVersion": "3.6.0", "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-77186e0d", "Status": "active" } ], "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "Endpoint": "sample-cluster-pit.cluster-corcjozrlsfc.us-west-2.docdb.amazonaws.com", "DbClusterResourceId": "cluster-NLCABBXOSE2QPQ4GOLZIFWEPLM", "DBClusterArn": "arn:aws:rds:us-west-2:123456789012:cluster:sample-cluster-pit" } }
Untuk informasi selengkapnya, lihat Memulihkan Snapshot ke Titik Waktu di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat RestoreDbClusterToPointInTime
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstart-db-cluster
.
- AWS CLI
-
Untuk memulai cluster Amazon DocumentDB yang dihentikan
start-db-cluster
Contoh berikut memulai cluster Amazon DocumentDB yang ditentukan.aws docdb start-db-cluster \ --db-cluster-identifier
sample-cluster
Output:
{ "DBCluster": { "ClusterCreateTime": "2019-03-19T18:45:01.857Z", "HostedZoneId": "ZNKXH85TT8WVW", "Engine": "docdb", "DBClusterMembers": [], "MultiAZ": false, "AvailabilityZones": [ "us-east-1a", "us-east-1c", "us-east-1f" ], "StorageEncrypted": false, "ReaderEndpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-ro-corcjozrlsfc.us-east-1.docdb.amazonaws.com", "Endpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-corcjozrlsfc.us-east-1.docdb.amazonaws.com", "Port": 27017, "PreferredBackupWindow": "00:00-00:30", "DBSubnetGroup": "default", "DBClusterIdentifier": "sample-cluster-2019-03-16-00-01-restored", "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster-2019-03-16-00-01-restored", "DBClusterParameterGroup": "default.docdb3.6", "DbClusterResourceId": "cluster-XOO46Q3RH4LWSYNH3NMZKXPISU", "MasterUsername": "master-user", "EngineVersion": "3.6.0", "BackupRetentionPeriod": 3, "AssociatedRoles": [], "Status": "creating", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ] } }
Untuk informasi selengkapnya, lihat Menghentikan dan Memulai Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat StartDbCluster
di Referensi AWS CLI Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstop-db-cluster
.
- AWS CLI
-
Untuk menghentikan klaster Amazon DocumentDB yang sedang berjalan
stop-db-cluster
Contoh berikut menghentikan cluster Amazon DocumentDB yang ditentukan.aws docdb stop-db-cluster \ --db-cluster-identifier
sample-cluster
Output:
{ "DBCluster": { "ClusterCreateTime": "2019-03-19T18:45:01.857Z", "HostedZoneId": "ZNKXH85TT8WVW", "Engine": "docdb", "DBClusterMembers": [], "MultiAZ": false, "AvailabilityZones": [ "us-east-1a", "us-east-1c", "us-east-1f" ], "StorageEncrypted": false, "ReaderEndpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-ro-corcjozrlsfc.us-east-1.docdb.amazonaws.com", "Endpoint": "sample-cluster-2019-03-16-00-01-restored.cluster-corcjozrlsfc.us-east-1.docdb.amazonaws.com", "Port": 27017, "PreferredBackupWindow": "00:00-00:30", "DBSubnetGroup": "default", "DBClusterIdentifier": "sample-cluster-2019-03-16-00-01-restored", "PreferredMaintenanceWindow": "sat:04:30-sat:05:00", "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster-2019-03-16-00-01-restored", "DBClusterParameterGroup": "default.docdb3.6", "DbClusterResourceId": "cluster-XOO46Q3RH4LWSYNH3NMZKXPISU", "MasterUsername": "master-user", "EngineVersion": "3.6.0", "BackupRetentionPeriod": 3, "AssociatedRoles": [], "Status": "creating", "VpcSecurityGroups": [ { "Status": "active", "VpcSecurityGroupId": "sg-77186e0d" } ] } }
Untuk informasi selengkapnya, lihat Menghentikan dan Memulai Cluster Amazon DocumentDB di Panduan Pengembang Amazon DocumentDB.
-
Untuk API detailnya, lihat StopDbCluster
di Referensi AWS CLI Perintah.
-