mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+11353
File diff suppressed because it is too large
Load Diff
+28
@@ -0,0 +1,28 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package docdb provides the client and types for making API
|
||||
// requests to Amazon DocumentDB with MongoDB compatibility.
|
||||
//
|
||||
// Amazon DocumentDB API documentation
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31 for more information on this service.
|
||||
//
|
||||
// See docdb package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact Amazon DocumentDB with MongoDB compatibility with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon DocumentDB with MongoDB compatibility client DocDB for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/#New
|
||||
package docdb
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package docdbiface provides an interface to enable mocking the Amazon DocumentDB with MongoDB compatibility service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package docdbiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/docdb"
|
||||
)
|
||||
|
||||
// DocDBAPI provides an interface to enable mocking the
|
||||
// docdb.DocDB service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon DocumentDB with MongoDB compatibility.
|
||||
// func myFunc(svc docdbiface.DocDBAPI) bool {
|
||||
// // Make svc.AddTagsToResource request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := docdb.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockDocDBClient struct {
|
||||
// docdbiface.DocDBAPI
|
||||
// }
|
||||
// func (m *mockDocDBClient) AddTagsToResource(input *docdb.AddTagsToResourceInput) (*docdb.AddTagsToResourceOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockDocDBClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type DocDBAPI interface {
|
||||
AddTagsToResource(*docdb.AddTagsToResourceInput) (*docdb.AddTagsToResourceOutput, error)
|
||||
AddTagsToResourceWithContext(aws.Context, *docdb.AddTagsToResourceInput, ...request.Option) (*docdb.AddTagsToResourceOutput, error)
|
||||
AddTagsToResourceRequest(*docdb.AddTagsToResourceInput) (*request.Request, *docdb.AddTagsToResourceOutput)
|
||||
|
||||
ApplyPendingMaintenanceAction(*docdb.ApplyPendingMaintenanceActionInput) (*docdb.ApplyPendingMaintenanceActionOutput, error)
|
||||
ApplyPendingMaintenanceActionWithContext(aws.Context, *docdb.ApplyPendingMaintenanceActionInput, ...request.Option) (*docdb.ApplyPendingMaintenanceActionOutput, error)
|
||||
ApplyPendingMaintenanceActionRequest(*docdb.ApplyPendingMaintenanceActionInput) (*request.Request, *docdb.ApplyPendingMaintenanceActionOutput)
|
||||
|
||||
CopyDBClusterParameterGroup(*docdb.CopyDBClusterParameterGroupInput) (*docdb.CopyDBClusterParameterGroupOutput, error)
|
||||
CopyDBClusterParameterGroupWithContext(aws.Context, *docdb.CopyDBClusterParameterGroupInput, ...request.Option) (*docdb.CopyDBClusterParameterGroupOutput, error)
|
||||
CopyDBClusterParameterGroupRequest(*docdb.CopyDBClusterParameterGroupInput) (*request.Request, *docdb.CopyDBClusterParameterGroupOutput)
|
||||
|
||||
CopyDBClusterSnapshot(*docdb.CopyDBClusterSnapshotInput) (*docdb.CopyDBClusterSnapshotOutput, error)
|
||||
CopyDBClusterSnapshotWithContext(aws.Context, *docdb.CopyDBClusterSnapshotInput, ...request.Option) (*docdb.CopyDBClusterSnapshotOutput, error)
|
||||
CopyDBClusterSnapshotRequest(*docdb.CopyDBClusterSnapshotInput) (*request.Request, *docdb.CopyDBClusterSnapshotOutput)
|
||||
|
||||
CreateDBCluster(*docdb.CreateDBClusterInput) (*docdb.CreateDBClusterOutput, error)
|
||||
CreateDBClusterWithContext(aws.Context, *docdb.CreateDBClusterInput, ...request.Option) (*docdb.CreateDBClusterOutput, error)
|
||||
CreateDBClusterRequest(*docdb.CreateDBClusterInput) (*request.Request, *docdb.CreateDBClusterOutput)
|
||||
|
||||
CreateDBClusterParameterGroup(*docdb.CreateDBClusterParameterGroupInput) (*docdb.CreateDBClusterParameterGroupOutput, error)
|
||||
CreateDBClusterParameterGroupWithContext(aws.Context, *docdb.CreateDBClusterParameterGroupInput, ...request.Option) (*docdb.CreateDBClusterParameterGroupOutput, error)
|
||||
CreateDBClusterParameterGroupRequest(*docdb.CreateDBClusterParameterGroupInput) (*request.Request, *docdb.CreateDBClusterParameterGroupOutput)
|
||||
|
||||
CreateDBClusterSnapshot(*docdb.CreateDBClusterSnapshotInput) (*docdb.CreateDBClusterSnapshotOutput, error)
|
||||
CreateDBClusterSnapshotWithContext(aws.Context, *docdb.CreateDBClusterSnapshotInput, ...request.Option) (*docdb.CreateDBClusterSnapshotOutput, error)
|
||||
CreateDBClusterSnapshotRequest(*docdb.CreateDBClusterSnapshotInput) (*request.Request, *docdb.CreateDBClusterSnapshotOutput)
|
||||
|
||||
CreateDBInstance(*docdb.CreateDBInstanceInput) (*docdb.CreateDBInstanceOutput, error)
|
||||
CreateDBInstanceWithContext(aws.Context, *docdb.CreateDBInstanceInput, ...request.Option) (*docdb.CreateDBInstanceOutput, error)
|
||||
CreateDBInstanceRequest(*docdb.CreateDBInstanceInput) (*request.Request, *docdb.CreateDBInstanceOutput)
|
||||
|
||||
CreateDBSubnetGroup(*docdb.CreateDBSubnetGroupInput) (*docdb.CreateDBSubnetGroupOutput, error)
|
||||
CreateDBSubnetGroupWithContext(aws.Context, *docdb.CreateDBSubnetGroupInput, ...request.Option) (*docdb.CreateDBSubnetGroupOutput, error)
|
||||
CreateDBSubnetGroupRequest(*docdb.CreateDBSubnetGroupInput) (*request.Request, *docdb.CreateDBSubnetGroupOutput)
|
||||
|
||||
DeleteDBCluster(*docdb.DeleteDBClusterInput) (*docdb.DeleteDBClusterOutput, error)
|
||||
DeleteDBClusterWithContext(aws.Context, *docdb.DeleteDBClusterInput, ...request.Option) (*docdb.DeleteDBClusterOutput, error)
|
||||
DeleteDBClusterRequest(*docdb.DeleteDBClusterInput) (*request.Request, *docdb.DeleteDBClusterOutput)
|
||||
|
||||
DeleteDBClusterParameterGroup(*docdb.DeleteDBClusterParameterGroupInput) (*docdb.DeleteDBClusterParameterGroupOutput, error)
|
||||
DeleteDBClusterParameterGroupWithContext(aws.Context, *docdb.DeleteDBClusterParameterGroupInput, ...request.Option) (*docdb.DeleteDBClusterParameterGroupOutput, error)
|
||||
DeleteDBClusterParameterGroupRequest(*docdb.DeleteDBClusterParameterGroupInput) (*request.Request, *docdb.DeleteDBClusterParameterGroupOutput)
|
||||
|
||||
DeleteDBClusterSnapshot(*docdb.DeleteDBClusterSnapshotInput) (*docdb.DeleteDBClusterSnapshotOutput, error)
|
||||
DeleteDBClusterSnapshotWithContext(aws.Context, *docdb.DeleteDBClusterSnapshotInput, ...request.Option) (*docdb.DeleteDBClusterSnapshotOutput, error)
|
||||
DeleteDBClusterSnapshotRequest(*docdb.DeleteDBClusterSnapshotInput) (*request.Request, *docdb.DeleteDBClusterSnapshotOutput)
|
||||
|
||||
DeleteDBInstance(*docdb.DeleteDBInstanceInput) (*docdb.DeleteDBInstanceOutput, error)
|
||||
DeleteDBInstanceWithContext(aws.Context, *docdb.DeleteDBInstanceInput, ...request.Option) (*docdb.DeleteDBInstanceOutput, error)
|
||||
DeleteDBInstanceRequest(*docdb.DeleteDBInstanceInput) (*request.Request, *docdb.DeleteDBInstanceOutput)
|
||||
|
||||
DeleteDBSubnetGroup(*docdb.DeleteDBSubnetGroupInput) (*docdb.DeleteDBSubnetGroupOutput, error)
|
||||
DeleteDBSubnetGroupWithContext(aws.Context, *docdb.DeleteDBSubnetGroupInput, ...request.Option) (*docdb.DeleteDBSubnetGroupOutput, error)
|
||||
DeleteDBSubnetGroupRequest(*docdb.DeleteDBSubnetGroupInput) (*request.Request, *docdb.DeleteDBSubnetGroupOutput)
|
||||
|
||||
DescribeDBClusterParameterGroups(*docdb.DescribeDBClusterParameterGroupsInput) (*docdb.DescribeDBClusterParameterGroupsOutput, error)
|
||||
DescribeDBClusterParameterGroupsWithContext(aws.Context, *docdb.DescribeDBClusterParameterGroupsInput, ...request.Option) (*docdb.DescribeDBClusterParameterGroupsOutput, error)
|
||||
DescribeDBClusterParameterGroupsRequest(*docdb.DescribeDBClusterParameterGroupsInput) (*request.Request, *docdb.DescribeDBClusterParameterGroupsOutput)
|
||||
|
||||
DescribeDBClusterParameters(*docdb.DescribeDBClusterParametersInput) (*docdb.DescribeDBClusterParametersOutput, error)
|
||||
DescribeDBClusterParametersWithContext(aws.Context, *docdb.DescribeDBClusterParametersInput, ...request.Option) (*docdb.DescribeDBClusterParametersOutput, error)
|
||||
DescribeDBClusterParametersRequest(*docdb.DescribeDBClusterParametersInput) (*request.Request, *docdb.DescribeDBClusterParametersOutput)
|
||||
|
||||
DescribeDBClusterSnapshotAttributes(*docdb.DescribeDBClusterSnapshotAttributesInput) (*docdb.DescribeDBClusterSnapshotAttributesOutput, error)
|
||||
DescribeDBClusterSnapshotAttributesWithContext(aws.Context, *docdb.DescribeDBClusterSnapshotAttributesInput, ...request.Option) (*docdb.DescribeDBClusterSnapshotAttributesOutput, error)
|
||||
DescribeDBClusterSnapshotAttributesRequest(*docdb.DescribeDBClusterSnapshotAttributesInput) (*request.Request, *docdb.DescribeDBClusterSnapshotAttributesOutput)
|
||||
|
||||
DescribeDBClusterSnapshots(*docdb.DescribeDBClusterSnapshotsInput) (*docdb.DescribeDBClusterSnapshotsOutput, error)
|
||||
DescribeDBClusterSnapshotsWithContext(aws.Context, *docdb.DescribeDBClusterSnapshotsInput, ...request.Option) (*docdb.DescribeDBClusterSnapshotsOutput, error)
|
||||
DescribeDBClusterSnapshotsRequest(*docdb.DescribeDBClusterSnapshotsInput) (*request.Request, *docdb.DescribeDBClusterSnapshotsOutput)
|
||||
|
||||
DescribeDBClusters(*docdb.DescribeDBClustersInput) (*docdb.DescribeDBClustersOutput, error)
|
||||
DescribeDBClustersWithContext(aws.Context, *docdb.DescribeDBClustersInput, ...request.Option) (*docdb.DescribeDBClustersOutput, error)
|
||||
DescribeDBClustersRequest(*docdb.DescribeDBClustersInput) (*request.Request, *docdb.DescribeDBClustersOutput)
|
||||
|
||||
DescribeDBClustersPages(*docdb.DescribeDBClustersInput, func(*docdb.DescribeDBClustersOutput, bool) bool) error
|
||||
DescribeDBClustersPagesWithContext(aws.Context, *docdb.DescribeDBClustersInput, func(*docdb.DescribeDBClustersOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeDBEngineVersions(*docdb.DescribeDBEngineVersionsInput) (*docdb.DescribeDBEngineVersionsOutput, error)
|
||||
DescribeDBEngineVersionsWithContext(aws.Context, *docdb.DescribeDBEngineVersionsInput, ...request.Option) (*docdb.DescribeDBEngineVersionsOutput, error)
|
||||
DescribeDBEngineVersionsRequest(*docdb.DescribeDBEngineVersionsInput) (*request.Request, *docdb.DescribeDBEngineVersionsOutput)
|
||||
|
||||
DescribeDBEngineVersionsPages(*docdb.DescribeDBEngineVersionsInput, func(*docdb.DescribeDBEngineVersionsOutput, bool) bool) error
|
||||
DescribeDBEngineVersionsPagesWithContext(aws.Context, *docdb.DescribeDBEngineVersionsInput, func(*docdb.DescribeDBEngineVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeDBInstances(*docdb.DescribeDBInstancesInput) (*docdb.DescribeDBInstancesOutput, error)
|
||||
DescribeDBInstancesWithContext(aws.Context, *docdb.DescribeDBInstancesInput, ...request.Option) (*docdb.DescribeDBInstancesOutput, error)
|
||||
DescribeDBInstancesRequest(*docdb.DescribeDBInstancesInput) (*request.Request, *docdb.DescribeDBInstancesOutput)
|
||||
|
||||
DescribeDBInstancesPages(*docdb.DescribeDBInstancesInput, func(*docdb.DescribeDBInstancesOutput, bool) bool) error
|
||||
DescribeDBInstancesPagesWithContext(aws.Context, *docdb.DescribeDBInstancesInput, func(*docdb.DescribeDBInstancesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeDBSubnetGroups(*docdb.DescribeDBSubnetGroupsInput) (*docdb.DescribeDBSubnetGroupsOutput, error)
|
||||
DescribeDBSubnetGroupsWithContext(aws.Context, *docdb.DescribeDBSubnetGroupsInput, ...request.Option) (*docdb.DescribeDBSubnetGroupsOutput, error)
|
||||
DescribeDBSubnetGroupsRequest(*docdb.DescribeDBSubnetGroupsInput) (*request.Request, *docdb.DescribeDBSubnetGroupsOutput)
|
||||
|
||||
DescribeDBSubnetGroupsPages(*docdb.DescribeDBSubnetGroupsInput, func(*docdb.DescribeDBSubnetGroupsOutput, bool) bool) error
|
||||
DescribeDBSubnetGroupsPagesWithContext(aws.Context, *docdb.DescribeDBSubnetGroupsInput, func(*docdb.DescribeDBSubnetGroupsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeEngineDefaultClusterParameters(*docdb.DescribeEngineDefaultClusterParametersInput) (*docdb.DescribeEngineDefaultClusterParametersOutput, error)
|
||||
DescribeEngineDefaultClusterParametersWithContext(aws.Context, *docdb.DescribeEngineDefaultClusterParametersInput, ...request.Option) (*docdb.DescribeEngineDefaultClusterParametersOutput, error)
|
||||
DescribeEngineDefaultClusterParametersRequest(*docdb.DescribeEngineDefaultClusterParametersInput) (*request.Request, *docdb.DescribeEngineDefaultClusterParametersOutput)
|
||||
|
||||
DescribeEventCategories(*docdb.DescribeEventCategoriesInput) (*docdb.DescribeEventCategoriesOutput, error)
|
||||
DescribeEventCategoriesWithContext(aws.Context, *docdb.DescribeEventCategoriesInput, ...request.Option) (*docdb.DescribeEventCategoriesOutput, error)
|
||||
DescribeEventCategoriesRequest(*docdb.DescribeEventCategoriesInput) (*request.Request, *docdb.DescribeEventCategoriesOutput)
|
||||
|
||||
DescribeEvents(*docdb.DescribeEventsInput) (*docdb.DescribeEventsOutput, error)
|
||||
DescribeEventsWithContext(aws.Context, *docdb.DescribeEventsInput, ...request.Option) (*docdb.DescribeEventsOutput, error)
|
||||
DescribeEventsRequest(*docdb.DescribeEventsInput) (*request.Request, *docdb.DescribeEventsOutput)
|
||||
|
||||
DescribeEventsPages(*docdb.DescribeEventsInput, func(*docdb.DescribeEventsOutput, bool) bool) error
|
||||
DescribeEventsPagesWithContext(aws.Context, *docdb.DescribeEventsInput, func(*docdb.DescribeEventsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeOrderableDBInstanceOptions(*docdb.DescribeOrderableDBInstanceOptionsInput) (*docdb.DescribeOrderableDBInstanceOptionsOutput, error)
|
||||
DescribeOrderableDBInstanceOptionsWithContext(aws.Context, *docdb.DescribeOrderableDBInstanceOptionsInput, ...request.Option) (*docdb.DescribeOrderableDBInstanceOptionsOutput, error)
|
||||
DescribeOrderableDBInstanceOptionsRequest(*docdb.DescribeOrderableDBInstanceOptionsInput) (*request.Request, *docdb.DescribeOrderableDBInstanceOptionsOutput)
|
||||
|
||||
DescribeOrderableDBInstanceOptionsPages(*docdb.DescribeOrderableDBInstanceOptionsInput, func(*docdb.DescribeOrderableDBInstanceOptionsOutput, bool) bool) error
|
||||
DescribeOrderableDBInstanceOptionsPagesWithContext(aws.Context, *docdb.DescribeOrderableDBInstanceOptionsInput, func(*docdb.DescribeOrderableDBInstanceOptionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribePendingMaintenanceActions(*docdb.DescribePendingMaintenanceActionsInput) (*docdb.DescribePendingMaintenanceActionsOutput, error)
|
||||
DescribePendingMaintenanceActionsWithContext(aws.Context, *docdb.DescribePendingMaintenanceActionsInput, ...request.Option) (*docdb.DescribePendingMaintenanceActionsOutput, error)
|
||||
DescribePendingMaintenanceActionsRequest(*docdb.DescribePendingMaintenanceActionsInput) (*request.Request, *docdb.DescribePendingMaintenanceActionsOutput)
|
||||
|
||||
FailoverDBCluster(*docdb.FailoverDBClusterInput) (*docdb.FailoverDBClusterOutput, error)
|
||||
FailoverDBClusterWithContext(aws.Context, *docdb.FailoverDBClusterInput, ...request.Option) (*docdb.FailoverDBClusterOutput, error)
|
||||
FailoverDBClusterRequest(*docdb.FailoverDBClusterInput) (*request.Request, *docdb.FailoverDBClusterOutput)
|
||||
|
||||
ListTagsForResource(*docdb.ListTagsForResourceInput) (*docdb.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *docdb.ListTagsForResourceInput, ...request.Option) (*docdb.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*docdb.ListTagsForResourceInput) (*request.Request, *docdb.ListTagsForResourceOutput)
|
||||
|
||||
ModifyDBCluster(*docdb.ModifyDBClusterInput) (*docdb.ModifyDBClusterOutput, error)
|
||||
ModifyDBClusterWithContext(aws.Context, *docdb.ModifyDBClusterInput, ...request.Option) (*docdb.ModifyDBClusterOutput, error)
|
||||
ModifyDBClusterRequest(*docdb.ModifyDBClusterInput) (*request.Request, *docdb.ModifyDBClusterOutput)
|
||||
|
||||
ModifyDBClusterParameterGroup(*docdb.ModifyDBClusterParameterGroupInput) (*docdb.ModifyDBClusterParameterGroupOutput, error)
|
||||
ModifyDBClusterParameterGroupWithContext(aws.Context, *docdb.ModifyDBClusterParameterGroupInput, ...request.Option) (*docdb.ModifyDBClusterParameterGroupOutput, error)
|
||||
ModifyDBClusterParameterGroupRequest(*docdb.ModifyDBClusterParameterGroupInput) (*request.Request, *docdb.ModifyDBClusterParameterGroupOutput)
|
||||
|
||||
ModifyDBClusterSnapshotAttribute(*docdb.ModifyDBClusterSnapshotAttributeInput) (*docdb.ModifyDBClusterSnapshotAttributeOutput, error)
|
||||
ModifyDBClusterSnapshotAttributeWithContext(aws.Context, *docdb.ModifyDBClusterSnapshotAttributeInput, ...request.Option) (*docdb.ModifyDBClusterSnapshotAttributeOutput, error)
|
||||
ModifyDBClusterSnapshotAttributeRequest(*docdb.ModifyDBClusterSnapshotAttributeInput) (*request.Request, *docdb.ModifyDBClusterSnapshotAttributeOutput)
|
||||
|
||||
ModifyDBInstance(*docdb.ModifyDBInstanceInput) (*docdb.ModifyDBInstanceOutput, error)
|
||||
ModifyDBInstanceWithContext(aws.Context, *docdb.ModifyDBInstanceInput, ...request.Option) (*docdb.ModifyDBInstanceOutput, error)
|
||||
ModifyDBInstanceRequest(*docdb.ModifyDBInstanceInput) (*request.Request, *docdb.ModifyDBInstanceOutput)
|
||||
|
||||
ModifyDBSubnetGroup(*docdb.ModifyDBSubnetGroupInput) (*docdb.ModifyDBSubnetGroupOutput, error)
|
||||
ModifyDBSubnetGroupWithContext(aws.Context, *docdb.ModifyDBSubnetGroupInput, ...request.Option) (*docdb.ModifyDBSubnetGroupOutput, error)
|
||||
ModifyDBSubnetGroupRequest(*docdb.ModifyDBSubnetGroupInput) (*request.Request, *docdb.ModifyDBSubnetGroupOutput)
|
||||
|
||||
RebootDBInstance(*docdb.RebootDBInstanceInput) (*docdb.RebootDBInstanceOutput, error)
|
||||
RebootDBInstanceWithContext(aws.Context, *docdb.RebootDBInstanceInput, ...request.Option) (*docdb.RebootDBInstanceOutput, error)
|
||||
RebootDBInstanceRequest(*docdb.RebootDBInstanceInput) (*request.Request, *docdb.RebootDBInstanceOutput)
|
||||
|
||||
RemoveTagsFromResource(*docdb.RemoveTagsFromResourceInput) (*docdb.RemoveTagsFromResourceOutput, error)
|
||||
RemoveTagsFromResourceWithContext(aws.Context, *docdb.RemoveTagsFromResourceInput, ...request.Option) (*docdb.RemoveTagsFromResourceOutput, error)
|
||||
RemoveTagsFromResourceRequest(*docdb.RemoveTagsFromResourceInput) (*request.Request, *docdb.RemoveTagsFromResourceOutput)
|
||||
|
||||
ResetDBClusterParameterGroup(*docdb.ResetDBClusterParameterGroupInput) (*docdb.ResetDBClusterParameterGroupOutput, error)
|
||||
ResetDBClusterParameterGroupWithContext(aws.Context, *docdb.ResetDBClusterParameterGroupInput, ...request.Option) (*docdb.ResetDBClusterParameterGroupOutput, error)
|
||||
ResetDBClusterParameterGroupRequest(*docdb.ResetDBClusterParameterGroupInput) (*request.Request, *docdb.ResetDBClusterParameterGroupOutput)
|
||||
|
||||
RestoreDBClusterFromSnapshot(*docdb.RestoreDBClusterFromSnapshotInput) (*docdb.RestoreDBClusterFromSnapshotOutput, error)
|
||||
RestoreDBClusterFromSnapshotWithContext(aws.Context, *docdb.RestoreDBClusterFromSnapshotInput, ...request.Option) (*docdb.RestoreDBClusterFromSnapshotOutput, error)
|
||||
RestoreDBClusterFromSnapshotRequest(*docdb.RestoreDBClusterFromSnapshotInput) (*request.Request, *docdb.RestoreDBClusterFromSnapshotOutput)
|
||||
|
||||
RestoreDBClusterToPointInTime(*docdb.RestoreDBClusterToPointInTimeInput) (*docdb.RestoreDBClusterToPointInTimeOutput, error)
|
||||
RestoreDBClusterToPointInTimeWithContext(aws.Context, *docdb.RestoreDBClusterToPointInTimeInput, ...request.Option) (*docdb.RestoreDBClusterToPointInTimeOutput, error)
|
||||
RestoreDBClusterToPointInTimeRequest(*docdb.RestoreDBClusterToPointInTimeInput) (*request.Request, *docdb.RestoreDBClusterToPointInTimeOutput)
|
||||
|
||||
StartDBCluster(*docdb.StartDBClusterInput) (*docdb.StartDBClusterOutput, error)
|
||||
StartDBClusterWithContext(aws.Context, *docdb.StartDBClusterInput, ...request.Option) (*docdb.StartDBClusterOutput, error)
|
||||
StartDBClusterRequest(*docdb.StartDBClusterInput) (*request.Request, *docdb.StartDBClusterOutput)
|
||||
|
||||
StopDBCluster(*docdb.StopDBClusterInput) (*docdb.StopDBClusterOutput, error)
|
||||
StopDBClusterWithContext(aws.Context, *docdb.StopDBClusterInput, ...request.Option) (*docdb.StopDBClusterOutput, error)
|
||||
StopDBClusterRequest(*docdb.StopDBClusterInput) (*request.Request, *docdb.StopDBClusterOutput)
|
||||
|
||||
WaitUntilDBInstanceAvailable(*docdb.DescribeDBInstancesInput) error
|
||||
WaitUntilDBInstanceAvailableWithContext(aws.Context, *docdb.DescribeDBInstancesInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilDBInstanceDeleted(*docdb.DescribeDBInstancesInput) error
|
||||
WaitUntilDBInstanceDeletedWithContext(aws.Context, *docdb.DescribeDBInstancesInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ DocDBAPI = (*docdb.DocDB)(nil)
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package docdb
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAuthorizationNotFoundFault for service response error code
|
||||
// "AuthorizationNotFound".
|
||||
//
|
||||
// The specified CIDR IP or Amazon EC2 security group isn't authorized for the
|
||||
// specified DB security group.
|
||||
//
|
||||
// Amazon DocumentDB also might not be authorized to perform necessary actions
|
||||
// on your behalf using IAM.
|
||||
ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound"
|
||||
|
||||
// ErrCodeCertificateNotFoundFault for service response error code
|
||||
// "CertificateNotFound".
|
||||
//
|
||||
// CertificateIdentifier doesn't refer to an existing certificate.
|
||||
ErrCodeCertificateNotFoundFault = "CertificateNotFound"
|
||||
|
||||
// ErrCodeDBClusterAlreadyExistsFault for service response error code
|
||||
// "DBClusterAlreadyExistsFault".
|
||||
//
|
||||
// You already have a DB cluster with the given identifier.
|
||||
ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault"
|
||||
|
||||
// ErrCodeDBClusterNotFoundFault for service response error code
|
||||
// "DBClusterNotFoundFault".
|
||||
//
|
||||
// DBClusterIdentifier doesn't refer to an existing DB cluster.
|
||||
ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault"
|
||||
|
||||
// ErrCodeDBClusterParameterGroupNotFoundFault for service response error code
|
||||
// "DBClusterParameterGroupNotFound".
|
||||
//
|
||||
// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter
|
||||
// group.
|
||||
ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound"
|
||||
|
||||
// ErrCodeDBClusterQuotaExceededFault for service response error code
|
||||
// "DBClusterQuotaExceededFault".
|
||||
//
|
||||
// The DB cluster can't be created because you have reached the maximum allowed
|
||||
// quota of DB clusters.
|
||||
ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault"
|
||||
|
||||
// ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code
|
||||
// "DBClusterSnapshotAlreadyExistsFault".
|
||||
//
|
||||
// You already have a DB cluster snapshot with the given identifier.
|
||||
ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault"
|
||||
|
||||
// ErrCodeDBClusterSnapshotNotFoundFault for service response error code
|
||||
// "DBClusterSnapshotNotFoundFault".
|
||||
//
|
||||
// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot.
|
||||
ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault"
|
||||
|
||||
// ErrCodeDBInstanceAlreadyExistsFault for service response error code
|
||||
// "DBInstanceAlreadyExists".
|
||||
//
|
||||
// You already have a DB instance with the given identifier.
|
||||
ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists"
|
||||
|
||||
// ErrCodeDBInstanceNotFoundFault for service response error code
|
||||
// "DBInstanceNotFound".
|
||||
//
|
||||
// DBInstanceIdentifier doesn't refer to an existing DB instance.
|
||||
ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound"
|
||||
|
||||
// ErrCodeDBParameterGroupAlreadyExistsFault for service response error code
|
||||
// "DBParameterGroupAlreadyExists".
|
||||
//
|
||||
// A DB parameter group with the same name already exists.
|
||||
ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists"
|
||||
|
||||
// ErrCodeDBParameterGroupNotFoundFault for service response error code
|
||||
// "DBParameterGroupNotFound".
|
||||
//
|
||||
// DBParameterGroupName doesn't refer to an existing DB parameter group.
|
||||
ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound"
|
||||
|
||||
// ErrCodeDBParameterGroupQuotaExceededFault for service response error code
|
||||
// "DBParameterGroupQuotaExceeded".
|
||||
//
|
||||
// This request would cause you to exceed the allowed number of DB parameter
|
||||
// groups.
|
||||
ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded"
|
||||
|
||||
// ErrCodeDBSecurityGroupNotFoundFault for service response error code
|
||||
// "DBSecurityGroupNotFound".
|
||||
//
|
||||
// DBSecurityGroupName doesn't refer to an existing DB security group.
|
||||
ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound"
|
||||
|
||||
// ErrCodeDBSnapshotAlreadyExistsFault for service response error code
|
||||
// "DBSnapshotAlreadyExists".
|
||||
//
|
||||
// DBSnapshotIdentifier is already being used by an existing snapshot.
|
||||
ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists"
|
||||
|
||||
// ErrCodeDBSnapshotNotFoundFault for service response error code
|
||||
// "DBSnapshotNotFound".
|
||||
//
|
||||
// DBSnapshotIdentifier doesn't refer to an existing DB snapshot.
|
||||
ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound"
|
||||
|
||||
// ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code
|
||||
// "DBSubnetGroupAlreadyExists".
|
||||
//
|
||||
// DBSubnetGroupName is already being used by an existing DB subnet group.
|
||||
ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists"
|
||||
|
||||
// ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code
|
||||
// "DBSubnetGroupDoesNotCoverEnoughAZs".
|
||||
//
|
||||
// Subnets in the DB subnet group should cover at least two Availability Zones
|
||||
// unless there is only one Availability Zone.
|
||||
ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs"
|
||||
|
||||
// ErrCodeDBSubnetGroupNotFoundFault for service response error code
|
||||
// "DBSubnetGroupNotFoundFault".
|
||||
//
|
||||
// DBSubnetGroupName doesn't refer to an existing DB subnet group.
|
||||
ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault"
|
||||
|
||||
// ErrCodeDBSubnetGroupQuotaExceededFault for service response error code
|
||||
// "DBSubnetGroupQuotaExceeded".
|
||||
//
|
||||
// The request would cause you to exceed the allowed number of DB subnet groups.
|
||||
ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded"
|
||||
|
||||
// ErrCodeDBSubnetQuotaExceededFault for service response error code
|
||||
// "DBSubnetQuotaExceededFault".
|
||||
//
|
||||
// The request would cause you to exceed the allowed number of subnets in a
|
||||
// DB subnet group.
|
||||
ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault"
|
||||
|
||||
// ErrCodeDBUpgradeDependencyFailureFault for service response error code
|
||||
// "DBUpgradeDependencyFailure".
|
||||
//
|
||||
// The DB upgrade failed because a resource that the DB depends on can't be
|
||||
// modified.
|
||||
ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure"
|
||||
|
||||
// ErrCodeInstanceQuotaExceededFault for service response error code
|
||||
// "InstanceQuotaExceeded".
|
||||
//
|
||||
// The request would cause you to exceed the allowed number of DB instances.
|
||||
ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded"
|
||||
|
||||
// ErrCodeInsufficientDBClusterCapacityFault for service response error code
|
||||
// "InsufficientDBClusterCapacityFault".
|
||||
//
|
||||
// The DB cluster doesn't have enough capacity for the current operation.
|
||||
ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault"
|
||||
|
||||
// ErrCodeInsufficientDBInstanceCapacityFault for service response error code
|
||||
// "InsufficientDBInstanceCapacity".
|
||||
//
|
||||
// The specified DB instance class isn't available in the specified Availability
|
||||
// Zone.
|
||||
ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity"
|
||||
|
||||
// ErrCodeInsufficientStorageClusterCapacityFault for service response error code
|
||||
// "InsufficientStorageClusterCapacity".
|
||||
//
|
||||
// There is not enough storage available for the current action. You might be
|
||||
// able to resolve this error by updating your subnet group to use different
|
||||
// Availability Zones that have more storage available.
|
||||
ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity"
|
||||
|
||||
// ErrCodeInvalidDBClusterSnapshotStateFault for service response error code
|
||||
// "InvalidDBClusterSnapshotStateFault".
|
||||
//
|
||||
// The provided value isn't a valid DB cluster snapshot state.
|
||||
ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault"
|
||||
|
||||
// ErrCodeInvalidDBClusterStateFault for service response error code
|
||||
// "InvalidDBClusterStateFault".
|
||||
//
|
||||
// The DB cluster isn't in a valid state.
|
||||
ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault"
|
||||
|
||||
// ErrCodeInvalidDBInstanceStateFault for service response error code
|
||||
// "InvalidDBInstanceState".
|
||||
//
|
||||
// The specified DB instance isn't in the available state.
|
||||
ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState"
|
||||
|
||||
// ErrCodeInvalidDBParameterGroupStateFault for service response error code
|
||||
// "InvalidDBParameterGroupState".
|
||||
//
|
||||
// The DB parameter group is in use, or it is in a state that is not valid.
|
||||
// If you are trying to delete the parameter group, you can't delete it when
|
||||
// the parameter group is in this state.
|
||||
ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState"
|
||||
|
||||
// ErrCodeInvalidDBSecurityGroupStateFault for service response error code
|
||||
// "InvalidDBSecurityGroupState".
|
||||
//
|
||||
// The state of the DB security group doesn't allow deletion.
|
||||
ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState"
|
||||
|
||||
// ErrCodeInvalidDBSnapshotStateFault for service response error code
|
||||
// "InvalidDBSnapshotState".
|
||||
//
|
||||
// The state of the DB snapshot doesn't allow deletion.
|
||||
ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState"
|
||||
|
||||
// ErrCodeInvalidDBSubnetGroupStateFault for service response error code
|
||||
// "InvalidDBSubnetGroupStateFault".
|
||||
//
|
||||
// The DB subnet group can't be deleted because it's in use.
|
||||
ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault"
|
||||
|
||||
// ErrCodeInvalidDBSubnetStateFault for service response error code
|
||||
// "InvalidDBSubnetStateFault".
|
||||
//
|
||||
// The DB subnet isn't in the available state.
|
||||
ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault"
|
||||
|
||||
// ErrCodeInvalidRestoreFault for service response error code
|
||||
// "InvalidRestoreFault".
|
||||
//
|
||||
// You cannot restore from a virtual private cloud (VPC) backup to a non-VPC
|
||||
// DB instance.
|
||||
ErrCodeInvalidRestoreFault = "InvalidRestoreFault"
|
||||
|
||||
// ErrCodeInvalidSubnet for service response error code
|
||||
// "InvalidSubnet".
|
||||
//
|
||||
// The requested subnet is not valid, or multiple subnets were requested that
|
||||
// are not all in a common virtual private cloud (VPC).
|
||||
ErrCodeInvalidSubnet = "InvalidSubnet"
|
||||
|
||||
// ErrCodeInvalidVPCNetworkStateFault for service response error code
|
||||
// "InvalidVPCNetworkStateFault".
|
||||
//
|
||||
// The DB subnet group doesn't cover all Availability Zones after it is created
|
||||
// because of changes that were made.
|
||||
ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault"
|
||||
|
||||
// ErrCodeKMSKeyNotAccessibleFault for service response error code
|
||||
// "KMSKeyNotAccessibleFault".
|
||||
//
|
||||
// An error occurred when accessing an AWS KMS key.
|
||||
ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault"
|
||||
|
||||
// ErrCodeResourceNotFoundFault for service response error code
|
||||
// "ResourceNotFoundFault".
|
||||
//
|
||||
// The specified resource ID was not found.
|
||||
ErrCodeResourceNotFoundFault = "ResourceNotFoundFault"
|
||||
|
||||
// ErrCodeSharedSnapshotQuotaExceededFault for service response error code
|
||||
// "SharedSnapshotQuotaExceeded".
|
||||
//
|
||||
// You have exceeded the maximum number of accounts that you can share a manual
|
||||
// DB snapshot with.
|
||||
ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded"
|
||||
|
||||
// ErrCodeSnapshotQuotaExceededFault for service response error code
|
||||
// "SnapshotQuotaExceeded".
|
||||
//
|
||||
// The request would cause you to exceed the allowed number of DB snapshots.
|
||||
ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded"
|
||||
|
||||
// ErrCodeStorageQuotaExceededFault for service response error code
|
||||
// "StorageQuotaExceeded".
|
||||
//
|
||||
// The request would cause you to exceed the allowed amount of storage available
|
||||
// across all DB instances.
|
||||
ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded"
|
||||
|
||||
// ErrCodeStorageTypeNotSupportedFault for service response error code
|
||||
// "StorageTypeNotSupported".
|
||||
//
|
||||
// Storage of the specified StorageType can't be associated with the DB instance.
|
||||
ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported"
|
||||
|
||||
// ErrCodeSubnetAlreadyInUse for service response error code
|
||||
// "SubnetAlreadyInUse".
|
||||
//
|
||||
// The DB subnet is already in use in the Availability Zone.
|
||||
ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse"
|
||||
)
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// +build go1.10,integration
|
||||
|
||||
package docdb_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration"
|
||||
"github.com/aws/aws-sdk-go/service/docdb"
|
||||
)
|
||||
|
||||
var _ aws.Config
|
||||
var _ awserr.Error
|
||||
var _ request.Request
|
||||
|
||||
func TestInteg_00_DescribeDBEngineVersions(t *testing.T) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
|
||||
sess := integration.SessionWithDefaultRegion("us-west-2")
|
||||
svc := docdb.New(sess)
|
||||
params := &docdb.DescribeDBEngineVersionsInput{}
|
||||
_, err := svc.DescribeDBEngineVersionsWithContext(ctx, params)
|
||||
if err != nil {
|
||||
t.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
func TestInteg_01_DescribeDBInstances(t *testing.T) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
|
||||
sess := integration.SessionWithDefaultRegion("us-west-2")
|
||||
svc := docdb.New(sess)
|
||||
params := &docdb.DescribeDBInstancesInput{
|
||||
DBInstanceIdentifier: aws.String("fake-id"),
|
||||
}
|
||||
_, err := svc.DescribeDBInstancesWithContext(ctx, params)
|
||||
if err == nil {
|
||||
t.Fatalf("expect request to fail")
|
||||
}
|
||||
aerr, ok := err.(awserr.RequestFailure)
|
||||
if !ok {
|
||||
t.Fatalf("expect awserr, was %T", err)
|
||||
}
|
||||
if len(aerr.Code()) == 0 {
|
||||
t.Errorf("expect non-empty error code")
|
||||
}
|
||||
if v := aerr.Code(); v == request.ErrCodeSerialization {
|
||||
t.Errorf("expect API error code got serialization failure")
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package docdb
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/query"
|
||||
)
|
||||
|
||||
// DocDB provides the API operation methods for making requests to
|
||||
// Amazon DocumentDB with MongoDB compatibility. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// DocDB methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type DocDB struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "DocDB" // Name of service.
|
||||
EndpointsID = "rds" // ID to lookup a service endpoint with.
|
||||
ServiceID = "DocDB" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the DocDB client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a DocDB client from just a session.
|
||||
// svc := docdb.New(mySession)
|
||||
//
|
||||
// // Create a DocDB client with additional configuration
|
||||
// svc := docdb.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DocDB {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "rds"
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DocDB {
|
||||
svc := &DocDB{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-10-31",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a DocDB operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *DocDB) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package docdb
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilDBInstanceAvailable uses the Amazon DocDB API operation
|
||||
// DescribeDBInstances to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *DocDB) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error {
|
||||
return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *DocDB) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilDBInstanceAvailable",
|
||||
MaxAttempts: 60,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "available",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "deleted",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "deleting",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "failed",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "incompatible-restore",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "incompatible-parameters",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeDBInstancesInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeDBInstancesRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilDBInstanceDeleted uses the Amazon DocDB API operation
|
||||
// DescribeDBInstances to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *DocDB) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error {
|
||||
return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *DocDB) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilDBInstanceDeleted",
|
||||
MaxAttempts: 60,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "deleted",
|
||||
},
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "DBInstanceNotFound",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "creating",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "modifying",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "rebooting",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus",
|
||||
Expected: "resetting-master-credentials",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeDBInstancesInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeDBInstancesRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user