docdb-api

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

README

docdb-api

Provides RESTful API access to the AWS DocumentDB service.

Endpoints

GET /v1/docdb/ping
GET /v1/docdb/version
GET /v1/docdb/metrics

GET /v1/docdb/{account}
GET /v1/docdb/{account}/{name}
POST /v1/docdb/{account}/{name}
DELETE /v1/docdb/{account}/{name}

Authentication

Authentication is accomplished via an encrypted pre-shared key passed via the X-Auth-Token header.

Usage

Lists all docdbs

GET

/v1/docdb/{account}

Get a single docdb

GET

/v1/docdb/{account}/{name}

Create docdb cluster and instances

POST

/v1/docdb/{account}/{name}

{
  "AvailabilityZones": ["us-east-1a","us-east-1d", "us-east-1b"],
  "DBClusterIdentifier": "exampleDB",
  "DBSubnetGroupName": "some-subnet-group",
  "DBInstanceClass": "db.t3.medium",
  "Engine": "docdb",
  "InstanceCount": "3",
  "MaintenanceWindow": "Sun:04:00-Sun:04:30",
  "MasterUsername": "foousername",
  "MasterUserPassword": "foobarbizbazboo",
  "Tags": [
    { "Key": "CreatedBy", "Value": "tom"},
    { "Key": "MoneyMattersMost", "Value": "IT"}
  ]
}

Response:

{
  "DBClusters": {
    "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:exampleDB",
    "DBClusterIdentifier": "exampleDB",
    "Endpoint": "exampleDB.cluster-somestring.us-east-1.docdb.amazonaws.com",
    "ReaderEndpoint": "exampleDB.cluster-ro-somestring.us-east-1.docdb.amazonaws.com",
    "StorageEncrypted": false,
    "DBSubnetGroup": "some-subnet-group",
    "DBInstances": [
      {
        "AvailabilityZone": "",
        "BackupRetentionPeriod": "",
        "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:exampleDB-1",
        "DBInstanceClass": "",
        "DBInstanceStatus": "",
        "DBInstanceIdentifier": "exampleDB-1",
        "DBSubnetGroup": "",
        "Endpoint": "",
        "Engine": "",
        "EngineVersion": "",
        "InstanceCreateTime": "0001-01-01T00:00:00Z",
        "KmsKeyId": "",
        "ReaderEndpoint": "",
        "StorageEncrypted": false
      },
      {
        "AvailabilityZone": "",
        "BackupRetentionPeriod": "",
        "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:exampleDB-2",
        "DBInstanceClass": "",
        "DBInstanceStatus": "",
        "DBInstanceIdentifier": "exampleDB-2",
        "DBSubnetGroup": "",
        "Endpoint": "",
        "Engine": "",
        "EngineVersion": "",
        "InstanceCreateTime": "0001-01-01T00:00:00Z",
        "KmsKeyId": "",
        "ReaderEndpoint": "",
        "StorageEncrypted": false
      },
      {
        "AvailabilityZone": "",
        "BackupRetentionPeriod": "",
        "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:exampleDB-3",
        "DBInstanceClass": "",
        "DBInstanceStatus": "",
        "DBInstanceIdentifier": "exampleDB-3",
        "DBSubnetGroup": "",
        "Endpoint": "",
        "Engine": "",
        "EngineVersion": "",
        "InstanceCreateTime": "0001-01-01T00:00:00Z",
        "KmsKeyId": "",
        "ReaderEndpoint": "",
        "StorageEncrypted": false
      }
    ]
  }
}

Delete docdb cluster and instances

DELETE

/v1/docdb/{account}/{name}

{
  "ClusterName": "exampleDB",
  "InstanceNames":
    [
        "exampleDB-1",
        "exampleDB-2",
        "exampleDB-3"
    ],
  "SkipFinalSnapshot": true
}

Author

Darryl Wisneski darryl.wisneski@yale.edu

License

GNU Affero General Public License v3.0 (GNU AGPLv3)
Copyright © 2021 Yale University

Documentation

Overview

Copyright © 2021 Yale University

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL