repo_name
stringlengths 1
52
| repo_creator
stringclasses 6
values | programming_language
stringclasses 4
values | code
stringlengths 0
9.68M
| num_lines
int64 1
234k
|
---|---|---|---|---|
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package chimesdkidentity
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// The input parameters don't match the service's restrictions.
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// The request could not be processed because of conflict in the current state
// of the resource.
ErrCodeConflictException = "ConflictException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// The client is permanently forbidden from making the request.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeResourceLimitExceededException for service response error code
// "ResourceLimitExceededException".
//
// The request exceeds the resource limit.
ErrCodeResourceLimitExceededException = "ResourceLimitExceededException"
// ErrCodeServiceFailureException for service response error code
// "ServiceFailureException".
//
// The service encountered an unexpected error.
ErrCodeServiceFailureException = "ServiceFailureException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is currently unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeThrottledClientException for service response error code
// "ThrottledClientException".
//
// The client exceeded its request rate limit.
ErrCodeThrottledClientException = "ThrottledClientException"
// ErrCodeUnauthorizedClientException for service response error code
// "UnauthorizedClientException".
//
// The client is not currently authorized to make the request.
ErrCodeUnauthorizedClientException = "UnauthorizedClientException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"BadRequestException": newErrorBadRequestException,
"ConflictException": newErrorConflictException,
"ForbiddenException": newErrorForbiddenException,
"ResourceLimitExceededException": newErrorResourceLimitExceededException,
"ServiceFailureException": newErrorServiceFailureException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"ThrottledClientException": newErrorThrottledClientException,
"UnauthorizedClientException": newErrorUnauthorizedClientException,
}
| 71 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package chimesdkidentity
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"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// ChimeSDKIdentity provides the API operation methods for making requests to
// Amazon Chime SDK Identity. See this package's package overview docs
// for details on the service.
//
// ChimeSDKIdentity methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ChimeSDKIdentity 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 = "Chime SDK Identity" // Name of service.
EndpointsID = "identity-chime" // ID to lookup a service endpoint with.
ServiceID = "Chime SDK Identity" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the ChimeSDKIdentity 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:
// mySession := session.Must(session.NewSession())
//
// // Create a ChimeSDKIdentity client from just a session.
// svc := chimesdkidentity.New(mySession)
//
// // Create a ChimeSDKIdentity client with additional configuration
// svc := chimesdkidentity.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ChimeSDKIdentity {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "chime"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *ChimeSDKIdentity {
svc := &ChimeSDKIdentity{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2021-04-20",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a ChimeSDKIdentity operation and runs any
// custom request initialization.
func (c *ChimeSDKIdentity) 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
}
| 105 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package chimesdkidentityiface provides an interface to enable mocking the Amazon Chime SDK Identity 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 chimesdkidentityiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/chimesdkidentity"
)
// ChimeSDKIdentityAPI provides an interface to enable mocking the
// chimesdkidentity.ChimeSDKIdentity 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 Chime SDK Identity.
// func myFunc(svc chimesdkidentityiface.ChimeSDKIdentityAPI) bool {
// // Make svc.CreateAppInstance request
// }
//
// func main() {
// sess := session.New()
// svc := chimesdkidentity.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockChimeSDKIdentityClient struct {
// chimesdkidentityiface.ChimeSDKIdentityAPI
// }
// func (m *mockChimeSDKIdentityClient) CreateAppInstance(input *chimesdkidentity.CreateAppInstanceInput) (*chimesdkidentity.CreateAppInstanceOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockChimeSDKIdentityClient{}
//
// 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 ChimeSDKIdentityAPI interface {
CreateAppInstance(*chimesdkidentity.CreateAppInstanceInput) (*chimesdkidentity.CreateAppInstanceOutput, error)
CreateAppInstanceWithContext(aws.Context, *chimesdkidentity.CreateAppInstanceInput, ...request.Option) (*chimesdkidentity.CreateAppInstanceOutput, error)
CreateAppInstanceRequest(*chimesdkidentity.CreateAppInstanceInput) (*request.Request, *chimesdkidentity.CreateAppInstanceOutput)
CreateAppInstanceAdmin(*chimesdkidentity.CreateAppInstanceAdminInput) (*chimesdkidentity.CreateAppInstanceAdminOutput, error)
CreateAppInstanceAdminWithContext(aws.Context, *chimesdkidentity.CreateAppInstanceAdminInput, ...request.Option) (*chimesdkidentity.CreateAppInstanceAdminOutput, error)
CreateAppInstanceAdminRequest(*chimesdkidentity.CreateAppInstanceAdminInput) (*request.Request, *chimesdkidentity.CreateAppInstanceAdminOutput)
CreateAppInstanceUser(*chimesdkidentity.CreateAppInstanceUserInput) (*chimesdkidentity.CreateAppInstanceUserOutput, error)
CreateAppInstanceUserWithContext(aws.Context, *chimesdkidentity.CreateAppInstanceUserInput, ...request.Option) (*chimesdkidentity.CreateAppInstanceUserOutput, error)
CreateAppInstanceUserRequest(*chimesdkidentity.CreateAppInstanceUserInput) (*request.Request, *chimesdkidentity.CreateAppInstanceUserOutput)
DeleteAppInstance(*chimesdkidentity.DeleteAppInstanceInput) (*chimesdkidentity.DeleteAppInstanceOutput, error)
DeleteAppInstanceWithContext(aws.Context, *chimesdkidentity.DeleteAppInstanceInput, ...request.Option) (*chimesdkidentity.DeleteAppInstanceOutput, error)
DeleteAppInstanceRequest(*chimesdkidentity.DeleteAppInstanceInput) (*request.Request, *chimesdkidentity.DeleteAppInstanceOutput)
DeleteAppInstanceAdmin(*chimesdkidentity.DeleteAppInstanceAdminInput) (*chimesdkidentity.DeleteAppInstanceAdminOutput, error)
DeleteAppInstanceAdminWithContext(aws.Context, *chimesdkidentity.DeleteAppInstanceAdminInput, ...request.Option) (*chimesdkidentity.DeleteAppInstanceAdminOutput, error)
DeleteAppInstanceAdminRequest(*chimesdkidentity.DeleteAppInstanceAdminInput) (*request.Request, *chimesdkidentity.DeleteAppInstanceAdminOutput)
DeleteAppInstanceUser(*chimesdkidentity.DeleteAppInstanceUserInput) (*chimesdkidentity.DeleteAppInstanceUserOutput, error)
DeleteAppInstanceUserWithContext(aws.Context, *chimesdkidentity.DeleteAppInstanceUserInput, ...request.Option) (*chimesdkidentity.DeleteAppInstanceUserOutput, error)
DeleteAppInstanceUserRequest(*chimesdkidentity.DeleteAppInstanceUserInput) (*request.Request, *chimesdkidentity.DeleteAppInstanceUserOutput)
DescribeAppInstance(*chimesdkidentity.DescribeAppInstanceInput) (*chimesdkidentity.DescribeAppInstanceOutput, error)
DescribeAppInstanceWithContext(aws.Context, *chimesdkidentity.DescribeAppInstanceInput, ...request.Option) (*chimesdkidentity.DescribeAppInstanceOutput, error)
DescribeAppInstanceRequest(*chimesdkidentity.DescribeAppInstanceInput) (*request.Request, *chimesdkidentity.DescribeAppInstanceOutput)
DescribeAppInstanceAdmin(*chimesdkidentity.DescribeAppInstanceAdminInput) (*chimesdkidentity.DescribeAppInstanceAdminOutput, error)
DescribeAppInstanceAdminWithContext(aws.Context, *chimesdkidentity.DescribeAppInstanceAdminInput, ...request.Option) (*chimesdkidentity.DescribeAppInstanceAdminOutput, error)
DescribeAppInstanceAdminRequest(*chimesdkidentity.DescribeAppInstanceAdminInput) (*request.Request, *chimesdkidentity.DescribeAppInstanceAdminOutput)
DescribeAppInstanceUser(*chimesdkidentity.DescribeAppInstanceUserInput) (*chimesdkidentity.DescribeAppInstanceUserOutput, error)
DescribeAppInstanceUserWithContext(aws.Context, *chimesdkidentity.DescribeAppInstanceUserInput, ...request.Option) (*chimesdkidentity.DescribeAppInstanceUserOutput, error)
DescribeAppInstanceUserRequest(*chimesdkidentity.DescribeAppInstanceUserInput) (*request.Request, *chimesdkidentity.DescribeAppInstanceUserOutput)
GetAppInstanceRetentionSettings(*chimesdkidentity.GetAppInstanceRetentionSettingsInput) (*chimesdkidentity.GetAppInstanceRetentionSettingsOutput, error)
GetAppInstanceRetentionSettingsWithContext(aws.Context, *chimesdkidentity.GetAppInstanceRetentionSettingsInput, ...request.Option) (*chimesdkidentity.GetAppInstanceRetentionSettingsOutput, error)
GetAppInstanceRetentionSettingsRequest(*chimesdkidentity.GetAppInstanceRetentionSettingsInput) (*request.Request, *chimesdkidentity.GetAppInstanceRetentionSettingsOutput)
ListAppInstanceAdmins(*chimesdkidentity.ListAppInstanceAdminsInput) (*chimesdkidentity.ListAppInstanceAdminsOutput, error)
ListAppInstanceAdminsWithContext(aws.Context, *chimesdkidentity.ListAppInstanceAdminsInput, ...request.Option) (*chimesdkidentity.ListAppInstanceAdminsOutput, error)
ListAppInstanceAdminsRequest(*chimesdkidentity.ListAppInstanceAdminsInput) (*request.Request, *chimesdkidentity.ListAppInstanceAdminsOutput)
ListAppInstanceAdminsPages(*chimesdkidentity.ListAppInstanceAdminsInput, func(*chimesdkidentity.ListAppInstanceAdminsOutput, bool) bool) error
ListAppInstanceAdminsPagesWithContext(aws.Context, *chimesdkidentity.ListAppInstanceAdminsInput, func(*chimesdkidentity.ListAppInstanceAdminsOutput, bool) bool, ...request.Option) error
ListAppInstanceUsers(*chimesdkidentity.ListAppInstanceUsersInput) (*chimesdkidentity.ListAppInstanceUsersOutput, error)
ListAppInstanceUsersWithContext(aws.Context, *chimesdkidentity.ListAppInstanceUsersInput, ...request.Option) (*chimesdkidentity.ListAppInstanceUsersOutput, error)
ListAppInstanceUsersRequest(*chimesdkidentity.ListAppInstanceUsersInput) (*request.Request, *chimesdkidentity.ListAppInstanceUsersOutput)
ListAppInstanceUsersPages(*chimesdkidentity.ListAppInstanceUsersInput, func(*chimesdkidentity.ListAppInstanceUsersOutput, bool) bool) error
ListAppInstanceUsersPagesWithContext(aws.Context, *chimesdkidentity.ListAppInstanceUsersInput, func(*chimesdkidentity.ListAppInstanceUsersOutput, bool) bool, ...request.Option) error
ListAppInstances(*chimesdkidentity.ListAppInstancesInput) (*chimesdkidentity.ListAppInstancesOutput, error)
ListAppInstancesWithContext(aws.Context, *chimesdkidentity.ListAppInstancesInput, ...request.Option) (*chimesdkidentity.ListAppInstancesOutput, error)
ListAppInstancesRequest(*chimesdkidentity.ListAppInstancesInput) (*request.Request, *chimesdkidentity.ListAppInstancesOutput)
ListAppInstancesPages(*chimesdkidentity.ListAppInstancesInput, func(*chimesdkidentity.ListAppInstancesOutput, bool) bool) error
ListAppInstancesPagesWithContext(aws.Context, *chimesdkidentity.ListAppInstancesInput, func(*chimesdkidentity.ListAppInstancesOutput, bool) bool, ...request.Option) error
PutAppInstanceRetentionSettings(*chimesdkidentity.PutAppInstanceRetentionSettingsInput) (*chimesdkidentity.PutAppInstanceRetentionSettingsOutput, error)
PutAppInstanceRetentionSettingsWithContext(aws.Context, *chimesdkidentity.PutAppInstanceRetentionSettingsInput, ...request.Option) (*chimesdkidentity.PutAppInstanceRetentionSettingsOutput, error)
PutAppInstanceRetentionSettingsRequest(*chimesdkidentity.PutAppInstanceRetentionSettingsInput) (*request.Request, *chimesdkidentity.PutAppInstanceRetentionSettingsOutput)
UpdateAppInstance(*chimesdkidentity.UpdateAppInstanceInput) (*chimesdkidentity.UpdateAppInstanceOutput, error)
UpdateAppInstanceWithContext(aws.Context, *chimesdkidentity.UpdateAppInstanceInput, ...request.Option) (*chimesdkidentity.UpdateAppInstanceOutput, error)
UpdateAppInstanceRequest(*chimesdkidentity.UpdateAppInstanceInput) (*request.Request, *chimesdkidentity.UpdateAppInstanceOutput)
UpdateAppInstanceUser(*chimesdkidentity.UpdateAppInstanceUserInput) (*chimesdkidentity.UpdateAppInstanceUserOutput, error)
UpdateAppInstanceUserWithContext(aws.Context, *chimesdkidentity.UpdateAppInstanceUserInput, ...request.Option) (*chimesdkidentity.UpdateAppInstanceUserOutput, error)
UpdateAppInstanceUserRequest(*chimesdkidentity.UpdateAppInstanceUserInput) (*request.Request, *chimesdkidentity.UpdateAppInstanceUserOutput)
}
var _ ChimeSDKIdentityAPI = (*chimesdkidentity.ChimeSDKIdentity)(nil)
| 138 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package chimesdkmessaging
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opBatchCreateChannelMembership = "BatchCreateChannelMembership"
// BatchCreateChannelMembershipRequest generates a "aws/request.Request" representing the
// client's request for the BatchCreateChannelMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchCreateChannelMembership for more information on using the BatchCreateChannelMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchCreateChannelMembershipRequest method.
// req, resp := client.BatchCreateChannelMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/BatchCreateChannelMembership
func (c *ChimeSDKMessaging) BatchCreateChannelMembershipRequest(input *BatchCreateChannelMembershipInput) (req *request.Request, output *BatchCreateChannelMembershipOutput) {
op := &request.Operation{
Name: opBatchCreateChannelMembership,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/memberships?operation=batch-create",
}
if input == nil {
input = &BatchCreateChannelMembershipInput{}
}
output = &BatchCreateChannelMembershipOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchCreateChannelMembership API operation for Amazon Chime SDK Messaging.
//
// Adds a specified number of users to a channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation BatchCreateChannelMembership for usage and error information.
//
// Returned Error Types:
// * ServiceFailureException
// The service encountered an unexpected error.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/BatchCreateChannelMembership
func (c *ChimeSDKMessaging) BatchCreateChannelMembership(input *BatchCreateChannelMembershipInput) (*BatchCreateChannelMembershipOutput, error) {
req, out := c.BatchCreateChannelMembershipRequest(input)
return out, req.Send()
}
// BatchCreateChannelMembershipWithContext is the same as BatchCreateChannelMembership with the addition of
// the ability to pass a context and additional request options.
//
// See BatchCreateChannelMembership for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) BatchCreateChannelMembershipWithContext(ctx aws.Context, input *BatchCreateChannelMembershipInput, opts ...request.Option) (*BatchCreateChannelMembershipOutput, error) {
req, out := c.BatchCreateChannelMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateChannel = "CreateChannel"
// CreateChannelRequest generates a "aws/request.Request" representing the
// client's request for the CreateChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateChannel for more information on using the CreateChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateChannelRequest method.
// req, resp := client.CreateChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannel
func (c *ChimeSDKMessaging) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) {
op := &request.Operation{
Name: opCreateChannel,
HTTPMethod: "POST",
HTTPPath: "/channels",
}
if input == nil {
input = &CreateChannelInput{}
}
output = &CreateChannelOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateChannel API operation for Amazon Chime SDK Messaging.
//
// Creates a channel to which you can add users and send messages.
//
// Restriction: You can't change a channel's privacy.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation CreateChannel for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ResourceLimitExceededException
// The request exceeds the resource limit.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannel
func (c *ChimeSDKMessaging) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) {
req, out := c.CreateChannelRequest(input)
return out, req.Send()
}
// CreateChannelWithContext is the same as CreateChannel with the addition of
// the ability to pass a context and additional request options.
//
// See CreateChannel for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) {
req, out := c.CreateChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateChannelBan = "CreateChannelBan"
// CreateChannelBanRequest generates a "aws/request.Request" representing the
// client's request for the CreateChannelBan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateChannelBan for more information on using the CreateChannelBan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateChannelBanRequest method.
// req, resp := client.CreateChannelBanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelBan
func (c *ChimeSDKMessaging) CreateChannelBanRequest(input *CreateChannelBanInput) (req *request.Request, output *CreateChannelBanOutput) {
op := &request.Operation{
Name: opCreateChannelBan,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/bans",
}
if input == nil {
input = &CreateChannelBanInput{}
}
output = &CreateChannelBanOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateChannelBan API operation for Amazon Chime SDK Messaging.
//
// Permanently bans a member from a channel. Moderators can't add banned members
// to a channel. To undo a ban, you first have to DeleteChannelBan, and then
// CreateChannelMembership. Bans are cleaned up when you delete users or channels.
//
// If you ban a user who is already part of a channel, that user is automatically
// kicked from the channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation CreateChannelBan for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ResourceLimitExceededException
// The request exceeds the resource limit.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelBan
func (c *ChimeSDKMessaging) CreateChannelBan(input *CreateChannelBanInput) (*CreateChannelBanOutput, error) {
req, out := c.CreateChannelBanRequest(input)
return out, req.Send()
}
// CreateChannelBanWithContext is the same as CreateChannelBan with the addition of
// the ability to pass a context and additional request options.
//
// See CreateChannelBan for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) CreateChannelBanWithContext(ctx aws.Context, input *CreateChannelBanInput, opts ...request.Option) (*CreateChannelBanOutput, error) {
req, out := c.CreateChannelBanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateChannelMembership = "CreateChannelMembership"
// CreateChannelMembershipRequest generates a "aws/request.Request" representing the
// client's request for the CreateChannelMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateChannelMembership for more information on using the CreateChannelMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateChannelMembershipRequest method.
// req, resp := client.CreateChannelMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelMembership
func (c *ChimeSDKMessaging) CreateChannelMembershipRequest(input *CreateChannelMembershipInput) (req *request.Request, output *CreateChannelMembershipOutput) {
op := &request.Operation{
Name: opCreateChannelMembership,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/memberships",
}
if input == nil {
input = &CreateChannelMembershipInput{}
}
output = &CreateChannelMembershipOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateChannelMembership API operation for Amazon Chime SDK Messaging.
//
// Adds a user to a channel. The InvitedBy response field is derived from the
// request header. A channel member can:
//
// * List messages
//
// * Send messages
//
// * Receive messages
//
// * Edit their own messages
//
// * Leave the channel
//
// Privacy settings impact this action as follows:
//
// * Public Channels: You do not need to be a member to list messages, but
// you must be a member to send messages.
//
// * Private Channels: You must be a member to list or send messages.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation CreateChannelMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ResourceLimitExceededException
// The request exceeds the resource limit.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelMembership
func (c *ChimeSDKMessaging) CreateChannelMembership(input *CreateChannelMembershipInput) (*CreateChannelMembershipOutput, error) {
req, out := c.CreateChannelMembershipRequest(input)
return out, req.Send()
}
// CreateChannelMembershipWithContext is the same as CreateChannelMembership with the addition of
// the ability to pass a context and additional request options.
//
// See CreateChannelMembership for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) CreateChannelMembershipWithContext(ctx aws.Context, input *CreateChannelMembershipInput, opts ...request.Option) (*CreateChannelMembershipOutput, error) {
req, out := c.CreateChannelMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateChannelModerator = "CreateChannelModerator"
// CreateChannelModeratorRequest generates a "aws/request.Request" representing the
// client's request for the CreateChannelModerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateChannelModerator for more information on using the CreateChannelModerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateChannelModeratorRequest method.
// req, resp := client.CreateChannelModeratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelModerator
func (c *ChimeSDKMessaging) CreateChannelModeratorRequest(input *CreateChannelModeratorInput) (req *request.Request, output *CreateChannelModeratorOutput) {
op := &request.Operation{
Name: opCreateChannelModerator,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/moderators",
}
if input == nil {
input = &CreateChannelModeratorInput{}
}
output = &CreateChannelModeratorOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateChannelModerator API operation for Amazon Chime SDK Messaging.
//
// Creates a new ChannelModerator. A channel moderator can:
//
// * Add and remove other members of the channel.
//
// * Add and remove other moderators of the channel.
//
// * Add and remove user bans for the channel.
//
// * Redact messages in the channel.
//
// * List messages in the channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation CreateChannelModerator for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ResourceLimitExceededException
// The request exceeds the resource limit.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/CreateChannelModerator
func (c *ChimeSDKMessaging) CreateChannelModerator(input *CreateChannelModeratorInput) (*CreateChannelModeratorOutput, error) {
req, out := c.CreateChannelModeratorRequest(input)
return out, req.Send()
}
// CreateChannelModeratorWithContext is the same as CreateChannelModerator with the addition of
// the ability to pass a context and additional request options.
//
// See CreateChannelModerator for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) CreateChannelModeratorWithContext(ctx aws.Context, input *CreateChannelModeratorInput, opts ...request.Option) (*CreateChannelModeratorOutput, error) {
req, out := c.CreateChannelModeratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteChannel = "DeleteChannel"
// DeleteChannelRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannel for more information on using the DeleteChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteChannelRequest method.
// req, resp := client.DeleteChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannel
func (c *ChimeSDKMessaging) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) {
op := &request.Operation{
Name: opDeleteChannel,
HTTPMethod: "DELETE",
HTTPPath: "/channels/{channelArn}",
}
if input == nil {
input = &DeleteChannelInput{}
}
output = &DeleteChannelOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteChannel API operation for Amazon Chime SDK Messaging.
//
// Immediately makes a channel and its memberships inaccessible and marks them
// for deletion. This is an irreversible process.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DeleteChannel for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannel
func (c *ChimeSDKMessaging) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) {
req, out := c.DeleteChannelRequest(input)
return out, req.Send()
}
// DeleteChannelWithContext is the same as DeleteChannel with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannel for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) {
req, out := c.DeleteChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteChannelBan = "DeleteChannelBan"
// DeleteChannelBanRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannelBan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannelBan for more information on using the DeleteChannelBan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteChannelBanRequest method.
// req, resp := client.DeleteChannelBanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelBan
func (c *ChimeSDKMessaging) DeleteChannelBanRequest(input *DeleteChannelBanInput) (req *request.Request, output *DeleteChannelBanOutput) {
op := &request.Operation{
Name: opDeleteChannelBan,
HTTPMethod: "DELETE",
HTTPPath: "/channels/{channelArn}/bans/{memberArn}",
}
if input == nil {
input = &DeleteChannelBanInput{}
}
output = &DeleteChannelBanOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteChannelBan API operation for Amazon Chime SDK Messaging.
//
// Removes a user from a channel's ban list.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DeleteChannelBan for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelBan
func (c *ChimeSDKMessaging) DeleteChannelBan(input *DeleteChannelBanInput) (*DeleteChannelBanOutput, error) {
req, out := c.DeleteChannelBanRequest(input)
return out, req.Send()
}
// DeleteChannelBanWithContext is the same as DeleteChannelBan with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannelBan for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DeleteChannelBanWithContext(ctx aws.Context, input *DeleteChannelBanInput, opts ...request.Option) (*DeleteChannelBanOutput, error) {
req, out := c.DeleteChannelBanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteChannelMembership = "DeleteChannelMembership"
// DeleteChannelMembershipRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannelMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannelMembership for more information on using the DeleteChannelMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteChannelMembershipRequest method.
// req, resp := client.DeleteChannelMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelMembership
func (c *ChimeSDKMessaging) DeleteChannelMembershipRequest(input *DeleteChannelMembershipInput) (req *request.Request, output *DeleteChannelMembershipOutput) {
op := &request.Operation{
Name: opDeleteChannelMembership,
HTTPMethod: "DELETE",
HTTPPath: "/channels/{channelArn}/memberships/{memberArn}",
}
if input == nil {
input = &DeleteChannelMembershipInput{}
}
output = &DeleteChannelMembershipOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteChannelMembership API operation for Amazon Chime SDK Messaging.
//
// Removes a member from a channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DeleteChannelMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelMembership
func (c *ChimeSDKMessaging) DeleteChannelMembership(input *DeleteChannelMembershipInput) (*DeleteChannelMembershipOutput, error) {
req, out := c.DeleteChannelMembershipRequest(input)
return out, req.Send()
}
// DeleteChannelMembershipWithContext is the same as DeleteChannelMembership with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannelMembership for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DeleteChannelMembershipWithContext(ctx aws.Context, input *DeleteChannelMembershipInput, opts ...request.Option) (*DeleteChannelMembershipOutput, error) {
req, out := c.DeleteChannelMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteChannelMessage = "DeleteChannelMessage"
// DeleteChannelMessageRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannelMessage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannelMessage for more information on using the DeleteChannelMessage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteChannelMessageRequest method.
// req, resp := client.DeleteChannelMessageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelMessage
func (c *ChimeSDKMessaging) DeleteChannelMessageRequest(input *DeleteChannelMessageInput) (req *request.Request, output *DeleteChannelMessageOutput) {
op := &request.Operation{
Name: opDeleteChannelMessage,
HTTPMethod: "DELETE",
HTTPPath: "/channels/{channelArn}/messages/{messageId}",
}
if input == nil {
input = &DeleteChannelMessageInput{}
}
output = &DeleteChannelMessageOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteChannelMessage API operation for Amazon Chime SDK Messaging.
//
// Deletes a channel message. Only admins can perform this action. Deletion
// makes messages inaccessible immediately. A background process deletes any
// revisions created by UpdateChannelMessage.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DeleteChannelMessage for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelMessage
func (c *ChimeSDKMessaging) DeleteChannelMessage(input *DeleteChannelMessageInput) (*DeleteChannelMessageOutput, error) {
req, out := c.DeleteChannelMessageRequest(input)
return out, req.Send()
}
// DeleteChannelMessageWithContext is the same as DeleteChannelMessage with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannelMessage for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DeleteChannelMessageWithContext(ctx aws.Context, input *DeleteChannelMessageInput, opts ...request.Option) (*DeleteChannelMessageOutput, error) {
req, out := c.DeleteChannelMessageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteChannelModerator = "DeleteChannelModerator"
// DeleteChannelModeratorRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannelModerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannelModerator for more information on using the DeleteChannelModerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteChannelModeratorRequest method.
// req, resp := client.DeleteChannelModeratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelModerator
func (c *ChimeSDKMessaging) DeleteChannelModeratorRequest(input *DeleteChannelModeratorInput) (req *request.Request, output *DeleteChannelModeratorOutput) {
op := &request.Operation{
Name: opDeleteChannelModerator,
HTTPMethod: "DELETE",
HTTPPath: "/channels/{channelArn}/moderators/{channelModeratorArn}",
}
if input == nil {
input = &DeleteChannelModeratorInput{}
}
output = &DeleteChannelModeratorOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteChannelModerator API operation for Amazon Chime SDK Messaging.
//
// Deletes a channel moderator.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DeleteChannelModerator for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DeleteChannelModerator
func (c *ChimeSDKMessaging) DeleteChannelModerator(input *DeleteChannelModeratorInput) (*DeleteChannelModeratorOutput, error) {
req, out := c.DeleteChannelModeratorRequest(input)
return out, req.Send()
}
// DeleteChannelModeratorWithContext is the same as DeleteChannelModerator with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannelModerator for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DeleteChannelModeratorWithContext(ctx aws.Context, input *DeleteChannelModeratorInput, opts ...request.Option) (*DeleteChannelModeratorOutput, error) {
req, out := c.DeleteChannelModeratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannel = "DescribeChannel"
// DescribeChannelRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannel for more information on using the DescribeChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelRequest method.
// req, resp := client.DescribeChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannel
func (c *ChimeSDKMessaging) DescribeChannelRequest(input *DescribeChannelInput) (req *request.Request, output *DescribeChannelOutput) {
op := &request.Operation{
Name: opDescribeChannel,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}",
}
if input == nil {
input = &DescribeChannelInput{}
}
output = &DescribeChannelOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannel API operation for Amazon Chime SDK Messaging.
//
// Returns the full details of a channel in an Amazon Chime AppInstance.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannel for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannel
func (c *ChimeSDKMessaging) DescribeChannel(input *DescribeChannelInput) (*DescribeChannelOutput, error) {
req, out := c.DescribeChannelRequest(input)
return out, req.Send()
}
// DescribeChannelWithContext is the same as DescribeChannel with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannel for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.Option) (*DescribeChannelOutput, error) {
req, out := c.DescribeChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannelBan = "DescribeChannelBan"
// DescribeChannelBanRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannelBan operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannelBan for more information on using the DescribeChannelBan
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelBanRequest method.
// req, resp := client.DescribeChannelBanRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelBan
func (c *ChimeSDKMessaging) DescribeChannelBanRequest(input *DescribeChannelBanInput) (req *request.Request, output *DescribeChannelBanOutput) {
op := &request.Operation{
Name: opDescribeChannelBan,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/bans/{memberArn}",
}
if input == nil {
input = &DescribeChannelBanInput{}
}
output = &DescribeChannelBanOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannelBan API operation for Amazon Chime SDK Messaging.
//
// Returns the full details of a channel ban.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannelBan for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * NotFoundException
// One or more of the resources in the request does not exist in the system.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelBan
func (c *ChimeSDKMessaging) DescribeChannelBan(input *DescribeChannelBanInput) (*DescribeChannelBanOutput, error) {
req, out := c.DescribeChannelBanRequest(input)
return out, req.Send()
}
// DescribeChannelBanWithContext is the same as DescribeChannelBan with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannelBan for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelBanWithContext(ctx aws.Context, input *DescribeChannelBanInput, opts ...request.Option) (*DescribeChannelBanOutput, error) {
req, out := c.DescribeChannelBanRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannelMembership = "DescribeChannelMembership"
// DescribeChannelMembershipRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannelMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannelMembership for more information on using the DescribeChannelMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelMembershipRequest method.
// req, resp := client.DescribeChannelMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelMembership
func (c *ChimeSDKMessaging) DescribeChannelMembershipRequest(input *DescribeChannelMembershipInput) (req *request.Request, output *DescribeChannelMembershipOutput) {
op := &request.Operation{
Name: opDescribeChannelMembership,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/memberships/{memberArn}",
}
if input == nil {
input = &DescribeChannelMembershipInput{}
}
output = &DescribeChannelMembershipOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannelMembership API operation for Amazon Chime SDK Messaging.
//
// Returns the full details of a user's channel membership.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannelMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * NotFoundException
// One or more of the resources in the request does not exist in the system.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelMembership
func (c *ChimeSDKMessaging) DescribeChannelMembership(input *DescribeChannelMembershipInput) (*DescribeChannelMembershipOutput, error) {
req, out := c.DescribeChannelMembershipRequest(input)
return out, req.Send()
}
// DescribeChannelMembershipWithContext is the same as DescribeChannelMembership with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannelMembership for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelMembershipWithContext(ctx aws.Context, input *DescribeChannelMembershipInput, opts ...request.Option) (*DescribeChannelMembershipOutput, error) {
req, out := c.DescribeChannelMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannelMembershipForAppInstanceUser = "DescribeChannelMembershipForAppInstanceUser"
// DescribeChannelMembershipForAppInstanceUserRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannelMembershipForAppInstanceUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannelMembershipForAppInstanceUser for more information on using the DescribeChannelMembershipForAppInstanceUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelMembershipForAppInstanceUserRequest method.
// req, resp := client.DescribeChannelMembershipForAppInstanceUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelMembershipForAppInstanceUser
func (c *ChimeSDKMessaging) DescribeChannelMembershipForAppInstanceUserRequest(input *DescribeChannelMembershipForAppInstanceUserInput) (req *request.Request, output *DescribeChannelMembershipForAppInstanceUserOutput) {
op := &request.Operation{
Name: opDescribeChannelMembershipForAppInstanceUser,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}?scope=app-instance-user-membership",
}
if input == nil {
input = &DescribeChannelMembershipForAppInstanceUserInput{}
}
output = &DescribeChannelMembershipForAppInstanceUserOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannelMembershipForAppInstanceUser API operation for Amazon Chime SDK Messaging.
//
// Returns the details of a channel based on the membership of the specified
// AppInstanceUser.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannelMembershipForAppInstanceUser for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelMembershipForAppInstanceUser
func (c *ChimeSDKMessaging) DescribeChannelMembershipForAppInstanceUser(input *DescribeChannelMembershipForAppInstanceUserInput) (*DescribeChannelMembershipForAppInstanceUserOutput, error) {
req, out := c.DescribeChannelMembershipForAppInstanceUserRequest(input)
return out, req.Send()
}
// DescribeChannelMembershipForAppInstanceUserWithContext is the same as DescribeChannelMembershipForAppInstanceUser with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannelMembershipForAppInstanceUser for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelMembershipForAppInstanceUserWithContext(ctx aws.Context, input *DescribeChannelMembershipForAppInstanceUserInput, opts ...request.Option) (*DescribeChannelMembershipForAppInstanceUserOutput, error) {
req, out := c.DescribeChannelMembershipForAppInstanceUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannelModeratedByAppInstanceUser = "DescribeChannelModeratedByAppInstanceUser"
// DescribeChannelModeratedByAppInstanceUserRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannelModeratedByAppInstanceUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannelModeratedByAppInstanceUser for more information on using the DescribeChannelModeratedByAppInstanceUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelModeratedByAppInstanceUserRequest method.
// req, resp := client.DescribeChannelModeratedByAppInstanceUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelModeratedByAppInstanceUser
func (c *ChimeSDKMessaging) DescribeChannelModeratedByAppInstanceUserRequest(input *DescribeChannelModeratedByAppInstanceUserInput) (req *request.Request, output *DescribeChannelModeratedByAppInstanceUserOutput) {
op := &request.Operation{
Name: opDescribeChannelModeratedByAppInstanceUser,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}?scope=app-instance-user-moderated-channel",
}
if input == nil {
input = &DescribeChannelModeratedByAppInstanceUserInput{}
}
output = &DescribeChannelModeratedByAppInstanceUserOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannelModeratedByAppInstanceUser API operation for Amazon Chime SDK Messaging.
//
// Returns the full details of a channel moderated by the specified AppInstanceUser.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannelModeratedByAppInstanceUser for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelModeratedByAppInstanceUser
func (c *ChimeSDKMessaging) DescribeChannelModeratedByAppInstanceUser(input *DescribeChannelModeratedByAppInstanceUserInput) (*DescribeChannelModeratedByAppInstanceUserOutput, error) {
req, out := c.DescribeChannelModeratedByAppInstanceUserRequest(input)
return out, req.Send()
}
// DescribeChannelModeratedByAppInstanceUserWithContext is the same as DescribeChannelModeratedByAppInstanceUser with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannelModeratedByAppInstanceUser for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelModeratedByAppInstanceUserWithContext(ctx aws.Context, input *DescribeChannelModeratedByAppInstanceUserInput, opts ...request.Option) (*DescribeChannelModeratedByAppInstanceUserOutput, error) {
req, out := c.DescribeChannelModeratedByAppInstanceUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeChannelModerator = "DescribeChannelModerator"
// DescribeChannelModeratorRequest generates a "aws/request.Request" representing the
// client's request for the DescribeChannelModerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeChannelModerator for more information on using the DescribeChannelModerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeChannelModeratorRequest method.
// req, resp := client.DescribeChannelModeratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelModerator
func (c *ChimeSDKMessaging) DescribeChannelModeratorRequest(input *DescribeChannelModeratorInput) (req *request.Request, output *DescribeChannelModeratorOutput) {
op := &request.Operation{
Name: opDescribeChannelModerator,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/moderators/{channelModeratorArn}",
}
if input == nil {
input = &DescribeChannelModeratorInput{}
}
output = &DescribeChannelModeratorOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeChannelModerator API operation for Amazon Chime SDK Messaging.
//
// Returns the full details of a single ChannelModerator.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation DescribeChannelModerator for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * NotFoundException
// One or more of the resources in the request does not exist in the system.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/DescribeChannelModerator
func (c *ChimeSDKMessaging) DescribeChannelModerator(input *DescribeChannelModeratorInput) (*DescribeChannelModeratorOutput, error) {
req, out := c.DescribeChannelModeratorRequest(input)
return out, req.Send()
}
// DescribeChannelModeratorWithContext is the same as DescribeChannelModerator with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeChannelModerator for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) DescribeChannelModeratorWithContext(ctx aws.Context, input *DescribeChannelModeratorInput, opts ...request.Option) (*DescribeChannelModeratorOutput, error) {
req, out := c.DescribeChannelModeratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetChannelMessage = "GetChannelMessage"
// GetChannelMessageRequest generates a "aws/request.Request" representing the
// client's request for the GetChannelMessage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetChannelMessage for more information on using the GetChannelMessage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetChannelMessageRequest method.
// req, resp := client.GetChannelMessageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/GetChannelMessage
func (c *ChimeSDKMessaging) GetChannelMessageRequest(input *GetChannelMessageInput) (req *request.Request, output *GetChannelMessageOutput) {
op := &request.Operation{
Name: opGetChannelMessage,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/messages/{messageId}",
}
if input == nil {
input = &GetChannelMessageInput{}
}
output = &GetChannelMessageOutput{}
req = c.newRequest(op, input, output)
return
}
// GetChannelMessage API operation for Amazon Chime SDK Messaging.
//
// Gets the full details of a channel message.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation GetChannelMessage for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * NotFoundException
// One or more of the resources in the request does not exist in the system.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/GetChannelMessage
func (c *ChimeSDKMessaging) GetChannelMessage(input *GetChannelMessageInput) (*GetChannelMessageOutput, error) {
req, out := c.GetChannelMessageRequest(input)
return out, req.Send()
}
// GetChannelMessageWithContext is the same as GetChannelMessage with the addition of
// the ability to pass a context and additional request options.
//
// See GetChannelMessage for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) GetChannelMessageWithContext(ctx aws.Context, input *GetChannelMessageInput, opts ...request.Option) (*GetChannelMessageOutput, error) {
req, out := c.GetChannelMessageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetMessagingSessionEndpoint = "GetMessagingSessionEndpoint"
// GetMessagingSessionEndpointRequest generates a "aws/request.Request" representing the
// client's request for the GetMessagingSessionEndpoint operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetMessagingSessionEndpoint for more information on using the GetMessagingSessionEndpoint
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetMessagingSessionEndpointRequest method.
// req, resp := client.GetMessagingSessionEndpointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/GetMessagingSessionEndpoint
func (c *ChimeSDKMessaging) GetMessagingSessionEndpointRequest(input *GetMessagingSessionEndpointInput) (req *request.Request, output *GetMessagingSessionEndpointOutput) {
op := &request.Operation{
Name: opGetMessagingSessionEndpoint,
HTTPMethod: "GET",
HTTPPath: "/endpoints/messaging-session",
}
if input == nil {
input = &GetMessagingSessionEndpointInput{}
}
output = &GetMessagingSessionEndpointOutput{}
req = c.newRequest(op, input, output)
return
}
// GetMessagingSessionEndpoint API operation for Amazon Chime SDK Messaging.
//
// The details of the endpoint for the messaging session.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation GetMessagingSessionEndpoint for usage and error information.
//
// Returned Error Types:
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/GetMessagingSessionEndpoint
func (c *ChimeSDKMessaging) GetMessagingSessionEndpoint(input *GetMessagingSessionEndpointInput) (*GetMessagingSessionEndpointOutput, error) {
req, out := c.GetMessagingSessionEndpointRequest(input)
return out, req.Send()
}
// GetMessagingSessionEndpointWithContext is the same as GetMessagingSessionEndpoint with the addition of
// the ability to pass a context and additional request options.
//
// See GetMessagingSessionEndpoint for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) GetMessagingSessionEndpointWithContext(ctx aws.Context, input *GetMessagingSessionEndpointInput, opts ...request.Option) (*GetMessagingSessionEndpointOutput, error) {
req, out := c.GetMessagingSessionEndpointRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListChannelBans = "ListChannelBans"
// ListChannelBansRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelBans operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelBans for more information on using the ListChannelBans
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelBansRequest method.
// req, resp := client.ListChannelBansRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelBans
func (c *ChimeSDKMessaging) ListChannelBansRequest(input *ListChannelBansInput) (req *request.Request, output *ListChannelBansOutput) {
op := &request.Operation{
Name: opListChannelBans,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/bans",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelBansInput{}
}
output = &ListChannelBansOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelBans API operation for Amazon Chime SDK Messaging.
//
// Lists all the users banned from a particular channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelBans for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelBans
func (c *ChimeSDKMessaging) ListChannelBans(input *ListChannelBansInput) (*ListChannelBansOutput, error) {
req, out := c.ListChannelBansRequest(input)
return out, req.Send()
}
// ListChannelBansWithContext is the same as ListChannelBans with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelBans for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelBansWithContext(ctx aws.Context, input *ListChannelBansInput, opts ...request.Option) (*ListChannelBansOutput, error) {
req, out := c.ListChannelBansRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelBansPages iterates over the pages of a ListChannelBans operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelBans method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelBans operation.
// pageNum := 0
// err := client.ListChannelBansPages(params,
// func(page *chimesdkmessaging.ListChannelBansOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelBansPages(input *ListChannelBansInput, fn func(*ListChannelBansOutput, bool) bool) error {
return c.ListChannelBansPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelBansPagesWithContext same as ListChannelBansPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelBansPagesWithContext(ctx aws.Context, input *ListChannelBansInput, fn func(*ListChannelBansOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelBansInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelBansRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelBansOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannelMemberships = "ListChannelMemberships"
// ListChannelMembershipsRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelMemberships operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelMemberships for more information on using the ListChannelMemberships
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelMembershipsRequest method.
// req, resp := client.ListChannelMembershipsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMemberships
func (c *ChimeSDKMessaging) ListChannelMembershipsRequest(input *ListChannelMembershipsInput) (req *request.Request, output *ListChannelMembershipsOutput) {
op := &request.Operation{
Name: opListChannelMemberships,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/memberships",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelMembershipsInput{}
}
output = &ListChannelMembershipsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelMemberships API operation for Amazon Chime SDK Messaging.
//
// Lists all channel memberships in a channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelMemberships for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMemberships
func (c *ChimeSDKMessaging) ListChannelMemberships(input *ListChannelMembershipsInput) (*ListChannelMembershipsOutput, error) {
req, out := c.ListChannelMembershipsRequest(input)
return out, req.Send()
}
// ListChannelMembershipsWithContext is the same as ListChannelMemberships with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelMemberships for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelMembershipsWithContext(ctx aws.Context, input *ListChannelMembershipsInput, opts ...request.Option) (*ListChannelMembershipsOutput, error) {
req, out := c.ListChannelMembershipsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelMembershipsPages iterates over the pages of a ListChannelMemberships operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelMemberships method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelMemberships operation.
// pageNum := 0
// err := client.ListChannelMembershipsPages(params,
// func(page *chimesdkmessaging.ListChannelMembershipsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelMembershipsPages(input *ListChannelMembershipsInput, fn func(*ListChannelMembershipsOutput, bool) bool) error {
return c.ListChannelMembershipsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelMembershipsPagesWithContext same as ListChannelMembershipsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelMembershipsPagesWithContext(ctx aws.Context, input *ListChannelMembershipsInput, fn func(*ListChannelMembershipsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelMembershipsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelMembershipsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelMembershipsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannelMembershipsForAppInstanceUser = "ListChannelMembershipsForAppInstanceUser"
// ListChannelMembershipsForAppInstanceUserRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelMembershipsForAppInstanceUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelMembershipsForAppInstanceUser for more information on using the ListChannelMembershipsForAppInstanceUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelMembershipsForAppInstanceUserRequest method.
// req, resp := client.ListChannelMembershipsForAppInstanceUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMembershipsForAppInstanceUser
func (c *ChimeSDKMessaging) ListChannelMembershipsForAppInstanceUserRequest(input *ListChannelMembershipsForAppInstanceUserInput) (req *request.Request, output *ListChannelMembershipsForAppInstanceUserOutput) {
op := &request.Operation{
Name: opListChannelMembershipsForAppInstanceUser,
HTTPMethod: "GET",
HTTPPath: "/channels?scope=app-instance-user-memberships",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelMembershipsForAppInstanceUserInput{}
}
output = &ListChannelMembershipsForAppInstanceUserOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelMembershipsForAppInstanceUser API operation for Amazon Chime SDK Messaging.
//
// Lists all channels that a particular AppInstanceUser is a part of. Only an
// AppInstanceAdmin can call the API with a user ARN that is not their own.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelMembershipsForAppInstanceUser for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMembershipsForAppInstanceUser
func (c *ChimeSDKMessaging) ListChannelMembershipsForAppInstanceUser(input *ListChannelMembershipsForAppInstanceUserInput) (*ListChannelMembershipsForAppInstanceUserOutput, error) {
req, out := c.ListChannelMembershipsForAppInstanceUserRequest(input)
return out, req.Send()
}
// ListChannelMembershipsForAppInstanceUserWithContext is the same as ListChannelMembershipsForAppInstanceUser with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelMembershipsForAppInstanceUser for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelMembershipsForAppInstanceUserWithContext(ctx aws.Context, input *ListChannelMembershipsForAppInstanceUserInput, opts ...request.Option) (*ListChannelMembershipsForAppInstanceUserOutput, error) {
req, out := c.ListChannelMembershipsForAppInstanceUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelMembershipsForAppInstanceUserPages iterates over the pages of a ListChannelMembershipsForAppInstanceUser operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelMembershipsForAppInstanceUser method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelMembershipsForAppInstanceUser operation.
// pageNum := 0
// err := client.ListChannelMembershipsForAppInstanceUserPages(params,
// func(page *chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelMembershipsForAppInstanceUserPages(input *ListChannelMembershipsForAppInstanceUserInput, fn func(*ListChannelMembershipsForAppInstanceUserOutput, bool) bool) error {
return c.ListChannelMembershipsForAppInstanceUserPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelMembershipsForAppInstanceUserPagesWithContext same as ListChannelMembershipsForAppInstanceUserPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelMembershipsForAppInstanceUserPagesWithContext(ctx aws.Context, input *ListChannelMembershipsForAppInstanceUserInput, fn func(*ListChannelMembershipsForAppInstanceUserOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelMembershipsForAppInstanceUserInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelMembershipsForAppInstanceUserRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelMembershipsForAppInstanceUserOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannelMessages = "ListChannelMessages"
// ListChannelMessagesRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelMessages operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelMessages for more information on using the ListChannelMessages
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelMessagesRequest method.
// req, resp := client.ListChannelMessagesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMessages
func (c *ChimeSDKMessaging) ListChannelMessagesRequest(input *ListChannelMessagesInput) (req *request.Request, output *ListChannelMessagesOutput) {
op := &request.Operation{
Name: opListChannelMessages,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/messages",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelMessagesInput{}
}
output = &ListChannelMessagesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelMessages API operation for Amazon Chime SDK Messaging.
//
// List all the messages in a channel. Returns a paginated list of ChannelMessages.
// By default, sorted by creation timestamp in descending order.
//
// Redacted messages appear in the results as empty, since they are only redacted,
// not deleted. Deleted messages do not appear in the results. This action always
// returns the latest version of an edited message.
//
// Also, the x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelMessages for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelMessages
func (c *ChimeSDKMessaging) ListChannelMessages(input *ListChannelMessagesInput) (*ListChannelMessagesOutput, error) {
req, out := c.ListChannelMessagesRequest(input)
return out, req.Send()
}
// ListChannelMessagesWithContext is the same as ListChannelMessages with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelMessages for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelMessagesWithContext(ctx aws.Context, input *ListChannelMessagesInput, opts ...request.Option) (*ListChannelMessagesOutput, error) {
req, out := c.ListChannelMessagesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelMessagesPages iterates over the pages of a ListChannelMessages operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelMessages method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelMessages operation.
// pageNum := 0
// err := client.ListChannelMessagesPages(params,
// func(page *chimesdkmessaging.ListChannelMessagesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelMessagesPages(input *ListChannelMessagesInput, fn func(*ListChannelMessagesOutput, bool) bool) error {
return c.ListChannelMessagesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelMessagesPagesWithContext same as ListChannelMessagesPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelMessagesPagesWithContext(ctx aws.Context, input *ListChannelMessagesInput, fn func(*ListChannelMessagesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelMessagesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelMessagesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelMessagesOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannelModerators = "ListChannelModerators"
// ListChannelModeratorsRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelModerators operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelModerators for more information on using the ListChannelModerators
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelModeratorsRequest method.
// req, resp := client.ListChannelModeratorsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelModerators
func (c *ChimeSDKMessaging) ListChannelModeratorsRequest(input *ListChannelModeratorsInput) (req *request.Request, output *ListChannelModeratorsOutput) {
op := &request.Operation{
Name: opListChannelModerators,
HTTPMethod: "GET",
HTTPPath: "/channels/{channelArn}/moderators",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelModeratorsInput{}
}
output = &ListChannelModeratorsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelModerators API operation for Amazon Chime SDK Messaging.
//
// Lists all the moderators for a channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelModerators for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelModerators
func (c *ChimeSDKMessaging) ListChannelModerators(input *ListChannelModeratorsInput) (*ListChannelModeratorsOutput, error) {
req, out := c.ListChannelModeratorsRequest(input)
return out, req.Send()
}
// ListChannelModeratorsWithContext is the same as ListChannelModerators with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelModerators for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelModeratorsWithContext(ctx aws.Context, input *ListChannelModeratorsInput, opts ...request.Option) (*ListChannelModeratorsOutput, error) {
req, out := c.ListChannelModeratorsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelModeratorsPages iterates over the pages of a ListChannelModerators operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelModerators method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelModerators operation.
// pageNum := 0
// err := client.ListChannelModeratorsPages(params,
// func(page *chimesdkmessaging.ListChannelModeratorsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelModeratorsPages(input *ListChannelModeratorsInput, fn func(*ListChannelModeratorsOutput, bool) bool) error {
return c.ListChannelModeratorsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelModeratorsPagesWithContext same as ListChannelModeratorsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelModeratorsPagesWithContext(ctx aws.Context, input *ListChannelModeratorsInput, fn func(*ListChannelModeratorsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelModeratorsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelModeratorsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelModeratorsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannels = "ListChannels"
// ListChannelsRequest generates a "aws/request.Request" representing the
// client's request for the ListChannels operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannels for more information on using the ListChannels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelsRequest method.
// req, resp := client.ListChannelsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannels
func (c *ChimeSDKMessaging) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) {
op := &request.Operation{
Name: opListChannels,
HTTPMethod: "GET",
HTTPPath: "/channels",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelsInput{}
}
output = &ListChannelsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannels API operation for Amazon Chime SDK Messaging.
//
// Lists all Channels created under a single Chime App as a paginated list.
// You can specify filters to narrow results.
//
// Functionality & restrictions
//
// * Use privacy = PUBLIC to retrieve all public channels in the account.
//
// * Only an AppInstanceAdmin can set privacy = PRIVATE to list the private
// channels in an account.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannels for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannels
func (c *ChimeSDKMessaging) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) {
req, out := c.ListChannelsRequest(input)
return out, req.Send()
}
// ListChannelsWithContext is the same as ListChannels with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannels for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) {
req, out := c.ListChannelsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelsPages iterates over the pages of a ListChannels operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannels method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannels operation.
// pageNum := 0
// err := client.ListChannelsPages(params,
// func(page *chimesdkmessaging.ListChannelsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error {
return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelsPagesWithContext same as ListChannelsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListChannelsModeratedByAppInstanceUser = "ListChannelsModeratedByAppInstanceUser"
// ListChannelsModeratedByAppInstanceUserRequest generates a "aws/request.Request" representing the
// client's request for the ListChannelsModeratedByAppInstanceUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannelsModeratedByAppInstanceUser for more information on using the ListChannelsModeratedByAppInstanceUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListChannelsModeratedByAppInstanceUserRequest method.
// req, resp := client.ListChannelsModeratedByAppInstanceUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelsModeratedByAppInstanceUser
func (c *ChimeSDKMessaging) ListChannelsModeratedByAppInstanceUserRequest(input *ListChannelsModeratedByAppInstanceUserInput) (req *request.Request, output *ListChannelsModeratedByAppInstanceUserOutput) {
op := &request.Operation{
Name: opListChannelsModeratedByAppInstanceUser,
HTTPMethod: "GET",
HTTPPath: "/channels?scope=app-instance-user-moderated-channels",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListChannelsModeratedByAppInstanceUserInput{}
}
output = &ListChannelsModeratedByAppInstanceUserOutput{}
req = c.newRequest(op, input, output)
return
}
// ListChannelsModeratedByAppInstanceUser API operation for Amazon Chime SDK Messaging.
//
// A list of the channels moderated by an AppInstanceUser.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation ListChannelsModeratedByAppInstanceUser for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ListChannelsModeratedByAppInstanceUser
func (c *ChimeSDKMessaging) ListChannelsModeratedByAppInstanceUser(input *ListChannelsModeratedByAppInstanceUserInput) (*ListChannelsModeratedByAppInstanceUserOutput, error) {
req, out := c.ListChannelsModeratedByAppInstanceUserRequest(input)
return out, req.Send()
}
// ListChannelsModeratedByAppInstanceUserWithContext is the same as ListChannelsModeratedByAppInstanceUser with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannelsModeratedByAppInstanceUser for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) ListChannelsModeratedByAppInstanceUserWithContext(ctx aws.Context, input *ListChannelsModeratedByAppInstanceUserInput, opts ...request.Option) (*ListChannelsModeratedByAppInstanceUserOutput, error) {
req, out := c.ListChannelsModeratedByAppInstanceUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListChannelsModeratedByAppInstanceUserPages iterates over the pages of a ListChannelsModeratedByAppInstanceUser operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannelsModeratedByAppInstanceUser method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListChannelsModeratedByAppInstanceUser operation.
// pageNum := 0
// err := client.ListChannelsModeratedByAppInstanceUserPages(params,
// func(page *chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ChimeSDKMessaging) ListChannelsModeratedByAppInstanceUserPages(input *ListChannelsModeratedByAppInstanceUserInput, fn func(*ListChannelsModeratedByAppInstanceUserOutput, bool) bool) error {
return c.ListChannelsModeratedByAppInstanceUserPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListChannelsModeratedByAppInstanceUserPagesWithContext same as ListChannelsModeratedByAppInstanceUserPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ChimeSDKMessaging) ListChannelsModeratedByAppInstanceUserPagesWithContext(ctx aws.Context, input *ListChannelsModeratedByAppInstanceUserInput, fn func(*ListChannelsModeratedByAppInstanceUserOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListChannelsModeratedByAppInstanceUserInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListChannelsModeratedByAppInstanceUserRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListChannelsModeratedByAppInstanceUserOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opRedactChannelMessage = "RedactChannelMessage"
// RedactChannelMessageRequest generates a "aws/request.Request" representing the
// client's request for the RedactChannelMessage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RedactChannelMessage for more information on using the RedactChannelMessage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RedactChannelMessageRequest method.
// req, resp := client.RedactChannelMessageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/RedactChannelMessage
func (c *ChimeSDKMessaging) RedactChannelMessageRequest(input *RedactChannelMessageInput) (req *request.Request, output *RedactChannelMessageOutput) {
op := &request.Operation{
Name: opRedactChannelMessage,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/messages/{messageId}?operation=redact",
}
if input == nil {
input = &RedactChannelMessageInput{}
}
output = &RedactChannelMessageOutput{}
req = c.newRequest(op, input, output)
return
}
// RedactChannelMessage API operation for Amazon Chime SDK Messaging.
//
// Redacts message content, but not metadata. The message exists in the back
// end, but the action returns null content, and the state shows as redacted.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation RedactChannelMessage for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/RedactChannelMessage
func (c *ChimeSDKMessaging) RedactChannelMessage(input *RedactChannelMessageInput) (*RedactChannelMessageOutput, error) {
req, out := c.RedactChannelMessageRequest(input)
return out, req.Send()
}
// RedactChannelMessageWithContext is the same as RedactChannelMessage with the addition of
// the ability to pass a context and additional request options.
//
// See RedactChannelMessage for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) RedactChannelMessageWithContext(ctx aws.Context, input *RedactChannelMessageInput, opts ...request.Option) (*RedactChannelMessageOutput, error) {
req, out := c.RedactChannelMessageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opSendChannelMessage = "SendChannelMessage"
// SendChannelMessageRequest generates a "aws/request.Request" representing the
// client's request for the SendChannelMessage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See SendChannelMessage for more information on using the SendChannelMessage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the SendChannelMessageRequest method.
// req, resp := client.SendChannelMessageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/SendChannelMessage
func (c *ChimeSDKMessaging) SendChannelMessageRequest(input *SendChannelMessageInput) (req *request.Request, output *SendChannelMessageOutput) {
op := &request.Operation{
Name: opSendChannelMessage,
HTTPMethod: "POST",
HTTPPath: "/channels/{channelArn}/messages",
}
if input == nil {
input = &SendChannelMessageInput{}
}
output = &SendChannelMessageOutput{}
req = c.newRequest(op, input, output)
return
}
// SendChannelMessage API operation for Amazon Chime SDK Messaging.
//
// Sends a message to a particular channel that the member is a part of.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Also, STANDARD messages can contain 4KB of data and the 1KB of metadata.
// CONTROL messages can contain 30 bytes of data and no metadata.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation SendChannelMessage for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/SendChannelMessage
func (c *ChimeSDKMessaging) SendChannelMessage(input *SendChannelMessageInput) (*SendChannelMessageOutput, error) {
req, out := c.SendChannelMessageRequest(input)
return out, req.Send()
}
// SendChannelMessageWithContext is the same as SendChannelMessage with the addition of
// the ability to pass a context and additional request options.
//
// See SendChannelMessage for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) SendChannelMessageWithContext(ctx aws.Context, input *SendChannelMessageInput, opts ...request.Option) (*SendChannelMessageOutput, error) {
req, out := c.SendChannelMessageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateChannel = "UpdateChannel"
// UpdateChannelRequest generates a "aws/request.Request" representing the
// client's request for the UpdateChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateChannel for more information on using the UpdateChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateChannelRequest method.
// req, resp := client.UpdateChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannel
func (c *ChimeSDKMessaging) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) {
op := &request.Operation{
Name: opUpdateChannel,
HTTPMethod: "PUT",
HTTPPath: "/channels/{channelArn}",
}
if input == nil {
input = &UpdateChannelInput{}
}
output = &UpdateChannelOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateChannel API operation for Amazon Chime SDK Messaging.
//
// Update a channel's attributes.
//
// Restriction: You can't change a channel's privacy.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation UpdateChannel for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannel
func (c *ChimeSDKMessaging) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) {
req, out := c.UpdateChannelRequest(input)
return out, req.Send()
}
// UpdateChannelWithContext is the same as UpdateChannel with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateChannel for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) {
req, out := c.UpdateChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateChannelMessage = "UpdateChannelMessage"
// UpdateChannelMessageRequest generates a "aws/request.Request" representing the
// client's request for the UpdateChannelMessage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateChannelMessage for more information on using the UpdateChannelMessage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateChannelMessageRequest method.
// req, resp := client.UpdateChannelMessageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannelMessage
func (c *ChimeSDKMessaging) UpdateChannelMessageRequest(input *UpdateChannelMessageInput) (req *request.Request, output *UpdateChannelMessageOutput) {
op := &request.Operation{
Name: opUpdateChannelMessage,
HTTPMethod: "PUT",
HTTPPath: "/channels/{channelArn}/messages/{messageId}",
}
if input == nil {
input = &UpdateChannelMessageInput{}
}
output = &UpdateChannelMessageOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateChannelMessage API operation for Amazon Chime SDK Messaging.
//
// Updates the content of a message.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation UpdateChannelMessage for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannelMessage
func (c *ChimeSDKMessaging) UpdateChannelMessage(input *UpdateChannelMessageInput) (*UpdateChannelMessageOutput, error) {
req, out := c.UpdateChannelMessageRequest(input)
return out, req.Send()
}
// UpdateChannelMessageWithContext is the same as UpdateChannelMessage with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateChannelMessage for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) UpdateChannelMessageWithContext(ctx aws.Context, input *UpdateChannelMessageInput, opts ...request.Option) (*UpdateChannelMessageOutput, error) {
req, out := c.UpdateChannelMessageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateChannelReadMarker = "UpdateChannelReadMarker"
// UpdateChannelReadMarkerRequest generates a "aws/request.Request" representing the
// client's request for the UpdateChannelReadMarker operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateChannelReadMarker for more information on using the UpdateChannelReadMarker
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateChannelReadMarkerRequest method.
// req, resp := client.UpdateChannelReadMarkerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannelReadMarker
func (c *ChimeSDKMessaging) UpdateChannelReadMarkerRequest(input *UpdateChannelReadMarkerInput) (req *request.Request, output *UpdateChannelReadMarkerOutput) {
op := &request.Operation{
Name: opUpdateChannelReadMarker,
HTTPMethod: "PUT",
HTTPPath: "/channels/{channelArn}/readMarker",
}
if input == nil {
input = &UpdateChannelReadMarkerInput{}
}
output = &UpdateChannelReadMarkerOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateChannelReadMarker API operation for Amazon Chime SDK Messaging.
//
// The details of the time when a user last read messages in a channel.
//
// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn
// of the user that makes the API call as the value in the header.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Chime SDK Messaging's
// API operation UpdateChannelReadMarker for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The input parameters don't match the service's restrictions.
//
// * ForbiddenException
// The client is permanently forbidden from making the request.
//
// * ConflictException
// The request could not be processed because of conflict in the current state
// of the resource.
//
// * UnauthorizedClientException
// The client is not currently authorized to make the request.
//
// * ThrottledClientException
// The client exceeded its request rate limit.
//
// * ServiceUnavailableException
// The service is currently unavailable.
//
// * ServiceFailureException
// The service encountered an unexpected error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/UpdateChannelReadMarker
func (c *ChimeSDKMessaging) UpdateChannelReadMarker(input *UpdateChannelReadMarkerInput) (*UpdateChannelReadMarkerOutput, error) {
req, out := c.UpdateChannelReadMarkerRequest(input)
return out, req.Send()
}
// UpdateChannelReadMarkerWithContext is the same as UpdateChannelReadMarker with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateChannelReadMarker for details on how to use this API operation.
//
// 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 *ChimeSDKMessaging) UpdateChannelReadMarkerWithContext(ctx aws.Context, input *UpdateChannelReadMarkerInput, opts ...request.Option) (*UpdateChannelReadMarkerOutput, error) {
req, out := c.UpdateChannelReadMarkerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// Summary of the membership details of an AppInstanceUser.
type AppInstanceUserMembershipSummary struct {
_ struct{} `type:"structure"`
// The time at which a message was last read.
ReadMarkerTimestamp *time.Time `type:"timestamp"`
// The type of ChannelMembership.
Type *string `type:"string" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s AppInstanceUserMembershipSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AppInstanceUserMembershipSummary) GoString() string {
return s.String()
}
// SetReadMarkerTimestamp sets the ReadMarkerTimestamp field's value.
func (s *AppInstanceUserMembershipSummary) SetReadMarkerTimestamp(v time.Time) *AppInstanceUserMembershipSummary {
s.ReadMarkerTimestamp = &v
return s
}
// SetType sets the Type field's value.
func (s *AppInstanceUserMembershipSummary) SetType(v string) *AppInstanceUserMembershipSummary {
s.Type = &v
return s
}
// The input parameters don't match the service's restrictions.
type BadRequestException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s BadRequestException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BadRequestException) GoString() string {
return s.String()
}
func newErrorBadRequestException(v protocol.ResponseMetadata) error {
return &BadRequestException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *BadRequestException) Code() string {
return "BadRequestException"
}
// Message returns the exception's message.
func (s *BadRequestException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *BadRequestException) OrigErr() error {
return nil
}
func (s *BadRequestException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *BadRequestException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *BadRequestException) RequestID() string {
return s.RespMetadata.RequestID
}
// The membership information, including member ARNs, the channel ARN, and membership
// types.
type BatchChannelMemberships struct {
_ struct{} `type:"structure"`
// The ARN of the channel to which you're adding users.
ChannelArn *string `min:"5" type:"string"`
// The identifier of the member who invited another member.
InvitedBy *Identity `type:"structure"`
// The users successfully added to the request.
Members []*Identity `type:"list"`
// The membership types set for the channel users.
Type *string `type:"string" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s BatchChannelMemberships) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchChannelMemberships) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *BatchChannelMemberships) SetChannelArn(v string) *BatchChannelMemberships {
s.ChannelArn = &v
return s
}
// SetInvitedBy sets the InvitedBy field's value.
func (s *BatchChannelMemberships) SetInvitedBy(v *Identity) *BatchChannelMemberships {
s.InvitedBy = v
return s
}
// SetMembers sets the Members field's value.
func (s *BatchChannelMemberships) SetMembers(v []*Identity) *BatchChannelMemberships {
s.Members = v
return s
}
// SetType sets the Type field's value.
func (s *BatchChannelMemberships) SetType(v string) *BatchChannelMemberships {
s.Type = &v
return s
}
// A list of failed member ARNs, error codes, and error messages.
type BatchCreateChannelMembershipError struct {
_ struct{} `type:"structure"`
// The error code.
ErrorCode *string `type:"string" enum:"ErrorCode"`
// The error message.
ErrorMessage *string `type:"string"`
// The ARN of the member that the service couldn't add.
MemberArn *string `min:"5" type:"string"`
}
// String returns the string representation
func (s BatchCreateChannelMembershipError) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchCreateChannelMembershipError) GoString() string {
return s.String()
}
// SetErrorCode sets the ErrorCode field's value.
func (s *BatchCreateChannelMembershipError) SetErrorCode(v string) *BatchCreateChannelMembershipError {
s.ErrorCode = &v
return s
}
// SetErrorMessage sets the ErrorMessage field's value.
func (s *BatchCreateChannelMembershipError) SetErrorMessage(v string) *BatchCreateChannelMembershipError {
s.ErrorMessage = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *BatchCreateChannelMembershipError) SetMemberArn(v string) *BatchCreateChannelMembershipError {
s.MemberArn = &v
return s
}
type BatchCreateChannelMembershipInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel to which you're adding users.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARNs of the members you want to add to the channel.
//
// MemberArns is a required field
MemberArns []*string `min:"1" type:"list" required:"true"`
// The membership type of a user, DEFAULT or HIDDEN. Default members are always
// returned as part of ListChannelMemberships. Hidden members are only returned
// if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden
// members are not returned. This is only supported by moderators.
Type *string `type:"string" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s BatchCreateChannelMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchCreateChannelMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchCreateChannelMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BatchCreateChannelMembershipInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArns == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArns"))
}
if s.MemberArns != nil && len(s.MemberArns) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MemberArns", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *BatchCreateChannelMembershipInput) SetChannelArn(v string) *BatchCreateChannelMembershipInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *BatchCreateChannelMembershipInput) SetChimeBearer(v string) *BatchCreateChannelMembershipInput {
s.ChimeBearer = &v
return s
}
// SetMemberArns sets the MemberArns field's value.
func (s *BatchCreateChannelMembershipInput) SetMemberArns(v []*string) *BatchCreateChannelMembershipInput {
s.MemberArns = v
return s
}
// SetType sets the Type field's value.
func (s *BatchCreateChannelMembershipInput) SetType(v string) *BatchCreateChannelMembershipInput {
s.Type = &v
return s
}
type BatchCreateChannelMembershipOutput struct {
_ struct{} `type:"structure"`
// The list of channel memberships in the response.
BatchChannelMemberships *BatchChannelMemberships `type:"structure"`
// If the action fails for one or more of the memberships in the request, a
// list of the memberships is returned, along with error codes and error messages.
Errors []*BatchCreateChannelMembershipError `type:"list"`
}
// String returns the string representation
func (s BatchCreateChannelMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchCreateChannelMembershipOutput) GoString() string {
return s.String()
}
// SetBatchChannelMemberships sets the BatchChannelMemberships field's value.
func (s *BatchCreateChannelMembershipOutput) SetBatchChannelMemberships(v *BatchChannelMemberships) *BatchCreateChannelMembershipOutput {
s.BatchChannelMemberships = v
return s
}
// SetErrors sets the Errors field's value.
func (s *BatchCreateChannelMembershipOutput) SetErrors(v []*BatchCreateChannelMembershipError) *BatchCreateChannelMembershipOutput {
s.Errors = v
return s
}
// The details of a channel.
type Channel struct {
_ struct{} `type:"structure"`
// The ARN of a channel.
ChannelArn *string `min:"5" type:"string"`
// The AppInstanceUser who created the channel.
CreatedBy *Identity `type:"structure"`
// The time at which the AppInstanceUser created the channel.
CreatedTimestamp *time.Time `type:"timestamp"`
// The time at which a member sent the last message in the channel.
LastMessageTimestamp *time.Time `type:"timestamp"`
// The time at which a channel was last updated.
LastUpdatedTimestamp *time.Time `type:"timestamp"`
// The channel's metadata.
Metadata *string `type:"string" sensitive:"true"`
// The mode of the channel.
Mode *string `type:"string" enum:"ChannelMode"`
// The name of a channel.
Name *string `min:"1" type:"string" sensitive:"true"`
// The channel's privacy setting.
Privacy *string `type:"string" enum:"ChannelPrivacy"`
}
// String returns the string representation
func (s Channel) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Channel) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *Channel) SetChannelArn(v string) *Channel {
s.ChannelArn = &v
return s
}
// SetCreatedBy sets the CreatedBy field's value.
func (s *Channel) SetCreatedBy(v *Identity) *Channel {
s.CreatedBy = v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *Channel) SetCreatedTimestamp(v time.Time) *Channel {
s.CreatedTimestamp = &v
return s
}
// SetLastMessageTimestamp sets the LastMessageTimestamp field's value.
func (s *Channel) SetLastMessageTimestamp(v time.Time) *Channel {
s.LastMessageTimestamp = &v
return s
}
// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
func (s *Channel) SetLastUpdatedTimestamp(v time.Time) *Channel {
s.LastUpdatedTimestamp = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *Channel) SetMetadata(v string) *Channel {
s.Metadata = &v
return s
}
// SetMode sets the Mode field's value.
func (s *Channel) SetMode(v string) *Channel {
s.Mode = &v
return s
}
// SetName sets the Name field's value.
func (s *Channel) SetName(v string) *Channel {
s.Name = &v
return s
}
// SetPrivacy sets the Privacy field's value.
func (s *Channel) SetPrivacy(v string) *Channel {
s.Privacy = &v
return s
}
// The details of a channel ban.
type ChannelBan struct {
_ struct{} `type:"structure"`
// The ARN of the channel from which a member is being banned.
ChannelArn *string `min:"5" type:"string"`
// The AppInstanceUser who created the ban.
CreatedBy *Identity `type:"structure"`
// The time at which the ban was created.
CreatedTimestamp *time.Time `type:"timestamp"`
// The member being banned from the channel.
Member *Identity `type:"structure"`
}
// String returns the string representation
func (s ChannelBan) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelBan) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ChannelBan) SetChannelArn(v string) *ChannelBan {
s.ChannelArn = &v
return s
}
// SetCreatedBy sets the CreatedBy field's value.
func (s *ChannelBan) SetCreatedBy(v *Identity) *ChannelBan {
s.CreatedBy = v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ChannelBan) SetCreatedTimestamp(v time.Time) *ChannelBan {
s.CreatedTimestamp = &v
return s
}
// SetMember sets the Member field's value.
func (s *ChannelBan) SetMember(v *Identity) *ChannelBan {
s.Member = v
return s
}
// Summary of the details of a ChannelBan.
type ChannelBanSummary struct {
_ struct{} `type:"structure"`
// The member being banned from a channel.
Member *Identity `type:"structure"`
}
// String returns the string representation
func (s ChannelBanSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelBanSummary) GoString() string {
return s.String()
}
// SetMember sets the Member field's value.
func (s *ChannelBanSummary) SetMember(v *Identity) *ChannelBanSummary {
s.Member = v
return s
}
// The details of a channel member.
type ChannelMembership struct {
_ struct{} `type:"structure"`
// The ARN of the member's channel.
ChannelArn *string `min:"5" type:"string"`
// The time at which the channel membership was created.
CreatedTimestamp *time.Time `type:"timestamp"`
// The identifier of the member who invited another member.
InvitedBy *Identity `type:"structure"`
// The time at which a channel membership was last updated.
LastUpdatedTimestamp *time.Time `type:"timestamp"`
// The data of the channel member.
Member *Identity `type:"structure"`
// The membership type set for the channel member.
Type *string `type:"string" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s ChannelMembership) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelMembership) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ChannelMembership) SetChannelArn(v string) *ChannelMembership {
s.ChannelArn = &v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ChannelMembership) SetCreatedTimestamp(v time.Time) *ChannelMembership {
s.CreatedTimestamp = &v
return s
}
// SetInvitedBy sets the InvitedBy field's value.
func (s *ChannelMembership) SetInvitedBy(v *Identity) *ChannelMembership {
s.InvitedBy = v
return s
}
// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
func (s *ChannelMembership) SetLastUpdatedTimestamp(v time.Time) *ChannelMembership {
s.LastUpdatedTimestamp = &v
return s
}
// SetMember sets the Member field's value.
func (s *ChannelMembership) SetMember(v *Identity) *ChannelMembership {
s.Member = v
return s
}
// SetType sets the Type field's value.
func (s *ChannelMembership) SetType(v string) *ChannelMembership {
s.Type = &v
return s
}
// Summary of the channel membership details of an AppInstanceUser.
type ChannelMembershipForAppInstanceUserSummary struct {
_ struct{} `type:"structure"`
// Returns the channel membership data for an AppInstance.
AppInstanceUserMembershipSummary *AppInstanceUserMembershipSummary `type:"structure"`
// Returns the channel data for an AppInstance.
ChannelSummary *ChannelSummary `type:"structure"`
}
// String returns the string representation
func (s ChannelMembershipForAppInstanceUserSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelMembershipForAppInstanceUserSummary) GoString() string {
return s.String()
}
// SetAppInstanceUserMembershipSummary sets the AppInstanceUserMembershipSummary field's value.
func (s *ChannelMembershipForAppInstanceUserSummary) SetAppInstanceUserMembershipSummary(v *AppInstanceUserMembershipSummary) *ChannelMembershipForAppInstanceUserSummary {
s.AppInstanceUserMembershipSummary = v
return s
}
// SetChannelSummary sets the ChannelSummary field's value.
func (s *ChannelMembershipForAppInstanceUserSummary) SetChannelSummary(v *ChannelSummary) *ChannelMembershipForAppInstanceUserSummary {
s.ChannelSummary = v
return s
}
// Summary of the details of a ChannelMembership.
type ChannelMembershipSummary struct {
_ struct{} `type:"structure"`
// A member's summary data.
Member *Identity `type:"structure"`
}
// String returns the string representation
func (s ChannelMembershipSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelMembershipSummary) GoString() string {
return s.String()
}
// SetMember sets the Member field's value.
func (s *ChannelMembershipSummary) SetMember(v *Identity) *ChannelMembershipSummary {
s.Member = v
return s
}
// The details of a message in a channel.
type ChannelMessage struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The message content.
Content *string `type:"string" sensitive:"true"`
// The time at which the message was created.
CreatedTimestamp *time.Time `type:"timestamp"`
// The time at which a message was edited.
LastEditedTimestamp *time.Time `type:"timestamp"`
// The time at which a message was updated.
LastUpdatedTimestamp *time.Time `type:"timestamp"`
// The ID of a message.
MessageId *string `min:"1" type:"string"`
// The message metadata.
Metadata *string `type:"string" sensitive:"true"`
// The persistence setting for a channel message.
Persistence *string `type:"string" enum:"ChannelMessagePersistenceType"`
// Hides the content of a message.
Redacted *bool `type:"boolean"`
// The message sender.
Sender *Identity `type:"structure"`
// The message type.
Type *string `type:"string" enum:"ChannelMessageType"`
}
// String returns the string representation
func (s ChannelMessage) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelMessage) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ChannelMessage) SetChannelArn(v string) *ChannelMessage {
s.ChannelArn = &v
return s
}
// SetContent sets the Content field's value.
func (s *ChannelMessage) SetContent(v string) *ChannelMessage {
s.Content = &v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ChannelMessage) SetCreatedTimestamp(v time.Time) *ChannelMessage {
s.CreatedTimestamp = &v
return s
}
// SetLastEditedTimestamp sets the LastEditedTimestamp field's value.
func (s *ChannelMessage) SetLastEditedTimestamp(v time.Time) *ChannelMessage {
s.LastEditedTimestamp = &v
return s
}
// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
func (s *ChannelMessage) SetLastUpdatedTimestamp(v time.Time) *ChannelMessage {
s.LastUpdatedTimestamp = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *ChannelMessage) SetMessageId(v string) *ChannelMessage {
s.MessageId = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *ChannelMessage) SetMetadata(v string) *ChannelMessage {
s.Metadata = &v
return s
}
// SetPersistence sets the Persistence field's value.
func (s *ChannelMessage) SetPersistence(v string) *ChannelMessage {
s.Persistence = &v
return s
}
// SetRedacted sets the Redacted field's value.
func (s *ChannelMessage) SetRedacted(v bool) *ChannelMessage {
s.Redacted = &v
return s
}
// SetSender sets the Sender field's value.
func (s *ChannelMessage) SetSender(v *Identity) *ChannelMessage {
s.Sender = v
return s
}
// SetType sets the Type field's value.
func (s *ChannelMessage) SetType(v string) *ChannelMessage {
s.Type = &v
return s
}
// Summary of the messages in a Channel.
type ChannelMessageSummary struct {
_ struct{} `type:"structure"`
// The content of the message.
Content *string `type:"string" sensitive:"true"`
// The time at which the message summary was created.
CreatedTimestamp *time.Time `type:"timestamp"`
// The time at which a message was last edited.
LastEditedTimestamp *time.Time `type:"timestamp"`
// The time at which a message was last updated.
LastUpdatedTimestamp *time.Time `type:"timestamp"`
// The ID of the message.
MessageId *string `min:"1" type:"string"`
// The metadata of the message.
Metadata *string `type:"string" sensitive:"true"`
// Indicates whether a message was redacted.
Redacted *bool `type:"boolean"`
// The message sender.
Sender *Identity `type:"structure"`
// The type of message.
Type *string `type:"string" enum:"ChannelMessageType"`
}
// String returns the string representation
func (s ChannelMessageSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelMessageSummary) GoString() string {
return s.String()
}
// SetContent sets the Content field's value.
func (s *ChannelMessageSummary) SetContent(v string) *ChannelMessageSummary {
s.Content = &v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ChannelMessageSummary) SetCreatedTimestamp(v time.Time) *ChannelMessageSummary {
s.CreatedTimestamp = &v
return s
}
// SetLastEditedTimestamp sets the LastEditedTimestamp field's value.
func (s *ChannelMessageSummary) SetLastEditedTimestamp(v time.Time) *ChannelMessageSummary {
s.LastEditedTimestamp = &v
return s
}
// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
func (s *ChannelMessageSummary) SetLastUpdatedTimestamp(v time.Time) *ChannelMessageSummary {
s.LastUpdatedTimestamp = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *ChannelMessageSummary) SetMessageId(v string) *ChannelMessageSummary {
s.MessageId = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *ChannelMessageSummary) SetMetadata(v string) *ChannelMessageSummary {
s.Metadata = &v
return s
}
// SetRedacted sets the Redacted field's value.
func (s *ChannelMessageSummary) SetRedacted(v bool) *ChannelMessageSummary {
s.Redacted = &v
return s
}
// SetSender sets the Sender field's value.
func (s *ChannelMessageSummary) SetSender(v *Identity) *ChannelMessageSummary {
s.Sender = v
return s
}
// SetType sets the Type field's value.
func (s *ChannelMessageSummary) SetType(v string) *ChannelMessageSummary {
s.Type = &v
return s
}
// Summary of the details of a moderated channel.
type ChannelModeratedByAppInstanceUserSummary struct {
_ struct{} `type:"structure"`
// Summary of the details of a Channel.
ChannelSummary *ChannelSummary `type:"structure"`
}
// String returns the string representation
func (s ChannelModeratedByAppInstanceUserSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelModeratedByAppInstanceUserSummary) GoString() string {
return s.String()
}
// SetChannelSummary sets the ChannelSummary field's value.
func (s *ChannelModeratedByAppInstanceUserSummary) SetChannelSummary(v *ChannelSummary) *ChannelModeratedByAppInstanceUserSummary {
s.ChannelSummary = v
return s
}
// The details of a channel moderator.
type ChannelModerator struct {
_ struct{} `type:"structure"`
// The ARN of the moderator's channel.
ChannelArn *string `min:"5" type:"string"`
// The AppInstanceUser who created the moderator.
CreatedBy *Identity `type:"structure"`
// The time at which the moderator was created.
CreatedTimestamp *time.Time `type:"timestamp"`
// The moderator's data.
Moderator *Identity `type:"structure"`
}
// String returns the string representation
func (s ChannelModerator) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelModerator) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ChannelModerator) SetChannelArn(v string) *ChannelModerator {
s.ChannelArn = &v
return s
}
// SetCreatedBy sets the CreatedBy field's value.
func (s *ChannelModerator) SetCreatedBy(v *Identity) *ChannelModerator {
s.CreatedBy = v
return s
}
// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ChannelModerator) SetCreatedTimestamp(v time.Time) *ChannelModerator {
s.CreatedTimestamp = &v
return s
}
// SetModerator sets the Moderator field's value.
func (s *ChannelModerator) SetModerator(v *Identity) *ChannelModerator {
s.Moderator = v
return s
}
// Summary of the details of a ChannelModerator.
type ChannelModeratorSummary struct {
_ struct{} `type:"structure"`
// The data for a moderator.
Moderator *Identity `type:"structure"`
}
// String returns the string representation
func (s ChannelModeratorSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelModeratorSummary) GoString() string {
return s.String()
}
// SetModerator sets the Moderator field's value.
func (s *ChannelModeratorSummary) SetModerator(v *Identity) *ChannelModeratorSummary {
s.Moderator = v
return s
}
// Summary of the details of a Channel.
type ChannelSummary struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The time at which the last message in a channel was sent.
LastMessageTimestamp *time.Time `type:"timestamp"`
// The metadata of the channel.
Metadata *string `type:"string" sensitive:"true"`
// The mode of the channel.
Mode *string `type:"string" enum:"ChannelMode"`
// The name of the channel.
Name *string `min:"1" type:"string" sensitive:"true"`
// The privacy setting of the channel.
Privacy *string `type:"string" enum:"ChannelPrivacy"`
}
// String returns the string representation
func (s ChannelSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ChannelSummary) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ChannelSummary) SetChannelArn(v string) *ChannelSummary {
s.ChannelArn = &v
return s
}
// SetLastMessageTimestamp sets the LastMessageTimestamp field's value.
func (s *ChannelSummary) SetLastMessageTimestamp(v time.Time) *ChannelSummary {
s.LastMessageTimestamp = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *ChannelSummary) SetMetadata(v string) *ChannelSummary {
s.Metadata = &v
return s
}
// SetMode sets the Mode field's value.
func (s *ChannelSummary) SetMode(v string) *ChannelSummary {
s.Mode = &v
return s
}
// SetName sets the Name field's value.
func (s *ChannelSummary) SetName(v string) *ChannelSummary {
s.Name = &v
return s
}
// SetPrivacy sets the Privacy field's value.
func (s *ChannelSummary) SetPrivacy(v string) *ChannelSummary {
s.Privacy = &v
return s
}
// The request could not be processed because of conflict in the current state
// of the resource.
type ConflictException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ConflictException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ConflictException) GoString() string {
return s.String()
}
func newErrorConflictException(v protocol.ResponseMetadata) error {
return &ConflictException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ConflictException) Code() string {
return "ConflictException"
}
// Message returns the exception's message.
func (s *ConflictException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ConflictException) OrigErr() error {
return nil
}
func (s *ConflictException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ConflictException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ConflictException) RequestID() string {
return s.RespMetadata.RequestID
}
type CreateChannelBanInput struct {
_ struct{} `type:"structure"`
// The ARN of the ban request.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the member being banned.
//
// MemberArn is a required field
MemberArn *string `min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateChannelBanInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelBanInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateChannelBanInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateChannelBanInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelBanInput) SetChannelArn(v string) *CreateChannelBanInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *CreateChannelBanInput) SetChimeBearer(v string) *CreateChannelBanInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *CreateChannelBanInput) SetMemberArn(v string) *CreateChannelBanInput {
s.MemberArn = &v
return s
}
type CreateChannelBanOutput struct {
_ struct{} `type:"structure"`
// The ARN of the response to the ban request.
ChannelArn *string `min:"5" type:"string"`
// The ChannelArn and BannedIdentity of the member in the ban response.
Member *Identity `type:"structure"`
}
// String returns the string representation
func (s CreateChannelBanOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelBanOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelBanOutput) SetChannelArn(v string) *CreateChannelBanOutput {
s.ChannelArn = &v
return s
}
// SetMember sets the Member field's value.
func (s *CreateChannelBanOutput) SetMember(v *Identity) *CreateChannelBanOutput {
s.Member = v
return s
}
type CreateChannelInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel request.
//
// AppInstanceArn is a required field
AppInstanceArn *string `min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The client token for the request. An Idempotency token.
ClientRequestToken *string `min:"2" type:"string" idempotencyToken:"true" sensitive:"true"`
// The metadata of the creation request. Limited to 1KB and UTF-8.
Metadata *string `type:"string" sensitive:"true"`
// The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators,
// and channel members can add themselves and other members to unrestricted
// channels. Only administrators and moderators can add members to restricted
// channels.
Mode *string `type:"string" enum:"ChannelMode"`
// The name of the channel.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true" sensitive:"true"`
// The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable
// by users outside the channel. Public channels are discoverable by anyone
// in the AppInstance.
Privacy *string `type:"string" enum:"ChannelPrivacy"`
// The tags for the creation request.
Tags []*Tag `min:"1" type:"list"`
}
// String returns the string representation
func (s CreateChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateChannelInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"}
if s.AppInstanceArn == nil {
invalidParams.Add(request.NewErrParamRequired("AppInstanceArn"))
}
if s.AppInstanceArn != nil && len(*s.AppInstanceArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 2 {
invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 2))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if s.Tags != nil && len(s.Tags) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
}
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceArn sets the AppInstanceArn field's value.
func (s *CreateChannelInput) SetAppInstanceArn(v string) *CreateChannelInput {
s.AppInstanceArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *CreateChannelInput) SetChimeBearer(v string) *CreateChannelInput {
s.ChimeBearer = &v
return s
}
// SetClientRequestToken sets the ClientRequestToken field's value.
func (s *CreateChannelInput) SetClientRequestToken(v string) *CreateChannelInput {
s.ClientRequestToken = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *CreateChannelInput) SetMetadata(v string) *CreateChannelInput {
s.Metadata = &v
return s
}
// SetMode sets the Mode field's value.
func (s *CreateChannelInput) SetMode(v string) *CreateChannelInput {
s.Mode = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateChannelInput) SetName(v string) *CreateChannelInput {
s.Name = &v
return s
}
// SetPrivacy sets the Privacy field's value.
func (s *CreateChannelInput) SetPrivacy(v string) *CreateChannelInput {
s.Privacy = &v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateChannelInput) SetTags(v []*Tag) *CreateChannelInput {
s.Tags = v
return s
}
type CreateChannelMembershipInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel to which you're adding users.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the member you want to add to the channel.
//
// MemberArn is a required field
MemberArn *string `min:"5" type:"string" required:"true"`
// The membership type of a user, DEFAULT or HIDDEN. Default members are always
// returned as part of ListChannelMemberships. Hidden members are only returned
// if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden
// members are not returned. This is only supported by moderators.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s CreateChannelMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateChannelMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateChannelMembershipInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelMembershipInput) SetChannelArn(v string) *CreateChannelMembershipInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *CreateChannelMembershipInput) SetChimeBearer(v string) *CreateChannelMembershipInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *CreateChannelMembershipInput) SetMemberArn(v string) *CreateChannelMembershipInput {
s.MemberArn = &v
return s
}
// SetType sets the Type field's value.
func (s *CreateChannelMembershipInput) SetType(v string) *CreateChannelMembershipInput {
s.Type = &v
return s
}
type CreateChannelMembershipOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The ARN and metadata of the member being added.
Member *Identity `type:"structure"`
}
// String returns the string representation
func (s CreateChannelMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelMembershipOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelMembershipOutput) SetChannelArn(v string) *CreateChannelMembershipOutput {
s.ChannelArn = &v
return s
}
// SetMember sets the Member field's value.
func (s *CreateChannelMembershipOutput) SetMember(v *Identity) *CreateChannelMembershipOutput {
s.Member = v
return s
}
type CreateChannelModeratorInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The ARN of the moderator.
//
// ChannelModeratorArn is a required field
ChannelModeratorArn *string `min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateChannelModeratorInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelModeratorInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateChannelModeratorInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateChannelModeratorInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChannelModeratorArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelModeratorArn"))
}
if s.ChannelModeratorArn != nil && len(*s.ChannelModeratorArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelModeratorArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelModeratorInput) SetChannelArn(v string) *CreateChannelModeratorInput {
s.ChannelArn = &v
return s
}
// SetChannelModeratorArn sets the ChannelModeratorArn field's value.
func (s *CreateChannelModeratorInput) SetChannelModeratorArn(v string) *CreateChannelModeratorInput {
s.ChannelModeratorArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *CreateChannelModeratorInput) SetChimeBearer(v string) *CreateChannelModeratorInput {
s.ChimeBearer = &v
return s
}
type CreateChannelModeratorOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The ARNs of the channel and the moderator.
ChannelModerator *Identity `type:"structure"`
}
// String returns the string representation
func (s CreateChannelModeratorOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelModeratorOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelModeratorOutput) SetChannelArn(v string) *CreateChannelModeratorOutput {
s.ChannelArn = &v
return s
}
// SetChannelModerator sets the ChannelModerator field's value.
func (s *CreateChannelModeratorOutput) SetChannelModerator(v *Identity) *CreateChannelModeratorOutput {
s.ChannelModerator = v
return s
}
type CreateChannelOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
}
// String returns the string representation
func (s CreateChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateChannelOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelOutput) SetChannelArn(v string) *CreateChannelOutput {
s.ChannelArn = &v
return s
}
type DeleteChannelBanInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel from which the AppInstanceUser was banned.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the AppInstanceUser that you want to reinstate.
//
// MemberArn is a required field
MemberArn *string `location:"uri" locationName:"memberArn" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteChannelBanInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelBanInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelBanInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteChannelBanInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DeleteChannelBanInput) SetChannelArn(v string) *DeleteChannelBanInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DeleteChannelBanInput) SetChimeBearer(v string) *DeleteChannelBanInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *DeleteChannelBanInput) SetMemberArn(v string) *DeleteChannelBanInput {
s.MemberArn = &v
return s
}
type DeleteChannelBanOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteChannelBanOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelBanOutput) GoString() string {
return s.String()
}
type DeleteChannelInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel being deleted.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DeleteChannelInput) SetChannelArn(v string) *DeleteChannelInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DeleteChannelInput) SetChimeBearer(v string) *DeleteChannelInput {
s.ChimeBearer = &v
return s
}
type DeleteChannelMembershipInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel from which you want to remove the user.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the member that you're removing from the channel.
//
// MemberArn is a required field
MemberArn *string `location:"uri" locationName:"memberArn" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteChannelMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteChannelMembershipInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DeleteChannelMembershipInput) SetChannelArn(v string) *DeleteChannelMembershipInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DeleteChannelMembershipInput) SetChimeBearer(v string) *DeleteChannelMembershipInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *DeleteChannelMembershipInput) SetMemberArn(v string) *DeleteChannelMembershipInput {
s.MemberArn = &v
return s
}
type DeleteChannelMembershipOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteChannelMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelMembershipOutput) GoString() string {
return s.String()
}
type DeleteChannelMessageInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ID of the message being deleted.
//
// MessageId is a required field
MessageId *string `location:"uri" locationName:"messageId" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteChannelMessageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelMessageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelMessageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteChannelMessageInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MessageId == nil {
invalidParams.Add(request.NewErrParamRequired("MessageId"))
}
if s.MessageId != nil && len(*s.MessageId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MessageId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DeleteChannelMessageInput) SetChannelArn(v string) *DeleteChannelMessageInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DeleteChannelMessageInput) SetChimeBearer(v string) *DeleteChannelMessageInput {
s.ChimeBearer = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *DeleteChannelMessageInput) SetMessageId(v string) *DeleteChannelMessageInput {
s.MessageId = &v
return s
}
type DeleteChannelMessageOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteChannelMessageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelMessageOutput) GoString() string {
return s.String()
}
type DeleteChannelModeratorInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The ARN of the moderator being deleted.
//
// ChannelModeratorArn is a required field
ChannelModeratorArn *string `location:"uri" locationName:"channelModeratorArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteChannelModeratorInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelModeratorInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelModeratorInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteChannelModeratorInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChannelModeratorArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelModeratorArn"))
}
if s.ChannelModeratorArn != nil && len(*s.ChannelModeratorArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelModeratorArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DeleteChannelModeratorInput) SetChannelArn(v string) *DeleteChannelModeratorInput {
s.ChannelArn = &v
return s
}
// SetChannelModeratorArn sets the ChannelModeratorArn field's value.
func (s *DeleteChannelModeratorInput) SetChannelModeratorArn(v string) *DeleteChannelModeratorInput {
s.ChannelModeratorArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DeleteChannelModeratorInput) SetChimeBearer(v string) *DeleteChannelModeratorInput {
s.ChimeBearer = &v
return s
}
type DeleteChannelModeratorOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteChannelModeratorOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelModeratorOutput) GoString() string {
return s.String()
}
type DeleteChannelOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteChannelOutput) GoString() string {
return s.String()
}
type DescribeChannelBanInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel from which the user is banned.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the member being banned.
//
// MemberArn is a required field
MemberArn *string `location:"uri" locationName:"memberArn" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelBanInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelBanInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelBanInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelBanInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelBanInput) SetChannelArn(v string) *DescribeChannelBanInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelBanInput) SetChimeBearer(v string) *DescribeChannelBanInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *DescribeChannelBanInput) SetMemberArn(v string) *DescribeChannelBanInput {
s.MemberArn = &v
return s
}
type DescribeChannelBanOutput struct {
_ struct{} `type:"structure"`
// The details of the ban.
ChannelBan *ChannelBan `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelBanOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelBanOutput) GoString() string {
return s.String()
}
// SetChannelBan sets the ChannelBan field's value.
func (s *DescribeChannelBanOutput) SetChannelBan(v *ChannelBan) *DescribeChannelBanOutput {
s.ChannelBan = v
return s
}
type DescribeChannelInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelInput) SetChannelArn(v string) *DescribeChannelInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelInput) SetChimeBearer(v string) *DescribeChannelInput {
s.ChimeBearer = &v
return s
}
type DescribeChannelMembershipForAppInstanceUserInput struct {
_ struct{} `type:"structure"`
// The ARN of the user in a channel.
//
// AppInstanceUserArn is a required field
AppInstanceUserArn *string `location:"querystring" locationName:"app-instance-user-arn" min:"5" type:"string" required:"true"`
// The ARN of the channel to which the user belongs.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelMembershipForAppInstanceUserInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelMembershipForAppInstanceUserInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelMembershipForAppInstanceUserInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelMembershipForAppInstanceUserInput"}
if s.AppInstanceUserArn == nil {
invalidParams.Add(request.NewErrParamRequired("AppInstanceUserArn"))
}
if s.AppInstanceUserArn != nil && len(*s.AppInstanceUserArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceUserArn", 5))
}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceUserArn sets the AppInstanceUserArn field's value.
func (s *DescribeChannelMembershipForAppInstanceUserInput) SetAppInstanceUserArn(v string) *DescribeChannelMembershipForAppInstanceUserInput {
s.AppInstanceUserArn = &v
return s
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelMembershipForAppInstanceUserInput) SetChannelArn(v string) *DescribeChannelMembershipForAppInstanceUserInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelMembershipForAppInstanceUserInput) SetChimeBearer(v string) *DescribeChannelMembershipForAppInstanceUserInput {
s.ChimeBearer = &v
return s
}
type DescribeChannelMembershipForAppInstanceUserOutput struct {
_ struct{} `type:"structure"`
// The channel to which a user belongs.
ChannelMembership *ChannelMembershipForAppInstanceUserSummary `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelMembershipForAppInstanceUserOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelMembershipForAppInstanceUserOutput) GoString() string {
return s.String()
}
// SetChannelMembership sets the ChannelMembership field's value.
func (s *DescribeChannelMembershipForAppInstanceUserOutput) SetChannelMembership(v *ChannelMembershipForAppInstanceUserSummary) *DescribeChannelMembershipForAppInstanceUserOutput {
s.ChannelMembership = v
return s
}
type DescribeChannelMembershipInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ARN of the member.
//
// MemberArn is a required field
MemberArn *string `location:"uri" locationName:"memberArn" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelMembershipInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MemberArn == nil {
invalidParams.Add(request.NewErrParamRequired("MemberArn"))
}
if s.MemberArn != nil && len(*s.MemberArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("MemberArn", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelMembershipInput) SetChannelArn(v string) *DescribeChannelMembershipInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelMembershipInput) SetChimeBearer(v string) *DescribeChannelMembershipInput {
s.ChimeBearer = &v
return s
}
// SetMemberArn sets the MemberArn field's value.
func (s *DescribeChannelMembershipInput) SetMemberArn(v string) *DescribeChannelMembershipInput {
s.MemberArn = &v
return s
}
type DescribeChannelMembershipOutput struct {
_ struct{} `type:"structure"`
// The details of the membership.
ChannelMembership *ChannelMembership `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelMembershipOutput) GoString() string {
return s.String()
}
// SetChannelMembership sets the ChannelMembership field's value.
func (s *DescribeChannelMembershipOutput) SetChannelMembership(v *ChannelMembership) *DescribeChannelMembershipOutput {
s.ChannelMembership = v
return s
}
type DescribeChannelModeratedByAppInstanceUserInput struct {
_ struct{} `type:"structure"`
// The ARN of the AppInstanceUser in the moderated channel.
//
// AppInstanceUserArn is a required field
AppInstanceUserArn *string `location:"querystring" locationName:"app-instance-user-arn" min:"5" type:"string" required:"true"`
// The ARN of the moderated channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelModeratedByAppInstanceUserInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelModeratedByAppInstanceUserInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelModeratedByAppInstanceUserInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelModeratedByAppInstanceUserInput"}
if s.AppInstanceUserArn == nil {
invalidParams.Add(request.NewErrParamRequired("AppInstanceUserArn"))
}
if s.AppInstanceUserArn != nil && len(*s.AppInstanceUserArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceUserArn", 5))
}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceUserArn sets the AppInstanceUserArn field's value.
func (s *DescribeChannelModeratedByAppInstanceUserInput) SetAppInstanceUserArn(v string) *DescribeChannelModeratedByAppInstanceUserInput {
s.AppInstanceUserArn = &v
return s
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelModeratedByAppInstanceUserInput) SetChannelArn(v string) *DescribeChannelModeratedByAppInstanceUserInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelModeratedByAppInstanceUserInput) SetChimeBearer(v string) *DescribeChannelModeratedByAppInstanceUserInput {
s.ChimeBearer = &v
return s
}
type DescribeChannelModeratedByAppInstanceUserOutput struct {
_ struct{} `type:"structure"`
// The moderated channel.
Channel *ChannelModeratedByAppInstanceUserSummary `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelModeratedByAppInstanceUserOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelModeratedByAppInstanceUserOutput) GoString() string {
return s.String()
}
// SetChannel sets the Channel field's value.
func (s *DescribeChannelModeratedByAppInstanceUserOutput) SetChannel(v *ChannelModeratedByAppInstanceUserSummary) *DescribeChannelModeratedByAppInstanceUserOutput {
s.Channel = v
return s
}
type DescribeChannelModeratorInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The ARN of the channel moderator.
//
// ChannelModeratorArn is a required field
ChannelModeratorArn *string `location:"uri" locationName:"channelModeratorArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeChannelModeratorInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelModeratorInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeChannelModeratorInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeChannelModeratorInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChannelModeratorArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelModeratorArn"))
}
if s.ChannelModeratorArn != nil && len(*s.ChannelModeratorArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelModeratorArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *DescribeChannelModeratorInput) SetChannelArn(v string) *DescribeChannelModeratorInput {
s.ChannelArn = &v
return s
}
// SetChannelModeratorArn sets the ChannelModeratorArn field's value.
func (s *DescribeChannelModeratorInput) SetChannelModeratorArn(v string) *DescribeChannelModeratorInput {
s.ChannelModeratorArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *DescribeChannelModeratorInput) SetChimeBearer(v string) *DescribeChannelModeratorInput {
s.ChimeBearer = &v
return s
}
type DescribeChannelModeratorOutput struct {
_ struct{} `type:"structure"`
// The details of the channel moderator.
ChannelModerator *ChannelModerator `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelModeratorOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelModeratorOutput) GoString() string {
return s.String()
}
// SetChannelModerator sets the ChannelModerator field's value.
func (s *DescribeChannelModeratorOutput) SetChannelModerator(v *ChannelModerator) *DescribeChannelModeratorOutput {
s.ChannelModerator = v
return s
}
type DescribeChannelOutput struct {
_ struct{} `type:"structure"`
// The channel details.
Channel *Channel `type:"structure"`
}
// String returns the string representation
func (s DescribeChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeChannelOutput) GoString() string {
return s.String()
}
// SetChannel sets the Channel field's value.
func (s *DescribeChannelOutput) SetChannel(v *Channel) *DescribeChannelOutput {
s.Channel = v
return s
}
// The client is permanently forbidden from making the request.
type ForbiddenException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ForbiddenException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ForbiddenException) GoString() string {
return s.String()
}
func newErrorForbiddenException(v protocol.ResponseMetadata) error {
return &ForbiddenException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ForbiddenException) Code() string {
return "ForbiddenException"
}
// Message returns the exception's message.
func (s *ForbiddenException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ForbiddenException) OrigErr() error {
return nil
}
func (s *ForbiddenException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ForbiddenException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ForbiddenException) RequestID() string {
return s.RespMetadata.RequestID
}
type GetChannelMessageInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ID of the message.
//
// MessageId is a required field
MessageId *string `location:"uri" locationName:"messageId" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetChannelMessageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetChannelMessageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetChannelMessageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetChannelMessageInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MessageId == nil {
invalidParams.Add(request.NewErrParamRequired("MessageId"))
}
if s.MessageId != nil && len(*s.MessageId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MessageId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *GetChannelMessageInput) SetChannelArn(v string) *GetChannelMessageInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *GetChannelMessageInput) SetChimeBearer(v string) *GetChannelMessageInput {
s.ChimeBearer = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *GetChannelMessageInput) SetMessageId(v string) *GetChannelMessageInput {
s.MessageId = &v
return s
}
type GetChannelMessageOutput struct {
_ struct{} `type:"structure"`
// The details of and content in the message.
ChannelMessage *ChannelMessage `type:"structure"`
}
// String returns the string representation
func (s GetChannelMessageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetChannelMessageOutput) GoString() string {
return s.String()
}
// SetChannelMessage sets the ChannelMessage field's value.
func (s *GetChannelMessageOutput) SetChannelMessage(v *ChannelMessage) *GetChannelMessageOutput {
s.ChannelMessage = v
return s
}
type GetMessagingSessionEndpointInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetMessagingSessionEndpointInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMessagingSessionEndpointInput) GoString() string {
return s.String()
}
type GetMessagingSessionEndpointOutput struct {
_ struct{} `type:"structure"`
// The endpoint returned in the response.
Endpoint *MessagingSessionEndpoint `type:"structure"`
}
// String returns the string representation
func (s GetMessagingSessionEndpointOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMessagingSessionEndpointOutput) GoString() string {
return s.String()
}
// SetEndpoint sets the Endpoint field's value.
func (s *GetMessagingSessionEndpointOutput) SetEndpoint(v *MessagingSessionEndpoint) *GetMessagingSessionEndpointOutput {
s.Endpoint = v
return s
}
// The details of a user.
type Identity struct {
_ struct{} `type:"structure"`
// The ARN in an Identity.
Arn *string `min:"5" type:"string"`
// The name in an Identity.
Name *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s Identity) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Identity) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *Identity) SetArn(v string) *Identity {
s.Arn = &v
return s
}
// SetName sets the Name field's value.
func (s *Identity) SetName(v string) *Identity {
s.Name = &v
return s
}
type ListChannelBansInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of bans that you want returned.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token passed by previous API calls until all requested bans are returned.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelBansInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelBansInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelBansInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelBansInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelBansInput) SetChannelArn(v string) *ListChannelBansInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelBansInput) SetChimeBearer(v string) *ListChannelBansInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelBansInput) SetMaxResults(v int64) *ListChannelBansInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelBansInput) SetNextToken(v string) *ListChannelBansInput {
s.NextToken = &v
return s
}
type ListChannelBansOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The information for each requested ban.
ChannelBans []*ChannelBanSummary `type:"list"`
// The token passed by previous API calls until all requested bans are returned.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelBansOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelBansOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelBansOutput) SetChannelArn(v string) *ListChannelBansOutput {
s.ChannelArn = &v
return s
}
// SetChannelBans sets the ChannelBans field's value.
func (s *ListChannelBansOutput) SetChannelBans(v []*ChannelBanSummary) *ListChannelBansOutput {
s.ChannelBans = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelBansOutput) SetNextToken(v string) *ListChannelBansOutput {
s.NextToken = &v
return s
}
type ListChannelMembershipsForAppInstanceUserInput struct {
_ struct{} `type:"structure"`
// The ARN of the AppInstanceUsers
AppInstanceUserArn *string `location:"querystring" locationName:"app-instance-user-arn" min:"5" type:"string"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of users that you want returned.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token returned from previous API requests until the number of channel
// memberships is reached.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelMembershipsForAppInstanceUserInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMembershipsForAppInstanceUserInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelMembershipsForAppInstanceUserInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelMembershipsForAppInstanceUserInput"}
if s.AppInstanceUserArn != nil && len(*s.AppInstanceUserArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceUserArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceUserArn sets the AppInstanceUserArn field's value.
func (s *ListChannelMembershipsForAppInstanceUserInput) SetAppInstanceUserArn(v string) *ListChannelMembershipsForAppInstanceUserInput {
s.AppInstanceUserArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelMembershipsForAppInstanceUserInput) SetChimeBearer(v string) *ListChannelMembershipsForAppInstanceUserInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelMembershipsForAppInstanceUserInput) SetMaxResults(v int64) *ListChannelMembershipsForAppInstanceUserInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMembershipsForAppInstanceUserInput) SetNextToken(v string) *ListChannelMembershipsForAppInstanceUserInput {
s.NextToken = &v
return s
}
type ListChannelMembershipsForAppInstanceUserOutput struct {
_ struct{} `type:"structure"`
// The token passed by previous API calls until all requested users are returned.
ChannelMemberships []*ChannelMembershipForAppInstanceUserSummary `type:"list"`
// The token passed by previous API calls until all requested users are returned.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelMembershipsForAppInstanceUserOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMembershipsForAppInstanceUserOutput) GoString() string {
return s.String()
}
// SetChannelMemberships sets the ChannelMemberships field's value.
func (s *ListChannelMembershipsForAppInstanceUserOutput) SetChannelMemberships(v []*ChannelMembershipForAppInstanceUserSummary) *ListChannelMembershipsForAppInstanceUserOutput {
s.ChannelMemberships = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMembershipsForAppInstanceUserOutput) SetNextToken(v string) *ListChannelMembershipsForAppInstanceUserOutput {
s.NextToken = &v
return s
}
type ListChannelMembershipsInput struct {
_ struct{} `type:"structure"`
// The maximum number of channel memberships that you want returned.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of channel memberships that you want returned.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token passed by previous API calls until all requested channel memberships
// are returned.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
// The membership type of a user, DEFAULT or HIDDEN. Default members are always
// returned as part of ListChannelMemberships. Hidden members are only returned
// if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden
// members are not returned.
Type *string `location:"querystring" locationName:"type" type:"string" enum:"ChannelMembershipType"`
}
// String returns the string representation
func (s ListChannelMembershipsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMembershipsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelMembershipsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelMembershipsInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelMembershipsInput) SetChannelArn(v string) *ListChannelMembershipsInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelMembershipsInput) SetChimeBearer(v string) *ListChannelMembershipsInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelMembershipsInput) SetMaxResults(v int64) *ListChannelMembershipsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMembershipsInput) SetNextToken(v string) *ListChannelMembershipsInput {
s.NextToken = &v
return s
}
// SetType sets the Type field's value.
func (s *ListChannelMembershipsInput) SetType(v string) *ListChannelMembershipsInput {
s.Type = &v
return s
}
type ListChannelMembershipsOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The information for the requested channel memberships.
ChannelMemberships []*ChannelMembershipSummary `type:"list"`
// The token passed by previous API calls until all requested channel memberships
// are returned.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelMembershipsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMembershipsOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelMembershipsOutput) SetChannelArn(v string) *ListChannelMembershipsOutput {
s.ChannelArn = &v
return s
}
// SetChannelMemberships sets the ChannelMemberships field's value.
func (s *ListChannelMembershipsOutput) SetChannelMemberships(v []*ChannelMembershipSummary) *ListChannelMembershipsOutput {
s.ChannelMemberships = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMembershipsOutput) SetNextToken(v string) *ListChannelMembershipsOutput {
s.NextToken = &v
return s
}
type ListChannelMessagesInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of messages that you want returned.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token passed by previous API calls until all requested messages are returned.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
// The final or ending time stamp for your requested messages.
NotAfter *time.Time `location:"querystring" locationName:"not-after" type:"timestamp"`
// The initial or starting time stamp for your requested messages.
NotBefore *time.Time `location:"querystring" locationName:"not-before" type:"timestamp"`
// The order in which you want messages sorted. Default is Descending, based
// on time created.
SortOrder *string `location:"querystring" locationName:"sort-order" type:"string" enum:"SortOrder"`
}
// String returns the string representation
func (s ListChannelMessagesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMessagesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelMessagesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelMessagesInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelMessagesInput) SetChannelArn(v string) *ListChannelMessagesInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelMessagesInput) SetChimeBearer(v string) *ListChannelMessagesInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelMessagesInput) SetMaxResults(v int64) *ListChannelMessagesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMessagesInput) SetNextToken(v string) *ListChannelMessagesInput {
s.NextToken = &v
return s
}
// SetNotAfter sets the NotAfter field's value.
func (s *ListChannelMessagesInput) SetNotAfter(v time.Time) *ListChannelMessagesInput {
s.NotAfter = &v
return s
}
// SetNotBefore sets the NotBefore field's value.
func (s *ListChannelMessagesInput) SetNotBefore(v time.Time) *ListChannelMessagesInput {
s.NotBefore = &v
return s
}
// SetSortOrder sets the SortOrder field's value.
func (s *ListChannelMessagesInput) SetSortOrder(v string) *ListChannelMessagesInput {
s.SortOrder = &v
return s
}
type ListChannelMessagesOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel containing the requested messages.
ChannelArn *string `min:"5" type:"string"`
// The information about, and content of, each requested message.
ChannelMessages []*ChannelMessageSummary `type:"list"`
// The token passed by previous API calls until all requested messages are returned.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelMessagesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelMessagesOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelMessagesOutput) SetChannelArn(v string) *ListChannelMessagesOutput {
s.ChannelArn = &v
return s
}
// SetChannelMessages sets the ChannelMessages field's value.
func (s *ListChannelMessagesOutput) SetChannelMessages(v []*ChannelMessageSummary) *ListChannelMessagesOutput {
s.ChannelMessages = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelMessagesOutput) SetNextToken(v string) *ListChannelMessagesOutput {
s.NextToken = &v
return s
}
type ListChannelModeratorsInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of moderators that you want returned.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token passed by previous API calls until all requested moderators are
// returned.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelModeratorsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelModeratorsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelModeratorsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelModeratorsInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelModeratorsInput) SetChannelArn(v string) *ListChannelModeratorsInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelModeratorsInput) SetChimeBearer(v string) *ListChannelModeratorsInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelModeratorsInput) SetMaxResults(v int64) *ListChannelModeratorsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelModeratorsInput) SetNextToken(v string) *ListChannelModeratorsInput {
s.NextToken = &v
return s
}
type ListChannelModeratorsOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The information about and names of each moderator.
ChannelModerators []*ChannelModeratorSummary `type:"list"`
// The token passed by previous API calls until all requested moderators are
// returned.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelModeratorsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelModeratorsOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *ListChannelModeratorsOutput) SetChannelArn(v string) *ListChannelModeratorsOutput {
s.ChannelArn = &v
return s
}
// SetChannelModerators sets the ChannelModerators field's value.
func (s *ListChannelModeratorsOutput) SetChannelModerators(v []*ChannelModeratorSummary) *ListChannelModeratorsOutput {
s.ChannelModerators = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelModeratorsOutput) SetNextToken(v string) *ListChannelModeratorsOutput {
s.NextToken = &v
return s
}
type ListChannelsInput struct {
_ struct{} `type:"structure"`
// The ARN of the AppInstance.
//
// AppInstanceArn is a required field
AppInstanceArn *string `location:"querystring" locationName:"app-instance-arn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of channels that you want to return.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token passed by previous API calls until all requested channels are returned.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
// The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves
// private channels. Only an AppInstanceAdmin can retrieve private channels.
Privacy *string `location:"querystring" locationName:"privacy" type:"string" enum:"ChannelPrivacy"`
}
// String returns the string representation
func (s ListChannelsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"}
if s.AppInstanceArn == nil {
invalidParams.Add(request.NewErrParamRequired("AppInstanceArn"))
}
if s.AppInstanceArn != nil && len(*s.AppInstanceArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceArn sets the AppInstanceArn field's value.
func (s *ListChannelsInput) SetAppInstanceArn(v string) *ListChannelsInput {
s.AppInstanceArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelsInput) SetChimeBearer(v string) *ListChannelsInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput {
s.NextToken = &v
return s
}
// SetPrivacy sets the Privacy field's value.
func (s *ListChannelsInput) SetPrivacy(v string) *ListChannelsInput {
s.Privacy = &v
return s
}
type ListChannelsModeratedByAppInstanceUserInput struct {
_ struct{} `type:"structure"`
// The ARN of the user in the moderated channel.
AppInstanceUserArn *string `location:"querystring" locationName:"app-instance-user-arn" min:"5" type:"string"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The maximum number of channels in the request.
MaxResults *int64 `location:"querystring" locationName:"max-results" min:"1" type:"integer"`
// The token returned from previous API requests until the number of channels
// moderated by the user is reached.
NextToken *string `location:"querystring" locationName:"next-token" type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelsModeratedByAppInstanceUserInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelsModeratedByAppInstanceUserInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelsModeratedByAppInstanceUserInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListChannelsModeratedByAppInstanceUserInput"}
if s.AppInstanceUserArn != nil && len(*s.AppInstanceUserArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("AppInstanceUserArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAppInstanceUserArn sets the AppInstanceUserArn field's value.
func (s *ListChannelsModeratedByAppInstanceUserInput) SetAppInstanceUserArn(v string) *ListChannelsModeratedByAppInstanceUserInput {
s.AppInstanceUserArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *ListChannelsModeratedByAppInstanceUserInput) SetChimeBearer(v string) *ListChannelsModeratedByAppInstanceUserInput {
s.ChimeBearer = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelsModeratedByAppInstanceUserInput) SetMaxResults(v int64) *ListChannelsModeratedByAppInstanceUserInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelsModeratedByAppInstanceUserInput) SetNextToken(v string) *ListChannelsModeratedByAppInstanceUserInput {
s.NextToken = &v
return s
}
type ListChannelsModeratedByAppInstanceUserOutput struct {
_ struct{} `type:"structure"`
// The moderated channels in the request.
Channels []*ChannelModeratedByAppInstanceUserSummary `type:"list"`
// The token returned from previous API requests until the number of channels
// moderated by the user is reached.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelsModeratedByAppInstanceUserOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelsModeratedByAppInstanceUserOutput) GoString() string {
return s.String()
}
// SetChannels sets the Channels field's value.
func (s *ListChannelsModeratedByAppInstanceUserOutput) SetChannels(v []*ChannelModeratedByAppInstanceUserSummary) *ListChannelsModeratedByAppInstanceUserOutput {
s.Channels = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelsModeratedByAppInstanceUserOutput) SetNextToken(v string) *ListChannelsModeratedByAppInstanceUserOutput {
s.NextToken = &v
return s
}
type ListChannelsOutput struct {
_ struct{} `type:"structure"`
// The information about each channel.
Channels []*ChannelSummary `type:"list"`
// The token returned from previous API requests until the number of channels
// is reached.
NextToken *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s ListChannelsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListChannelsOutput) GoString() string {
return s.String()
}
// SetChannels sets the Channels field's value.
func (s *ListChannelsOutput) SetChannels(v []*ChannelSummary) *ListChannelsOutput {
s.Channels = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput {
s.NextToken = &v
return s
}
// The websocket endpoint used to connect to Amazon Chime SDK messaging.
type MessagingSessionEndpoint struct {
_ struct{} `type:"structure"`
// The endpoint to which you establish a websocket connection.
Url *string `type:"string"`
}
// String returns the string representation
func (s MessagingSessionEndpoint) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MessagingSessionEndpoint) GoString() string {
return s.String()
}
// SetUrl sets the Url field's value.
func (s *MessagingSessionEndpoint) SetUrl(v string) *MessagingSessionEndpoint {
s.Url = &v
return s
}
// One or more of the resources in the request does not exist in the system.
type NotFoundException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s NotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s NotFoundException) GoString() string {
return s.String()
}
func newErrorNotFoundException(v protocol.ResponseMetadata) error {
return &NotFoundException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *NotFoundException) Code() string {
return "NotFoundException"
}
// Message returns the exception's message.
func (s *NotFoundException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NotFoundException) OrigErr() error {
return nil
}
func (s *NotFoundException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *NotFoundException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *NotFoundException) RequestID() string {
return s.RespMetadata.RequestID
}
type RedactChannelMessageInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel containing the messages that you want to redact.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The ID of the message being redacted.
//
// MessageId is a required field
MessageId *string `location:"uri" locationName:"messageId" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s RedactChannelMessageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RedactChannelMessageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RedactChannelMessageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RedactChannelMessageInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MessageId == nil {
invalidParams.Add(request.NewErrParamRequired("MessageId"))
}
if s.MessageId != nil && len(*s.MessageId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MessageId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *RedactChannelMessageInput) SetChannelArn(v string) *RedactChannelMessageInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *RedactChannelMessageInput) SetChimeBearer(v string) *RedactChannelMessageInput {
s.ChimeBearer = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *RedactChannelMessageInput) SetMessageId(v string) *RedactChannelMessageInput {
s.MessageId = &v
return s
}
type RedactChannelMessageOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel containing the messages that you want to redact.
ChannelArn *string `min:"5" type:"string"`
// The ID of the message being redacted.
MessageId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s RedactChannelMessageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RedactChannelMessageOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *RedactChannelMessageOutput) SetChannelArn(v string) *RedactChannelMessageOutput {
s.ChannelArn = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *RedactChannelMessageOutput) SetMessageId(v string) *RedactChannelMessageOutput {
s.MessageId = &v
return s
}
// The request exceeds the resource limit.
type ResourceLimitExceededException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ResourceLimitExceededException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResourceLimitExceededException) GoString() string {
return s.String()
}
func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error {
return &ResourceLimitExceededException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ResourceLimitExceededException) Code() string {
return "ResourceLimitExceededException"
}
// Message returns the exception's message.
func (s *ResourceLimitExceededException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceLimitExceededException) OrigErr() error {
return nil
}
func (s *ResourceLimitExceededException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ResourceLimitExceededException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ResourceLimitExceededException) RequestID() string {
return s.RespMetadata.RequestID
}
type SendChannelMessageInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The Idempotency token for each client request.
ClientRequestToken *string `min:"2" type:"string" idempotencyToken:"true" sensitive:"true"`
// The content of the message.
//
// Content is a required field
Content *string `min:"1" type:"string" required:"true" sensitive:"true"`
// The optional metadata for each message.
Metadata *string `type:"string" sensitive:"true"`
// Boolean that controls whether the message is persisted on the back end. Required.
//
// Persistence is a required field
Persistence *string `type:"string" required:"true" enum:"ChannelMessagePersistenceType"`
// The type of message, STANDARD or CONTROL.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"ChannelMessageType"`
}
// String returns the string representation
func (s SendChannelMessageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SendChannelMessageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *SendChannelMessageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SendChannelMessageInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 2 {
invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 2))
}
if s.Content == nil {
invalidParams.Add(request.NewErrParamRequired("Content"))
}
if s.Content != nil && len(*s.Content) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Content", 1))
}
if s.Persistence == nil {
invalidParams.Add(request.NewErrParamRequired("Persistence"))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *SendChannelMessageInput) SetChannelArn(v string) *SendChannelMessageInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *SendChannelMessageInput) SetChimeBearer(v string) *SendChannelMessageInput {
s.ChimeBearer = &v
return s
}
// SetClientRequestToken sets the ClientRequestToken field's value.
func (s *SendChannelMessageInput) SetClientRequestToken(v string) *SendChannelMessageInput {
s.ClientRequestToken = &v
return s
}
// SetContent sets the Content field's value.
func (s *SendChannelMessageInput) SetContent(v string) *SendChannelMessageInput {
s.Content = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *SendChannelMessageInput) SetMetadata(v string) *SendChannelMessageInput {
s.Metadata = &v
return s
}
// SetPersistence sets the Persistence field's value.
func (s *SendChannelMessageInput) SetPersistence(v string) *SendChannelMessageInput {
s.Persistence = &v
return s
}
// SetType sets the Type field's value.
func (s *SendChannelMessageInput) SetType(v string) *SendChannelMessageInput {
s.Type = &v
return s
}
type SendChannelMessageOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The ID string assigned to each message.
MessageId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s SendChannelMessageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SendChannelMessageOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *SendChannelMessageOutput) SetChannelArn(v string) *SendChannelMessageOutput {
s.ChannelArn = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *SendChannelMessageOutput) SetMessageId(v string) *SendChannelMessageOutput {
s.MessageId = &v
return s
}
// The service encountered an unexpected error.
type ServiceFailureException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ServiceFailureException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceFailureException) GoString() string {
return s.String()
}
func newErrorServiceFailureException(v protocol.ResponseMetadata) error {
return &ServiceFailureException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ServiceFailureException) Code() string {
return "ServiceFailureException"
}
// Message returns the exception's message.
func (s *ServiceFailureException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ServiceFailureException) OrigErr() error {
return nil
}
func (s *ServiceFailureException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ServiceFailureException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ServiceFailureException) RequestID() string {
return s.RespMetadata.RequestID
}
// The service is currently unavailable.
type ServiceUnavailableException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ServiceUnavailableException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceUnavailableException) GoString() string {
return s.String()
}
func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error {
return &ServiceUnavailableException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ServiceUnavailableException) Code() string {
return "ServiceUnavailableException"
}
// Message returns the exception's message.
func (s *ServiceUnavailableException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ServiceUnavailableException) OrigErr() error {
return nil
}
func (s *ServiceUnavailableException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ServiceUnavailableException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ServiceUnavailableException) RequestID() string {
return s.RespMetadata.RequestID
}
// Describes a tag applied to a resource.
type Tag struct {
_ struct{} `type:"structure"`
// The key of the tag.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true" sensitive:"true"`
// The value of the tag.
//
// Value is a required field
Value *string `min:"1" type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Tag) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Tag"}
if s.Key == nil {
invalidParams.Add(request.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Key", 1))
}
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
if s.Value != nil && len(*s.Value) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Value", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
s.Key = &v
return s
}
// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
s.Value = &v
return s
}
// The client exceeded its request rate limit.
type ThrottledClientException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ThrottledClientException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ThrottledClientException) GoString() string {
return s.String()
}
func newErrorThrottledClientException(v protocol.ResponseMetadata) error {
return &ThrottledClientException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ThrottledClientException) Code() string {
return "ThrottledClientException"
}
// Message returns the exception's message.
func (s *ThrottledClientException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ThrottledClientException) OrigErr() error {
return nil
}
func (s *ThrottledClientException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ThrottledClientException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ThrottledClientException) RequestID() string {
return s.RespMetadata.RequestID
}
// The client is not currently authorized to make the request.
type UnauthorizedClientException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Code_ *string `locationName:"Code" type:"string" enum:"ErrorCode"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s UnauthorizedClientException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UnauthorizedClientException) GoString() string {
return s.String()
}
func newErrorUnauthorizedClientException(v protocol.ResponseMetadata) error {
return &UnauthorizedClientException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *UnauthorizedClientException) Code() string {
return "UnauthorizedClientException"
}
// Message returns the exception's message.
func (s *UnauthorizedClientException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *UnauthorizedClientException) OrigErr() error {
return nil
}
func (s *UnauthorizedClientException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *UnauthorizedClientException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *UnauthorizedClientException) RequestID() string {
return s.RespMetadata.RequestID
}
type UpdateChannelInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The metadata for the update request.
Metadata *string `type:"string" sensitive:"true"`
// The mode of the update request.
//
// Mode is a required field
Mode *string `type:"string" required:"true" enum:"ChannelMode"`
// The name of the channel.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation
func (s UpdateChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateChannelInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.Mode == nil {
invalidParams.Add(request.NewErrParamRequired("Mode"))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelInput) SetChannelArn(v string) *UpdateChannelInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *UpdateChannelInput) SetChimeBearer(v string) *UpdateChannelInput {
s.ChimeBearer = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *UpdateChannelInput) SetMetadata(v string) *UpdateChannelInput {
s.Metadata = &v
return s
}
// SetMode sets the Mode field's value.
func (s *UpdateChannelInput) SetMode(v string) *UpdateChannelInput {
s.Mode = &v
return s
}
// SetName sets the Name field's value.
func (s *UpdateChannelInput) SetName(v string) *UpdateChannelInput {
s.Name = &v
return s
}
type UpdateChannelMessageInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
// The content of the message being updated.
Content *string `type:"string" sensitive:"true"`
// The ID string of the message being updated.
//
// MessageId is a required field
MessageId *string `location:"uri" locationName:"messageId" min:"1" type:"string" required:"true"`
// The metadata of the message being updated.
Metadata *string `type:"string" sensitive:"true"`
}
// String returns the string representation
func (s UpdateChannelMessageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelMessageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateChannelMessageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateChannelMessageInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if s.MessageId == nil {
invalidParams.Add(request.NewErrParamRequired("MessageId"))
}
if s.MessageId != nil && len(*s.MessageId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MessageId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelMessageInput) SetChannelArn(v string) *UpdateChannelMessageInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *UpdateChannelMessageInput) SetChimeBearer(v string) *UpdateChannelMessageInput {
s.ChimeBearer = &v
return s
}
// SetContent sets the Content field's value.
func (s *UpdateChannelMessageInput) SetContent(v string) *UpdateChannelMessageInput {
s.Content = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *UpdateChannelMessageInput) SetMessageId(v string) *UpdateChannelMessageInput {
s.MessageId = &v
return s
}
// SetMetadata sets the Metadata field's value.
func (s *UpdateChannelMessageInput) SetMetadata(v string) *UpdateChannelMessageInput {
s.Metadata = &v
return s
}
type UpdateChannelMessageOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
// The ID string of the message being updated.
MessageId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s UpdateChannelMessageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelMessageOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelMessageOutput) SetChannelArn(v string) *UpdateChannelMessageOutput {
s.ChannelArn = &v
return s
}
// SetMessageId sets the MessageId field's value.
func (s *UpdateChannelMessageOutput) SetMessageId(v string) *UpdateChannelMessageOutput {
s.MessageId = &v
return s
}
type UpdateChannelOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
}
// String returns the string representation
func (s UpdateChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelOutput) SetChannelArn(v string) *UpdateChannelOutput {
s.ChannelArn = &v
return s
}
type UpdateChannelReadMarkerInput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
//
// ChannelArn is a required field
ChannelArn *string `location:"uri" locationName:"channelArn" min:"5" type:"string" required:"true"`
// The AppInstanceUserArn of the user that makes the API call.
//
// ChimeBearer is a required field
ChimeBearer *string `location:"header" locationName:"x-amz-chime-bearer" min:"5" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateChannelReadMarkerInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelReadMarkerInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateChannelReadMarkerInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateChannelReadMarkerInput"}
if s.ChannelArn == nil {
invalidParams.Add(request.NewErrParamRequired("ChannelArn"))
}
if s.ChannelArn != nil && len(*s.ChannelArn) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChannelArn", 5))
}
if s.ChimeBearer == nil {
invalidParams.Add(request.NewErrParamRequired("ChimeBearer"))
}
if s.ChimeBearer != nil && len(*s.ChimeBearer) < 5 {
invalidParams.Add(request.NewErrParamMinLen("ChimeBearer", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelReadMarkerInput) SetChannelArn(v string) *UpdateChannelReadMarkerInput {
s.ChannelArn = &v
return s
}
// SetChimeBearer sets the ChimeBearer field's value.
func (s *UpdateChannelReadMarkerInput) SetChimeBearer(v string) *UpdateChannelReadMarkerInput {
s.ChimeBearer = &v
return s
}
type UpdateChannelReadMarkerOutput struct {
_ struct{} `type:"structure"`
// The ARN of the channel.
ChannelArn *string `min:"5" type:"string"`
}
// String returns the string representation
func (s UpdateChannelReadMarkerOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateChannelReadMarkerOutput) GoString() string {
return s.String()
}
// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelReadMarkerOutput) SetChannelArn(v string) *UpdateChannelReadMarkerOutput {
s.ChannelArn = &v
return s
}
const (
// ChannelMembershipTypeDefault is a ChannelMembershipType enum value
ChannelMembershipTypeDefault = "DEFAULT"
// ChannelMembershipTypeHidden is a ChannelMembershipType enum value
ChannelMembershipTypeHidden = "HIDDEN"
)
// ChannelMembershipType_Values returns all elements of the ChannelMembershipType enum
func ChannelMembershipType_Values() []string {
return []string{
ChannelMembershipTypeDefault,
ChannelMembershipTypeHidden,
}
}
const (
// ChannelMessagePersistenceTypePersistent is a ChannelMessagePersistenceType enum value
ChannelMessagePersistenceTypePersistent = "PERSISTENT"
// ChannelMessagePersistenceTypeNonPersistent is a ChannelMessagePersistenceType enum value
ChannelMessagePersistenceTypeNonPersistent = "NON_PERSISTENT"
)
// ChannelMessagePersistenceType_Values returns all elements of the ChannelMessagePersistenceType enum
func ChannelMessagePersistenceType_Values() []string {
return []string{
ChannelMessagePersistenceTypePersistent,
ChannelMessagePersistenceTypeNonPersistent,
}
}
const (
// ChannelMessageTypeStandard is a ChannelMessageType enum value
ChannelMessageTypeStandard = "STANDARD"
// ChannelMessageTypeControl is a ChannelMessageType enum value
ChannelMessageTypeControl = "CONTROL"
)
// ChannelMessageType_Values returns all elements of the ChannelMessageType enum
func ChannelMessageType_Values() []string {
return []string{
ChannelMessageTypeStandard,
ChannelMessageTypeControl,
}
}
const (
// ChannelModeUnrestricted is a ChannelMode enum value
ChannelModeUnrestricted = "UNRESTRICTED"
// ChannelModeRestricted is a ChannelMode enum value
ChannelModeRestricted = "RESTRICTED"
)
// ChannelMode_Values returns all elements of the ChannelMode enum
func ChannelMode_Values() []string {
return []string{
ChannelModeUnrestricted,
ChannelModeRestricted,
}
}
const (
// ChannelPrivacyPublic is a ChannelPrivacy enum value
ChannelPrivacyPublic = "PUBLIC"
// ChannelPrivacyPrivate is a ChannelPrivacy enum value
ChannelPrivacyPrivate = "PRIVATE"
)
// ChannelPrivacy_Values returns all elements of the ChannelPrivacy enum
func ChannelPrivacy_Values() []string {
return []string{
ChannelPrivacyPublic,
ChannelPrivacyPrivate,
}
}
const (
// ErrorCodeBadRequest is a ErrorCode enum value
ErrorCodeBadRequest = "BadRequest"
// ErrorCodeConflict is a ErrorCode enum value
ErrorCodeConflict = "Conflict"
// ErrorCodeForbidden is a ErrorCode enum value
ErrorCodeForbidden = "Forbidden"
// ErrorCodeNotFound is a ErrorCode enum value
ErrorCodeNotFound = "NotFound"
// ErrorCodePreconditionFailed is a ErrorCode enum value
ErrorCodePreconditionFailed = "PreconditionFailed"
// ErrorCodeResourceLimitExceeded is a ErrorCode enum value
ErrorCodeResourceLimitExceeded = "ResourceLimitExceeded"
// ErrorCodeServiceFailure is a ErrorCode enum value
ErrorCodeServiceFailure = "ServiceFailure"
// ErrorCodeAccessDenied is a ErrorCode enum value
ErrorCodeAccessDenied = "AccessDenied"
// ErrorCodeServiceUnavailable is a ErrorCode enum value
ErrorCodeServiceUnavailable = "ServiceUnavailable"
// ErrorCodeThrottled is a ErrorCode enum value
ErrorCodeThrottled = "Throttled"
// ErrorCodeThrottling is a ErrorCode enum value
ErrorCodeThrottling = "Throttling"
// ErrorCodeUnauthorized is a ErrorCode enum value
ErrorCodeUnauthorized = "Unauthorized"
// ErrorCodeUnprocessable is a ErrorCode enum value
ErrorCodeUnprocessable = "Unprocessable"
// ErrorCodeVoiceConnectorGroupAssociationsExist is a ErrorCode enum value
ErrorCodeVoiceConnectorGroupAssociationsExist = "VoiceConnectorGroupAssociationsExist"
// ErrorCodePhoneNumberAssociationsExist is a ErrorCode enum value
ErrorCodePhoneNumberAssociationsExist = "PhoneNumberAssociationsExist"
)
// ErrorCode_Values returns all elements of the ErrorCode enum
func ErrorCode_Values() []string {
return []string{
ErrorCodeBadRequest,
ErrorCodeConflict,
ErrorCodeForbidden,
ErrorCodeNotFound,
ErrorCodePreconditionFailed,
ErrorCodeResourceLimitExceeded,
ErrorCodeServiceFailure,
ErrorCodeAccessDenied,
ErrorCodeServiceUnavailable,
ErrorCodeThrottled,
ErrorCodeThrottling,
ErrorCodeUnauthorized,
ErrorCodeUnprocessable,
ErrorCodeVoiceConnectorGroupAssociationsExist,
ErrorCodePhoneNumberAssociationsExist,
}
}
const (
// SortOrderAscending is a SortOrder enum value
SortOrderAscending = "ASCENDING"
// SortOrderDescending is a SortOrder enum value
SortOrderDescending = "DESCENDING"
)
// SortOrder_Values returns all elements of the SortOrder enum
func SortOrder_Values() []string {
return []string{
SortOrderAscending,
SortOrderDescending,
}
}
| 8,258 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package chimesdkmessaging provides the client and types for making API
// requests to Amazon Chime SDK Messaging.
//
// The Amazon Chime SDK Messaging APIs in this section allow software developers
// to send and receive messages in custom messaging applications. These APIs
// depend on the frameworks provided by the Amazon Chime SDK Identity APIs.
// For more information about the messaging APIs, see .
//
// See https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15 for more information on this service.
//
// See chimesdkmessaging package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/chimesdkmessaging/
//
// Using the Client
//
// To contact Amazon Chime SDK Messaging 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 Chime SDK Messaging client ChimeSDKMessaging for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/chimesdkmessaging/#New
package chimesdkmessaging
| 32 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package chimesdkmessaging
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// The input parameters don't match the service's restrictions.
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// The request could not be processed because of conflict in the current state
// of the resource.
ErrCodeConflictException = "ConflictException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// The client is permanently forbidden from making the request.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// One or more of the resources in the request does not exist in the system.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeResourceLimitExceededException for service response error code
// "ResourceLimitExceededException".
//
// The request exceeds the resource limit.
ErrCodeResourceLimitExceededException = "ResourceLimitExceededException"
// ErrCodeServiceFailureException for service response error code
// "ServiceFailureException".
//
// The service encountered an unexpected error.
ErrCodeServiceFailureException = "ServiceFailureException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is currently unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeThrottledClientException for service response error code
// "ThrottledClientException".
//
// The client exceeded its request rate limit.
ErrCodeThrottledClientException = "ThrottledClientException"
// ErrCodeUnauthorizedClientException for service response error code
// "UnauthorizedClientException".
//
// The client is not currently authorized to make the request.
ErrCodeUnauthorizedClientException = "UnauthorizedClientException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"BadRequestException": newErrorBadRequestException,
"ConflictException": newErrorConflictException,
"ForbiddenException": newErrorForbiddenException,
"NotFoundException": newErrorNotFoundException,
"ResourceLimitExceededException": newErrorResourceLimitExceededException,
"ServiceFailureException": newErrorServiceFailureException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"ThrottledClientException": newErrorThrottledClientException,
"UnauthorizedClientException": newErrorUnauthorizedClientException,
}
| 78 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package chimesdkmessaging
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"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// ChimeSDKMessaging provides the API operation methods for making requests to
// Amazon Chime SDK Messaging. See this package's package overview docs
// for details on the service.
//
// ChimeSDKMessaging methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ChimeSDKMessaging 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 = "Chime SDK Messaging" // Name of service.
EndpointsID = "messaging-chime" // ID to lookup a service endpoint with.
ServiceID = "Chime SDK Messaging" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the ChimeSDKMessaging 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:
// mySession := session.Must(session.NewSession())
//
// // Create a ChimeSDKMessaging client from just a session.
// svc := chimesdkmessaging.New(mySession)
//
// // Create a ChimeSDKMessaging client with additional configuration
// svc := chimesdkmessaging.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ChimeSDKMessaging {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "chime"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *ChimeSDKMessaging {
svc := &ChimeSDKMessaging{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2021-05-15",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a ChimeSDKMessaging operation and runs any
// custom request initialization.
func (c *ChimeSDKMessaging) 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
}
| 105 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package chimesdkmessagingiface provides an interface to enable mocking the Amazon Chime SDK Messaging 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 chimesdkmessagingiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/chimesdkmessaging"
)
// ChimeSDKMessagingAPI provides an interface to enable mocking the
// chimesdkmessaging.ChimeSDKMessaging 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 Chime SDK Messaging.
// func myFunc(svc chimesdkmessagingiface.ChimeSDKMessagingAPI) bool {
// // Make svc.BatchCreateChannelMembership request
// }
//
// func main() {
// sess := session.New()
// svc := chimesdkmessaging.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockChimeSDKMessagingClient struct {
// chimesdkmessagingiface.ChimeSDKMessagingAPI
// }
// func (m *mockChimeSDKMessagingClient) BatchCreateChannelMembership(input *chimesdkmessaging.BatchCreateChannelMembershipInput) (*chimesdkmessaging.BatchCreateChannelMembershipOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockChimeSDKMessagingClient{}
//
// 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 ChimeSDKMessagingAPI interface {
BatchCreateChannelMembership(*chimesdkmessaging.BatchCreateChannelMembershipInput) (*chimesdkmessaging.BatchCreateChannelMembershipOutput, error)
BatchCreateChannelMembershipWithContext(aws.Context, *chimesdkmessaging.BatchCreateChannelMembershipInput, ...request.Option) (*chimesdkmessaging.BatchCreateChannelMembershipOutput, error)
BatchCreateChannelMembershipRequest(*chimesdkmessaging.BatchCreateChannelMembershipInput) (*request.Request, *chimesdkmessaging.BatchCreateChannelMembershipOutput)
CreateChannel(*chimesdkmessaging.CreateChannelInput) (*chimesdkmessaging.CreateChannelOutput, error)
CreateChannelWithContext(aws.Context, *chimesdkmessaging.CreateChannelInput, ...request.Option) (*chimesdkmessaging.CreateChannelOutput, error)
CreateChannelRequest(*chimesdkmessaging.CreateChannelInput) (*request.Request, *chimesdkmessaging.CreateChannelOutput)
CreateChannelBan(*chimesdkmessaging.CreateChannelBanInput) (*chimesdkmessaging.CreateChannelBanOutput, error)
CreateChannelBanWithContext(aws.Context, *chimesdkmessaging.CreateChannelBanInput, ...request.Option) (*chimesdkmessaging.CreateChannelBanOutput, error)
CreateChannelBanRequest(*chimesdkmessaging.CreateChannelBanInput) (*request.Request, *chimesdkmessaging.CreateChannelBanOutput)
CreateChannelMembership(*chimesdkmessaging.CreateChannelMembershipInput) (*chimesdkmessaging.CreateChannelMembershipOutput, error)
CreateChannelMembershipWithContext(aws.Context, *chimesdkmessaging.CreateChannelMembershipInput, ...request.Option) (*chimesdkmessaging.CreateChannelMembershipOutput, error)
CreateChannelMembershipRequest(*chimesdkmessaging.CreateChannelMembershipInput) (*request.Request, *chimesdkmessaging.CreateChannelMembershipOutput)
CreateChannelModerator(*chimesdkmessaging.CreateChannelModeratorInput) (*chimesdkmessaging.CreateChannelModeratorOutput, error)
CreateChannelModeratorWithContext(aws.Context, *chimesdkmessaging.CreateChannelModeratorInput, ...request.Option) (*chimesdkmessaging.CreateChannelModeratorOutput, error)
CreateChannelModeratorRequest(*chimesdkmessaging.CreateChannelModeratorInput) (*request.Request, *chimesdkmessaging.CreateChannelModeratorOutput)
DeleteChannel(*chimesdkmessaging.DeleteChannelInput) (*chimesdkmessaging.DeleteChannelOutput, error)
DeleteChannelWithContext(aws.Context, *chimesdkmessaging.DeleteChannelInput, ...request.Option) (*chimesdkmessaging.DeleteChannelOutput, error)
DeleteChannelRequest(*chimesdkmessaging.DeleteChannelInput) (*request.Request, *chimesdkmessaging.DeleteChannelOutput)
DeleteChannelBan(*chimesdkmessaging.DeleteChannelBanInput) (*chimesdkmessaging.DeleteChannelBanOutput, error)
DeleteChannelBanWithContext(aws.Context, *chimesdkmessaging.DeleteChannelBanInput, ...request.Option) (*chimesdkmessaging.DeleteChannelBanOutput, error)
DeleteChannelBanRequest(*chimesdkmessaging.DeleteChannelBanInput) (*request.Request, *chimesdkmessaging.DeleteChannelBanOutput)
DeleteChannelMembership(*chimesdkmessaging.DeleteChannelMembershipInput) (*chimesdkmessaging.DeleteChannelMembershipOutput, error)
DeleteChannelMembershipWithContext(aws.Context, *chimesdkmessaging.DeleteChannelMembershipInput, ...request.Option) (*chimesdkmessaging.DeleteChannelMembershipOutput, error)
DeleteChannelMembershipRequest(*chimesdkmessaging.DeleteChannelMembershipInput) (*request.Request, *chimesdkmessaging.DeleteChannelMembershipOutput)
DeleteChannelMessage(*chimesdkmessaging.DeleteChannelMessageInput) (*chimesdkmessaging.DeleteChannelMessageOutput, error)
DeleteChannelMessageWithContext(aws.Context, *chimesdkmessaging.DeleteChannelMessageInput, ...request.Option) (*chimesdkmessaging.DeleteChannelMessageOutput, error)
DeleteChannelMessageRequest(*chimesdkmessaging.DeleteChannelMessageInput) (*request.Request, *chimesdkmessaging.DeleteChannelMessageOutput)
DeleteChannelModerator(*chimesdkmessaging.DeleteChannelModeratorInput) (*chimesdkmessaging.DeleteChannelModeratorOutput, error)
DeleteChannelModeratorWithContext(aws.Context, *chimesdkmessaging.DeleteChannelModeratorInput, ...request.Option) (*chimesdkmessaging.DeleteChannelModeratorOutput, error)
DeleteChannelModeratorRequest(*chimesdkmessaging.DeleteChannelModeratorInput) (*request.Request, *chimesdkmessaging.DeleteChannelModeratorOutput)
DescribeChannel(*chimesdkmessaging.DescribeChannelInput) (*chimesdkmessaging.DescribeChannelOutput, error)
DescribeChannelWithContext(aws.Context, *chimesdkmessaging.DescribeChannelInput, ...request.Option) (*chimesdkmessaging.DescribeChannelOutput, error)
DescribeChannelRequest(*chimesdkmessaging.DescribeChannelInput) (*request.Request, *chimesdkmessaging.DescribeChannelOutput)
DescribeChannelBan(*chimesdkmessaging.DescribeChannelBanInput) (*chimesdkmessaging.DescribeChannelBanOutput, error)
DescribeChannelBanWithContext(aws.Context, *chimesdkmessaging.DescribeChannelBanInput, ...request.Option) (*chimesdkmessaging.DescribeChannelBanOutput, error)
DescribeChannelBanRequest(*chimesdkmessaging.DescribeChannelBanInput) (*request.Request, *chimesdkmessaging.DescribeChannelBanOutput)
DescribeChannelMembership(*chimesdkmessaging.DescribeChannelMembershipInput) (*chimesdkmessaging.DescribeChannelMembershipOutput, error)
DescribeChannelMembershipWithContext(aws.Context, *chimesdkmessaging.DescribeChannelMembershipInput, ...request.Option) (*chimesdkmessaging.DescribeChannelMembershipOutput, error)
DescribeChannelMembershipRequest(*chimesdkmessaging.DescribeChannelMembershipInput) (*request.Request, *chimesdkmessaging.DescribeChannelMembershipOutput)
DescribeChannelMembershipForAppInstanceUser(*chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserInput) (*chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserOutput, error)
DescribeChannelMembershipForAppInstanceUserWithContext(aws.Context, *chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserInput, ...request.Option) (*chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserOutput, error)
DescribeChannelMembershipForAppInstanceUserRequest(*chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserInput) (*request.Request, *chimesdkmessaging.DescribeChannelMembershipForAppInstanceUserOutput)
DescribeChannelModeratedByAppInstanceUser(*chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserInput) (*chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserOutput, error)
DescribeChannelModeratedByAppInstanceUserWithContext(aws.Context, *chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserInput, ...request.Option) (*chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserOutput, error)
DescribeChannelModeratedByAppInstanceUserRequest(*chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserInput) (*request.Request, *chimesdkmessaging.DescribeChannelModeratedByAppInstanceUserOutput)
DescribeChannelModerator(*chimesdkmessaging.DescribeChannelModeratorInput) (*chimesdkmessaging.DescribeChannelModeratorOutput, error)
DescribeChannelModeratorWithContext(aws.Context, *chimesdkmessaging.DescribeChannelModeratorInput, ...request.Option) (*chimesdkmessaging.DescribeChannelModeratorOutput, error)
DescribeChannelModeratorRequest(*chimesdkmessaging.DescribeChannelModeratorInput) (*request.Request, *chimesdkmessaging.DescribeChannelModeratorOutput)
GetChannelMessage(*chimesdkmessaging.GetChannelMessageInput) (*chimesdkmessaging.GetChannelMessageOutput, error)
GetChannelMessageWithContext(aws.Context, *chimesdkmessaging.GetChannelMessageInput, ...request.Option) (*chimesdkmessaging.GetChannelMessageOutput, error)
GetChannelMessageRequest(*chimesdkmessaging.GetChannelMessageInput) (*request.Request, *chimesdkmessaging.GetChannelMessageOutput)
GetMessagingSessionEndpoint(*chimesdkmessaging.GetMessagingSessionEndpointInput) (*chimesdkmessaging.GetMessagingSessionEndpointOutput, error)
GetMessagingSessionEndpointWithContext(aws.Context, *chimesdkmessaging.GetMessagingSessionEndpointInput, ...request.Option) (*chimesdkmessaging.GetMessagingSessionEndpointOutput, error)
GetMessagingSessionEndpointRequest(*chimesdkmessaging.GetMessagingSessionEndpointInput) (*request.Request, *chimesdkmessaging.GetMessagingSessionEndpointOutput)
ListChannelBans(*chimesdkmessaging.ListChannelBansInput) (*chimesdkmessaging.ListChannelBansOutput, error)
ListChannelBansWithContext(aws.Context, *chimesdkmessaging.ListChannelBansInput, ...request.Option) (*chimesdkmessaging.ListChannelBansOutput, error)
ListChannelBansRequest(*chimesdkmessaging.ListChannelBansInput) (*request.Request, *chimesdkmessaging.ListChannelBansOutput)
ListChannelBansPages(*chimesdkmessaging.ListChannelBansInput, func(*chimesdkmessaging.ListChannelBansOutput, bool) bool) error
ListChannelBansPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelBansInput, func(*chimesdkmessaging.ListChannelBansOutput, bool) bool, ...request.Option) error
ListChannelMemberships(*chimesdkmessaging.ListChannelMembershipsInput) (*chimesdkmessaging.ListChannelMembershipsOutput, error)
ListChannelMembershipsWithContext(aws.Context, *chimesdkmessaging.ListChannelMembershipsInput, ...request.Option) (*chimesdkmessaging.ListChannelMembershipsOutput, error)
ListChannelMembershipsRequest(*chimesdkmessaging.ListChannelMembershipsInput) (*request.Request, *chimesdkmessaging.ListChannelMembershipsOutput)
ListChannelMembershipsPages(*chimesdkmessaging.ListChannelMembershipsInput, func(*chimesdkmessaging.ListChannelMembershipsOutput, bool) bool) error
ListChannelMembershipsPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelMembershipsInput, func(*chimesdkmessaging.ListChannelMembershipsOutput, bool) bool, ...request.Option) error
ListChannelMembershipsForAppInstanceUser(*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserInput) (*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput, error)
ListChannelMembershipsForAppInstanceUserWithContext(aws.Context, *chimesdkmessaging.ListChannelMembershipsForAppInstanceUserInput, ...request.Option) (*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput, error)
ListChannelMembershipsForAppInstanceUserRequest(*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserInput) (*request.Request, *chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput)
ListChannelMembershipsForAppInstanceUserPages(*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserInput, func(*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput, bool) bool) error
ListChannelMembershipsForAppInstanceUserPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelMembershipsForAppInstanceUserInput, func(*chimesdkmessaging.ListChannelMembershipsForAppInstanceUserOutput, bool) bool, ...request.Option) error
ListChannelMessages(*chimesdkmessaging.ListChannelMessagesInput) (*chimesdkmessaging.ListChannelMessagesOutput, error)
ListChannelMessagesWithContext(aws.Context, *chimesdkmessaging.ListChannelMessagesInput, ...request.Option) (*chimesdkmessaging.ListChannelMessagesOutput, error)
ListChannelMessagesRequest(*chimesdkmessaging.ListChannelMessagesInput) (*request.Request, *chimesdkmessaging.ListChannelMessagesOutput)
ListChannelMessagesPages(*chimesdkmessaging.ListChannelMessagesInput, func(*chimesdkmessaging.ListChannelMessagesOutput, bool) bool) error
ListChannelMessagesPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelMessagesInput, func(*chimesdkmessaging.ListChannelMessagesOutput, bool) bool, ...request.Option) error
ListChannelModerators(*chimesdkmessaging.ListChannelModeratorsInput) (*chimesdkmessaging.ListChannelModeratorsOutput, error)
ListChannelModeratorsWithContext(aws.Context, *chimesdkmessaging.ListChannelModeratorsInput, ...request.Option) (*chimesdkmessaging.ListChannelModeratorsOutput, error)
ListChannelModeratorsRequest(*chimesdkmessaging.ListChannelModeratorsInput) (*request.Request, *chimesdkmessaging.ListChannelModeratorsOutput)
ListChannelModeratorsPages(*chimesdkmessaging.ListChannelModeratorsInput, func(*chimesdkmessaging.ListChannelModeratorsOutput, bool) bool) error
ListChannelModeratorsPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelModeratorsInput, func(*chimesdkmessaging.ListChannelModeratorsOutput, bool) bool, ...request.Option) error
ListChannels(*chimesdkmessaging.ListChannelsInput) (*chimesdkmessaging.ListChannelsOutput, error)
ListChannelsWithContext(aws.Context, *chimesdkmessaging.ListChannelsInput, ...request.Option) (*chimesdkmessaging.ListChannelsOutput, error)
ListChannelsRequest(*chimesdkmessaging.ListChannelsInput) (*request.Request, *chimesdkmessaging.ListChannelsOutput)
ListChannelsPages(*chimesdkmessaging.ListChannelsInput, func(*chimesdkmessaging.ListChannelsOutput, bool) bool) error
ListChannelsPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelsInput, func(*chimesdkmessaging.ListChannelsOutput, bool) bool, ...request.Option) error
ListChannelsModeratedByAppInstanceUser(*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserInput) (*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput, error)
ListChannelsModeratedByAppInstanceUserWithContext(aws.Context, *chimesdkmessaging.ListChannelsModeratedByAppInstanceUserInput, ...request.Option) (*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput, error)
ListChannelsModeratedByAppInstanceUserRequest(*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserInput) (*request.Request, *chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput)
ListChannelsModeratedByAppInstanceUserPages(*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserInput, func(*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput, bool) bool) error
ListChannelsModeratedByAppInstanceUserPagesWithContext(aws.Context, *chimesdkmessaging.ListChannelsModeratedByAppInstanceUserInput, func(*chimesdkmessaging.ListChannelsModeratedByAppInstanceUserOutput, bool) bool, ...request.Option) error
RedactChannelMessage(*chimesdkmessaging.RedactChannelMessageInput) (*chimesdkmessaging.RedactChannelMessageOutput, error)
RedactChannelMessageWithContext(aws.Context, *chimesdkmessaging.RedactChannelMessageInput, ...request.Option) (*chimesdkmessaging.RedactChannelMessageOutput, error)
RedactChannelMessageRequest(*chimesdkmessaging.RedactChannelMessageInput) (*request.Request, *chimesdkmessaging.RedactChannelMessageOutput)
SendChannelMessage(*chimesdkmessaging.SendChannelMessageInput) (*chimesdkmessaging.SendChannelMessageOutput, error)
SendChannelMessageWithContext(aws.Context, *chimesdkmessaging.SendChannelMessageInput, ...request.Option) (*chimesdkmessaging.SendChannelMessageOutput, error)
SendChannelMessageRequest(*chimesdkmessaging.SendChannelMessageInput) (*request.Request, *chimesdkmessaging.SendChannelMessageOutput)
UpdateChannel(*chimesdkmessaging.UpdateChannelInput) (*chimesdkmessaging.UpdateChannelOutput, error)
UpdateChannelWithContext(aws.Context, *chimesdkmessaging.UpdateChannelInput, ...request.Option) (*chimesdkmessaging.UpdateChannelOutput, error)
UpdateChannelRequest(*chimesdkmessaging.UpdateChannelInput) (*request.Request, *chimesdkmessaging.UpdateChannelOutput)
UpdateChannelMessage(*chimesdkmessaging.UpdateChannelMessageInput) (*chimesdkmessaging.UpdateChannelMessageOutput, error)
UpdateChannelMessageWithContext(aws.Context, *chimesdkmessaging.UpdateChannelMessageInput, ...request.Option) (*chimesdkmessaging.UpdateChannelMessageOutput, error)
UpdateChannelMessageRequest(*chimesdkmessaging.UpdateChannelMessageInput) (*request.Request, *chimesdkmessaging.UpdateChannelMessageOutput)
UpdateChannelReadMarker(*chimesdkmessaging.UpdateChannelReadMarkerInput) (*chimesdkmessaging.UpdateChannelReadMarkerOutput, error)
UpdateChannelReadMarkerWithContext(aws.Context, *chimesdkmessaging.UpdateChannelReadMarkerInput, ...request.Option) (*chimesdkmessaging.UpdateChannelReadMarkerOutput, error)
UpdateChannelReadMarkerRequest(*chimesdkmessaging.UpdateChannelReadMarkerInput) (*request.Request, *chimesdkmessaging.UpdateChannelReadMarkerOutput)
}
var _ ChimeSDKMessagingAPI = (*chimesdkmessaging.ChimeSDKMessaging)(nil)
| 206 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opCreateEnvironmentEC2 = "CreateEnvironmentEC2"
// CreateEnvironmentEC2Request generates a "aws/request.Request" representing the
// client's request for the CreateEnvironmentEC2 operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateEnvironmentEC2 for more information on using the CreateEnvironmentEC2
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateEnvironmentEC2Request method.
// req, resp := client.CreateEnvironmentEC2Request(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2
func (c *Cloud9) CreateEnvironmentEC2Request(input *CreateEnvironmentEC2Input) (req *request.Request, output *CreateEnvironmentEC2Output) {
op := &request.Operation{
Name: opCreateEnvironmentEC2,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEnvironmentEC2Input{}
}
output = &CreateEnvironmentEC2Output{}
req = c.newRequest(op, input, output)
return
}
// CreateEnvironmentEC2 API operation for AWS Cloud9.
//
// Creates an Cloud9 development environment, launches an Amazon Elastic Compute
// Cloud (Amazon EC2) instance, and then connects from the instance to the environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation CreateEnvironmentEC2 for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2
func (c *Cloud9) CreateEnvironmentEC2(input *CreateEnvironmentEC2Input) (*CreateEnvironmentEC2Output, error) {
req, out := c.CreateEnvironmentEC2Request(input)
return out, req.Send()
}
// CreateEnvironmentEC2WithContext is the same as CreateEnvironmentEC2 with the addition of
// the ability to pass a context and additional request options.
//
// See CreateEnvironmentEC2 for details on how to use this API operation.
//
// 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 *Cloud9) CreateEnvironmentEC2WithContext(ctx aws.Context, input *CreateEnvironmentEC2Input, opts ...request.Option) (*CreateEnvironmentEC2Output, error) {
req, out := c.CreateEnvironmentEC2Request(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateEnvironmentMembership = "CreateEnvironmentMembership"
// CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the
// client's request for the CreateEnvironmentMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateEnvironmentMembership for more information on using the CreateEnvironmentMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateEnvironmentMembershipRequest method.
// req, resp := client.CreateEnvironmentMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership
func (c *Cloud9) CreateEnvironmentMembershipRequest(input *CreateEnvironmentMembershipInput) (req *request.Request, output *CreateEnvironmentMembershipOutput) {
op := &request.Operation{
Name: opCreateEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEnvironmentMembershipInput{}
}
output = &CreateEnvironmentMembershipOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateEnvironmentMembership API operation for AWS Cloud9.
//
// Adds an environment member to an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation CreateEnvironmentMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership
func (c *Cloud9) CreateEnvironmentMembership(input *CreateEnvironmentMembershipInput) (*CreateEnvironmentMembershipOutput, error) {
req, out := c.CreateEnvironmentMembershipRequest(input)
return out, req.Send()
}
// CreateEnvironmentMembershipWithContext is the same as CreateEnvironmentMembership with the addition of
// the ability to pass a context and additional request options.
//
// See CreateEnvironmentMembership for details on how to use this API operation.
//
// 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 *Cloud9) CreateEnvironmentMembershipWithContext(ctx aws.Context, input *CreateEnvironmentMembershipInput, opts ...request.Option) (*CreateEnvironmentMembershipOutput, error) {
req, out := c.CreateEnvironmentMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteEnvironment = "DeleteEnvironment"
// DeleteEnvironmentRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEnvironment operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteEnvironment for more information on using the DeleteEnvironment
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteEnvironmentRequest method.
// req, resp := client.DeleteEnvironmentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment
func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) (req *request.Request, output *DeleteEnvironmentOutput) {
op := &request.Operation{
Name: opDeleteEnvironment,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEnvironmentInput{}
}
output = &DeleteEnvironmentOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteEnvironment API operation for AWS Cloud9.
//
// Deletes an Cloud9 development environment. If an Amazon EC2 instance is connected
// to the environment, also terminates the instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation DeleteEnvironment for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment
func (c *Cloud9) DeleteEnvironment(input *DeleteEnvironmentInput) (*DeleteEnvironmentOutput, error) {
req, out := c.DeleteEnvironmentRequest(input)
return out, req.Send()
}
// DeleteEnvironmentWithContext is the same as DeleteEnvironment with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteEnvironment for details on how to use this API operation.
//
// 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 *Cloud9) DeleteEnvironmentWithContext(ctx aws.Context, input *DeleteEnvironmentInput, opts ...request.Option) (*DeleteEnvironmentOutput, error) {
req, out := c.DeleteEnvironmentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership"
// DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEnvironmentMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteEnvironmentMembership for more information on using the DeleteEnvironmentMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteEnvironmentMembershipRequest method.
// req, resp := client.DeleteEnvironmentMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership
func (c *Cloud9) DeleteEnvironmentMembershipRequest(input *DeleteEnvironmentMembershipInput) (req *request.Request, output *DeleteEnvironmentMembershipOutput) {
op := &request.Operation{
Name: opDeleteEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEnvironmentMembershipInput{}
}
output = &DeleteEnvironmentMembershipOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteEnvironmentMembership API operation for AWS Cloud9.
//
// Deletes an environment member from an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation DeleteEnvironmentMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership
func (c *Cloud9) DeleteEnvironmentMembership(input *DeleteEnvironmentMembershipInput) (*DeleteEnvironmentMembershipOutput, error) {
req, out := c.DeleteEnvironmentMembershipRequest(input)
return out, req.Send()
}
// DeleteEnvironmentMembershipWithContext is the same as DeleteEnvironmentMembership with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteEnvironmentMembership for details on how to use this API operation.
//
// 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 *Cloud9) DeleteEnvironmentMembershipWithContext(ctx aws.Context, input *DeleteEnvironmentMembershipInput, opts ...request.Option) (*DeleteEnvironmentMembershipOutput, error) {
req, out := c.DeleteEnvironmentMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships"
// DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEnvironmentMemberships operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeEnvironmentMemberships for more information on using the DescribeEnvironmentMemberships
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeEnvironmentMembershipsRequest method.
// req, resp := client.DescribeEnvironmentMembershipsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships
func (c *Cloud9) DescribeEnvironmentMembershipsRequest(input *DescribeEnvironmentMembershipsInput) (req *request.Request, output *DescribeEnvironmentMembershipsOutput) {
op := &request.Operation{
Name: opDescribeEnvironmentMemberships,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeEnvironmentMembershipsInput{}
}
output = &DescribeEnvironmentMembershipsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeEnvironmentMemberships API operation for AWS Cloud9.
//
// Gets information about environment members for an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation DescribeEnvironmentMemberships for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships
func (c *Cloud9) DescribeEnvironmentMemberships(input *DescribeEnvironmentMembershipsInput) (*DescribeEnvironmentMembershipsOutput, error) {
req, out := c.DescribeEnvironmentMembershipsRequest(input)
return out, req.Send()
}
// DescribeEnvironmentMembershipsWithContext is the same as DescribeEnvironmentMemberships with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeEnvironmentMemberships for details on how to use this API operation.
//
// 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 *Cloud9) DescribeEnvironmentMembershipsWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, opts ...request.Option) (*DescribeEnvironmentMembershipsOutput, error) {
req, out := c.DescribeEnvironmentMembershipsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeEnvironmentMembershipsPages iterates over the pages of a DescribeEnvironmentMemberships operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeEnvironmentMemberships method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeEnvironmentMemberships operation.
// pageNum := 0
// err := client.DescribeEnvironmentMembershipsPages(params,
// func(page *cloud9.DescribeEnvironmentMembershipsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Cloud9) DescribeEnvironmentMembershipsPages(input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool) error {
return c.DescribeEnvironmentMembershipsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeEnvironmentMembershipsPagesWithContext same as DescribeEnvironmentMembershipsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *Cloud9) DescribeEnvironmentMembershipsPagesWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeEnvironmentMembershipsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEnvironmentMembershipsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*DescribeEnvironmentMembershipsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus"
// DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEnvironmentStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeEnvironmentStatus for more information on using the DescribeEnvironmentStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeEnvironmentStatusRequest method.
// req, resp := client.DescribeEnvironmentStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus
func (c *Cloud9) DescribeEnvironmentStatusRequest(input *DescribeEnvironmentStatusInput) (req *request.Request, output *DescribeEnvironmentStatusOutput) {
op := &request.Operation{
Name: opDescribeEnvironmentStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEnvironmentStatusInput{}
}
output = &DescribeEnvironmentStatusOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeEnvironmentStatus API operation for AWS Cloud9.
//
// Gets status information for an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation DescribeEnvironmentStatus for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus
func (c *Cloud9) DescribeEnvironmentStatus(input *DescribeEnvironmentStatusInput) (*DescribeEnvironmentStatusOutput, error) {
req, out := c.DescribeEnvironmentStatusRequest(input)
return out, req.Send()
}
// DescribeEnvironmentStatusWithContext is the same as DescribeEnvironmentStatus with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeEnvironmentStatus for details on how to use this API operation.
//
// 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 *Cloud9) DescribeEnvironmentStatusWithContext(ctx aws.Context, input *DescribeEnvironmentStatusInput, opts ...request.Option) (*DescribeEnvironmentStatusOutput, error) {
req, out := c.DescribeEnvironmentStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeEnvironments = "DescribeEnvironments"
// DescribeEnvironmentsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEnvironments operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeEnvironments for more information on using the DescribeEnvironments
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeEnvironmentsRequest method.
// req, resp := client.DescribeEnvironmentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments
func (c *Cloud9) DescribeEnvironmentsRequest(input *DescribeEnvironmentsInput) (req *request.Request, output *DescribeEnvironmentsOutput) {
op := &request.Operation{
Name: opDescribeEnvironments,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEnvironmentsInput{}
}
output = &DescribeEnvironmentsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeEnvironments API operation for AWS Cloud9.
//
// Gets information about Cloud9 development environments.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation DescribeEnvironments for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments
func (c *Cloud9) DescribeEnvironments(input *DescribeEnvironmentsInput) (*DescribeEnvironmentsOutput, error) {
req, out := c.DescribeEnvironmentsRequest(input)
return out, req.Send()
}
// DescribeEnvironmentsWithContext is the same as DescribeEnvironments with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeEnvironments for details on how to use this API operation.
//
// 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 *Cloud9) DescribeEnvironmentsWithContext(ctx aws.Context, input *DescribeEnvironmentsInput, opts ...request.Option) (*DescribeEnvironmentsOutput, error) {
req, out := c.DescribeEnvironmentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListEnvironments = "ListEnvironments"
// ListEnvironmentsRequest generates a "aws/request.Request" representing the
// client's request for the ListEnvironments operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListEnvironments for more information on using the ListEnvironments
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListEnvironmentsRequest method.
// req, resp := client.ListEnvironmentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments
func (c *Cloud9) ListEnvironmentsRequest(input *ListEnvironmentsInput) (req *request.Request, output *ListEnvironmentsOutput) {
op := &request.Operation{
Name: opListEnvironments,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListEnvironmentsInput{}
}
output = &ListEnvironmentsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListEnvironments API operation for AWS Cloud9.
//
// Gets a list of Cloud9 development environment identifiers.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation ListEnvironments for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments
func (c *Cloud9) ListEnvironments(input *ListEnvironmentsInput) (*ListEnvironmentsOutput, error) {
req, out := c.ListEnvironmentsRequest(input)
return out, req.Send()
}
// ListEnvironmentsWithContext is the same as ListEnvironments with the addition of
// the ability to pass a context and additional request options.
//
// See ListEnvironments for details on how to use this API operation.
//
// 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 *Cloud9) ListEnvironmentsWithContext(ctx aws.Context, input *ListEnvironmentsInput, opts ...request.Option) (*ListEnvironmentsOutput, error) {
req, out := c.ListEnvironmentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListEnvironmentsPages iterates over the pages of a ListEnvironments operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListEnvironments method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListEnvironments operation.
// pageNum := 0
// err := client.ListEnvironmentsPages(params,
// func(page *cloud9.ListEnvironmentsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Cloud9) ListEnvironmentsPages(input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool) error {
return c.ListEnvironmentsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListEnvironmentsPagesWithContext same as ListEnvironmentsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *Cloud9) ListEnvironmentsPagesWithContext(ctx aws.Context, input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListEnvironmentsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListEnvironmentsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListEnvironmentsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListTagsForResource = "ListTagsForResource"
// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTagsForResource for more information on using the ListTagsForResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsForResourceRequest method.
// req, resp := client.ListTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListTagsForResource
func (c *Cloud9) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for AWS Cloud9.
//
// Gets a list of the tags associated with an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Types:
// * NotFoundException
// The target resource cannot be found.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// * BadRequestException
// The target request is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListTagsForResource
func (c *Cloud9) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
return out, req.Send()
}
// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListTagsForResource for details on how to use this API operation.
//
// 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 *Cloud9) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opTagResource = "TagResource"
// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See TagResource for more information on using the TagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the TagResourceRequest method.
// req, resp := client.TagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/TagResource
func (c *Cloud9) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
op := &request.Operation{
Name: opTagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &TagResourceInput{}
}
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// TagResource API operation for AWS Cloud9.
//
// Adds tags to an Cloud9 development environment.
//
// Tags that you add to an Cloud9 environment by using this method will NOT
// be automatically propagated to underlying resources.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation TagResource for usage and error information.
//
// Returned Error Types:
// * NotFoundException
// The target resource cannot be found.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// * BadRequestException
// The target request is invalid.
//
// * ConcurrentAccessException
// A concurrent access issue occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/TagResource
func (c *Cloud9) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
return out, req.Send()
}
// TagResourceWithContext is the same as TagResource with the addition of
// the ability to pass a context and additional request options.
//
// See TagResource for details on how to use this API operation.
//
// 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 *Cloud9) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUntagResource = "UntagResource"
// UntagResourceRequest generates a "aws/request.Request" representing the
// client's request for the UntagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UntagResource for more information on using the UntagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UntagResourceRequest method.
// req, resp := client.UntagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UntagResource
func (c *Cloud9) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
op := &request.Operation{
Name: opUntagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UntagResourceInput{}
}
output = &UntagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UntagResource API operation for AWS Cloud9.
//
// Removes tags from an Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation UntagResource for usage and error information.
//
// Returned Error Types:
// * NotFoundException
// The target resource cannot be found.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// * BadRequestException
// The target request is invalid.
//
// * ConcurrentAccessException
// A concurrent access issue occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UntagResource
func (c *Cloud9) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
return out, req.Send()
}
// UntagResourceWithContext is the same as UntagResource with the addition of
// the ability to pass a context and additional request options.
//
// See UntagResource for details on how to use this API operation.
//
// 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 *Cloud9) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateEnvironment = "UpdateEnvironment"
// UpdateEnvironmentRequest generates a "aws/request.Request" representing the
// client's request for the UpdateEnvironment operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateEnvironment for more information on using the UpdateEnvironment
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateEnvironmentRequest method.
// req, resp := client.UpdateEnvironmentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment
func (c *Cloud9) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) (req *request.Request, output *UpdateEnvironmentOutput) {
op := &request.Operation{
Name: opUpdateEnvironment,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateEnvironmentInput{}
}
output = &UpdateEnvironmentOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UpdateEnvironment API operation for AWS Cloud9.
//
// Changes the settings of an existing Cloud9 development environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation UpdateEnvironment for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment
func (c *Cloud9) UpdateEnvironment(input *UpdateEnvironmentInput) (*UpdateEnvironmentOutput, error) {
req, out := c.UpdateEnvironmentRequest(input)
return out, req.Send()
}
// UpdateEnvironmentWithContext is the same as UpdateEnvironment with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateEnvironment for details on how to use this API operation.
//
// 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 *Cloud9) UpdateEnvironmentWithContext(ctx aws.Context, input *UpdateEnvironmentInput, opts ...request.Option) (*UpdateEnvironmentOutput, error) {
req, out := c.UpdateEnvironmentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership"
// UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the
// client's request for the UpdateEnvironmentMembership operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateEnvironmentMembership for more information on using the UpdateEnvironmentMembership
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateEnvironmentMembershipRequest method.
// req, resp := client.UpdateEnvironmentMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership
func (c *Cloud9) UpdateEnvironmentMembershipRequest(input *UpdateEnvironmentMembershipInput) (req *request.Request, output *UpdateEnvironmentMembershipOutput) {
op := &request.Operation{
Name: opUpdateEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateEnvironmentMembershipInput{}
}
output = &UpdateEnvironmentMembershipOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateEnvironmentMembership API operation for AWS Cloud9.
//
// Changes the settings of an existing environment member for an Cloud9 development
// environment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud9's
// API operation UpdateEnvironmentMembership for usage and error information.
//
// Returned Error Types:
// * BadRequestException
// The target request is invalid.
//
// * ConflictException
// A conflict occurred.
//
// * NotFoundException
// The target resource cannot be found.
//
// * ForbiddenException
// An access permissions issue occurred.
//
// * TooManyRequestsException
// Too many service requests were made over the given time period.
//
// * LimitExceededException
// A service limit was exceeded.
//
// * InternalServerErrorException
// An internal server error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership
func (c *Cloud9) UpdateEnvironmentMembership(input *UpdateEnvironmentMembershipInput) (*UpdateEnvironmentMembershipOutput, error) {
req, out := c.UpdateEnvironmentMembershipRequest(input)
return out, req.Send()
}
// UpdateEnvironmentMembershipWithContext is the same as UpdateEnvironmentMembership with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateEnvironmentMembership for details on how to use this API operation.
//
// 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 *Cloud9) UpdateEnvironmentMembershipWithContext(ctx aws.Context, input *UpdateEnvironmentMembershipInput, opts ...request.Option) (*UpdateEnvironmentMembershipOutput, error) {
req, out := c.UpdateEnvironmentMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// The target request is invalid.
type BadRequestException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s BadRequestException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BadRequestException) GoString() string {
return s.String()
}
func newErrorBadRequestException(v protocol.ResponseMetadata) error {
return &BadRequestException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *BadRequestException) Code() string {
return "BadRequestException"
}
// Message returns the exception's message.
func (s *BadRequestException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *BadRequestException) OrigErr() error {
return nil
}
func (s *BadRequestException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *BadRequestException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *BadRequestException) RequestID() string {
return s.RespMetadata.RequestID
}
// A concurrent access issue occurred.
type ConcurrentAccessException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s ConcurrentAccessException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ConcurrentAccessException) GoString() string {
return s.String()
}
func newErrorConcurrentAccessException(v protocol.ResponseMetadata) error {
return &ConcurrentAccessException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ConcurrentAccessException) Code() string {
return "ConcurrentAccessException"
}
// Message returns the exception's message.
func (s *ConcurrentAccessException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ConcurrentAccessException) OrigErr() error {
return nil
}
func (s *ConcurrentAccessException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ConcurrentAccessException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ConcurrentAccessException) RequestID() string {
return s.RespMetadata.RequestID
}
// A conflict occurred.
type ConflictException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s ConflictException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ConflictException) GoString() string {
return s.String()
}
func newErrorConflictException(v protocol.ResponseMetadata) error {
return &ConflictException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ConflictException) Code() string {
return "ConflictException"
}
// Message returns the exception's message.
func (s *ConflictException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ConflictException) OrigErr() error {
return nil
}
func (s *ConflictException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ConflictException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ConflictException) RequestID() string {
return s.RespMetadata.RequestID
}
type CreateEnvironmentEC2Input struct {
_ struct{} `type:"structure"`
// The number of minutes until the running instance is shut down after the environment
// has last been used.
AutomaticStopTimeMinutes *int64 `locationName:"automaticStopTimeMinutes" type:"integer"`
// A unique, case-sensitive string that helps Cloud9 to ensure this operation
// completes no more than one time.
//
// For more information, see Client Tokens (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html)
// in the Amazon EC2 API Reference.
ClientRequestToken *string `locationName:"clientRequestToken" type:"string"`
// The connection type used for connecting to an Amazon EC2 environment. Valid
// values are CONNECT_SSH (default) and CONNECT_SSM (connected through Amazon
// EC2 Systems Manager).
//
// For more information, see Accessing no-ingress EC2 instances with Amazon
// EC2 Systems Manager (https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html)
// in the Cloud9 User Guide.
ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"`
// The description of the environment to create.
Description *string `locationName:"description" type:"string" sensitive:"true"`
// The identifier for the Amazon Machine Image (AMI) that's used to create the
// EC2 instance. To choose an AMI for the instance, you must specify a valid
// AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.
//
// The default AMI is used if the parameter isn't explicitly assigned a value
// in the request. Because Amazon Linux AMI has ended standard support as of
// December 31, 2020, we recommend you choose Amazon Linux 2, which includes
// long term support through 2023.
//
// AMI aliases
//
// * Amazon Linux (default): amazonlinux-1-x86_64
//
// * Amazon Linux 2: amazonlinux-2-x86_64
//
// * Ubuntu 18.04: ubuntu-18.04-x86_64
//
// SSM paths
//
// * Amazon Linux (default): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64
//
// * Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
//
// * Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
ImageId *string `locationName:"imageId" type:"string"`
// The type of instance to connect to the environment (for example, t2.micro).
//
// InstanceType is a required field
InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"`
// The name of the environment to create.
//
// This name is visible to other IAM users in the same Amazon Web Services account.
//
// Name is a required field
Name *string `locationName:"name" min:"1" type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the environment owner. This ARN can be
// the ARN of any IAM principal. If this value is not specified, the ARN defaults
// to this environment's creator.
OwnerArn *string `locationName:"ownerArn" type:"string"`
// The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with
// the Amazon EC2 instance.
SubnetId *string `locationName:"subnetId" min:"15" type:"string"`
// An array of key-value pairs that will be associated with the new Cloud9 development
// environment.
Tags []*Tag `locationName:"tags" type:"list" sensitive:"true"`
}
// String returns the string representation
func (s CreateEnvironmentEC2Input) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentEC2Input) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEnvironmentEC2Input) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentEC2Input"}
if s.InstanceType == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceType"))
}
if s.InstanceType != nil && len(*s.InstanceType) < 5 {
invalidParams.Add(request.NewErrParamMinLen("InstanceType", 5))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if s.SubnetId != nil && len(*s.SubnetId) < 15 {
invalidParams.Add(request.NewErrParamMinLen("SubnetId", 15))
}
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAutomaticStopTimeMinutes sets the AutomaticStopTimeMinutes field's value.
func (s *CreateEnvironmentEC2Input) SetAutomaticStopTimeMinutes(v int64) *CreateEnvironmentEC2Input {
s.AutomaticStopTimeMinutes = &v
return s
}
// SetClientRequestToken sets the ClientRequestToken field's value.
func (s *CreateEnvironmentEC2Input) SetClientRequestToken(v string) *CreateEnvironmentEC2Input {
s.ClientRequestToken = &v
return s
}
// SetConnectionType sets the ConnectionType field's value.
func (s *CreateEnvironmentEC2Input) SetConnectionType(v string) *CreateEnvironmentEC2Input {
s.ConnectionType = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateEnvironmentEC2Input) SetDescription(v string) *CreateEnvironmentEC2Input {
s.Description = &v
return s
}
// SetImageId sets the ImageId field's value.
func (s *CreateEnvironmentEC2Input) SetImageId(v string) *CreateEnvironmentEC2Input {
s.ImageId = &v
return s
}
// SetInstanceType sets the InstanceType field's value.
func (s *CreateEnvironmentEC2Input) SetInstanceType(v string) *CreateEnvironmentEC2Input {
s.InstanceType = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateEnvironmentEC2Input) SetName(v string) *CreateEnvironmentEC2Input {
s.Name = &v
return s
}
// SetOwnerArn sets the OwnerArn field's value.
func (s *CreateEnvironmentEC2Input) SetOwnerArn(v string) *CreateEnvironmentEC2Input {
s.OwnerArn = &v
return s
}
// SetSubnetId sets the SubnetId field's value.
func (s *CreateEnvironmentEC2Input) SetSubnetId(v string) *CreateEnvironmentEC2Input {
s.SubnetId = &v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateEnvironmentEC2Input) SetTags(v []*Tag) *CreateEnvironmentEC2Input {
s.Tags = v
return s
}
type CreateEnvironmentEC2Output struct {
_ struct{} `type:"structure"`
// The ID of the environment that was created.
EnvironmentId *string `locationName:"environmentId" type:"string"`
}
// String returns the string representation
func (s CreateEnvironmentEC2Output) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentEC2Output) GoString() string {
return s.String()
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *CreateEnvironmentEC2Output) SetEnvironmentId(v string) *CreateEnvironmentEC2Output {
s.EnvironmentId = &v
return s
}
type CreateEnvironmentMembershipInput struct {
_ struct{} `type:"structure"`
// The ID of the environment that contains the environment member you want to
// add.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The type of environment member permissions you want to associate with this
// environment member. Available values include:
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// Permissions is a required field
Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"`
// The Amazon Resource Name (ARN) of the environment member you want to add.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateEnvironmentMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEnvironmentMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentMembershipInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if s.Permissions == nil {
invalidParams.Add(request.NewErrParamRequired("Permissions"))
}
if s.UserArn == nil {
invalidParams.Add(request.NewErrParamRequired("UserArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *CreateEnvironmentMembershipInput) SetEnvironmentId(v string) *CreateEnvironmentMembershipInput {
s.EnvironmentId = &v
return s
}
// SetPermissions sets the Permissions field's value.
func (s *CreateEnvironmentMembershipInput) SetPermissions(v string) *CreateEnvironmentMembershipInput {
s.Permissions = &v
return s
}
// SetUserArn sets the UserArn field's value.
func (s *CreateEnvironmentMembershipInput) SetUserArn(v string) *CreateEnvironmentMembershipInput {
s.UserArn = &v
return s
}
type CreateEnvironmentMembershipOutput struct {
_ struct{} `type:"structure"`
// Information about the environment member that was added.
//
// Membership is a required field
Membership *EnvironmentMember `locationName:"membership" type:"structure" required:"true"`
}
// String returns the string representation
func (s CreateEnvironmentMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentMembershipOutput) GoString() string {
return s.String()
}
// SetMembership sets the Membership field's value.
func (s *CreateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *CreateEnvironmentMembershipOutput {
s.Membership = v
return s
}
type DeleteEnvironmentInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to delete.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteEnvironmentInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEnvironmentInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *DeleteEnvironmentInput) SetEnvironmentId(v string) *DeleteEnvironmentInput {
s.EnvironmentId = &v
return s
}
type DeleteEnvironmentMembershipInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to delete the environment member from.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the environment member to delete from the
// environment.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteEnvironmentMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEnvironmentMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentMembershipInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if s.UserArn == nil {
invalidParams.Add(request.NewErrParamRequired("UserArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *DeleteEnvironmentMembershipInput) SetEnvironmentId(v string) *DeleteEnvironmentMembershipInput {
s.EnvironmentId = &v
return s
}
// SetUserArn sets the UserArn field's value.
func (s *DeleteEnvironmentMembershipInput) SetUserArn(v string) *DeleteEnvironmentMembershipInput {
s.UserArn = &v
return s
}
type DeleteEnvironmentMembershipOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteEnvironmentMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentMembershipOutput) GoString() string {
return s.String()
}
type DeleteEnvironmentOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteEnvironmentOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentOutput) GoString() string {
return s.String()
}
type DescribeEnvironmentMembershipsInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to get environment member information about.
EnvironmentId *string `locationName:"environmentId" type:"string"`
// The maximum number of environment members to get information about.
MaxResults *int64 `locationName:"maxResults" type:"integer"`
// During a previous call, if there are more than 25 items in the list, only
// the first 25 items are returned, along with a unique string called a next
// token. To get the next batch of items in the list, call this operation again,
// adding the next token to the call. To get all of the items in the list, keep
// calling this operation with each subsequent next token that is returned,
// until no more next tokens are returned.
NextToken *string `locationName:"nextToken" type:"string"`
// The type of environment member permissions to get information about. Available
// values include:
//
// * owner: Owns the environment.
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// If no value is specified, information about all environment members are returned.
Permissions []*string `locationName:"permissions" type:"list"`
// The Amazon Resource Name (ARN) of an individual environment member to get
// information about. If no value is specified, information about all environment
// members are returned.
UserArn *string `locationName:"userArn" type:"string"`
}
// String returns the string representation
func (s DescribeEnvironmentMembershipsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentMembershipsInput) GoString() string {
return s.String()
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *DescribeEnvironmentMembershipsInput) SetEnvironmentId(v string) *DescribeEnvironmentMembershipsInput {
s.EnvironmentId = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *DescribeEnvironmentMembershipsInput) SetMaxResults(v int64) *DescribeEnvironmentMembershipsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeEnvironmentMembershipsInput) SetNextToken(v string) *DescribeEnvironmentMembershipsInput {
s.NextToken = &v
return s
}
// SetPermissions sets the Permissions field's value.
func (s *DescribeEnvironmentMembershipsInput) SetPermissions(v []*string) *DescribeEnvironmentMembershipsInput {
s.Permissions = v
return s
}
// SetUserArn sets the UserArn field's value.
func (s *DescribeEnvironmentMembershipsInput) SetUserArn(v string) *DescribeEnvironmentMembershipsInput {
s.UserArn = &v
return s
}
type DescribeEnvironmentMembershipsOutput struct {
_ struct{} `type:"structure"`
// Information about the environment members for the environment.
Memberships []*EnvironmentMember `locationName:"memberships" type:"list"`
// If there are more than 25 items in the list, only the first 25 items are
// returned, along with a unique string called a next token. To get the next
// batch of items in the list, call this operation again, adding the next token
// to the call.
NextToken *string `locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s DescribeEnvironmentMembershipsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentMembershipsOutput) GoString() string {
return s.String()
}
// SetMemberships sets the Memberships field's value.
func (s *DescribeEnvironmentMembershipsOutput) SetMemberships(v []*EnvironmentMember) *DescribeEnvironmentMembershipsOutput {
s.Memberships = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeEnvironmentMembershipsOutput) SetNextToken(v string) *DescribeEnvironmentMembershipsOutput {
s.NextToken = &v
return s
}
type DescribeEnvironmentStatusInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to get status information about.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeEnvironmentStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentStatusInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeEnvironmentStatusInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentStatusInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *DescribeEnvironmentStatusInput) SetEnvironmentId(v string) *DescribeEnvironmentStatusInput {
s.EnvironmentId = &v
return s
}
type DescribeEnvironmentStatusOutput struct {
_ struct{} `type:"structure"`
// Any informational message about the status of the environment.
//
// Message is a required field
Message *string `locationName:"message" type:"string" required:"true"`
// The status of the environment. Available values include:
//
// * connecting: The environment is connecting.
//
// * creating: The environment is being created.
//
// * deleting: The environment is being deleted.
//
// * error: The environment is in an error state.
//
// * ready: The environment is ready.
//
// * stopped: The environment is stopped.
//
// * stopping: The environment is stopping.
//
// Status is a required field
Status *string `locationName:"status" type:"string" required:"true" enum:"EnvironmentStatus"`
}
// String returns the string representation
func (s DescribeEnvironmentStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentStatusOutput) GoString() string {
return s.String()
}
// SetMessage sets the Message field's value.
func (s *DescribeEnvironmentStatusOutput) SetMessage(v string) *DescribeEnvironmentStatusOutput {
s.Message = &v
return s
}
// SetStatus sets the Status field's value.
func (s *DescribeEnvironmentStatusOutput) SetStatus(v string) *DescribeEnvironmentStatusOutput {
s.Status = &v
return s
}
type DescribeEnvironmentsInput struct {
_ struct{} `type:"structure"`
// The IDs of individual environments to get information about.
//
// EnvironmentIds is a required field
EnvironmentIds []*string `locationName:"environmentIds" min:"1" type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeEnvironmentsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeEnvironmentsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentsInput"}
if s.EnvironmentIds == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentIds"))
}
if s.EnvironmentIds != nil && len(s.EnvironmentIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("EnvironmentIds", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentIds sets the EnvironmentIds field's value.
func (s *DescribeEnvironmentsInput) SetEnvironmentIds(v []*string) *DescribeEnvironmentsInput {
s.EnvironmentIds = v
return s
}
type DescribeEnvironmentsOutput struct {
_ struct{} `type:"structure"`
// Information about the environments that are returned.
Environments []*Environment `locationName:"environments" type:"list"`
}
// String returns the string representation
func (s DescribeEnvironmentsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentsOutput) GoString() string {
return s.String()
}
// SetEnvironments sets the Environments field's value.
func (s *DescribeEnvironmentsOutput) SetEnvironments(v []*Environment) *DescribeEnvironmentsOutput {
s.Environments = v
return s
}
// Information about an Cloud9 development environment.
type Environment struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the environment.
//
// Arn is a required field
Arn *string `locationName:"arn" type:"string" required:"true"`
// The connection type used for connecting to an Amazon EC2 environment. CONNECT_SSH
// is selected by default.
ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"`
// The description for the environment.
Description *string `locationName:"description" type:"string" sensitive:"true"`
// The ID of the environment.
Id *string `locationName:"id" type:"string"`
// The state of the environment in its creation or deletion lifecycle.
Lifecycle *EnvironmentLifecycle `locationName:"lifecycle" type:"structure"`
// Describes the status of Amazon Web Services managed temporary credentials
// for the Cloud9 environment. Available values are:
//
// * ENABLED_ON_CREATE
//
// * ENABLED_BY_OWNER
//
// * DISABLED_BY_DEFAULT
//
// * DISABLED_BY_OWNER
//
// * DISABLED_BY_COLLABORATOR
//
// * PENDING_REMOVAL_BY_COLLABORATOR
//
// * PENDING_REMOVAL_BY_OWNER
//
// * FAILED_REMOVAL_BY_COLLABORATOR
//
// * ENABLED_BY_OWNER
//
// * DISABLED_BY_DEFAULT
ManagedCredentialsStatus *string `locationName:"managedCredentialsStatus" type:"string" enum:"ManagedCredentialsStatus"`
// The name of the environment.
Name *string `locationName:"name" min:"1" type:"string"`
// The Amazon Resource Name (ARN) of the environment owner.
//
// OwnerArn is a required field
OwnerArn *string `locationName:"ownerArn" type:"string" required:"true"`
// The type of environment. Valid values include the following:
//
// * ec2: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects
// to the environment.
//
// * ssh: Your own server connects to the environment.
//
// Type is a required field
Type *string `locationName:"type" type:"string" required:"true" enum:"EnvironmentType"`
}
// String returns the string representation
func (s Environment) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Environment) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *Environment) SetArn(v string) *Environment {
s.Arn = &v
return s
}
// SetConnectionType sets the ConnectionType field's value.
func (s *Environment) SetConnectionType(v string) *Environment {
s.ConnectionType = &v
return s
}
// SetDescription sets the Description field's value.
func (s *Environment) SetDescription(v string) *Environment {
s.Description = &v
return s
}
// SetId sets the Id field's value.
func (s *Environment) SetId(v string) *Environment {
s.Id = &v
return s
}
// SetLifecycle sets the Lifecycle field's value.
func (s *Environment) SetLifecycle(v *EnvironmentLifecycle) *Environment {
s.Lifecycle = v
return s
}
// SetManagedCredentialsStatus sets the ManagedCredentialsStatus field's value.
func (s *Environment) SetManagedCredentialsStatus(v string) *Environment {
s.ManagedCredentialsStatus = &v
return s
}
// SetName sets the Name field's value.
func (s *Environment) SetName(v string) *Environment {
s.Name = &v
return s
}
// SetOwnerArn sets the OwnerArn field's value.
func (s *Environment) SetOwnerArn(v string) *Environment {
s.OwnerArn = &v
return s
}
// SetType sets the Type field's value.
func (s *Environment) SetType(v string) *Environment {
s.Type = &v
return s
}
// Information about the current creation or deletion lifecycle state of an
// Cloud9 development environment.
type EnvironmentLifecycle struct {
_ struct{} `type:"structure"`
// If the environment failed to delete, the Amazon Resource Name (ARN) of the
// related Amazon Web Services resource.
FailureResource *string `locationName:"failureResource" type:"string"`
// Any informational message about the lifecycle state of the environment.
Reason *string `locationName:"reason" type:"string"`
// The current creation or deletion lifecycle state of the environment.
//
// * CREATING: The environment is in the process of being created.
//
// * CREATED: The environment was successfully created.
//
// * CREATE_FAILED: The environment failed to be created.
//
// * DELETING: The environment is in the process of being deleted.
//
// * DELETE_FAILED: The environment failed to delete.
Status *string `locationName:"status" type:"string" enum:"EnvironmentLifecycleStatus"`
}
// String returns the string representation
func (s EnvironmentLifecycle) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnvironmentLifecycle) GoString() string {
return s.String()
}
// SetFailureResource sets the FailureResource field's value.
func (s *EnvironmentLifecycle) SetFailureResource(v string) *EnvironmentLifecycle {
s.FailureResource = &v
return s
}
// SetReason sets the Reason field's value.
func (s *EnvironmentLifecycle) SetReason(v string) *EnvironmentLifecycle {
s.Reason = &v
return s
}
// SetStatus sets the Status field's value.
func (s *EnvironmentLifecycle) SetStatus(v string) *EnvironmentLifecycle {
s.Status = &v
return s
}
// Information about an environment member for an Cloud9 development environment.
type EnvironmentMember struct {
_ struct{} `type:"structure"`
// The ID of the environment for the environment member.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The time, expressed in epoch time format, when the environment member last
// opened the environment.
LastAccess *time.Time `locationName:"lastAccess" type:"timestamp"`
// The type of environment member permissions associated with this environment
// member. Available values include:
//
// * owner: Owns the environment.
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// Permissions is a required field
Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"Permissions"`
// The Amazon Resource Name (ARN) of the environment member.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
// The user ID in Identity and Access Management (IAM) of the environment member.
//
// UserId is a required field
UserId *string `locationName:"userId" type:"string" required:"true"`
}
// String returns the string representation
func (s EnvironmentMember) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnvironmentMember) GoString() string {
return s.String()
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *EnvironmentMember) SetEnvironmentId(v string) *EnvironmentMember {
s.EnvironmentId = &v
return s
}
// SetLastAccess sets the LastAccess field's value.
func (s *EnvironmentMember) SetLastAccess(v time.Time) *EnvironmentMember {
s.LastAccess = &v
return s
}
// SetPermissions sets the Permissions field's value.
func (s *EnvironmentMember) SetPermissions(v string) *EnvironmentMember {
s.Permissions = &v
return s
}
// SetUserArn sets the UserArn field's value.
func (s *EnvironmentMember) SetUserArn(v string) *EnvironmentMember {
s.UserArn = &v
return s
}
// SetUserId sets the UserId field's value.
func (s *EnvironmentMember) SetUserId(v string) *EnvironmentMember {
s.UserId = &v
return s
}
// An access permissions issue occurred.
type ForbiddenException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s ForbiddenException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ForbiddenException) GoString() string {
return s.String()
}
func newErrorForbiddenException(v protocol.ResponseMetadata) error {
return &ForbiddenException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ForbiddenException) Code() string {
return "ForbiddenException"
}
// Message returns the exception's message.
func (s *ForbiddenException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ForbiddenException) OrigErr() error {
return nil
}
func (s *ForbiddenException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ForbiddenException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ForbiddenException) RequestID() string {
return s.RespMetadata.RequestID
}
// An internal server error occurred.
type InternalServerErrorException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s InternalServerErrorException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InternalServerErrorException) GoString() string {
return s.String()
}
func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error {
return &InternalServerErrorException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InternalServerErrorException) Code() string {
return "InternalServerErrorException"
}
// Message returns the exception's message.
func (s *InternalServerErrorException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InternalServerErrorException) OrigErr() error {
return nil
}
func (s *InternalServerErrorException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InternalServerErrorException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InternalServerErrorException) RequestID() string {
return s.RespMetadata.RequestID
}
// A service limit was exceeded.
type LimitExceededException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s LimitExceededException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s LimitExceededException) GoString() string {
return s.String()
}
func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
return &LimitExceededException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *LimitExceededException) Code() string {
return "LimitExceededException"
}
// Message returns the exception's message.
func (s *LimitExceededException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *LimitExceededException) OrigErr() error {
return nil
}
func (s *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *LimitExceededException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *LimitExceededException) RequestID() string {
return s.RespMetadata.RequestID
}
type ListEnvironmentsInput struct {
_ struct{} `type:"structure"`
// The maximum number of environments to get identifiers for.
MaxResults *int64 `locationName:"maxResults" type:"integer"`
// During a previous call, if there are more than 25 items in the list, only
// the first 25 items are returned, along with a unique string called a next
// token. To get the next batch of items in the list, call this operation again,
// adding the next token to the call. To get all of the items in the list, keep
// calling this operation with each subsequent next token that is returned,
// until no more next tokens are returned.
NextToken *string `locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s ListEnvironmentsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListEnvironmentsInput) GoString() string {
return s.String()
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListEnvironmentsInput) SetMaxResults(v int64) *ListEnvironmentsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListEnvironmentsInput) SetNextToken(v string) *ListEnvironmentsInput {
s.NextToken = &v
return s
}
type ListEnvironmentsOutput struct {
_ struct{} `type:"structure"`
// The list of environment identifiers.
EnvironmentIds []*string `locationName:"environmentIds" type:"list"`
// If there are more than 25 items in the list, only the first 25 items are
// returned, along with a unique string called a next token. To get the next
// batch of items in the list, call this operation again, adding the next token
// to the call.
NextToken *string `locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s ListEnvironmentsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListEnvironmentsOutput) GoString() string {
return s.String()
}
// SetEnvironmentIds sets the EnvironmentIds field's value.
func (s *ListEnvironmentsOutput) SetEnvironmentIds(v []*string) *ListEnvironmentsOutput {
s.EnvironmentIds = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListEnvironmentsOutput) SetNextToken(v string) *ListEnvironmentsOutput {
s.NextToken = &v
return s
}
type ListTagsForResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Cloud9 development environment to get
// the tags for.
//
// ResourceARN is a required field
ResourceARN *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ListTagsForResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsForResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsForResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
if s.ResourceARN == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceARN sets the ResourceARN field's value.
func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput {
s.ResourceARN = &v
return s
}
type ListTagsForResourceOutput struct {
_ struct{} `type:"structure"`
// The list of tags associated with the Cloud9 development environment.
Tags []*Tag `type:"list" sensitive:"true"`
}
// String returns the string representation
func (s ListTagsForResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsForResourceOutput) GoString() string {
return s.String()
}
// SetTags sets the Tags field's value.
func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
s.Tags = v
return s
}
// The target resource cannot be found.
type NotFoundException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s NotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s NotFoundException) GoString() string {
return s.String()
}
func newErrorNotFoundException(v protocol.ResponseMetadata) error {
return &NotFoundException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *NotFoundException) Code() string {
return "NotFoundException"
}
// Message returns the exception's message.
func (s *NotFoundException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NotFoundException) OrigErr() error {
return nil
}
func (s *NotFoundException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *NotFoundException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *NotFoundException) RequestID() string {
return s.RespMetadata.RequestID
}
// Metadata that is associated with Amazon Web Services resources. In particular,
// a name-value pair that can be associated with an Cloud9 development environment.
// There are two types of tags: user tags and system tags. A user tag is created
// by the user. A system tag is automatically created by Amazon Web Services
// services. A system tag is prefixed with "aws:" and cannot be modified by
// the user.
type Tag struct {
_ struct{} `type:"structure" sensitive:"true"`
// The name part of a tag.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true" sensitive:"true"`
// The value part of a tag.
//
// Value is a required field
Value *string `type:"string" required:"true" sensitive:"true"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Tag) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Tag"}
if s.Key == nil {
invalidParams.Add(request.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Key", 1))
}
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
s.Key = &v
return s
}
// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
s.Value = &v
return s
}
type TagResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Cloud9 development environment to add
// tags to.
//
// ResourceARN is a required field
ResourceARN *string `type:"string" required:"true"`
// The list of tags to add to the given Cloud9 development environment.
//
// Tags is a required field
Tags []*Tag `type:"list" required:"true" sensitive:"true"`
}
// String returns the string representation
func (s TagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
if s.ResourceARN == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
}
if s.Tags == nil {
invalidParams.Add(request.NewErrParamRequired("Tags"))
}
if s.Tags != nil {
for i, v := range s.Tags {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceARN sets the ResourceARN field's value.
func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput {
s.ResourceARN = &v
return s
}
// SetTags sets the Tags field's value.
func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
s.Tags = v
return s
}
type TagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s TagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceOutput) GoString() string {
return s.String()
}
// Too many service requests were made over the given time period.
type TooManyRequestsException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s TooManyRequestsException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TooManyRequestsException) GoString() string {
return s.String()
}
func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
return &TooManyRequestsException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *TooManyRequestsException) Code() string {
return "TooManyRequestsException"
}
// Message returns the exception's message.
func (s *TooManyRequestsException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *TooManyRequestsException) OrigErr() error {
return nil
}
func (s *TooManyRequestsException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *TooManyRequestsException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *TooManyRequestsException) RequestID() string {
return s.RespMetadata.RequestID
}
type UntagResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Cloud9 development environment to remove
// tags from.
//
// ResourceARN is a required field
ResourceARN *string `type:"string" required:"true"`
// The tag names of the tags to remove from the given Cloud9 development environment.
//
// TagKeys is a required field
TagKeys []*string `type:"list" required:"true" sensitive:"true"`
}
// String returns the string representation
func (s UntagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UntagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
if s.ResourceARN == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
}
if s.TagKeys == nil {
invalidParams.Add(request.NewErrParamRequired("TagKeys"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceARN sets the ResourceARN field's value.
func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput {
s.ResourceARN = &v
return s
}
// SetTagKeys sets the TagKeys field's value.
func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
s.TagKeys = v
return s
}
type UntagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UntagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceOutput) GoString() string {
return s.String()
}
type UpdateEnvironmentInput struct {
_ struct{} `type:"structure"`
// Any new or replacement description for the environment.
Description *string `locationName:"description" type:"string" sensitive:"true"`
// The ID of the environment to change settings.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// A replacement name for the environment.
Name *string `locationName:"name" min:"1" type:"string"`
}
// String returns the string representation
func (s UpdateEnvironmentInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateEnvironmentInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateEnvironmentInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *UpdateEnvironmentInput) SetDescription(v string) *UpdateEnvironmentInput {
s.Description = &v
return s
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *UpdateEnvironmentInput) SetEnvironmentId(v string) *UpdateEnvironmentInput {
s.EnvironmentId = &v
return s
}
// SetName sets the Name field's value.
func (s *UpdateEnvironmentInput) SetName(v string) *UpdateEnvironmentInput {
s.Name = &v
return s
}
type UpdateEnvironmentMembershipInput struct {
_ struct{} `type:"structure"`
// The ID of the environment for the environment member whose settings you want
// to change.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The replacement type of environment member permissions you want to associate
// with this environment member. Available values include:
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// Permissions is a required field
Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"`
// The Amazon Resource Name (ARN) of the environment member whose settings you
// want to change.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateEnvironmentMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateEnvironmentMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateEnvironmentMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentMembershipInput"}
if s.EnvironmentId == nil {
invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
}
if s.Permissions == nil {
invalidParams.Add(request.NewErrParamRequired("Permissions"))
}
if s.UserArn == nil {
invalidParams.Add(request.NewErrParamRequired("UserArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEnvironmentId sets the EnvironmentId field's value.
func (s *UpdateEnvironmentMembershipInput) SetEnvironmentId(v string) *UpdateEnvironmentMembershipInput {
s.EnvironmentId = &v
return s
}
// SetPermissions sets the Permissions field's value.
func (s *UpdateEnvironmentMembershipInput) SetPermissions(v string) *UpdateEnvironmentMembershipInput {
s.Permissions = &v
return s
}
// SetUserArn sets the UserArn field's value.
func (s *UpdateEnvironmentMembershipInput) SetUserArn(v string) *UpdateEnvironmentMembershipInput {
s.UserArn = &v
return s
}
type UpdateEnvironmentMembershipOutput struct {
_ struct{} `type:"structure"`
// Information about the environment member whose settings were changed.
Membership *EnvironmentMember `locationName:"membership" type:"structure"`
}
// String returns the string representation
func (s UpdateEnvironmentMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateEnvironmentMembershipOutput) GoString() string {
return s.String()
}
// SetMembership sets the Membership field's value.
func (s *UpdateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *UpdateEnvironmentMembershipOutput {
s.Membership = v
return s
}
type UpdateEnvironmentOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UpdateEnvironmentOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateEnvironmentOutput) GoString() string {
return s.String()
}
const (
// ConnectionTypeConnectSsh is a ConnectionType enum value
ConnectionTypeConnectSsh = "CONNECT_SSH"
// ConnectionTypeConnectSsm is a ConnectionType enum value
ConnectionTypeConnectSsm = "CONNECT_SSM"
)
// ConnectionType_Values returns all elements of the ConnectionType enum
func ConnectionType_Values() []string {
return []string{
ConnectionTypeConnectSsh,
ConnectionTypeConnectSsm,
}
}
const (
// EnvironmentLifecycleStatusCreating is a EnvironmentLifecycleStatus enum value
EnvironmentLifecycleStatusCreating = "CREATING"
// EnvironmentLifecycleStatusCreated is a EnvironmentLifecycleStatus enum value
EnvironmentLifecycleStatusCreated = "CREATED"
// EnvironmentLifecycleStatusCreateFailed is a EnvironmentLifecycleStatus enum value
EnvironmentLifecycleStatusCreateFailed = "CREATE_FAILED"
// EnvironmentLifecycleStatusDeleting is a EnvironmentLifecycleStatus enum value
EnvironmentLifecycleStatusDeleting = "DELETING"
// EnvironmentLifecycleStatusDeleteFailed is a EnvironmentLifecycleStatus enum value
EnvironmentLifecycleStatusDeleteFailed = "DELETE_FAILED"
)
// EnvironmentLifecycleStatus_Values returns all elements of the EnvironmentLifecycleStatus enum
func EnvironmentLifecycleStatus_Values() []string {
return []string{
EnvironmentLifecycleStatusCreating,
EnvironmentLifecycleStatusCreated,
EnvironmentLifecycleStatusCreateFailed,
EnvironmentLifecycleStatusDeleting,
EnvironmentLifecycleStatusDeleteFailed,
}
}
const (
// EnvironmentStatusError is a EnvironmentStatus enum value
EnvironmentStatusError = "error"
// EnvironmentStatusCreating is a EnvironmentStatus enum value
EnvironmentStatusCreating = "creating"
// EnvironmentStatusConnecting is a EnvironmentStatus enum value
EnvironmentStatusConnecting = "connecting"
// EnvironmentStatusReady is a EnvironmentStatus enum value
EnvironmentStatusReady = "ready"
// EnvironmentStatusStopping is a EnvironmentStatus enum value
EnvironmentStatusStopping = "stopping"
// EnvironmentStatusStopped is a EnvironmentStatus enum value
EnvironmentStatusStopped = "stopped"
// EnvironmentStatusDeleting is a EnvironmentStatus enum value
EnvironmentStatusDeleting = "deleting"
)
// EnvironmentStatus_Values returns all elements of the EnvironmentStatus enum
func EnvironmentStatus_Values() []string {
return []string{
EnvironmentStatusError,
EnvironmentStatusCreating,
EnvironmentStatusConnecting,
EnvironmentStatusReady,
EnvironmentStatusStopping,
EnvironmentStatusStopped,
EnvironmentStatusDeleting,
}
}
const (
// EnvironmentTypeSsh is a EnvironmentType enum value
EnvironmentTypeSsh = "ssh"
// EnvironmentTypeEc2 is a EnvironmentType enum value
EnvironmentTypeEc2 = "ec2"
)
// EnvironmentType_Values returns all elements of the EnvironmentType enum
func EnvironmentType_Values() []string {
return []string{
EnvironmentTypeSsh,
EnvironmentTypeEc2,
}
}
const (
// ManagedCredentialsStatusEnabledOnCreate is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusEnabledOnCreate = "ENABLED_ON_CREATE"
// ManagedCredentialsStatusEnabledByOwner is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusEnabledByOwner = "ENABLED_BY_OWNER"
// ManagedCredentialsStatusDisabledByDefault is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusDisabledByDefault = "DISABLED_BY_DEFAULT"
// ManagedCredentialsStatusDisabledByOwner is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusDisabledByOwner = "DISABLED_BY_OWNER"
// ManagedCredentialsStatusDisabledByCollaborator is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusDisabledByCollaborator = "DISABLED_BY_COLLABORATOR"
// ManagedCredentialsStatusPendingRemovalByCollaborator is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusPendingRemovalByCollaborator = "PENDING_REMOVAL_BY_COLLABORATOR"
// ManagedCredentialsStatusPendingStartRemovalByCollaborator is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusPendingStartRemovalByCollaborator = "PENDING_START_REMOVAL_BY_COLLABORATOR"
// ManagedCredentialsStatusPendingRemovalByOwner is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusPendingRemovalByOwner = "PENDING_REMOVAL_BY_OWNER"
// ManagedCredentialsStatusPendingStartRemovalByOwner is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusPendingStartRemovalByOwner = "PENDING_START_REMOVAL_BY_OWNER"
// ManagedCredentialsStatusFailedRemovalByCollaborator is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusFailedRemovalByCollaborator = "FAILED_REMOVAL_BY_COLLABORATOR"
// ManagedCredentialsStatusFailedRemovalByOwner is a ManagedCredentialsStatus enum value
ManagedCredentialsStatusFailedRemovalByOwner = "FAILED_REMOVAL_BY_OWNER"
)
// ManagedCredentialsStatus_Values returns all elements of the ManagedCredentialsStatus enum
func ManagedCredentialsStatus_Values() []string {
return []string{
ManagedCredentialsStatusEnabledOnCreate,
ManagedCredentialsStatusEnabledByOwner,
ManagedCredentialsStatusDisabledByDefault,
ManagedCredentialsStatusDisabledByOwner,
ManagedCredentialsStatusDisabledByCollaborator,
ManagedCredentialsStatusPendingRemovalByCollaborator,
ManagedCredentialsStatusPendingStartRemovalByCollaborator,
ManagedCredentialsStatusPendingRemovalByOwner,
ManagedCredentialsStatusPendingStartRemovalByOwner,
ManagedCredentialsStatusFailedRemovalByCollaborator,
ManagedCredentialsStatusFailedRemovalByOwner,
}
}
const (
// MemberPermissionsReadWrite is a MemberPermissions enum value
MemberPermissionsReadWrite = "read-write"
// MemberPermissionsReadOnly is a MemberPermissions enum value
MemberPermissionsReadOnly = "read-only"
)
// MemberPermissions_Values returns all elements of the MemberPermissions enum
func MemberPermissions_Values() []string {
return []string{
MemberPermissionsReadWrite,
MemberPermissionsReadOnly,
}
}
const (
// PermissionsOwner is a Permissions enum value
PermissionsOwner = "owner"
// PermissionsReadWrite is a Permissions enum value
PermissionsReadWrite = "read-write"
// PermissionsReadOnly is a Permissions enum value
PermissionsReadOnly = "read-only"
)
// Permissions_Values returns all elements of the Permissions enum
func Permissions_Values() []string {
return []string{
PermissionsOwner,
PermissionsReadWrite,
PermissionsReadOnly,
}
}
| 3,456 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloud9 provides the client and types for making API
// requests to AWS Cloud9.
//
// Cloud9 is a collection of tools that you can use to code, build, run, test,
// debug, and release software in the cloud.
//
// For more information about Cloud9, see the Cloud9 User Guide (https://docs.aws.amazon.com/cloud9/latest/user-guide).
//
// Cloud9 supports these operations:
//
// * CreateEnvironmentEC2: Creates an Cloud9 development environment, launches
// an Amazon EC2 instance, and then connects from the instance to the environment.
//
// * CreateEnvironmentMembership: Adds an environment member to an environment.
//
// * DeleteEnvironment: Deletes an environment. If an Amazon EC2 instance
// is connected to the environment, also terminates the instance.
//
// * DeleteEnvironmentMembership: Deletes an environment member from an environment.
//
// * DescribeEnvironmentMemberships: Gets information about environment members
// for an environment.
//
// * DescribeEnvironments: Gets information about environments.
//
// * DescribeEnvironmentStatus: Gets status information for an environment.
//
// * ListEnvironments: Gets a list of environment identifiers.
//
// * ListTagsForResource: Gets the tags for an environment.
//
// * TagResource: Adds tags to an environment.
//
// * UntagResource: Removes tags from an environment.
//
// * UpdateEnvironment: Changes the settings of an existing environment.
//
// * UpdateEnvironmentMembership: Changes the settings of an existing environment
// member for an environment.
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23 for more information on this service.
//
// See cloud9 package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/
//
// Using the Client
//
// To contact AWS Cloud9 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 AWS Cloud9 client Cloud9 for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/#New
package cloud9
| 64 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// The target request is invalid.
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeConcurrentAccessException for service response error code
// "ConcurrentAccessException".
//
// A concurrent access issue occurred.
ErrCodeConcurrentAccessException = "ConcurrentAccessException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// A conflict occurred.
ErrCodeConflictException = "ConflictException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// An access permissions issue occurred.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeInternalServerErrorException for service response error code
// "InternalServerErrorException".
//
// An internal server error occurred.
ErrCodeInternalServerErrorException = "InternalServerErrorException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// A service limit was exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// The target resource cannot be found.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// Too many service requests were made over the given time period.
ErrCodeTooManyRequestsException = "TooManyRequestsException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"BadRequestException": newErrorBadRequestException,
"ConcurrentAccessException": newErrorConcurrentAccessException,
"ConflictException": newErrorConflictException,
"ForbiddenException": newErrorForbiddenException,
"InternalServerErrorException": newErrorInternalServerErrorException,
"LimitExceededException": newErrorLimitExceededException,
"NotFoundException": newErrorNotFoundException,
"TooManyRequestsException": newErrorTooManyRequestsException,
}
| 70 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9_test
import (
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloud9"
)
var _ time.Duration
var _ strings.Reader
var _ aws.Config
func parseTime(layout, value string) *time.Time {
t, err := time.Parse(layout, value)
if err != nil {
panic(err)
}
return &t
}
// CreateEnvironmentEC2
//
func ExampleCloud9_CreateEnvironmentEC2_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.CreateEnvironmentEC2Input{
AutomaticStopTimeMinutes: aws.Int64(60),
Description: aws.String("This is my demonstration environment."),
InstanceType: aws.String("t2.micro"),
Name: aws.String("my-demo-environment"),
OwnerArn: aws.String("arn:aws:iam::123456789012:user/MyDemoUser"),
SubnetId: aws.String("subnet-6300cd1b"),
}
result, err := svc.CreateEnvironmentEC2(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// CreateEnvironmentMembership
//
func ExampleCloud9_CreateEnvironmentMembership_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.CreateEnvironmentMembershipInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
Permissions: aws.String("read-write"),
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
}
result, err := svc.CreateEnvironmentMembership(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DeleteEnvironment
//
func ExampleCloud9_DeleteEnvironment_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.DeleteEnvironmentInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
}
result, err := svc.DeleteEnvironment(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DeleteEnvironmentMembership
//
func ExampleCloud9_DeleteEnvironmentMembership_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.DeleteEnvironmentMembershipInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
}
result, err := svc.DeleteEnvironmentMembership(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DescribeEnvironmentMemberships1
//
// The following example gets information about all of the environment members for the
// specified development environment.
func ExampleCloud9_DescribeEnvironmentMemberships_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.DescribeEnvironmentMembershipsInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
}
result, err := svc.DescribeEnvironmentMemberships(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DescribeEnvironmentMemberships2
//
// The following example gets information about the owner of the specified development
// environment.
func ExampleCloud9_DescribeEnvironmentMemberships_shared01() {
svc := cloud9.New(session.New())
input := &cloud9.DescribeEnvironmentMembershipsInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
Permissions: []*string{
aws.String("owner"),
},
}
result, err := svc.DescribeEnvironmentMemberships(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DescribeEnvironmentMemberships3
//
// The following example gets development environment membership information for the
// specified user.
func ExampleCloud9_DescribeEnvironmentMemberships_shared02() {
svc := cloud9.New(session.New())
input := &cloud9.DescribeEnvironmentMembershipsInput{
UserArn: aws.String("arn:aws:iam::123456789012:user/MyDemoUser"),
}
result, err := svc.DescribeEnvironmentMemberships(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DescribeEnvironmentStatus
//
func ExampleCloud9_DescribeEnvironmentStatus_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.DescribeEnvironmentStatusInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
}
result, err := svc.DescribeEnvironmentStatus(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// DescribeEnvironments
//
func ExampleCloud9_DescribeEnvironments_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.DescribeEnvironmentsInput{
EnvironmentIds: []*string{
aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
aws.String("349c86d4579e4e7298d500ff57a6b2EX"),
},
}
result, err := svc.DescribeEnvironments(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// ListEnvironments
//
func ExampleCloud9_ListEnvironments_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.ListEnvironmentsInput{}
result, err := svc.ListEnvironments(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// UpdateEnvironment
//
func ExampleCloud9_UpdateEnvironment_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.UpdateEnvironmentInput{
Description: aws.String("This is my changed demonstration environment."),
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
Name: aws.String("my-changed-demo-environment"),
}
result, err := svc.UpdateEnvironment(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// UpdateEnvironmentMembership
//
func ExampleCloud9_UpdateEnvironmentMembership_shared00() {
svc := cloud9.New(session.New())
input := &cloud9.UpdateEnvironmentMembershipInput{
EnvironmentId: aws.String("8d9967e2f0624182b74e7690ad69ebEX"),
Permissions: aws.String("read-only"),
UserArn: aws.String("arn:aws:iam::123456789012:user/AnotherDemoUser"),
}
result, err := svc.UpdateEnvironmentMembership(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloud9.ErrCodeBadRequestException:
fmt.Println(cloud9.ErrCodeBadRequestException, aerr.Error())
case cloud9.ErrCodeConflictException:
fmt.Println(cloud9.ErrCodeConflictException, aerr.Error())
case cloud9.ErrCodeNotFoundException:
fmt.Println(cloud9.ErrCodeNotFoundException, aerr.Error())
case cloud9.ErrCodeForbiddenException:
fmt.Println(cloud9.ErrCodeForbiddenException, aerr.Error())
case cloud9.ErrCodeTooManyRequestsException:
fmt.Println(cloud9.ErrCodeTooManyRequestsException, aerr.Error())
case cloud9.ErrCodeLimitExceededException:
fmt.Println(cloud9.ErrCodeLimitExceededException, aerr.Error())
case cloud9.ErrCodeInternalServerErrorException:
fmt.Println(cloud9.ErrCodeInternalServerErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
| 538 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
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"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// Cloud9 provides the API operation methods for making requests to
// AWS Cloud9. See this package's package overview docs
// for details on the service.
//
// Cloud9 methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type Cloud9 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 = "cloud9" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "Cloud9" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the Cloud9 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:
// mySession := session.Must(session.NewSession())
//
// // Create a Cloud9 client from just a session.
// svc := cloud9.New(mySession)
//
// // Create a Cloud9 client with additional configuration
// svc := cloud9.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Cloud9 {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *Cloud9 {
svc := &Cloud9{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2017-09-23",
JSONVersion: "1.1",
TargetPrefix: "AWSCloud9WorkspaceManagementService",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a Cloud9 operation and runs any
// custom request initialization.
func (c *Cloud9) 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
}
| 104 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloud9iface provides an interface to enable mocking the AWS Cloud9 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 cloud9iface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloud9"
)
// Cloud9API provides an interface to enable mocking the
// cloud9.Cloud9 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
// // AWS Cloud9.
// func myFunc(svc cloud9iface.Cloud9API) bool {
// // Make svc.CreateEnvironmentEC2 request
// }
//
// func main() {
// sess := session.New()
// svc := cloud9.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloud9Client struct {
// cloud9iface.Cloud9API
// }
// func (m *mockCloud9Client) CreateEnvironmentEC2(input *cloud9.CreateEnvironmentEC2Input) (*cloud9.CreateEnvironmentEC2Output, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloud9Client{}
//
// 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 Cloud9API interface {
CreateEnvironmentEC2(*cloud9.CreateEnvironmentEC2Input) (*cloud9.CreateEnvironmentEC2Output, error)
CreateEnvironmentEC2WithContext(aws.Context, *cloud9.CreateEnvironmentEC2Input, ...request.Option) (*cloud9.CreateEnvironmentEC2Output, error)
CreateEnvironmentEC2Request(*cloud9.CreateEnvironmentEC2Input) (*request.Request, *cloud9.CreateEnvironmentEC2Output)
CreateEnvironmentMembership(*cloud9.CreateEnvironmentMembershipInput) (*cloud9.CreateEnvironmentMembershipOutput, error)
CreateEnvironmentMembershipWithContext(aws.Context, *cloud9.CreateEnvironmentMembershipInput, ...request.Option) (*cloud9.CreateEnvironmentMembershipOutput, error)
CreateEnvironmentMembershipRequest(*cloud9.CreateEnvironmentMembershipInput) (*request.Request, *cloud9.CreateEnvironmentMembershipOutput)
DeleteEnvironment(*cloud9.DeleteEnvironmentInput) (*cloud9.DeleteEnvironmentOutput, error)
DeleteEnvironmentWithContext(aws.Context, *cloud9.DeleteEnvironmentInput, ...request.Option) (*cloud9.DeleteEnvironmentOutput, error)
DeleteEnvironmentRequest(*cloud9.DeleteEnvironmentInput) (*request.Request, *cloud9.DeleteEnvironmentOutput)
DeleteEnvironmentMembership(*cloud9.DeleteEnvironmentMembershipInput) (*cloud9.DeleteEnvironmentMembershipOutput, error)
DeleteEnvironmentMembershipWithContext(aws.Context, *cloud9.DeleteEnvironmentMembershipInput, ...request.Option) (*cloud9.DeleteEnvironmentMembershipOutput, error)
DeleteEnvironmentMembershipRequest(*cloud9.DeleteEnvironmentMembershipInput) (*request.Request, *cloud9.DeleteEnvironmentMembershipOutput)
DescribeEnvironmentMemberships(*cloud9.DescribeEnvironmentMembershipsInput) (*cloud9.DescribeEnvironmentMembershipsOutput, error)
DescribeEnvironmentMembershipsWithContext(aws.Context, *cloud9.DescribeEnvironmentMembershipsInput, ...request.Option) (*cloud9.DescribeEnvironmentMembershipsOutput, error)
DescribeEnvironmentMembershipsRequest(*cloud9.DescribeEnvironmentMembershipsInput) (*request.Request, *cloud9.DescribeEnvironmentMembershipsOutput)
DescribeEnvironmentMembershipsPages(*cloud9.DescribeEnvironmentMembershipsInput, func(*cloud9.DescribeEnvironmentMembershipsOutput, bool) bool) error
DescribeEnvironmentMembershipsPagesWithContext(aws.Context, *cloud9.DescribeEnvironmentMembershipsInput, func(*cloud9.DescribeEnvironmentMembershipsOutput, bool) bool, ...request.Option) error
DescribeEnvironmentStatus(*cloud9.DescribeEnvironmentStatusInput) (*cloud9.DescribeEnvironmentStatusOutput, error)
DescribeEnvironmentStatusWithContext(aws.Context, *cloud9.DescribeEnvironmentStatusInput, ...request.Option) (*cloud9.DescribeEnvironmentStatusOutput, error)
DescribeEnvironmentStatusRequest(*cloud9.DescribeEnvironmentStatusInput) (*request.Request, *cloud9.DescribeEnvironmentStatusOutput)
DescribeEnvironments(*cloud9.DescribeEnvironmentsInput) (*cloud9.DescribeEnvironmentsOutput, error)
DescribeEnvironmentsWithContext(aws.Context, *cloud9.DescribeEnvironmentsInput, ...request.Option) (*cloud9.DescribeEnvironmentsOutput, error)
DescribeEnvironmentsRequest(*cloud9.DescribeEnvironmentsInput) (*request.Request, *cloud9.DescribeEnvironmentsOutput)
ListEnvironments(*cloud9.ListEnvironmentsInput) (*cloud9.ListEnvironmentsOutput, error)
ListEnvironmentsWithContext(aws.Context, *cloud9.ListEnvironmentsInput, ...request.Option) (*cloud9.ListEnvironmentsOutput, error)
ListEnvironmentsRequest(*cloud9.ListEnvironmentsInput) (*request.Request, *cloud9.ListEnvironmentsOutput)
ListEnvironmentsPages(*cloud9.ListEnvironmentsInput, func(*cloud9.ListEnvironmentsOutput, bool) bool) error
ListEnvironmentsPagesWithContext(aws.Context, *cloud9.ListEnvironmentsInput, func(*cloud9.ListEnvironmentsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*cloud9.ListTagsForResourceInput) (*cloud9.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *cloud9.ListTagsForResourceInput, ...request.Option) (*cloud9.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*cloud9.ListTagsForResourceInput) (*request.Request, *cloud9.ListTagsForResourceOutput)
TagResource(*cloud9.TagResourceInput) (*cloud9.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *cloud9.TagResourceInput, ...request.Option) (*cloud9.TagResourceOutput, error)
TagResourceRequest(*cloud9.TagResourceInput) (*request.Request, *cloud9.TagResourceOutput)
UntagResource(*cloud9.UntagResourceInput) (*cloud9.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *cloud9.UntagResourceInput, ...request.Option) (*cloud9.UntagResourceOutput, error)
UntagResourceRequest(*cloud9.UntagResourceInput) (*request.Request, *cloud9.UntagResourceOutput)
UpdateEnvironment(*cloud9.UpdateEnvironmentInput) (*cloud9.UpdateEnvironmentOutput, error)
UpdateEnvironmentWithContext(aws.Context, *cloud9.UpdateEnvironmentInput, ...request.Option) (*cloud9.UpdateEnvironmentOutput, error)
UpdateEnvironmentRequest(*cloud9.UpdateEnvironmentInput) (*request.Request, *cloud9.UpdateEnvironmentOutput)
UpdateEnvironmentMembership(*cloud9.UpdateEnvironmentMembershipInput) (*cloud9.UpdateEnvironmentMembershipOutput, error)
UpdateEnvironmentMembershipWithContext(aws.Context, *cloud9.UpdateEnvironmentMembershipInput, ...request.Option) (*cloud9.UpdateEnvironmentMembershipOutput, error)
UpdateEnvironmentMembershipRequest(*cloud9.UpdateEnvironmentMembershipInput) (*request.Request, *cloud9.UpdateEnvironmentMembershipOutput)
}
var _ Cloud9API = (*cloud9.Cloud9)(nil)
| 123 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package clouddirectory provides the client and types for making API
// requests to Amazon CloudDirectory.
//
// Amazon Cloud Directory is a component of the AWS Directory Service that simplifies
// the development and management of cloud-scale web, mobile, and IoT applications.
// This guide describes the Cloud Directory operations that you can call programmatically
// and includes detailed information on data types and errors. For information
// about Cloud Directory features, see AWS Directory Service (https://aws.amazon.com/directoryservice/)
// and the Amazon Cloud Directory Developer Guide (https://docs.aws.amazon.com/clouddirectory/latest/developerguide/what_is_cloud_directory.html).
//
// See https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2017-01-11 for more information on this service.
//
// See clouddirectory package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/clouddirectory/
//
// Using the Client
//
// To contact Amazon CloudDirectory 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 CloudDirectory client CloudDirectory for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/clouddirectory/#New
package clouddirectory
| 34 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package clouddirectory
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"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// CloudDirectory provides the API operation methods for making requests to
// Amazon CloudDirectory. See this package's package overview docs
// for details on the service.
//
// CloudDirectory methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudDirectory 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 = "clouddirectory" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudDirectory" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudDirectory 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudDirectory client from just a session.
// svc := clouddirectory.New(mySession)
//
// // Create a CloudDirectory client with additional configuration
// svc := clouddirectory.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudDirectory {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "clouddirectory"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudDirectory {
svc := &CloudDirectory{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2017-01-11",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CloudDirectory operation and runs any
// custom request initialization.
func (c *CloudDirectory) 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
}
| 105 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package clouddirectoryiface provides an interface to enable mocking the Amazon CloudDirectory 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 clouddirectoryiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/clouddirectory"
)
// CloudDirectoryAPI provides an interface to enable mocking the
// clouddirectory.CloudDirectory 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 CloudDirectory.
// func myFunc(svc clouddirectoryiface.CloudDirectoryAPI) bool {
// // Make svc.AddFacetToObject request
// }
//
// func main() {
// sess := session.New()
// svc := clouddirectory.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudDirectoryClient struct {
// clouddirectoryiface.CloudDirectoryAPI
// }
// func (m *mockCloudDirectoryClient) AddFacetToObject(input *clouddirectory.AddFacetToObjectInput) (*clouddirectory.AddFacetToObjectOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudDirectoryClient{}
//
// 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 CloudDirectoryAPI interface {
AddFacetToObject(*clouddirectory.AddFacetToObjectInput) (*clouddirectory.AddFacetToObjectOutput, error)
AddFacetToObjectWithContext(aws.Context, *clouddirectory.AddFacetToObjectInput, ...request.Option) (*clouddirectory.AddFacetToObjectOutput, error)
AddFacetToObjectRequest(*clouddirectory.AddFacetToObjectInput) (*request.Request, *clouddirectory.AddFacetToObjectOutput)
ApplySchema(*clouddirectory.ApplySchemaInput) (*clouddirectory.ApplySchemaOutput, error)
ApplySchemaWithContext(aws.Context, *clouddirectory.ApplySchemaInput, ...request.Option) (*clouddirectory.ApplySchemaOutput, error)
ApplySchemaRequest(*clouddirectory.ApplySchemaInput) (*request.Request, *clouddirectory.ApplySchemaOutput)
AttachObject(*clouddirectory.AttachObjectInput) (*clouddirectory.AttachObjectOutput, error)
AttachObjectWithContext(aws.Context, *clouddirectory.AttachObjectInput, ...request.Option) (*clouddirectory.AttachObjectOutput, error)
AttachObjectRequest(*clouddirectory.AttachObjectInput) (*request.Request, *clouddirectory.AttachObjectOutput)
AttachPolicy(*clouddirectory.AttachPolicyInput) (*clouddirectory.AttachPolicyOutput, error)
AttachPolicyWithContext(aws.Context, *clouddirectory.AttachPolicyInput, ...request.Option) (*clouddirectory.AttachPolicyOutput, error)
AttachPolicyRequest(*clouddirectory.AttachPolicyInput) (*request.Request, *clouddirectory.AttachPolicyOutput)
AttachToIndex(*clouddirectory.AttachToIndexInput) (*clouddirectory.AttachToIndexOutput, error)
AttachToIndexWithContext(aws.Context, *clouddirectory.AttachToIndexInput, ...request.Option) (*clouddirectory.AttachToIndexOutput, error)
AttachToIndexRequest(*clouddirectory.AttachToIndexInput) (*request.Request, *clouddirectory.AttachToIndexOutput)
AttachTypedLink(*clouddirectory.AttachTypedLinkInput) (*clouddirectory.AttachTypedLinkOutput, error)
AttachTypedLinkWithContext(aws.Context, *clouddirectory.AttachTypedLinkInput, ...request.Option) (*clouddirectory.AttachTypedLinkOutput, error)
AttachTypedLinkRequest(*clouddirectory.AttachTypedLinkInput) (*request.Request, *clouddirectory.AttachTypedLinkOutput)
BatchRead(*clouddirectory.BatchReadInput) (*clouddirectory.BatchReadOutput, error)
BatchReadWithContext(aws.Context, *clouddirectory.BatchReadInput, ...request.Option) (*clouddirectory.BatchReadOutput, error)
BatchReadRequest(*clouddirectory.BatchReadInput) (*request.Request, *clouddirectory.BatchReadOutput)
BatchWrite(*clouddirectory.BatchWriteInput) (*clouddirectory.BatchWriteOutput, error)
BatchWriteWithContext(aws.Context, *clouddirectory.BatchWriteInput, ...request.Option) (*clouddirectory.BatchWriteOutput, error)
BatchWriteRequest(*clouddirectory.BatchWriteInput) (*request.Request, *clouddirectory.BatchWriteOutput)
CreateDirectory(*clouddirectory.CreateDirectoryInput) (*clouddirectory.CreateDirectoryOutput, error)
CreateDirectoryWithContext(aws.Context, *clouddirectory.CreateDirectoryInput, ...request.Option) (*clouddirectory.CreateDirectoryOutput, error)
CreateDirectoryRequest(*clouddirectory.CreateDirectoryInput) (*request.Request, *clouddirectory.CreateDirectoryOutput)
CreateFacet(*clouddirectory.CreateFacetInput) (*clouddirectory.CreateFacetOutput, error)
CreateFacetWithContext(aws.Context, *clouddirectory.CreateFacetInput, ...request.Option) (*clouddirectory.CreateFacetOutput, error)
CreateFacetRequest(*clouddirectory.CreateFacetInput) (*request.Request, *clouddirectory.CreateFacetOutput)
CreateIndex(*clouddirectory.CreateIndexInput) (*clouddirectory.CreateIndexOutput, error)
CreateIndexWithContext(aws.Context, *clouddirectory.CreateIndexInput, ...request.Option) (*clouddirectory.CreateIndexOutput, error)
CreateIndexRequest(*clouddirectory.CreateIndexInput) (*request.Request, *clouddirectory.CreateIndexOutput)
CreateObject(*clouddirectory.CreateObjectInput) (*clouddirectory.CreateObjectOutput, error)
CreateObjectWithContext(aws.Context, *clouddirectory.CreateObjectInput, ...request.Option) (*clouddirectory.CreateObjectOutput, error)
CreateObjectRequest(*clouddirectory.CreateObjectInput) (*request.Request, *clouddirectory.CreateObjectOutput)
CreateSchema(*clouddirectory.CreateSchemaInput) (*clouddirectory.CreateSchemaOutput, error)
CreateSchemaWithContext(aws.Context, *clouddirectory.CreateSchemaInput, ...request.Option) (*clouddirectory.CreateSchemaOutput, error)
CreateSchemaRequest(*clouddirectory.CreateSchemaInput) (*request.Request, *clouddirectory.CreateSchemaOutput)
CreateTypedLinkFacet(*clouddirectory.CreateTypedLinkFacetInput) (*clouddirectory.CreateTypedLinkFacetOutput, error)
CreateTypedLinkFacetWithContext(aws.Context, *clouddirectory.CreateTypedLinkFacetInput, ...request.Option) (*clouddirectory.CreateTypedLinkFacetOutput, error)
CreateTypedLinkFacetRequest(*clouddirectory.CreateTypedLinkFacetInput) (*request.Request, *clouddirectory.CreateTypedLinkFacetOutput)
DeleteDirectory(*clouddirectory.DeleteDirectoryInput) (*clouddirectory.DeleteDirectoryOutput, error)
DeleteDirectoryWithContext(aws.Context, *clouddirectory.DeleteDirectoryInput, ...request.Option) (*clouddirectory.DeleteDirectoryOutput, error)
DeleteDirectoryRequest(*clouddirectory.DeleteDirectoryInput) (*request.Request, *clouddirectory.DeleteDirectoryOutput)
DeleteFacet(*clouddirectory.DeleteFacetInput) (*clouddirectory.DeleteFacetOutput, error)
DeleteFacetWithContext(aws.Context, *clouddirectory.DeleteFacetInput, ...request.Option) (*clouddirectory.DeleteFacetOutput, error)
DeleteFacetRequest(*clouddirectory.DeleteFacetInput) (*request.Request, *clouddirectory.DeleteFacetOutput)
DeleteObject(*clouddirectory.DeleteObjectInput) (*clouddirectory.DeleteObjectOutput, error)
DeleteObjectWithContext(aws.Context, *clouddirectory.DeleteObjectInput, ...request.Option) (*clouddirectory.DeleteObjectOutput, error)
DeleteObjectRequest(*clouddirectory.DeleteObjectInput) (*request.Request, *clouddirectory.DeleteObjectOutput)
DeleteSchema(*clouddirectory.DeleteSchemaInput) (*clouddirectory.DeleteSchemaOutput, error)
DeleteSchemaWithContext(aws.Context, *clouddirectory.DeleteSchemaInput, ...request.Option) (*clouddirectory.DeleteSchemaOutput, error)
DeleteSchemaRequest(*clouddirectory.DeleteSchemaInput) (*request.Request, *clouddirectory.DeleteSchemaOutput)
DeleteTypedLinkFacet(*clouddirectory.DeleteTypedLinkFacetInput) (*clouddirectory.DeleteTypedLinkFacetOutput, error)
DeleteTypedLinkFacetWithContext(aws.Context, *clouddirectory.DeleteTypedLinkFacetInput, ...request.Option) (*clouddirectory.DeleteTypedLinkFacetOutput, error)
DeleteTypedLinkFacetRequest(*clouddirectory.DeleteTypedLinkFacetInput) (*request.Request, *clouddirectory.DeleteTypedLinkFacetOutput)
DetachFromIndex(*clouddirectory.DetachFromIndexInput) (*clouddirectory.DetachFromIndexOutput, error)
DetachFromIndexWithContext(aws.Context, *clouddirectory.DetachFromIndexInput, ...request.Option) (*clouddirectory.DetachFromIndexOutput, error)
DetachFromIndexRequest(*clouddirectory.DetachFromIndexInput) (*request.Request, *clouddirectory.DetachFromIndexOutput)
DetachObject(*clouddirectory.DetachObjectInput) (*clouddirectory.DetachObjectOutput, error)
DetachObjectWithContext(aws.Context, *clouddirectory.DetachObjectInput, ...request.Option) (*clouddirectory.DetachObjectOutput, error)
DetachObjectRequest(*clouddirectory.DetachObjectInput) (*request.Request, *clouddirectory.DetachObjectOutput)
DetachPolicy(*clouddirectory.DetachPolicyInput) (*clouddirectory.DetachPolicyOutput, error)
DetachPolicyWithContext(aws.Context, *clouddirectory.DetachPolicyInput, ...request.Option) (*clouddirectory.DetachPolicyOutput, error)
DetachPolicyRequest(*clouddirectory.DetachPolicyInput) (*request.Request, *clouddirectory.DetachPolicyOutput)
DetachTypedLink(*clouddirectory.DetachTypedLinkInput) (*clouddirectory.DetachTypedLinkOutput, error)
DetachTypedLinkWithContext(aws.Context, *clouddirectory.DetachTypedLinkInput, ...request.Option) (*clouddirectory.DetachTypedLinkOutput, error)
DetachTypedLinkRequest(*clouddirectory.DetachTypedLinkInput) (*request.Request, *clouddirectory.DetachTypedLinkOutput)
DisableDirectory(*clouddirectory.DisableDirectoryInput) (*clouddirectory.DisableDirectoryOutput, error)
DisableDirectoryWithContext(aws.Context, *clouddirectory.DisableDirectoryInput, ...request.Option) (*clouddirectory.DisableDirectoryOutput, error)
DisableDirectoryRequest(*clouddirectory.DisableDirectoryInput) (*request.Request, *clouddirectory.DisableDirectoryOutput)
EnableDirectory(*clouddirectory.EnableDirectoryInput) (*clouddirectory.EnableDirectoryOutput, error)
EnableDirectoryWithContext(aws.Context, *clouddirectory.EnableDirectoryInput, ...request.Option) (*clouddirectory.EnableDirectoryOutput, error)
EnableDirectoryRequest(*clouddirectory.EnableDirectoryInput) (*request.Request, *clouddirectory.EnableDirectoryOutput)
GetAppliedSchemaVersion(*clouddirectory.GetAppliedSchemaVersionInput) (*clouddirectory.GetAppliedSchemaVersionOutput, error)
GetAppliedSchemaVersionWithContext(aws.Context, *clouddirectory.GetAppliedSchemaVersionInput, ...request.Option) (*clouddirectory.GetAppliedSchemaVersionOutput, error)
GetAppliedSchemaVersionRequest(*clouddirectory.GetAppliedSchemaVersionInput) (*request.Request, *clouddirectory.GetAppliedSchemaVersionOutput)
GetDirectory(*clouddirectory.GetDirectoryInput) (*clouddirectory.GetDirectoryOutput, error)
GetDirectoryWithContext(aws.Context, *clouddirectory.GetDirectoryInput, ...request.Option) (*clouddirectory.GetDirectoryOutput, error)
GetDirectoryRequest(*clouddirectory.GetDirectoryInput) (*request.Request, *clouddirectory.GetDirectoryOutput)
GetFacet(*clouddirectory.GetFacetInput) (*clouddirectory.GetFacetOutput, error)
GetFacetWithContext(aws.Context, *clouddirectory.GetFacetInput, ...request.Option) (*clouddirectory.GetFacetOutput, error)
GetFacetRequest(*clouddirectory.GetFacetInput) (*request.Request, *clouddirectory.GetFacetOutput)
GetLinkAttributes(*clouddirectory.GetLinkAttributesInput) (*clouddirectory.GetLinkAttributesOutput, error)
GetLinkAttributesWithContext(aws.Context, *clouddirectory.GetLinkAttributesInput, ...request.Option) (*clouddirectory.GetLinkAttributesOutput, error)
GetLinkAttributesRequest(*clouddirectory.GetLinkAttributesInput) (*request.Request, *clouddirectory.GetLinkAttributesOutput)
GetObjectAttributes(*clouddirectory.GetObjectAttributesInput) (*clouddirectory.GetObjectAttributesOutput, error)
GetObjectAttributesWithContext(aws.Context, *clouddirectory.GetObjectAttributesInput, ...request.Option) (*clouddirectory.GetObjectAttributesOutput, error)
GetObjectAttributesRequest(*clouddirectory.GetObjectAttributesInput) (*request.Request, *clouddirectory.GetObjectAttributesOutput)
GetObjectInformation(*clouddirectory.GetObjectInformationInput) (*clouddirectory.GetObjectInformationOutput, error)
GetObjectInformationWithContext(aws.Context, *clouddirectory.GetObjectInformationInput, ...request.Option) (*clouddirectory.GetObjectInformationOutput, error)
GetObjectInformationRequest(*clouddirectory.GetObjectInformationInput) (*request.Request, *clouddirectory.GetObjectInformationOutput)
GetSchemaAsJson(*clouddirectory.GetSchemaAsJsonInput) (*clouddirectory.GetSchemaAsJsonOutput, error)
GetSchemaAsJsonWithContext(aws.Context, *clouddirectory.GetSchemaAsJsonInput, ...request.Option) (*clouddirectory.GetSchemaAsJsonOutput, error)
GetSchemaAsJsonRequest(*clouddirectory.GetSchemaAsJsonInput) (*request.Request, *clouddirectory.GetSchemaAsJsonOutput)
GetTypedLinkFacetInformation(*clouddirectory.GetTypedLinkFacetInformationInput) (*clouddirectory.GetTypedLinkFacetInformationOutput, error)
GetTypedLinkFacetInformationWithContext(aws.Context, *clouddirectory.GetTypedLinkFacetInformationInput, ...request.Option) (*clouddirectory.GetTypedLinkFacetInformationOutput, error)
GetTypedLinkFacetInformationRequest(*clouddirectory.GetTypedLinkFacetInformationInput) (*request.Request, *clouddirectory.GetTypedLinkFacetInformationOutput)
ListAppliedSchemaArns(*clouddirectory.ListAppliedSchemaArnsInput) (*clouddirectory.ListAppliedSchemaArnsOutput, error)
ListAppliedSchemaArnsWithContext(aws.Context, *clouddirectory.ListAppliedSchemaArnsInput, ...request.Option) (*clouddirectory.ListAppliedSchemaArnsOutput, error)
ListAppliedSchemaArnsRequest(*clouddirectory.ListAppliedSchemaArnsInput) (*request.Request, *clouddirectory.ListAppliedSchemaArnsOutput)
ListAppliedSchemaArnsPages(*clouddirectory.ListAppliedSchemaArnsInput, func(*clouddirectory.ListAppliedSchemaArnsOutput, bool) bool) error
ListAppliedSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListAppliedSchemaArnsInput, func(*clouddirectory.ListAppliedSchemaArnsOutput, bool) bool, ...request.Option) error
ListAttachedIndices(*clouddirectory.ListAttachedIndicesInput) (*clouddirectory.ListAttachedIndicesOutput, error)
ListAttachedIndicesWithContext(aws.Context, *clouddirectory.ListAttachedIndicesInput, ...request.Option) (*clouddirectory.ListAttachedIndicesOutput, error)
ListAttachedIndicesRequest(*clouddirectory.ListAttachedIndicesInput) (*request.Request, *clouddirectory.ListAttachedIndicesOutput)
ListAttachedIndicesPages(*clouddirectory.ListAttachedIndicesInput, func(*clouddirectory.ListAttachedIndicesOutput, bool) bool) error
ListAttachedIndicesPagesWithContext(aws.Context, *clouddirectory.ListAttachedIndicesInput, func(*clouddirectory.ListAttachedIndicesOutput, bool) bool, ...request.Option) error
ListDevelopmentSchemaArns(*clouddirectory.ListDevelopmentSchemaArnsInput) (*clouddirectory.ListDevelopmentSchemaArnsOutput, error)
ListDevelopmentSchemaArnsWithContext(aws.Context, *clouddirectory.ListDevelopmentSchemaArnsInput, ...request.Option) (*clouddirectory.ListDevelopmentSchemaArnsOutput, error)
ListDevelopmentSchemaArnsRequest(*clouddirectory.ListDevelopmentSchemaArnsInput) (*request.Request, *clouddirectory.ListDevelopmentSchemaArnsOutput)
ListDevelopmentSchemaArnsPages(*clouddirectory.ListDevelopmentSchemaArnsInput, func(*clouddirectory.ListDevelopmentSchemaArnsOutput, bool) bool) error
ListDevelopmentSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListDevelopmentSchemaArnsInput, func(*clouddirectory.ListDevelopmentSchemaArnsOutput, bool) bool, ...request.Option) error
ListDirectories(*clouddirectory.ListDirectoriesInput) (*clouddirectory.ListDirectoriesOutput, error)
ListDirectoriesWithContext(aws.Context, *clouddirectory.ListDirectoriesInput, ...request.Option) (*clouddirectory.ListDirectoriesOutput, error)
ListDirectoriesRequest(*clouddirectory.ListDirectoriesInput) (*request.Request, *clouddirectory.ListDirectoriesOutput)
ListDirectoriesPages(*clouddirectory.ListDirectoriesInput, func(*clouddirectory.ListDirectoriesOutput, bool) bool) error
ListDirectoriesPagesWithContext(aws.Context, *clouddirectory.ListDirectoriesInput, func(*clouddirectory.ListDirectoriesOutput, bool) bool, ...request.Option) error
ListFacetAttributes(*clouddirectory.ListFacetAttributesInput) (*clouddirectory.ListFacetAttributesOutput, error)
ListFacetAttributesWithContext(aws.Context, *clouddirectory.ListFacetAttributesInput, ...request.Option) (*clouddirectory.ListFacetAttributesOutput, error)
ListFacetAttributesRequest(*clouddirectory.ListFacetAttributesInput) (*request.Request, *clouddirectory.ListFacetAttributesOutput)
ListFacetAttributesPages(*clouddirectory.ListFacetAttributesInput, func(*clouddirectory.ListFacetAttributesOutput, bool) bool) error
ListFacetAttributesPagesWithContext(aws.Context, *clouddirectory.ListFacetAttributesInput, func(*clouddirectory.ListFacetAttributesOutput, bool) bool, ...request.Option) error
ListFacetNames(*clouddirectory.ListFacetNamesInput) (*clouddirectory.ListFacetNamesOutput, error)
ListFacetNamesWithContext(aws.Context, *clouddirectory.ListFacetNamesInput, ...request.Option) (*clouddirectory.ListFacetNamesOutput, error)
ListFacetNamesRequest(*clouddirectory.ListFacetNamesInput) (*request.Request, *clouddirectory.ListFacetNamesOutput)
ListFacetNamesPages(*clouddirectory.ListFacetNamesInput, func(*clouddirectory.ListFacetNamesOutput, bool) bool) error
ListFacetNamesPagesWithContext(aws.Context, *clouddirectory.ListFacetNamesInput, func(*clouddirectory.ListFacetNamesOutput, bool) bool, ...request.Option) error
ListIncomingTypedLinks(*clouddirectory.ListIncomingTypedLinksInput) (*clouddirectory.ListIncomingTypedLinksOutput, error)
ListIncomingTypedLinksWithContext(aws.Context, *clouddirectory.ListIncomingTypedLinksInput, ...request.Option) (*clouddirectory.ListIncomingTypedLinksOutput, error)
ListIncomingTypedLinksRequest(*clouddirectory.ListIncomingTypedLinksInput) (*request.Request, *clouddirectory.ListIncomingTypedLinksOutput)
ListIndex(*clouddirectory.ListIndexInput) (*clouddirectory.ListIndexOutput, error)
ListIndexWithContext(aws.Context, *clouddirectory.ListIndexInput, ...request.Option) (*clouddirectory.ListIndexOutput, error)
ListIndexRequest(*clouddirectory.ListIndexInput) (*request.Request, *clouddirectory.ListIndexOutput)
ListIndexPages(*clouddirectory.ListIndexInput, func(*clouddirectory.ListIndexOutput, bool) bool) error
ListIndexPagesWithContext(aws.Context, *clouddirectory.ListIndexInput, func(*clouddirectory.ListIndexOutput, bool) bool, ...request.Option) error
ListManagedSchemaArns(*clouddirectory.ListManagedSchemaArnsInput) (*clouddirectory.ListManagedSchemaArnsOutput, error)
ListManagedSchemaArnsWithContext(aws.Context, *clouddirectory.ListManagedSchemaArnsInput, ...request.Option) (*clouddirectory.ListManagedSchemaArnsOutput, error)
ListManagedSchemaArnsRequest(*clouddirectory.ListManagedSchemaArnsInput) (*request.Request, *clouddirectory.ListManagedSchemaArnsOutput)
ListManagedSchemaArnsPages(*clouddirectory.ListManagedSchemaArnsInput, func(*clouddirectory.ListManagedSchemaArnsOutput, bool) bool) error
ListManagedSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListManagedSchemaArnsInput, func(*clouddirectory.ListManagedSchemaArnsOutput, bool) bool, ...request.Option) error
ListObjectAttributes(*clouddirectory.ListObjectAttributesInput) (*clouddirectory.ListObjectAttributesOutput, error)
ListObjectAttributesWithContext(aws.Context, *clouddirectory.ListObjectAttributesInput, ...request.Option) (*clouddirectory.ListObjectAttributesOutput, error)
ListObjectAttributesRequest(*clouddirectory.ListObjectAttributesInput) (*request.Request, *clouddirectory.ListObjectAttributesOutput)
ListObjectAttributesPages(*clouddirectory.ListObjectAttributesInput, func(*clouddirectory.ListObjectAttributesOutput, bool) bool) error
ListObjectAttributesPagesWithContext(aws.Context, *clouddirectory.ListObjectAttributesInput, func(*clouddirectory.ListObjectAttributesOutput, bool) bool, ...request.Option) error
ListObjectChildren(*clouddirectory.ListObjectChildrenInput) (*clouddirectory.ListObjectChildrenOutput, error)
ListObjectChildrenWithContext(aws.Context, *clouddirectory.ListObjectChildrenInput, ...request.Option) (*clouddirectory.ListObjectChildrenOutput, error)
ListObjectChildrenRequest(*clouddirectory.ListObjectChildrenInput) (*request.Request, *clouddirectory.ListObjectChildrenOutput)
ListObjectChildrenPages(*clouddirectory.ListObjectChildrenInput, func(*clouddirectory.ListObjectChildrenOutput, bool) bool) error
ListObjectChildrenPagesWithContext(aws.Context, *clouddirectory.ListObjectChildrenInput, func(*clouddirectory.ListObjectChildrenOutput, bool) bool, ...request.Option) error
ListObjectParentPaths(*clouddirectory.ListObjectParentPathsInput) (*clouddirectory.ListObjectParentPathsOutput, error)
ListObjectParentPathsWithContext(aws.Context, *clouddirectory.ListObjectParentPathsInput, ...request.Option) (*clouddirectory.ListObjectParentPathsOutput, error)
ListObjectParentPathsRequest(*clouddirectory.ListObjectParentPathsInput) (*request.Request, *clouddirectory.ListObjectParentPathsOutput)
ListObjectParentPathsPages(*clouddirectory.ListObjectParentPathsInput, func(*clouddirectory.ListObjectParentPathsOutput, bool) bool) error
ListObjectParentPathsPagesWithContext(aws.Context, *clouddirectory.ListObjectParentPathsInput, func(*clouddirectory.ListObjectParentPathsOutput, bool) bool, ...request.Option) error
ListObjectParents(*clouddirectory.ListObjectParentsInput) (*clouddirectory.ListObjectParentsOutput, error)
ListObjectParentsWithContext(aws.Context, *clouddirectory.ListObjectParentsInput, ...request.Option) (*clouddirectory.ListObjectParentsOutput, error)
ListObjectParentsRequest(*clouddirectory.ListObjectParentsInput) (*request.Request, *clouddirectory.ListObjectParentsOutput)
ListObjectParentsPages(*clouddirectory.ListObjectParentsInput, func(*clouddirectory.ListObjectParentsOutput, bool) bool) error
ListObjectParentsPagesWithContext(aws.Context, *clouddirectory.ListObjectParentsInput, func(*clouddirectory.ListObjectParentsOutput, bool) bool, ...request.Option) error
ListObjectPolicies(*clouddirectory.ListObjectPoliciesInput) (*clouddirectory.ListObjectPoliciesOutput, error)
ListObjectPoliciesWithContext(aws.Context, *clouddirectory.ListObjectPoliciesInput, ...request.Option) (*clouddirectory.ListObjectPoliciesOutput, error)
ListObjectPoliciesRequest(*clouddirectory.ListObjectPoliciesInput) (*request.Request, *clouddirectory.ListObjectPoliciesOutput)
ListObjectPoliciesPages(*clouddirectory.ListObjectPoliciesInput, func(*clouddirectory.ListObjectPoliciesOutput, bool) bool) error
ListObjectPoliciesPagesWithContext(aws.Context, *clouddirectory.ListObjectPoliciesInput, func(*clouddirectory.ListObjectPoliciesOutput, bool) bool, ...request.Option) error
ListOutgoingTypedLinks(*clouddirectory.ListOutgoingTypedLinksInput) (*clouddirectory.ListOutgoingTypedLinksOutput, error)
ListOutgoingTypedLinksWithContext(aws.Context, *clouddirectory.ListOutgoingTypedLinksInput, ...request.Option) (*clouddirectory.ListOutgoingTypedLinksOutput, error)
ListOutgoingTypedLinksRequest(*clouddirectory.ListOutgoingTypedLinksInput) (*request.Request, *clouddirectory.ListOutgoingTypedLinksOutput)
ListPolicyAttachments(*clouddirectory.ListPolicyAttachmentsInput) (*clouddirectory.ListPolicyAttachmentsOutput, error)
ListPolicyAttachmentsWithContext(aws.Context, *clouddirectory.ListPolicyAttachmentsInput, ...request.Option) (*clouddirectory.ListPolicyAttachmentsOutput, error)
ListPolicyAttachmentsRequest(*clouddirectory.ListPolicyAttachmentsInput) (*request.Request, *clouddirectory.ListPolicyAttachmentsOutput)
ListPolicyAttachmentsPages(*clouddirectory.ListPolicyAttachmentsInput, func(*clouddirectory.ListPolicyAttachmentsOutput, bool) bool) error
ListPolicyAttachmentsPagesWithContext(aws.Context, *clouddirectory.ListPolicyAttachmentsInput, func(*clouddirectory.ListPolicyAttachmentsOutput, bool) bool, ...request.Option) error
ListPublishedSchemaArns(*clouddirectory.ListPublishedSchemaArnsInput) (*clouddirectory.ListPublishedSchemaArnsOutput, error)
ListPublishedSchemaArnsWithContext(aws.Context, *clouddirectory.ListPublishedSchemaArnsInput, ...request.Option) (*clouddirectory.ListPublishedSchemaArnsOutput, error)
ListPublishedSchemaArnsRequest(*clouddirectory.ListPublishedSchemaArnsInput) (*request.Request, *clouddirectory.ListPublishedSchemaArnsOutput)
ListPublishedSchemaArnsPages(*clouddirectory.ListPublishedSchemaArnsInput, func(*clouddirectory.ListPublishedSchemaArnsOutput, bool) bool) error
ListPublishedSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListPublishedSchemaArnsInput, func(*clouddirectory.ListPublishedSchemaArnsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*clouddirectory.ListTagsForResourceInput) (*clouddirectory.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *clouddirectory.ListTagsForResourceInput, ...request.Option) (*clouddirectory.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*clouddirectory.ListTagsForResourceInput) (*request.Request, *clouddirectory.ListTagsForResourceOutput)
ListTagsForResourcePages(*clouddirectory.ListTagsForResourceInput, func(*clouddirectory.ListTagsForResourceOutput, bool) bool) error
ListTagsForResourcePagesWithContext(aws.Context, *clouddirectory.ListTagsForResourceInput, func(*clouddirectory.ListTagsForResourceOutput, bool) bool, ...request.Option) error
ListTypedLinkFacetAttributes(*clouddirectory.ListTypedLinkFacetAttributesInput) (*clouddirectory.ListTypedLinkFacetAttributesOutput, error)
ListTypedLinkFacetAttributesWithContext(aws.Context, *clouddirectory.ListTypedLinkFacetAttributesInput, ...request.Option) (*clouddirectory.ListTypedLinkFacetAttributesOutput, error)
ListTypedLinkFacetAttributesRequest(*clouddirectory.ListTypedLinkFacetAttributesInput) (*request.Request, *clouddirectory.ListTypedLinkFacetAttributesOutput)
ListTypedLinkFacetAttributesPages(*clouddirectory.ListTypedLinkFacetAttributesInput, func(*clouddirectory.ListTypedLinkFacetAttributesOutput, bool) bool) error
ListTypedLinkFacetAttributesPagesWithContext(aws.Context, *clouddirectory.ListTypedLinkFacetAttributesInput, func(*clouddirectory.ListTypedLinkFacetAttributesOutput, bool) bool, ...request.Option) error
ListTypedLinkFacetNames(*clouddirectory.ListTypedLinkFacetNamesInput) (*clouddirectory.ListTypedLinkFacetNamesOutput, error)
ListTypedLinkFacetNamesWithContext(aws.Context, *clouddirectory.ListTypedLinkFacetNamesInput, ...request.Option) (*clouddirectory.ListTypedLinkFacetNamesOutput, error)
ListTypedLinkFacetNamesRequest(*clouddirectory.ListTypedLinkFacetNamesInput) (*request.Request, *clouddirectory.ListTypedLinkFacetNamesOutput)
ListTypedLinkFacetNamesPages(*clouddirectory.ListTypedLinkFacetNamesInput, func(*clouddirectory.ListTypedLinkFacetNamesOutput, bool) bool) error
ListTypedLinkFacetNamesPagesWithContext(aws.Context, *clouddirectory.ListTypedLinkFacetNamesInput, func(*clouddirectory.ListTypedLinkFacetNamesOutput, bool) bool, ...request.Option) error
LookupPolicy(*clouddirectory.LookupPolicyInput) (*clouddirectory.LookupPolicyOutput, error)
LookupPolicyWithContext(aws.Context, *clouddirectory.LookupPolicyInput, ...request.Option) (*clouddirectory.LookupPolicyOutput, error)
LookupPolicyRequest(*clouddirectory.LookupPolicyInput) (*request.Request, *clouddirectory.LookupPolicyOutput)
LookupPolicyPages(*clouddirectory.LookupPolicyInput, func(*clouddirectory.LookupPolicyOutput, bool) bool) error
LookupPolicyPagesWithContext(aws.Context, *clouddirectory.LookupPolicyInput, func(*clouddirectory.LookupPolicyOutput, bool) bool, ...request.Option) error
PublishSchema(*clouddirectory.PublishSchemaInput) (*clouddirectory.PublishSchemaOutput, error)
PublishSchemaWithContext(aws.Context, *clouddirectory.PublishSchemaInput, ...request.Option) (*clouddirectory.PublishSchemaOutput, error)
PublishSchemaRequest(*clouddirectory.PublishSchemaInput) (*request.Request, *clouddirectory.PublishSchemaOutput)
PutSchemaFromJson(*clouddirectory.PutSchemaFromJsonInput) (*clouddirectory.PutSchemaFromJsonOutput, error)
PutSchemaFromJsonWithContext(aws.Context, *clouddirectory.PutSchemaFromJsonInput, ...request.Option) (*clouddirectory.PutSchemaFromJsonOutput, error)
PutSchemaFromJsonRequest(*clouddirectory.PutSchemaFromJsonInput) (*request.Request, *clouddirectory.PutSchemaFromJsonOutput)
RemoveFacetFromObject(*clouddirectory.RemoveFacetFromObjectInput) (*clouddirectory.RemoveFacetFromObjectOutput, error)
RemoveFacetFromObjectWithContext(aws.Context, *clouddirectory.RemoveFacetFromObjectInput, ...request.Option) (*clouddirectory.RemoveFacetFromObjectOutput, error)
RemoveFacetFromObjectRequest(*clouddirectory.RemoveFacetFromObjectInput) (*request.Request, *clouddirectory.RemoveFacetFromObjectOutput)
TagResource(*clouddirectory.TagResourceInput) (*clouddirectory.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *clouddirectory.TagResourceInput, ...request.Option) (*clouddirectory.TagResourceOutput, error)
TagResourceRequest(*clouddirectory.TagResourceInput) (*request.Request, *clouddirectory.TagResourceOutput)
UntagResource(*clouddirectory.UntagResourceInput) (*clouddirectory.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *clouddirectory.UntagResourceInput, ...request.Option) (*clouddirectory.UntagResourceOutput, error)
UntagResourceRequest(*clouddirectory.UntagResourceInput) (*request.Request, *clouddirectory.UntagResourceOutput)
UpdateFacet(*clouddirectory.UpdateFacetInput) (*clouddirectory.UpdateFacetOutput, error)
UpdateFacetWithContext(aws.Context, *clouddirectory.UpdateFacetInput, ...request.Option) (*clouddirectory.UpdateFacetOutput, error)
UpdateFacetRequest(*clouddirectory.UpdateFacetInput) (*request.Request, *clouddirectory.UpdateFacetOutput)
UpdateLinkAttributes(*clouddirectory.UpdateLinkAttributesInput) (*clouddirectory.UpdateLinkAttributesOutput, error)
UpdateLinkAttributesWithContext(aws.Context, *clouddirectory.UpdateLinkAttributesInput, ...request.Option) (*clouddirectory.UpdateLinkAttributesOutput, error)
UpdateLinkAttributesRequest(*clouddirectory.UpdateLinkAttributesInput) (*request.Request, *clouddirectory.UpdateLinkAttributesOutput)
UpdateObjectAttributes(*clouddirectory.UpdateObjectAttributesInput) (*clouddirectory.UpdateObjectAttributesOutput, error)
UpdateObjectAttributesWithContext(aws.Context, *clouddirectory.UpdateObjectAttributesInput, ...request.Option) (*clouddirectory.UpdateObjectAttributesOutput, error)
UpdateObjectAttributesRequest(*clouddirectory.UpdateObjectAttributesInput) (*request.Request, *clouddirectory.UpdateObjectAttributesOutput)
UpdateSchema(*clouddirectory.UpdateSchemaInput) (*clouddirectory.UpdateSchemaOutput, error)
UpdateSchemaWithContext(aws.Context, *clouddirectory.UpdateSchemaInput, ...request.Option) (*clouddirectory.UpdateSchemaOutput, error)
UpdateSchemaRequest(*clouddirectory.UpdateSchemaInput) (*request.Request, *clouddirectory.UpdateSchemaOutput)
UpdateTypedLinkFacet(*clouddirectory.UpdateTypedLinkFacetInput) (*clouddirectory.UpdateTypedLinkFacetOutput, error)
UpdateTypedLinkFacetWithContext(aws.Context, *clouddirectory.UpdateTypedLinkFacetInput, ...request.Option) (*clouddirectory.UpdateTypedLinkFacetOutput, error)
UpdateTypedLinkFacetRequest(*clouddirectory.UpdateTypedLinkFacetInput) (*request.Request, *clouddirectory.UpdateTypedLinkFacetOutput)
UpgradeAppliedSchema(*clouddirectory.UpgradeAppliedSchemaInput) (*clouddirectory.UpgradeAppliedSchemaOutput, error)
UpgradeAppliedSchemaWithContext(aws.Context, *clouddirectory.UpgradeAppliedSchemaInput, ...request.Option) (*clouddirectory.UpgradeAppliedSchemaOutput, error)
UpgradeAppliedSchemaRequest(*clouddirectory.UpgradeAppliedSchemaInput) (*request.Request, *clouddirectory.UpgradeAppliedSchemaOutput)
UpgradePublishedSchema(*clouddirectory.UpgradePublishedSchemaInput) (*clouddirectory.UpgradePublishedSchemaOutput, error)
UpgradePublishedSchemaWithContext(aws.Context, *clouddirectory.UpgradePublishedSchemaInput, ...request.Option) (*clouddirectory.UpgradePublishedSchemaOutput, error)
UpgradePublishedSchemaRequest(*clouddirectory.UpgradePublishedSchemaInput) (*request.Request, *clouddirectory.UpgradePublishedSchemaOutput)
}
var _ CloudDirectoryAPI = (*clouddirectory.CloudDirectory)(nil)
| 386 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudformation provides the client and types for making API
// requests to AWS CloudFormation.
//
// CloudFormation allows you to create and manage Amazon Web Services infrastructure
// deployments predictably and repeatedly. You can use CloudFormation to leverage
// Amazon Web Services products, such as Amazon Elastic Compute Cloud, Amazon
// Elastic Block Store, Amazon Simple Notification Service, Elastic Load Balancing,
// and Auto Scaling to build highly-reliable, highly scalable, cost-effective
// applications without creating or configuring the underlying Amazon Web Services
// infrastructure.
//
// With CloudFormation, you declare all of your resources and dependencies in
// a template file. The template defines a collection of resources as a single
// unit called a stack. CloudFormation creates and deletes all member resources
// of the stack together and manages all dependencies between the resources
// for you.
//
// For more information about CloudFormation, see the CloudFormation Product
// Page (http://aws.amazon.com/cloudformation/).
//
// CloudFormation makes use of other Amazon Web Services products. If you need
// additional technical information about a specific Amazon Web Services product,
// you can find the product's technical documentation at docs.aws.amazon.com
// (https://docs.aws.amazon.com/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15 for more information on this service.
//
// See cloudformation package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/
//
// Using the Client
//
// To contact AWS CloudFormation 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 AWS CloudFormation client CloudFormation for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#New
package cloudformation
| 49 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudformation
const (
// ErrCodeAlreadyExistsException for service response error code
// "AlreadyExistsException".
//
// The resource with the name requested already exists.
ErrCodeAlreadyExistsException = "AlreadyExistsException"
// ErrCodeCFNRegistryException for service response error code
// "CFNRegistryException".
//
// An error occurred during a CloudFormation registry operation.
ErrCodeCFNRegistryException = "CFNRegistryException"
// ErrCodeChangeSetNotFoundException for service response error code
// "ChangeSetNotFound".
//
// The specified change set name or ID doesn't exit. To view valid change sets
// for a stack, use the ListChangeSets action.
ErrCodeChangeSetNotFoundException = "ChangeSetNotFound"
// ErrCodeCreatedButModifiedException for service response error code
// "CreatedButModifiedException".
//
// The specified resource exists, but has been changed.
ErrCodeCreatedButModifiedException = "CreatedButModifiedException"
// ErrCodeInsufficientCapabilitiesException for service response error code
// "InsufficientCapabilitiesException".
//
// The template contains resources with capabilities that weren't specified
// in the Capabilities parameter.
ErrCodeInsufficientCapabilitiesException = "InsufficientCapabilitiesException"
// ErrCodeInvalidChangeSetStatusException for service response error code
// "InvalidChangeSetStatus".
//
// The specified change set can't be used to update the stack. For example,
// the change set status might be CREATE_IN_PROGRESS, or the stack status might
// be UPDATE_IN_PROGRESS.
ErrCodeInvalidChangeSetStatusException = "InvalidChangeSetStatus"
// ErrCodeInvalidOperationException for service response error code
// "InvalidOperationException".
//
// The specified operation isn't valid.
ErrCodeInvalidOperationException = "InvalidOperationException"
// ErrCodeInvalidStateTransitionException for service response error code
// "InvalidStateTransition".
//
// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
// CloudFormation does not return this error to users.
ErrCodeInvalidStateTransitionException = "InvalidStateTransition"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The quota for the resource has already been reached.
//
// For information on resource and stack limitations, see Limits (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
// in the CloudFormation User Guide.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeNameAlreadyExistsException for service response error code
// "NameAlreadyExistsException".
//
// The specified name is already in use.
ErrCodeNameAlreadyExistsException = "NameAlreadyExistsException"
// ErrCodeOperationIdAlreadyExistsException for service response error code
// "OperationIdAlreadyExistsException".
//
// The specified operation ID already exists.
ErrCodeOperationIdAlreadyExistsException = "OperationIdAlreadyExistsException"
// ErrCodeOperationInProgressException for service response error code
// "OperationInProgressException".
//
// Another operation is currently in progress for this stack set. Only one operation
// can be performed for a stack set at a given time.
ErrCodeOperationInProgressException = "OperationInProgressException"
// ErrCodeOperationNotFoundException for service response error code
// "OperationNotFoundException".
//
// The specified ID refers to an operation that doesn't exist.
ErrCodeOperationNotFoundException = "OperationNotFoundException"
// ErrCodeOperationStatusCheckFailedException for service response error code
// "ConditionalCheckFailed".
//
// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
// CloudFormation does not return this error to users.
ErrCodeOperationStatusCheckFailedException = "ConditionalCheckFailed"
// ErrCodeStackInstanceNotFoundException for service response error code
// "StackInstanceNotFoundException".
//
// The specified stack instance doesn't exist.
ErrCodeStackInstanceNotFoundException = "StackInstanceNotFoundException"
// ErrCodeStackNotFoundException for service response error code
// "StackNotFoundException".
//
// The specified stack ARN doesn’t exist or stack doesn’t exist corresponding
// to the ARN in input.
ErrCodeStackNotFoundException = "StackNotFoundException"
// ErrCodeStackSetNotEmptyException for service response error code
// "StackSetNotEmptyException".
//
// You can't yet delete this stack set, because it still contains one or more
// stack instances. Delete all stack instances from the stack set before deleting
// the stack set.
ErrCodeStackSetNotEmptyException = "StackSetNotEmptyException"
// ErrCodeStackSetNotFoundException for service response error code
// "StackSetNotFoundException".
//
// The specified stack set doesn't exist.
ErrCodeStackSetNotFoundException = "StackSetNotFoundException"
// ErrCodeStaleRequestException for service response error code
// "StaleRequestException".
//
// Another operation has been performed on this stack set since the specified
// operation was performed.
ErrCodeStaleRequestException = "StaleRequestException"
// ErrCodeTokenAlreadyExistsException for service response error code
// "TokenAlreadyExistsException".
//
// A client request token already exists.
ErrCodeTokenAlreadyExistsException = "TokenAlreadyExistsException"
// ErrCodeTypeConfigurationNotFoundException for service response error code
// "TypeConfigurationNotFoundException".
//
// The specified extension configuration cannot be found.
ErrCodeTypeConfigurationNotFoundException = "TypeConfigurationNotFoundException"
// ErrCodeTypeNotFoundException for service response error code
// "TypeNotFoundException".
//
// The specified extension does not exist in the CloudFormation registry.
ErrCodeTypeNotFoundException = "TypeNotFoundException"
)
| 153 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.15,integration
package cloudformation_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/cloudformation"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_ListStacks(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudformation.New(sess)
params := &cloudformation.ListStacksInput{}
_, err := svc.ListStacksWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_CreateStack(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudformation.New(sess)
params := &cloudformation.CreateStackInput{
StackName: aws.String("fakestack"),
TemplateURL: aws.String("http://s3.amazonaws.com/foo/bar"),
}
_, err := svc.CreateStackWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
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 len(aerr.Message()) == 0 {
t.Errorf("expect non-empty error message")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
| 67 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudformation
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"
)
// CloudFormation provides the API operation methods for making requests to
// AWS CloudFormation. See this package's package overview docs
// for details on the service.
//
// CloudFormation methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudFormation 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 = "cloudformation" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudFormation" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudFormation 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudFormation client from just a session.
// svc := cloudformation.New(mySession)
//
// // Create a CloudFormation client with additional configuration
// svc := cloudformation.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFormation {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudFormation {
svc := &CloudFormation{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2010-05-15",
},
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 CloudFormation operation and runs any
// custom request initialization.
func (c *CloudFormation) 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
}
| 99 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudformation
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilChangeSetCreateComplete uses the AWS CloudFormation API operation
// DescribeChangeSet 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 *CloudFormation) WaitUntilChangeSetCreateComplete(input *DescribeChangeSetInput) error {
return c.WaitUntilChangeSetCreateCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilChangeSetCreateCompleteWithContext is an extended version of WaitUntilChangeSetCreateComplete.
// 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 *CloudFormation) WaitUntilChangeSetCreateCompleteWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilChangeSetCreateComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "Status",
Expected: "CREATE_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "Status",
Expected: "FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeChangeSetInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeChangeSetRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackCreateComplete uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error {
return c.WaitUntilStackCreateCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackCreateCompleteWithContext is an extended version of WaitUntilStackCreateComplete.
// 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 *CloudFormation) WaitUntilStackCreateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackCreateComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "CREATE_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "CREATE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "DELETE_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "DELETE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackDeleteComplete uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackDeleteComplete(input *DescribeStacksInput) error {
return c.WaitUntilStackDeleteCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackDeleteCompleteWithContext is an extended version of WaitUntilStackDeleteComplete.
// 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 *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackDeleteComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "DELETE_COMPLETE",
},
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "DELETE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "CREATE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_IN_PROGRESS",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_COMPLETE",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackExists uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackExists(input *DescribeStacksInput) error {
return c.WaitUntilStackExistsWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackExistsWithContext is an extended version of WaitUntilStackExists.
// 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 *CloudFormation) WaitUntilStackExistsWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackExists",
MaxAttempts: 20,
Delay: request.ConstantWaiterDelay(5 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
State: request.RetryWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackImportComplete uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackImportComplete(input *DescribeStacksInput) error {
return c.WaitUntilStackImportCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackImportCompleteWithContext is an extended version of WaitUntilStackImportComplete.
// 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 *CloudFormation) WaitUntilStackImportCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackImportComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "IMPORT_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "IMPORT_ROLLBACK_IN_PROGRESS",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "IMPORT_ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "IMPORT_ROLLBACK_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackRollbackComplete uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackRollbackComplete(input *DescribeStacksInput) error {
return c.WaitUntilStackRollbackCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackRollbackCompleteWithContext is an extended version of WaitUntilStackRollbackComplete.
// 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 *CloudFormation) WaitUntilStackRollbackCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackRollbackComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "DELETE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation
// DescribeStacks 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 *CloudFormation) WaitUntilStackUpdateComplete(input *DescribeStacksInput) error {
return c.WaitUntilStackUpdateCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStackUpdateCompleteWithContext is an extended version of WaitUntilStackUpdateComplete.
// 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 *CloudFormation) WaitUntilStackUpdateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStackUpdateComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_FAILED",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
Expected: "UPDATE_ROLLBACK_COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ValidationError",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeStacksInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeStacksRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilTypeRegistrationComplete uses the AWS CloudFormation API operation
// DescribeTypeRegistration 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 *CloudFormation) WaitUntilTypeRegistrationComplete(input *DescribeTypeRegistrationInput) error {
return c.WaitUntilTypeRegistrationCompleteWithContext(aws.BackgroundContext(), input)
}
// WaitUntilTypeRegistrationCompleteWithContext is an extended version of WaitUntilTypeRegistrationComplete.
// 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 *CloudFormation) WaitUntilTypeRegistrationCompleteWithContext(ctx aws.Context, input *DescribeTypeRegistrationInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilTypeRegistrationComplete",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(30 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
Expected: "COMPLETE",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
Expected: "FAILED",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeTypeRegistrationInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeTypeRegistrationRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
| 534 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudformationiface provides an interface to enable mocking the AWS CloudFormation 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 cloudformationiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudformation"
)
// CloudFormationAPI provides an interface to enable mocking the
// cloudformation.CloudFormation 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
// // AWS CloudFormation.
// func myFunc(svc cloudformationiface.CloudFormationAPI) bool {
// // Make svc.ActivateType request
// }
//
// func main() {
// sess := session.New()
// svc := cloudformation.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudFormationClient struct {
// cloudformationiface.CloudFormationAPI
// }
// func (m *mockCloudFormationClient) ActivateType(input *cloudformation.ActivateTypeInput) (*cloudformation.ActivateTypeOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudFormationClient{}
//
// 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 CloudFormationAPI interface {
ActivateType(*cloudformation.ActivateTypeInput) (*cloudformation.ActivateTypeOutput, error)
ActivateTypeWithContext(aws.Context, *cloudformation.ActivateTypeInput, ...request.Option) (*cloudformation.ActivateTypeOutput, error)
ActivateTypeRequest(*cloudformation.ActivateTypeInput) (*request.Request, *cloudformation.ActivateTypeOutput)
BatchDescribeTypeConfigurations(*cloudformation.BatchDescribeTypeConfigurationsInput) (*cloudformation.BatchDescribeTypeConfigurationsOutput, error)
BatchDescribeTypeConfigurationsWithContext(aws.Context, *cloudformation.BatchDescribeTypeConfigurationsInput, ...request.Option) (*cloudformation.BatchDescribeTypeConfigurationsOutput, error)
BatchDescribeTypeConfigurationsRequest(*cloudformation.BatchDescribeTypeConfigurationsInput) (*request.Request, *cloudformation.BatchDescribeTypeConfigurationsOutput)
CancelUpdateStack(*cloudformation.CancelUpdateStackInput) (*cloudformation.CancelUpdateStackOutput, error)
CancelUpdateStackWithContext(aws.Context, *cloudformation.CancelUpdateStackInput, ...request.Option) (*cloudformation.CancelUpdateStackOutput, error)
CancelUpdateStackRequest(*cloudformation.CancelUpdateStackInput) (*request.Request, *cloudformation.CancelUpdateStackOutput)
ContinueUpdateRollback(*cloudformation.ContinueUpdateRollbackInput) (*cloudformation.ContinueUpdateRollbackOutput, error)
ContinueUpdateRollbackWithContext(aws.Context, *cloudformation.ContinueUpdateRollbackInput, ...request.Option) (*cloudformation.ContinueUpdateRollbackOutput, error)
ContinueUpdateRollbackRequest(*cloudformation.ContinueUpdateRollbackInput) (*request.Request, *cloudformation.ContinueUpdateRollbackOutput)
CreateChangeSet(*cloudformation.CreateChangeSetInput) (*cloudformation.CreateChangeSetOutput, error)
CreateChangeSetWithContext(aws.Context, *cloudformation.CreateChangeSetInput, ...request.Option) (*cloudformation.CreateChangeSetOutput, error)
CreateChangeSetRequest(*cloudformation.CreateChangeSetInput) (*request.Request, *cloudformation.CreateChangeSetOutput)
CreateStack(*cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error)
CreateStackWithContext(aws.Context, *cloudformation.CreateStackInput, ...request.Option) (*cloudformation.CreateStackOutput, error)
CreateStackRequest(*cloudformation.CreateStackInput) (*request.Request, *cloudformation.CreateStackOutput)
CreateStackInstances(*cloudformation.CreateStackInstancesInput) (*cloudformation.CreateStackInstancesOutput, error)
CreateStackInstancesWithContext(aws.Context, *cloudformation.CreateStackInstancesInput, ...request.Option) (*cloudformation.CreateStackInstancesOutput, error)
CreateStackInstancesRequest(*cloudformation.CreateStackInstancesInput) (*request.Request, *cloudformation.CreateStackInstancesOutput)
CreateStackSet(*cloudformation.CreateStackSetInput) (*cloudformation.CreateStackSetOutput, error)
CreateStackSetWithContext(aws.Context, *cloudformation.CreateStackSetInput, ...request.Option) (*cloudformation.CreateStackSetOutput, error)
CreateStackSetRequest(*cloudformation.CreateStackSetInput) (*request.Request, *cloudformation.CreateStackSetOutput)
DeactivateType(*cloudformation.DeactivateTypeInput) (*cloudformation.DeactivateTypeOutput, error)
DeactivateTypeWithContext(aws.Context, *cloudformation.DeactivateTypeInput, ...request.Option) (*cloudformation.DeactivateTypeOutput, error)
DeactivateTypeRequest(*cloudformation.DeactivateTypeInput) (*request.Request, *cloudformation.DeactivateTypeOutput)
DeleteChangeSet(*cloudformation.DeleteChangeSetInput) (*cloudformation.DeleteChangeSetOutput, error)
DeleteChangeSetWithContext(aws.Context, *cloudformation.DeleteChangeSetInput, ...request.Option) (*cloudformation.DeleteChangeSetOutput, error)
DeleteChangeSetRequest(*cloudformation.DeleteChangeSetInput) (*request.Request, *cloudformation.DeleteChangeSetOutput)
DeleteStack(*cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error)
DeleteStackWithContext(aws.Context, *cloudformation.DeleteStackInput, ...request.Option) (*cloudformation.DeleteStackOutput, error)
DeleteStackRequest(*cloudformation.DeleteStackInput) (*request.Request, *cloudformation.DeleteStackOutput)
DeleteStackInstances(*cloudformation.DeleteStackInstancesInput) (*cloudformation.DeleteStackInstancesOutput, error)
DeleteStackInstancesWithContext(aws.Context, *cloudformation.DeleteStackInstancesInput, ...request.Option) (*cloudformation.DeleteStackInstancesOutput, error)
DeleteStackInstancesRequest(*cloudformation.DeleteStackInstancesInput) (*request.Request, *cloudformation.DeleteStackInstancesOutput)
DeleteStackSet(*cloudformation.DeleteStackSetInput) (*cloudformation.DeleteStackSetOutput, error)
DeleteStackSetWithContext(aws.Context, *cloudformation.DeleteStackSetInput, ...request.Option) (*cloudformation.DeleteStackSetOutput, error)
DeleteStackSetRequest(*cloudformation.DeleteStackSetInput) (*request.Request, *cloudformation.DeleteStackSetOutput)
DeregisterType(*cloudformation.DeregisterTypeInput) (*cloudformation.DeregisterTypeOutput, error)
DeregisterTypeWithContext(aws.Context, *cloudformation.DeregisterTypeInput, ...request.Option) (*cloudformation.DeregisterTypeOutput, error)
DeregisterTypeRequest(*cloudformation.DeregisterTypeInput) (*request.Request, *cloudformation.DeregisterTypeOutput)
DescribeAccountLimits(*cloudformation.DescribeAccountLimitsInput) (*cloudformation.DescribeAccountLimitsOutput, error)
DescribeAccountLimitsWithContext(aws.Context, *cloudformation.DescribeAccountLimitsInput, ...request.Option) (*cloudformation.DescribeAccountLimitsOutput, error)
DescribeAccountLimitsRequest(*cloudformation.DescribeAccountLimitsInput) (*request.Request, *cloudformation.DescribeAccountLimitsOutput)
DescribeAccountLimitsPages(*cloudformation.DescribeAccountLimitsInput, func(*cloudformation.DescribeAccountLimitsOutput, bool) bool) error
DescribeAccountLimitsPagesWithContext(aws.Context, *cloudformation.DescribeAccountLimitsInput, func(*cloudformation.DescribeAccountLimitsOutput, bool) bool, ...request.Option) error
DescribeChangeSet(*cloudformation.DescribeChangeSetInput) (*cloudformation.DescribeChangeSetOutput, error)
DescribeChangeSetWithContext(aws.Context, *cloudformation.DescribeChangeSetInput, ...request.Option) (*cloudformation.DescribeChangeSetOutput, error)
DescribeChangeSetRequest(*cloudformation.DescribeChangeSetInput) (*request.Request, *cloudformation.DescribeChangeSetOutput)
DescribePublisher(*cloudformation.DescribePublisherInput) (*cloudformation.DescribePublisherOutput, error)
DescribePublisherWithContext(aws.Context, *cloudformation.DescribePublisherInput, ...request.Option) (*cloudformation.DescribePublisherOutput, error)
DescribePublisherRequest(*cloudformation.DescribePublisherInput) (*request.Request, *cloudformation.DescribePublisherOutput)
DescribeStackDriftDetectionStatus(*cloudformation.DescribeStackDriftDetectionStatusInput) (*cloudformation.DescribeStackDriftDetectionStatusOutput, error)
DescribeStackDriftDetectionStatusWithContext(aws.Context, *cloudformation.DescribeStackDriftDetectionStatusInput, ...request.Option) (*cloudformation.DescribeStackDriftDetectionStatusOutput, error)
DescribeStackDriftDetectionStatusRequest(*cloudformation.DescribeStackDriftDetectionStatusInput) (*request.Request, *cloudformation.DescribeStackDriftDetectionStatusOutput)
DescribeStackEvents(*cloudformation.DescribeStackEventsInput) (*cloudformation.DescribeStackEventsOutput, error)
DescribeStackEventsWithContext(aws.Context, *cloudformation.DescribeStackEventsInput, ...request.Option) (*cloudformation.DescribeStackEventsOutput, error)
DescribeStackEventsRequest(*cloudformation.DescribeStackEventsInput) (*request.Request, *cloudformation.DescribeStackEventsOutput)
DescribeStackEventsPages(*cloudformation.DescribeStackEventsInput, func(*cloudformation.DescribeStackEventsOutput, bool) bool) error
DescribeStackEventsPagesWithContext(aws.Context, *cloudformation.DescribeStackEventsInput, func(*cloudformation.DescribeStackEventsOutput, bool) bool, ...request.Option) error
DescribeStackInstance(*cloudformation.DescribeStackInstanceInput) (*cloudformation.DescribeStackInstanceOutput, error)
DescribeStackInstanceWithContext(aws.Context, *cloudformation.DescribeStackInstanceInput, ...request.Option) (*cloudformation.DescribeStackInstanceOutput, error)
DescribeStackInstanceRequest(*cloudformation.DescribeStackInstanceInput) (*request.Request, *cloudformation.DescribeStackInstanceOutput)
DescribeStackResource(*cloudformation.DescribeStackResourceInput) (*cloudformation.DescribeStackResourceOutput, error)
DescribeStackResourceWithContext(aws.Context, *cloudformation.DescribeStackResourceInput, ...request.Option) (*cloudformation.DescribeStackResourceOutput, error)
DescribeStackResourceRequest(*cloudformation.DescribeStackResourceInput) (*request.Request, *cloudformation.DescribeStackResourceOutput)
DescribeStackResourceDrifts(*cloudformation.DescribeStackResourceDriftsInput) (*cloudformation.DescribeStackResourceDriftsOutput, error)
DescribeStackResourceDriftsWithContext(aws.Context, *cloudformation.DescribeStackResourceDriftsInput, ...request.Option) (*cloudformation.DescribeStackResourceDriftsOutput, error)
DescribeStackResourceDriftsRequest(*cloudformation.DescribeStackResourceDriftsInput) (*request.Request, *cloudformation.DescribeStackResourceDriftsOutput)
DescribeStackResourceDriftsPages(*cloudformation.DescribeStackResourceDriftsInput, func(*cloudformation.DescribeStackResourceDriftsOutput, bool) bool) error
DescribeStackResourceDriftsPagesWithContext(aws.Context, *cloudformation.DescribeStackResourceDriftsInput, func(*cloudformation.DescribeStackResourceDriftsOutput, bool) bool, ...request.Option) error
DescribeStackResources(*cloudformation.DescribeStackResourcesInput) (*cloudformation.DescribeStackResourcesOutput, error)
DescribeStackResourcesWithContext(aws.Context, *cloudformation.DescribeStackResourcesInput, ...request.Option) (*cloudformation.DescribeStackResourcesOutput, error)
DescribeStackResourcesRequest(*cloudformation.DescribeStackResourcesInput) (*request.Request, *cloudformation.DescribeStackResourcesOutput)
DescribeStackSet(*cloudformation.DescribeStackSetInput) (*cloudformation.DescribeStackSetOutput, error)
DescribeStackSetWithContext(aws.Context, *cloudformation.DescribeStackSetInput, ...request.Option) (*cloudformation.DescribeStackSetOutput, error)
DescribeStackSetRequest(*cloudformation.DescribeStackSetInput) (*request.Request, *cloudformation.DescribeStackSetOutput)
DescribeStackSetOperation(*cloudformation.DescribeStackSetOperationInput) (*cloudformation.DescribeStackSetOperationOutput, error)
DescribeStackSetOperationWithContext(aws.Context, *cloudformation.DescribeStackSetOperationInput, ...request.Option) (*cloudformation.DescribeStackSetOperationOutput, error)
DescribeStackSetOperationRequest(*cloudformation.DescribeStackSetOperationInput) (*request.Request, *cloudformation.DescribeStackSetOperationOutput)
DescribeStacks(*cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
DescribeStacksWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.Option) (*cloudformation.DescribeStacksOutput, error)
DescribeStacksRequest(*cloudformation.DescribeStacksInput) (*request.Request, *cloudformation.DescribeStacksOutput)
DescribeStacksPages(*cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool) error
DescribeStacksPagesWithContext(aws.Context, *cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool, ...request.Option) error
DescribeType(*cloudformation.DescribeTypeInput) (*cloudformation.DescribeTypeOutput, error)
DescribeTypeWithContext(aws.Context, *cloudformation.DescribeTypeInput, ...request.Option) (*cloudformation.DescribeTypeOutput, error)
DescribeTypeRequest(*cloudformation.DescribeTypeInput) (*request.Request, *cloudformation.DescribeTypeOutput)
DescribeTypeRegistration(*cloudformation.DescribeTypeRegistrationInput) (*cloudformation.DescribeTypeRegistrationOutput, error)
DescribeTypeRegistrationWithContext(aws.Context, *cloudformation.DescribeTypeRegistrationInput, ...request.Option) (*cloudformation.DescribeTypeRegistrationOutput, error)
DescribeTypeRegistrationRequest(*cloudformation.DescribeTypeRegistrationInput) (*request.Request, *cloudformation.DescribeTypeRegistrationOutput)
DetectStackDrift(*cloudformation.DetectStackDriftInput) (*cloudformation.DetectStackDriftOutput, error)
DetectStackDriftWithContext(aws.Context, *cloudformation.DetectStackDriftInput, ...request.Option) (*cloudformation.DetectStackDriftOutput, error)
DetectStackDriftRequest(*cloudformation.DetectStackDriftInput) (*request.Request, *cloudformation.DetectStackDriftOutput)
DetectStackResourceDrift(*cloudformation.DetectStackResourceDriftInput) (*cloudformation.DetectStackResourceDriftOutput, error)
DetectStackResourceDriftWithContext(aws.Context, *cloudformation.DetectStackResourceDriftInput, ...request.Option) (*cloudformation.DetectStackResourceDriftOutput, error)
DetectStackResourceDriftRequest(*cloudformation.DetectStackResourceDriftInput) (*request.Request, *cloudformation.DetectStackResourceDriftOutput)
DetectStackSetDrift(*cloudformation.DetectStackSetDriftInput) (*cloudformation.DetectStackSetDriftOutput, error)
DetectStackSetDriftWithContext(aws.Context, *cloudformation.DetectStackSetDriftInput, ...request.Option) (*cloudformation.DetectStackSetDriftOutput, error)
DetectStackSetDriftRequest(*cloudformation.DetectStackSetDriftInput) (*request.Request, *cloudformation.DetectStackSetDriftOutput)
EstimateTemplateCost(*cloudformation.EstimateTemplateCostInput) (*cloudformation.EstimateTemplateCostOutput, error)
EstimateTemplateCostWithContext(aws.Context, *cloudformation.EstimateTemplateCostInput, ...request.Option) (*cloudformation.EstimateTemplateCostOutput, error)
EstimateTemplateCostRequest(*cloudformation.EstimateTemplateCostInput) (*request.Request, *cloudformation.EstimateTemplateCostOutput)
ExecuteChangeSet(*cloudformation.ExecuteChangeSetInput) (*cloudformation.ExecuteChangeSetOutput, error)
ExecuteChangeSetWithContext(aws.Context, *cloudformation.ExecuteChangeSetInput, ...request.Option) (*cloudformation.ExecuteChangeSetOutput, error)
ExecuteChangeSetRequest(*cloudformation.ExecuteChangeSetInput) (*request.Request, *cloudformation.ExecuteChangeSetOutput)
GetStackPolicy(*cloudformation.GetStackPolicyInput) (*cloudformation.GetStackPolicyOutput, error)
GetStackPolicyWithContext(aws.Context, *cloudformation.GetStackPolicyInput, ...request.Option) (*cloudformation.GetStackPolicyOutput, error)
GetStackPolicyRequest(*cloudformation.GetStackPolicyInput) (*request.Request, *cloudformation.GetStackPolicyOutput)
GetTemplate(*cloudformation.GetTemplateInput) (*cloudformation.GetTemplateOutput, error)
GetTemplateWithContext(aws.Context, *cloudformation.GetTemplateInput, ...request.Option) (*cloudformation.GetTemplateOutput, error)
GetTemplateRequest(*cloudformation.GetTemplateInput) (*request.Request, *cloudformation.GetTemplateOutput)
GetTemplateSummary(*cloudformation.GetTemplateSummaryInput) (*cloudformation.GetTemplateSummaryOutput, error)
GetTemplateSummaryWithContext(aws.Context, *cloudformation.GetTemplateSummaryInput, ...request.Option) (*cloudformation.GetTemplateSummaryOutput, error)
GetTemplateSummaryRequest(*cloudformation.GetTemplateSummaryInput) (*request.Request, *cloudformation.GetTemplateSummaryOutput)
ImportStacksToStackSet(*cloudformation.ImportStacksToStackSetInput) (*cloudformation.ImportStacksToStackSetOutput, error)
ImportStacksToStackSetWithContext(aws.Context, *cloudformation.ImportStacksToStackSetInput, ...request.Option) (*cloudformation.ImportStacksToStackSetOutput, error)
ImportStacksToStackSetRequest(*cloudformation.ImportStacksToStackSetInput) (*request.Request, *cloudformation.ImportStacksToStackSetOutput)
ListChangeSets(*cloudformation.ListChangeSetsInput) (*cloudformation.ListChangeSetsOutput, error)
ListChangeSetsWithContext(aws.Context, *cloudformation.ListChangeSetsInput, ...request.Option) (*cloudformation.ListChangeSetsOutput, error)
ListChangeSetsRequest(*cloudformation.ListChangeSetsInput) (*request.Request, *cloudformation.ListChangeSetsOutput)
ListChangeSetsPages(*cloudformation.ListChangeSetsInput, func(*cloudformation.ListChangeSetsOutput, bool) bool) error
ListChangeSetsPagesWithContext(aws.Context, *cloudformation.ListChangeSetsInput, func(*cloudformation.ListChangeSetsOutput, bool) bool, ...request.Option) error
ListExports(*cloudformation.ListExportsInput) (*cloudformation.ListExportsOutput, error)
ListExportsWithContext(aws.Context, *cloudformation.ListExportsInput, ...request.Option) (*cloudformation.ListExportsOutput, error)
ListExportsRequest(*cloudformation.ListExportsInput) (*request.Request, *cloudformation.ListExportsOutput)
ListExportsPages(*cloudformation.ListExportsInput, func(*cloudformation.ListExportsOutput, bool) bool) error
ListExportsPagesWithContext(aws.Context, *cloudformation.ListExportsInput, func(*cloudformation.ListExportsOutput, bool) bool, ...request.Option) error
ListImports(*cloudformation.ListImportsInput) (*cloudformation.ListImportsOutput, error)
ListImportsWithContext(aws.Context, *cloudformation.ListImportsInput, ...request.Option) (*cloudformation.ListImportsOutput, error)
ListImportsRequest(*cloudformation.ListImportsInput) (*request.Request, *cloudformation.ListImportsOutput)
ListImportsPages(*cloudformation.ListImportsInput, func(*cloudformation.ListImportsOutput, bool) bool) error
ListImportsPagesWithContext(aws.Context, *cloudformation.ListImportsInput, func(*cloudformation.ListImportsOutput, bool) bool, ...request.Option) error
ListStackInstances(*cloudformation.ListStackInstancesInput) (*cloudformation.ListStackInstancesOutput, error)
ListStackInstancesWithContext(aws.Context, *cloudformation.ListStackInstancesInput, ...request.Option) (*cloudformation.ListStackInstancesOutput, error)
ListStackInstancesRequest(*cloudformation.ListStackInstancesInput) (*request.Request, *cloudformation.ListStackInstancesOutput)
ListStackInstancesPages(*cloudformation.ListStackInstancesInput, func(*cloudformation.ListStackInstancesOutput, bool) bool) error
ListStackInstancesPagesWithContext(aws.Context, *cloudformation.ListStackInstancesInput, func(*cloudformation.ListStackInstancesOutput, bool) bool, ...request.Option) error
ListStackResources(*cloudformation.ListStackResourcesInput) (*cloudformation.ListStackResourcesOutput, error)
ListStackResourcesWithContext(aws.Context, *cloudformation.ListStackResourcesInput, ...request.Option) (*cloudformation.ListStackResourcesOutput, error)
ListStackResourcesRequest(*cloudformation.ListStackResourcesInput) (*request.Request, *cloudformation.ListStackResourcesOutput)
ListStackResourcesPages(*cloudformation.ListStackResourcesInput, func(*cloudformation.ListStackResourcesOutput, bool) bool) error
ListStackResourcesPagesWithContext(aws.Context, *cloudformation.ListStackResourcesInput, func(*cloudformation.ListStackResourcesOutput, bool) bool, ...request.Option) error
ListStackSetOperationResults(*cloudformation.ListStackSetOperationResultsInput) (*cloudformation.ListStackSetOperationResultsOutput, error)
ListStackSetOperationResultsWithContext(aws.Context, *cloudformation.ListStackSetOperationResultsInput, ...request.Option) (*cloudformation.ListStackSetOperationResultsOutput, error)
ListStackSetOperationResultsRequest(*cloudformation.ListStackSetOperationResultsInput) (*request.Request, *cloudformation.ListStackSetOperationResultsOutput)
ListStackSetOperationResultsPages(*cloudformation.ListStackSetOperationResultsInput, func(*cloudformation.ListStackSetOperationResultsOutput, bool) bool) error
ListStackSetOperationResultsPagesWithContext(aws.Context, *cloudformation.ListStackSetOperationResultsInput, func(*cloudformation.ListStackSetOperationResultsOutput, bool) bool, ...request.Option) error
ListStackSetOperations(*cloudformation.ListStackSetOperationsInput) (*cloudformation.ListStackSetOperationsOutput, error)
ListStackSetOperationsWithContext(aws.Context, *cloudformation.ListStackSetOperationsInput, ...request.Option) (*cloudformation.ListStackSetOperationsOutput, error)
ListStackSetOperationsRequest(*cloudformation.ListStackSetOperationsInput) (*request.Request, *cloudformation.ListStackSetOperationsOutput)
ListStackSetOperationsPages(*cloudformation.ListStackSetOperationsInput, func(*cloudformation.ListStackSetOperationsOutput, bool) bool) error
ListStackSetOperationsPagesWithContext(aws.Context, *cloudformation.ListStackSetOperationsInput, func(*cloudformation.ListStackSetOperationsOutput, bool) bool, ...request.Option) error
ListStackSets(*cloudformation.ListStackSetsInput) (*cloudformation.ListStackSetsOutput, error)
ListStackSetsWithContext(aws.Context, *cloudformation.ListStackSetsInput, ...request.Option) (*cloudformation.ListStackSetsOutput, error)
ListStackSetsRequest(*cloudformation.ListStackSetsInput) (*request.Request, *cloudformation.ListStackSetsOutput)
ListStackSetsPages(*cloudformation.ListStackSetsInput, func(*cloudformation.ListStackSetsOutput, bool) bool) error
ListStackSetsPagesWithContext(aws.Context, *cloudformation.ListStackSetsInput, func(*cloudformation.ListStackSetsOutput, bool) bool, ...request.Option) error
ListStacks(*cloudformation.ListStacksInput) (*cloudformation.ListStacksOutput, error)
ListStacksWithContext(aws.Context, *cloudformation.ListStacksInput, ...request.Option) (*cloudformation.ListStacksOutput, error)
ListStacksRequest(*cloudformation.ListStacksInput) (*request.Request, *cloudformation.ListStacksOutput)
ListStacksPages(*cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool) error
ListStacksPagesWithContext(aws.Context, *cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool, ...request.Option) error
ListTypeRegistrations(*cloudformation.ListTypeRegistrationsInput) (*cloudformation.ListTypeRegistrationsOutput, error)
ListTypeRegistrationsWithContext(aws.Context, *cloudformation.ListTypeRegistrationsInput, ...request.Option) (*cloudformation.ListTypeRegistrationsOutput, error)
ListTypeRegistrationsRequest(*cloudformation.ListTypeRegistrationsInput) (*request.Request, *cloudformation.ListTypeRegistrationsOutput)
ListTypeRegistrationsPages(*cloudformation.ListTypeRegistrationsInput, func(*cloudformation.ListTypeRegistrationsOutput, bool) bool) error
ListTypeRegistrationsPagesWithContext(aws.Context, *cloudformation.ListTypeRegistrationsInput, func(*cloudformation.ListTypeRegistrationsOutput, bool) bool, ...request.Option) error
ListTypeVersions(*cloudformation.ListTypeVersionsInput) (*cloudformation.ListTypeVersionsOutput, error)
ListTypeVersionsWithContext(aws.Context, *cloudformation.ListTypeVersionsInput, ...request.Option) (*cloudformation.ListTypeVersionsOutput, error)
ListTypeVersionsRequest(*cloudformation.ListTypeVersionsInput) (*request.Request, *cloudformation.ListTypeVersionsOutput)
ListTypeVersionsPages(*cloudformation.ListTypeVersionsInput, func(*cloudformation.ListTypeVersionsOutput, bool) bool) error
ListTypeVersionsPagesWithContext(aws.Context, *cloudformation.ListTypeVersionsInput, func(*cloudformation.ListTypeVersionsOutput, bool) bool, ...request.Option) error
ListTypes(*cloudformation.ListTypesInput) (*cloudformation.ListTypesOutput, error)
ListTypesWithContext(aws.Context, *cloudformation.ListTypesInput, ...request.Option) (*cloudformation.ListTypesOutput, error)
ListTypesRequest(*cloudformation.ListTypesInput) (*request.Request, *cloudformation.ListTypesOutput)
ListTypesPages(*cloudformation.ListTypesInput, func(*cloudformation.ListTypesOutput, bool) bool) error
ListTypesPagesWithContext(aws.Context, *cloudformation.ListTypesInput, func(*cloudformation.ListTypesOutput, bool) bool, ...request.Option) error
PublishType(*cloudformation.PublishTypeInput) (*cloudformation.PublishTypeOutput, error)
PublishTypeWithContext(aws.Context, *cloudformation.PublishTypeInput, ...request.Option) (*cloudformation.PublishTypeOutput, error)
PublishTypeRequest(*cloudformation.PublishTypeInput) (*request.Request, *cloudformation.PublishTypeOutput)
RecordHandlerProgress(*cloudformation.RecordHandlerProgressInput) (*cloudformation.RecordHandlerProgressOutput, error)
RecordHandlerProgressWithContext(aws.Context, *cloudformation.RecordHandlerProgressInput, ...request.Option) (*cloudformation.RecordHandlerProgressOutput, error)
RecordHandlerProgressRequest(*cloudformation.RecordHandlerProgressInput) (*request.Request, *cloudformation.RecordHandlerProgressOutput)
RegisterPublisher(*cloudformation.RegisterPublisherInput) (*cloudformation.RegisterPublisherOutput, error)
RegisterPublisherWithContext(aws.Context, *cloudformation.RegisterPublisherInput, ...request.Option) (*cloudformation.RegisterPublisherOutput, error)
RegisterPublisherRequest(*cloudformation.RegisterPublisherInput) (*request.Request, *cloudformation.RegisterPublisherOutput)
RegisterType(*cloudformation.RegisterTypeInput) (*cloudformation.RegisterTypeOutput, error)
RegisterTypeWithContext(aws.Context, *cloudformation.RegisterTypeInput, ...request.Option) (*cloudformation.RegisterTypeOutput, error)
RegisterTypeRequest(*cloudformation.RegisterTypeInput) (*request.Request, *cloudformation.RegisterTypeOutput)
SetStackPolicy(*cloudformation.SetStackPolicyInput) (*cloudformation.SetStackPolicyOutput, error)
SetStackPolicyWithContext(aws.Context, *cloudformation.SetStackPolicyInput, ...request.Option) (*cloudformation.SetStackPolicyOutput, error)
SetStackPolicyRequest(*cloudformation.SetStackPolicyInput) (*request.Request, *cloudformation.SetStackPolicyOutput)
SetTypeConfiguration(*cloudformation.SetTypeConfigurationInput) (*cloudformation.SetTypeConfigurationOutput, error)
SetTypeConfigurationWithContext(aws.Context, *cloudformation.SetTypeConfigurationInput, ...request.Option) (*cloudformation.SetTypeConfigurationOutput, error)
SetTypeConfigurationRequest(*cloudformation.SetTypeConfigurationInput) (*request.Request, *cloudformation.SetTypeConfigurationOutput)
SetTypeDefaultVersion(*cloudformation.SetTypeDefaultVersionInput) (*cloudformation.SetTypeDefaultVersionOutput, error)
SetTypeDefaultVersionWithContext(aws.Context, *cloudformation.SetTypeDefaultVersionInput, ...request.Option) (*cloudformation.SetTypeDefaultVersionOutput, error)
SetTypeDefaultVersionRequest(*cloudformation.SetTypeDefaultVersionInput) (*request.Request, *cloudformation.SetTypeDefaultVersionOutput)
SignalResource(*cloudformation.SignalResourceInput) (*cloudformation.SignalResourceOutput, error)
SignalResourceWithContext(aws.Context, *cloudformation.SignalResourceInput, ...request.Option) (*cloudformation.SignalResourceOutput, error)
SignalResourceRequest(*cloudformation.SignalResourceInput) (*request.Request, *cloudformation.SignalResourceOutput)
StopStackSetOperation(*cloudformation.StopStackSetOperationInput) (*cloudformation.StopStackSetOperationOutput, error)
StopStackSetOperationWithContext(aws.Context, *cloudformation.StopStackSetOperationInput, ...request.Option) (*cloudformation.StopStackSetOperationOutput, error)
StopStackSetOperationRequest(*cloudformation.StopStackSetOperationInput) (*request.Request, *cloudformation.StopStackSetOperationOutput)
TestType(*cloudformation.TestTypeInput) (*cloudformation.TestTypeOutput, error)
TestTypeWithContext(aws.Context, *cloudformation.TestTypeInput, ...request.Option) (*cloudformation.TestTypeOutput, error)
TestTypeRequest(*cloudformation.TestTypeInput) (*request.Request, *cloudformation.TestTypeOutput)
UpdateStack(*cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
UpdateStackWithContext(aws.Context, *cloudformation.UpdateStackInput, ...request.Option) (*cloudformation.UpdateStackOutput, error)
UpdateStackRequest(*cloudformation.UpdateStackInput) (*request.Request, *cloudformation.UpdateStackOutput)
UpdateStackInstances(*cloudformation.UpdateStackInstancesInput) (*cloudformation.UpdateStackInstancesOutput, error)
UpdateStackInstancesWithContext(aws.Context, *cloudformation.UpdateStackInstancesInput, ...request.Option) (*cloudformation.UpdateStackInstancesOutput, error)
UpdateStackInstancesRequest(*cloudformation.UpdateStackInstancesInput) (*request.Request, *cloudformation.UpdateStackInstancesOutput)
UpdateStackSet(*cloudformation.UpdateStackSetInput) (*cloudformation.UpdateStackSetOutput, error)
UpdateStackSetWithContext(aws.Context, *cloudformation.UpdateStackSetInput, ...request.Option) (*cloudformation.UpdateStackSetOutput, error)
UpdateStackSetRequest(*cloudformation.UpdateStackSetInput) (*request.Request, *cloudformation.UpdateStackSetOutput)
UpdateTerminationProtection(*cloudformation.UpdateTerminationProtectionInput) (*cloudformation.UpdateTerminationProtectionOutput, error)
UpdateTerminationProtectionWithContext(aws.Context, *cloudformation.UpdateTerminationProtectionInput, ...request.Option) (*cloudformation.UpdateTerminationProtectionOutput, error)
UpdateTerminationProtectionRequest(*cloudformation.UpdateTerminationProtectionInput) (*request.Request, *cloudformation.UpdateTerminationProtectionOutput)
ValidateTemplate(*cloudformation.ValidateTemplateInput) (*cloudformation.ValidateTemplateOutput, error)
ValidateTemplateWithContext(aws.Context, *cloudformation.ValidateTemplateInput, ...request.Option) (*cloudformation.ValidateTemplateOutput, error)
ValidateTemplateRequest(*cloudformation.ValidateTemplateInput) (*request.Request, *cloudformation.ValidateTemplateOutput)
WaitUntilChangeSetCreateComplete(*cloudformation.DescribeChangeSetInput) error
WaitUntilChangeSetCreateCompleteWithContext(aws.Context, *cloudformation.DescribeChangeSetInput, ...request.WaiterOption) error
WaitUntilStackCreateComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackCreateCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilStackDeleteComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackDeleteCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilStackExists(*cloudformation.DescribeStacksInput) error
WaitUntilStackExistsWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilStackImportComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackImportCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilStackRollbackComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackRollbackCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilStackUpdateComplete(*cloudformation.DescribeStacksInput) error
WaitUntilStackUpdateCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
WaitUntilTypeRegistrationComplete(*cloudformation.DescribeTypeRegistrationInput) error
WaitUntilTypeRegistrationCompleteWithContext(aws.Context, *cloudformation.DescribeTypeRegistrationInput, ...request.WaiterOption) error
}
var _ CloudFormationAPI = (*cloudformation.CloudFormation)(nil)
| 393 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudfront provides the client and types for making API
// requests to Amazon CloudFront.
//
// This is the Amazon CloudFront API Reference. This guide is for developers
// who need detailed information about CloudFront API actions, data types, and
// errors. For detailed information about CloudFront features, see the Amazon
// CloudFront Developer Guide.
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31 for more information on this service.
//
// See cloudfront package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/
//
// Using the Client
//
// To contact Amazon CloudFront 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 CloudFront client CloudFront for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/#New
package cloudfront
| 32 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudfront
const (
// ErrCodeAccessDenied for service response error code
// "AccessDenied".
//
// Access denied.
ErrCodeAccessDenied = "AccessDenied"
// ErrCodeBatchTooLarge for service response error code
// "BatchTooLarge".
//
// Invalidation batch specified is too large.
ErrCodeBatchTooLarge = "BatchTooLarge"
// ErrCodeCNAMEAlreadyExists for service response error code
// "CNAMEAlreadyExists".
//
// The CNAME specified is already defined for CloudFront.
ErrCodeCNAMEAlreadyExists = "CNAMEAlreadyExists"
// ErrCodeCachePolicyAlreadyExists for service response error code
// "CachePolicyAlreadyExists".
//
// A cache policy with this name already exists. You must provide a unique name.
// To modify an existing cache policy, use UpdateCachePolicy.
ErrCodeCachePolicyAlreadyExists = "CachePolicyAlreadyExists"
// ErrCodeCachePolicyInUse for service response error code
// "CachePolicyInUse".
//
// Cannot delete the cache policy because it is attached to one or more cache
// behaviors.
ErrCodeCachePolicyInUse = "CachePolicyInUse"
// ErrCodeCannotChangeImmutablePublicKeyFields for service response error code
// "CannotChangeImmutablePublicKeyFields".
//
// You can't change the value of a public key.
ErrCodeCannotChangeImmutablePublicKeyFields = "CannotChangeImmutablePublicKeyFields"
// ErrCodeDistributionAlreadyExists for service response error code
// "DistributionAlreadyExists".
//
// The caller reference you attempted to create the distribution with is associated
// with another distribution.
ErrCodeDistributionAlreadyExists = "DistributionAlreadyExists"
// ErrCodeDistributionNotDisabled for service response error code
// "DistributionNotDisabled".
//
// The specified CloudFront distribution is not disabled. You must disable the
// distribution before you can delete it.
ErrCodeDistributionNotDisabled = "DistributionNotDisabled"
// ErrCodeFieldLevelEncryptionConfigAlreadyExists for service response error code
// "FieldLevelEncryptionConfigAlreadyExists".
//
// The specified configuration for field-level encryption already exists.
ErrCodeFieldLevelEncryptionConfigAlreadyExists = "FieldLevelEncryptionConfigAlreadyExists"
// ErrCodeFieldLevelEncryptionConfigInUse for service response error code
// "FieldLevelEncryptionConfigInUse".
//
// The specified configuration for field-level encryption is in use.
ErrCodeFieldLevelEncryptionConfigInUse = "FieldLevelEncryptionConfigInUse"
// ErrCodeFieldLevelEncryptionProfileAlreadyExists for service response error code
// "FieldLevelEncryptionProfileAlreadyExists".
//
// The specified profile for field-level encryption already exists.
ErrCodeFieldLevelEncryptionProfileAlreadyExists = "FieldLevelEncryptionProfileAlreadyExists"
// ErrCodeFieldLevelEncryptionProfileInUse for service response error code
// "FieldLevelEncryptionProfileInUse".
//
// The specified profile for field-level encryption is in use.
ErrCodeFieldLevelEncryptionProfileInUse = "FieldLevelEncryptionProfileInUse"
// ErrCodeFieldLevelEncryptionProfileSizeExceeded for service response error code
// "FieldLevelEncryptionProfileSizeExceeded".
//
// The maximum size of a profile for field-level encryption was exceeded.
ErrCodeFieldLevelEncryptionProfileSizeExceeded = "FieldLevelEncryptionProfileSizeExceeded"
// ErrCodeFunctionAlreadyExists for service response error code
// "FunctionAlreadyExists".
//
// A function with the same name already exists in this account. To create a
// function, you must provide a unique name. To update an existing function,
// use UpdateFunction.
ErrCodeFunctionAlreadyExists = "FunctionAlreadyExists"
// ErrCodeFunctionInUse for service response error code
// "FunctionInUse".
//
// Cannot delete the function because it’s attached to one or more cache behaviors.
ErrCodeFunctionInUse = "FunctionInUse"
// ErrCodeFunctionSizeLimitExceeded for service response error code
// "FunctionSizeLimitExceeded".
//
// The function is too large. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeFunctionSizeLimitExceeded = "FunctionSizeLimitExceeded"
// ErrCodeIllegalDelete for service response error code
// "IllegalDelete".
//
// You cannot delete a managed policy.
ErrCodeIllegalDelete = "IllegalDelete"
// ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior for service response error code
// "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior".
//
// The specified configuration for field-level encryption can't be associated
// with the specified cache behavior.
ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior = "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"
// ErrCodeIllegalUpdate for service response error code
// "IllegalUpdate".
//
// The update contains modifications that are not allowed.
ErrCodeIllegalUpdate = "IllegalUpdate"
// ErrCodeInconsistentQuantities for service response error code
// "InconsistentQuantities".
//
// The value of Quantity and the size of Items don't match.
ErrCodeInconsistentQuantities = "InconsistentQuantities"
// ErrCodeInvalidArgument for service response error code
// "InvalidArgument".
//
// An argument is invalid.
ErrCodeInvalidArgument = "InvalidArgument"
// ErrCodeInvalidDefaultRootObject for service response error code
// "InvalidDefaultRootObject".
//
// The default root object file name is too big or contains an invalid character.
ErrCodeInvalidDefaultRootObject = "InvalidDefaultRootObject"
// ErrCodeInvalidErrorCode for service response error code
// "InvalidErrorCode".
//
// An invalid error code was specified.
ErrCodeInvalidErrorCode = "InvalidErrorCode"
// ErrCodeInvalidForwardCookies for service response error code
// "InvalidForwardCookies".
//
// Your request contains forward cookies option which doesn't match with the
// expectation for the whitelisted list of cookie names. Either list of cookie
// names has been specified when not allowed or list of cookie names is missing
// when expected.
ErrCodeInvalidForwardCookies = "InvalidForwardCookies"
// ErrCodeInvalidFunctionAssociation for service response error code
// "InvalidFunctionAssociation".
//
// A CloudFront function association is invalid.
ErrCodeInvalidFunctionAssociation = "InvalidFunctionAssociation"
// ErrCodeInvalidGeoRestrictionParameter for service response error code
// "InvalidGeoRestrictionParameter".
//
// The specified geo restriction parameter is not valid.
ErrCodeInvalidGeoRestrictionParameter = "InvalidGeoRestrictionParameter"
// ErrCodeInvalidHeadersForS3Origin for service response error code
// "InvalidHeadersForS3Origin".
//
// The headers specified are not valid for an Amazon S3 origin.
ErrCodeInvalidHeadersForS3Origin = "InvalidHeadersForS3Origin"
// ErrCodeInvalidIfMatchVersion for service response error code
// "InvalidIfMatchVersion".
//
// The If-Match version is missing or not valid.
ErrCodeInvalidIfMatchVersion = "InvalidIfMatchVersion"
// ErrCodeInvalidLambdaFunctionAssociation for service response error code
// "InvalidLambdaFunctionAssociation".
//
// The specified Lambda@Edge function association is invalid.
ErrCodeInvalidLambdaFunctionAssociation = "InvalidLambdaFunctionAssociation"
// ErrCodeInvalidLocationCode for service response error code
// "InvalidLocationCode".
//
// The location code specified is not valid.
ErrCodeInvalidLocationCode = "InvalidLocationCode"
// ErrCodeInvalidMinimumProtocolVersion for service response error code
// "InvalidMinimumProtocolVersion".
//
// The minimum protocol version specified is not valid.
ErrCodeInvalidMinimumProtocolVersion = "InvalidMinimumProtocolVersion"
// ErrCodeInvalidOrigin for service response error code
// "InvalidOrigin".
//
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
// bucket.
ErrCodeInvalidOrigin = "InvalidOrigin"
// ErrCodeInvalidOriginAccessIdentity for service response error code
// "InvalidOriginAccessIdentity".
//
// The origin access identity is not valid or doesn't exist.
ErrCodeInvalidOriginAccessIdentity = "InvalidOriginAccessIdentity"
// ErrCodeInvalidOriginKeepaliveTimeout for service response error code
// "InvalidOriginKeepaliveTimeout".
//
// The keep alive timeout specified for the origin is not valid.
ErrCodeInvalidOriginKeepaliveTimeout = "InvalidOriginKeepaliveTimeout"
// ErrCodeInvalidOriginReadTimeout for service response error code
// "InvalidOriginReadTimeout".
//
// The read timeout specified for the origin is not valid.
ErrCodeInvalidOriginReadTimeout = "InvalidOriginReadTimeout"
// ErrCodeInvalidProtocolSettings for service response error code
// "InvalidProtocolSettings".
//
// You cannot specify SSLv3 as the minimum protocol version if you only want
// to support only clients that support Server Name Indication (SNI).
ErrCodeInvalidProtocolSettings = "InvalidProtocolSettings"
// ErrCodeInvalidQueryStringParameters for service response error code
// "InvalidQueryStringParameters".
//
// The query string parameters specified are not valid.
ErrCodeInvalidQueryStringParameters = "InvalidQueryStringParameters"
// ErrCodeInvalidRelativePath for service response error code
// "InvalidRelativePath".
//
// The relative path is too big, is not URL-encoded, or does not begin with
// a slash (/).
ErrCodeInvalidRelativePath = "InvalidRelativePath"
// ErrCodeInvalidRequiredProtocol for service response error code
// "InvalidRequiredProtocol".
//
// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
// protocol in your request, or omit the RequiredProtocols element from your
// distribution configuration.
ErrCodeInvalidRequiredProtocol = "InvalidRequiredProtocol"
// ErrCodeInvalidResponseCode for service response error code
// "InvalidResponseCode".
//
// A response code is not valid.
ErrCodeInvalidResponseCode = "InvalidResponseCode"
// ErrCodeInvalidTTLOrder for service response error code
// "InvalidTTLOrder".
//
// The TTL order specified is not valid.
ErrCodeInvalidTTLOrder = "InvalidTTLOrder"
// ErrCodeInvalidTagging for service response error code
// "InvalidTagging".
//
// The tagging specified is not valid.
ErrCodeInvalidTagging = "InvalidTagging"
// ErrCodeInvalidViewerCertificate for service response error code
// "InvalidViewerCertificate".
//
// A viewer certificate specified is not valid.
ErrCodeInvalidViewerCertificate = "InvalidViewerCertificate"
// ErrCodeInvalidWebACLId for service response error code
// "InvalidWebACLId".
//
// A web ACL ID specified is not valid. To specify a web ACL created using the
// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a.
// To specify a web ACL created using WAF Classic, use the ACL ID, for example
// 473e64fd-f30b-4765-81a0-62ad96dd167a.
ErrCodeInvalidWebACLId = "InvalidWebACLId"
// ErrCodeKeyGroupAlreadyExists for service response error code
// "KeyGroupAlreadyExists".
//
// A key group with this name already exists. You must provide a unique name.
// To modify an existing key group, use UpdateKeyGroup.
ErrCodeKeyGroupAlreadyExists = "KeyGroupAlreadyExists"
// ErrCodeMissingBody for service response error code
// "MissingBody".
//
// This operation requires a body. Ensure that the body is present and the Content-Type
// header is set.
ErrCodeMissingBody = "MissingBody"
// ErrCodeNoSuchCachePolicy for service response error code
// "NoSuchCachePolicy".
//
// The cache policy does not exist.
ErrCodeNoSuchCachePolicy = "NoSuchCachePolicy"
// ErrCodeNoSuchCloudFrontOriginAccessIdentity for service response error code
// "NoSuchCloudFrontOriginAccessIdentity".
//
// The specified origin access identity does not exist.
ErrCodeNoSuchCloudFrontOriginAccessIdentity = "NoSuchCloudFrontOriginAccessIdentity"
// ErrCodeNoSuchDistribution for service response error code
// "NoSuchDistribution".
//
// The specified distribution does not exist.
ErrCodeNoSuchDistribution = "NoSuchDistribution"
// ErrCodeNoSuchFieldLevelEncryptionConfig for service response error code
// "NoSuchFieldLevelEncryptionConfig".
//
// The specified configuration for field-level encryption doesn't exist.
ErrCodeNoSuchFieldLevelEncryptionConfig = "NoSuchFieldLevelEncryptionConfig"
// ErrCodeNoSuchFieldLevelEncryptionProfile for service response error code
// "NoSuchFieldLevelEncryptionProfile".
//
// The specified profile for field-level encryption doesn't exist.
ErrCodeNoSuchFieldLevelEncryptionProfile = "NoSuchFieldLevelEncryptionProfile"
// ErrCodeNoSuchFunctionExists for service response error code
// "NoSuchFunctionExists".
//
// The function does not exist.
ErrCodeNoSuchFunctionExists = "NoSuchFunctionExists"
// ErrCodeNoSuchInvalidation for service response error code
// "NoSuchInvalidation".
//
// The specified invalidation does not exist.
ErrCodeNoSuchInvalidation = "NoSuchInvalidation"
// ErrCodeNoSuchOrigin for service response error code
// "NoSuchOrigin".
//
// No origin exists with the specified Origin Id.
ErrCodeNoSuchOrigin = "NoSuchOrigin"
// ErrCodeNoSuchOriginRequestPolicy for service response error code
// "NoSuchOriginRequestPolicy".
//
// The origin request policy does not exist.
ErrCodeNoSuchOriginRequestPolicy = "NoSuchOriginRequestPolicy"
// ErrCodeNoSuchPublicKey for service response error code
// "NoSuchPublicKey".
//
// The specified public key doesn't exist.
ErrCodeNoSuchPublicKey = "NoSuchPublicKey"
// ErrCodeNoSuchRealtimeLogConfig for service response error code
// "NoSuchRealtimeLogConfig".
//
// The real-time log configuration does not exist.
ErrCodeNoSuchRealtimeLogConfig = "NoSuchRealtimeLogConfig"
// ErrCodeNoSuchResource for service response error code
// "NoSuchResource".
//
// A resource that was specified is not valid.
ErrCodeNoSuchResource = "NoSuchResource"
// ErrCodeNoSuchStreamingDistribution for service response error code
// "NoSuchStreamingDistribution".
//
// The specified streaming distribution does not exist.
ErrCodeNoSuchStreamingDistribution = "NoSuchStreamingDistribution"
// ErrCodeOriginAccessIdentityAlreadyExists for service response error code
// "CloudFrontOriginAccessIdentityAlreadyExists".
//
// If the CallerReference is a value you already sent in a previous request
// to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
// is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
// error.
ErrCodeOriginAccessIdentityAlreadyExists = "CloudFrontOriginAccessIdentityAlreadyExists"
// ErrCodeOriginAccessIdentityInUse for service response error code
// "CloudFrontOriginAccessIdentityInUse".
//
// The Origin Access Identity specified is already in use.
ErrCodeOriginAccessIdentityInUse = "CloudFrontOriginAccessIdentityInUse"
// ErrCodeOriginRequestPolicyAlreadyExists for service response error code
// "OriginRequestPolicyAlreadyExists".
//
// An origin request policy with this name already exists. You must provide
// a unique name. To modify an existing origin request policy, use UpdateOriginRequestPolicy.
ErrCodeOriginRequestPolicyAlreadyExists = "OriginRequestPolicyAlreadyExists"
// ErrCodeOriginRequestPolicyInUse for service response error code
// "OriginRequestPolicyInUse".
//
// Cannot delete the origin request policy because it is attached to one or
// more cache behaviors.
ErrCodeOriginRequestPolicyInUse = "OriginRequestPolicyInUse"
// ErrCodePreconditionFailed for service response error code
// "PreconditionFailed".
//
// The precondition in one or more of the request fields evaluated to false.
ErrCodePreconditionFailed = "PreconditionFailed"
// ErrCodePublicKeyAlreadyExists for service response error code
// "PublicKeyAlreadyExists".
//
// The specified public key already exists.
ErrCodePublicKeyAlreadyExists = "PublicKeyAlreadyExists"
// ErrCodePublicKeyInUse for service response error code
// "PublicKeyInUse".
//
// The specified public key is in use.
ErrCodePublicKeyInUse = "PublicKeyInUse"
// ErrCodeQueryArgProfileEmpty for service response error code
// "QueryArgProfileEmpty".
//
// No profile specified for the field-level encryption query argument.
ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty"
// ErrCodeRealtimeLogConfigAlreadyExists for service response error code
// "RealtimeLogConfigAlreadyExists".
//
// A real-time log configuration with this name already exists. You must provide
// a unique name. To modify an existing real-time log configuration, use UpdateRealtimeLogConfig.
ErrCodeRealtimeLogConfigAlreadyExists = "RealtimeLogConfigAlreadyExists"
// ErrCodeRealtimeLogConfigInUse for service response error code
// "RealtimeLogConfigInUse".
//
// Cannot delete the real-time log configuration because it is attached to one
// or more cache behaviors.
ErrCodeRealtimeLogConfigInUse = "RealtimeLogConfigInUse"
// ErrCodeRealtimeLogConfigOwnerMismatch for service response error code
// "RealtimeLogConfigOwnerMismatch".
//
// The specified real-time log configuration belongs to a different account.
ErrCodeRealtimeLogConfigOwnerMismatch = "RealtimeLogConfigOwnerMismatch"
// ErrCodeResourceInUse for service response error code
// "ResourceInUse".
//
// Cannot delete this resource because it is in use.
ErrCodeResourceInUse = "ResourceInUse"
// ErrCodeStreamingDistributionAlreadyExists for service response error code
// "StreamingDistributionAlreadyExists".
//
// The caller reference you attempted to create the streaming distribution with
// is associated with another distribution
ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists"
// ErrCodeStreamingDistributionNotDisabled for service response error code
// "StreamingDistributionNotDisabled".
//
// The specified CloudFront distribution is not disabled. You must disable the
// distribution before you can delete it.
ErrCodeStreamingDistributionNotDisabled = "StreamingDistributionNotDisabled"
// ErrCodeTestFunctionFailed for service response error code
// "TestFunctionFailed".
//
// The CloudFront function failed.
ErrCodeTestFunctionFailed = "TestFunctionFailed"
// ErrCodeTooManyCacheBehaviors for service response error code
// "TooManyCacheBehaviors".
//
// You cannot create more cache behaviors for the distribution.
ErrCodeTooManyCacheBehaviors = "TooManyCacheBehaviors"
// ErrCodeTooManyCachePolicies for service response error code
// "TooManyCachePolicies".
//
// You have reached the maximum number of cache policies for this account. For
// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyCachePolicies = "TooManyCachePolicies"
// ErrCodeTooManyCertificates for service response error code
// "TooManyCertificates".
//
// You cannot create anymore custom SSL/TLS certificates.
ErrCodeTooManyCertificates = "TooManyCertificates"
// ErrCodeTooManyCloudFrontOriginAccessIdentities for service response error code
// "TooManyCloudFrontOriginAccessIdentities".
//
// Processing your request would cause you to exceed the maximum number of origin
// access identities allowed.
ErrCodeTooManyCloudFrontOriginAccessIdentities = "TooManyCloudFrontOriginAccessIdentities"
// ErrCodeTooManyCookieNamesInWhiteList for service response error code
// "TooManyCookieNamesInWhiteList".
//
// Your request contains more cookie names in the whitelist than are allowed
// per cache behavior.
ErrCodeTooManyCookieNamesInWhiteList = "TooManyCookieNamesInWhiteList"
// ErrCodeTooManyCookiesInCachePolicy for service response error code
// "TooManyCookiesInCachePolicy".
//
// The number of cookies in the cache policy exceeds the maximum. For more information,
// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyCookiesInCachePolicy = "TooManyCookiesInCachePolicy"
// ErrCodeTooManyCookiesInOriginRequestPolicy for service response error code
// "TooManyCookiesInOriginRequestPolicy".
//
// The number of cookies in the origin request policy exceeds the maximum. For
// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyCookiesInOriginRequestPolicy = "TooManyCookiesInOriginRequestPolicy"
// ErrCodeTooManyDistributionCNAMEs for service response error code
// "TooManyDistributionCNAMEs".
//
// Your request contains more CNAMEs than are allowed per distribution.
ErrCodeTooManyDistributionCNAMEs = "TooManyDistributionCNAMEs"
// ErrCodeTooManyDistributions for service response error code
// "TooManyDistributions".
//
// Processing your request would cause you to exceed the maximum number of distributions
// allowed.
ErrCodeTooManyDistributions = "TooManyDistributions"
// ErrCodeTooManyDistributionsAssociatedToCachePolicy for service response error code
// "TooManyDistributionsAssociatedToCachePolicy".
//
// The maximum number of distributions have been associated with the specified
// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyDistributionsAssociatedToCachePolicy = "TooManyDistributionsAssociatedToCachePolicy"
// ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig for service response error code
// "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig".
//
// The maximum number of distributions have been associated with the specified
// configuration for field-level encryption.
ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig = "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"
// ErrCodeTooManyDistributionsAssociatedToKeyGroup for service response error code
// "TooManyDistributionsAssociatedToKeyGroup".
//
// The number of distributions that reference this key group is more than the
// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyDistributionsAssociatedToKeyGroup = "TooManyDistributionsAssociatedToKeyGroup"
// ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy for service response error code
// "TooManyDistributionsAssociatedToOriginRequestPolicy".
//
// The maximum number of distributions have been associated with the specified
// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy = "TooManyDistributionsAssociatedToOriginRequestPolicy"
// ErrCodeTooManyDistributionsWithFunctionAssociations for service response error code
// "TooManyDistributionsWithFunctionAssociations".
//
// You have reached the maximum number of distributions that are associated
// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyDistributionsWithFunctionAssociations = "TooManyDistributionsWithFunctionAssociations"
// ErrCodeTooManyDistributionsWithLambdaAssociations for service response error code
// "TooManyDistributionsWithLambdaAssociations".
//
// Processing your request would cause the maximum number of distributions with
// Lambda@Edge function associations per owner to be exceeded.
ErrCodeTooManyDistributionsWithLambdaAssociations = "TooManyDistributionsWithLambdaAssociations"
// ErrCodeTooManyDistributionsWithSingleFunctionARN for service response error code
// "TooManyDistributionsWithSingleFunctionARN".
//
// The maximum number of distributions have been associated with the specified
// Lambda@Edge function.
ErrCodeTooManyDistributionsWithSingleFunctionARN = "TooManyDistributionsWithSingleFunctionARN"
// ErrCodeTooManyFieldLevelEncryptionConfigs for service response error code
// "TooManyFieldLevelEncryptionConfigs".
//
// The maximum number of configurations for field-level encryption have been
// created.
ErrCodeTooManyFieldLevelEncryptionConfigs = "TooManyFieldLevelEncryptionConfigs"
// ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles for service response error code
// "TooManyFieldLevelEncryptionContentTypeProfiles".
//
// The maximum number of content type profiles for field-level encryption have
// been created.
ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles = "TooManyFieldLevelEncryptionContentTypeProfiles"
// ErrCodeTooManyFieldLevelEncryptionEncryptionEntities for service response error code
// "TooManyFieldLevelEncryptionEncryptionEntities".
//
// The maximum number of encryption entities for field-level encryption have
// been created.
ErrCodeTooManyFieldLevelEncryptionEncryptionEntities = "TooManyFieldLevelEncryptionEncryptionEntities"
// ErrCodeTooManyFieldLevelEncryptionFieldPatterns for service response error code
// "TooManyFieldLevelEncryptionFieldPatterns".
//
// The maximum number of field patterns for field-level encryption have been
// created.
ErrCodeTooManyFieldLevelEncryptionFieldPatterns = "TooManyFieldLevelEncryptionFieldPatterns"
// ErrCodeTooManyFieldLevelEncryptionProfiles for service response error code
// "TooManyFieldLevelEncryptionProfiles".
//
// The maximum number of profiles for field-level encryption have been created.
ErrCodeTooManyFieldLevelEncryptionProfiles = "TooManyFieldLevelEncryptionProfiles"
// ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles for service response error code
// "TooManyFieldLevelEncryptionQueryArgProfiles".
//
// The maximum number of query arg profiles for field-level encryption have
// been created.
ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles = "TooManyFieldLevelEncryptionQueryArgProfiles"
// ErrCodeTooManyFunctionAssociations for service response error code
// "TooManyFunctionAssociations".
//
// You have reached the maximum number of CloudFront function associations for
// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyFunctionAssociations = "TooManyFunctionAssociations"
// ErrCodeTooManyFunctions for service response error code
// "TooManyFunctions".
//
// You have reached the maximum number of CloudFront functions for this account.
// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyFunctions = "TooManyFunctions"
// ErrCodeTooManyHeadersInCachePolicy for service response error code
// "TooManyHeadersInCachePolicy".
//
// The number of headers in the cache policy exceeds the maximum. For more information,
// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyHeadersInCachePolicy = "TooManyHeadersInCachePolicy"
// ErrCodeTooManyHeadersInForwardedValues for service response error code
// "TooManyHeadersInForwardedValues".
//
// Your request contains too many headers in forwarded values.
ErrCodeTooManyHeadersInForwardedValues = "TooManyHeadersInForwardedValues"
// ErrCodeTooManyHeadersInOriginRequestPolicy for service response error code
// "TooManyHeadersInOriginRequestPolicy".
//
// The number of headers in the origin request policy exceeds the maximum. For
// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyHeadersInOriginRequestPolicy = "TooManyHeadersInOriginRequestPolicy"
// ErrCodeTooManyInvalidationsInProgress for service response error code
// "TooManyInvalidationsInProgress".
//
// You have exceeded the maximum number of allowable InProgress invalidation
// batch requests, or invalidation objects.
ErrCodeTooManyInvalidationsInProgress = "TooManyInvalidationsInProgress"
// ErrCodeTooManyKeyGroups for service response error code
// "TooManyKeyGroups".
//
// You have reached the maximum number of key groups for this account. For more
// information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyKeyGroups = "TooManyKeyGroups"
// ErrCodeTooManyKeyGroupsAssociatedToDistribution for service response error code
// "TooManyKeyGroupsAssociatedToDistribution".
//
// The number of key groups referenced by this distribution is more than the
// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyKeyGroupsAssociatedToDistribution = "TooManyKeyGroupsAssociatedToDistribution"
// ErrCodeTooManyLambdaFunctionAssociations for service response error code
// "TooManyLambdaFunctionAssociations".
//
// Your request contains more Lambda@Edge function associations than are allowed
// per distribution.
ErrCodeTooManyLambdaFunctionAssociations = "TooManyLambdaFunctionAssociations"
// ErrCodeTooManyOriginCustomHeaders for service response error code
// "TooManyOriginCustomHeaders".
//
// Your request contains too many origin custom headers.
ErrCodeTooManyOriginCustomHeaders = "TooManyOriginCustomHeaders"
// ErrCodeTooManyOriginGroupsPerDistribution for service response error code
// "TooManyOriginGroupsPerDistribution".
//
// Processing your request would cause you to exceed the maximum number of origin
// groups allowed.
ErrCodeTooManyOriginGroupsPerDistribution = "TooManyOriginGroupsPerDistribution"
// ErrCodeTooManyOriginRequestPolicies for service response error code
// "TooManyOriginRequestPolicies".
//
// You have reached the maximum number of origin request policies for this account.
// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyOriginRequestPolicies = "TooManyOriginRequestPolicies"
// ErrCodeTooManyOrigins for service response error code
// "TooManyOrigins".
//
// You cannot create more origins for the distribution.
ErrCodeTooManyOrigins = "TooManyOrigins"
// ErrCodeTooManyPublicKeys for service response error code
// "TooManyPublicKeys".
//
// The maximum number of public keys for field-level encryption have been created.
// To create a new public key, delete one of the existing keys.
ErrCodeTooManyPublicKeys = "TooManyPublicKeys"
// ErrCodeTooManyPublicKeysInKeyGroup for service response error code
// "TooManyPublicKeysInKeyGroup".
//
// The number of public keys in this key group is more than the maximum allowed.
// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyPublicKeysInKeyGroup = "TooManyPublicKeysInKeyGroup"
// ErrCodeTooManyQueryStringParameters for service response error code
// "TooManyQueryStringParameters".
//
// Your request contains too many query string parameters.
ErrCodeTooManyQueryStringParameters = "TooManyQueryStringParameters"
// ErrCodeTooManyQueryStringsInCachePolicy for service response error code
// "TooManyQueryStringsInCachePolicy".
//
// The number of query strings in the cache policy exceeds the maximum. For
// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyQueryStringsInCachePolicy = "TooManyQueryStringsInCachePolicy"
// ErrCodeTooManyQueryStringsInOriginRequestPolicy for service response error code
// "TooManyQueryStringsInOriginRequestPolicy".
//
// The number of query strings in the origin request policy exceeds the maximum.
// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyQueryStringsInOriginRequestPolicy = "TooManyQueryStringsInOriginRequestPolicy"
// ErrCodeTooManyRealtimeLogConfigs for service response error code
// "TooManyRealtimeLogConfigs".
//
// You have reached the maximum number of real-time log configurations for this
// account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)
// (formerly known as limits) in the Amazon CloudFront Developer Guide.
ErrCodeTooManyRealtimeLogConfigs = "TooManyRealtimeLogConfigs"
// ErrCodeTooManyStreamingDistributionCNAMEs for service response error code
// "TooManyStreamingDistributionCNAMEs".
//
// Your request contains more CNAMEs than are allowed per distribution.
ErrCodeTooManyStreamingDistributionCNAMEs = "TooManyStreamingDistributionCNAMEs"
// ErrCodeTooManyStreamingDistributions for service response error code
// "TooManyStreamingDistributions".
//
// Processing your request would cause you to exceed the maximum number of streaming
// distributions allowed.
ErrCodeTooManyStreamingDistributions = "TooManyStreamingDistributions"
// ErrCodeTooManyTrustedSigners for service response error code
// "TooManyTrustedSigners".
//
// Your request contains more trusted signers than are allowed per distribution.
ErrCodeTooManyTrustedSigners = "TooManyTrustedSigners"
// ErrCodeTrustedKeyGroupDoesNotExist for service response error code
// "TrustedKeyGroupDoesNotExist".
//
// The specified key group does not exist.
ErrCodeTrustedKeyGroupDoesNotExist = "TrustedKeyGroupDoesNotExist"
// ErrCodeTrustedSignerDoesNotExist for service response error code
// "TrustedSignerDoesNotExist".
//
// One or more of your trusted signers don't exist.
ErrCodeTrustedSignerDoesNotExist = "TrustedSignerDoesNotExist"
// ErrCodeUnsupportedOperation for service response error code
// "UnsupportedOperation".
//
// This operation is not supported in this region.
ErrCodeUnsupportedOperation = "UnsupportedOperation"
)
| 815 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudfront_test
import (
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudfront"
)
var _ time.Duration
var _ strings.Reader
var _ aws.Config
func parseTime(layout, value string) *time.Time {
t, err := time.Parse(layout, value)
if err != nil {
panic(err)
}
return &t
}
//
func ExampleCloudFront_CreateCloudFrontOriginAccessIdentity_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.CreateCloudFrontOriginAccessIdentityInput{}
result, err := svc.CreateCloudFrontOriginAccessIdentity(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeOriginAccessIdentityAlreadyExists:
fmt.Println(cloudfront.ErrCodeOriginAccessIdentityAlreadyExists, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeTooManyCloudFrontOriginAccessIdentities:
fmt.Println(cloudfront.ErrCodeTooManyCloudFrontOriginAccessIdentities, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_CreateDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.CreateDistributionInput{}
result, err := svc.CreateDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeCNAMEAlreadyExists:
fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error())
case cloudfront.ErrCodeDistributionAlreadyExists:
fmt.Println(cloudfront.ErrCodeDistributionAlreadyExists, aerr.Error())
case cloudfront.ErrCodeInvalidOrigin:
fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error())
case cloudfront.ErrCodeInvalidOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeTooManyTrustedSigners:
fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error())
case cloudfront.ErrCodeTrustedSignerDoesNotExist:
fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error())
case cloudfront.ErrCodeInvalidViewerCertificate:
fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error())
case cloudfront.ErrCodeInvalidMinimumProtocolVersion:
fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionCNAMEs:
fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error())
case cloudfront.ErrCodeTooManyDistributions:
fmt.Println(cloudfront.ErrCodeTooManyDistributions, aerr.Error())
case cloudfront.ErrCodeInvalidDefaultRootObject:
fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error())
case cloudfront.ErrCodeInvalidRelativePath:
fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error())
case cloudfront.ErrCodeInvalidErrorCode:
fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error())
case cloudfront.ErrCodeInvalidResponseCode:
fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidRequiredProtocol:
fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error())
case cloudfront.ErrCodeNoSuchOrigin:
fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error())
case cloudfront.ErrCodeTooManyOrigins:
fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error())
case cloudfront.ErrCodeTooManyCacheBehaviors:
fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error())
case cloudfront.ErrCodeTooManyCookieNamesInWhiteList:
fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error())
case cloudfront.ErrCodeInvalidForwardCookies:
fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error())
case cloudfront.ErrCodeTooManyHeadersInForwardedValues:
fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error())
case cloudfront.ErrCodeInvalidHeadersForS3Origin:
fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
case cloudfront.ErrCodeTooManyCertificates:
fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error())
case cloudfront.ErrCodeInvalidLocationCode:
fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error())
case cloudfront.ErrCodeInvalidGeoRestrictionParameter:
fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error())
case cloudfront.ErrCodeInvalidProtocolSettings:
fmt.Println(cloudfront.ErrCodeInvalidProtocolSettings, aerr.Error())
case cloudfront.ErrCodeInvalidTTLOrder:
fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error())
case cloudfront.ErrCodeInvalidWebACLId:
fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error())
case cloudfront.ErrCodeTooManyOriginCustomHeaders:
fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error())
case cloudfront.ErrCodeTooManyQueryStringParameters:
fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeInvalidQueryStringParameters:
fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations:
fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error())
case cloudfront.ErrCodeTooManyLambdaFunctionAssociations:
fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error())
case cloudfront.ErrCodeInvalidLambdaFunctionAssociation:
fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error())
case cloudfront.ErrCodeInvalidOriginReadTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error())
case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_CreateDistributionWithTags_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.CreateDistributionWithTagsInput{}
result, err := svc.CreateDistributionWithTags(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeCNAMEAlreadyExists:
fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error())
case cloudfront.ErrCodeDistributionAlreadyExists:
fmt.Println(cloudfront.ErrCodeDistributionAlreadyExists, aerr.Error())
case cloudfront.ErrCodeInvalidOrigin:
fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error())
case cloudfront.ErrCodeInvalidOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeTooManyTrustedSigners:
fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error())
case cloudfront.ErrCodeTrustedSignerDoesNotExist:
fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error())
case cloudfront.ErrCodeInvalidViewerCertificate:
fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error())
case cloudfront.ErrCodeInvalidMinimumProtocolVersion:
fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionCNAMEs:
fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error())
case cloudfront.ErrCodeTooManyDistributions:
fmt.Println(cloudfront.ErrCodeTooManyDistributions, aerr.Error())
case cloudfront.ErrCodeInvalidDefaultRootObject:
fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error())
case cloudfront.ErrCodeInvalidRelativePath:
fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error())
case cloudfront.ErrCodeInvalidErrorCode:
fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error())
case cloudfront.ErrCodeInvalidResponseCode:
fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidRequiredProtocol:
fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error())
case cloudfront.ErrCodeNoSuchOrigin:
fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error())
case cloudfront.ErrCodeTooManyOrigins:
fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error())
case cloudfront.ErrCodeTooManyCacheBehaviors:
fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error())
case cloudfront.ErrCodeTooManyCookieNamesInWhiteList:
fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error())
case cloudfront.ErrCodeInvalidForwardCookies:
fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error())
case cloudfront.ErrCodeTooManyHeadersInForwardedValues:
fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error())
case cloudfront.ErrCodeInvalidHeadersForS3Origin:
fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
case cloudfront.ErrCodeTooManyCertificates:
fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error())
case cloudfront.ErrCodeInvalidLocationCode:
fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error())
case cloudfront.ErrCodeInvalidGeoRestrictionParameter:
fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error())
case cloudfront.ErrCodeInvalidProtocolSettings:
fmt.Println(cloudfront.ErrCodeInvalidProtocolSettings, aerr.Error())
case cloudfront.ErrCodeInvalidTTLOrder:
fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error())
case cloudfront.ErrCodeInvalidWebACLId:
fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error())
case cloudfront.ErrCodeTooManyOriginCustomHeaders:
fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error())
case cloudfront.ErrCodeInvalidTagging:
fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error())
case cloudfront.ErrCodeTooManyQueryStringParameters:
fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeInvalidQueryStringParameters:
fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations:
fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error())
case cloudfront.ErrCodeTooManyLambdaFunctionAssociations:
fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error())
case cloudfront.ErrCodeInvalidLambdaFunctionAssociation:
fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error())
case cloudfront.ErrCodeInvalidOriginReadTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error())
case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_CreateInvalidation_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.CreateInvalidationInput{}
result, err := svc.CreateInvalidation(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodeBatchTooLarge:
fmt.Println(cloudfront.ErrCodeBatchTooLarge, aerr.Error())
case cloudfront.ErrCodeTooManyInvalidationsInProgress:
fmt.Println(cloudfront.ErrCodeTooManyInvalidationsInProgress, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_CreateStreamingDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.CreateStreamingDistributionInput{}
result, err := svc.CreateStreamingDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeCNAMEAlreadyExists:
fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error())
case cloudfront.ErrCodeStreamingDistributionAlreadyExists:
fmt.Println(cloudfront.ErrCodeStreamingDistributionAlreadyExists, aerr.Error())
case cloudfront.ErrCodeInvalidOrigin:
fmt.Println(cloudfront.ErrCodeInvalidOrigin, aerr.Error())
case cloudfront.ErrCodeInvalidOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeTooManyTrustedSigners:
fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error())
case cloudfront.ErrCodeTrustedSignerDoesNotExist:
fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs:
fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs, aerr.Error())
case cloudfront.ErrCodeTooManyStreamingDistributions:
fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributions, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_DeleteCloudFrontOriginAccessIdentity_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.DeleteCloudFrontOriginAccessIdentityInput{}
result, err := svc.DeleteCloudFrontOriginAccessIdentity(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
case cloudfront.ErrCodeOriginAccessIdentityInUse:
fmt.Println(cloudfront.ErrCodeOriginAccessIdentityInUse, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_DeleteDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.DeleteDistributionInput{}
result, err := svc.DeleteDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeDistributionNotDisabled:
fmt.Println(cloudfront.ErrCodeDistributionNotDisabled, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_DeleteStreamingDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.DeleteStreamingDistributionInput{}
result, err := svc.DeleteStreamingDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeStreamingDistributionNotDisabled:
fmt.Println(cloudfront.ErrCodeStreamingDistributionNotDisabled, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeNoSuchStreamingDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetCloudFrontOriginAccessIdentity_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetCloudFrontOriginAccessIdentityInput{}
result, err := svc.GetCloudFrontOriginAccessIdentity(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetCloudFrontOriginAccessIdentityConfig_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetCloudFrontOriginAccessIdentityConfigInput{}
result, err := svc.GetCloudFrontOriginAccessIdentityConfig(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetDistributionInput{}
result, err := svc.GetDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetDistributionConfig_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetDistributionConfigInput{}
result, err := svc.GetDistributionConfig(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetInvalidation_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetInvalidationInput{}
result, err := svc.GetInvalidation(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchInvalidation:
fmt.Println(cloudfront.ErrCodeNoSuchInvalidation, aerr.Error())
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetStreamingDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetStreamingDistributionInput{}
result, err := svc.GetStreamingDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchStreamingDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_GetStreamingDistributionConfig_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.GetStreamingDistributionConfigInput{}
result, err := svc.GetStreamingDistributionConfig(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeNoSuchStreamingDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListCloudFrontOriginAccessIdentities_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListCloudFrontOriginAccessIdentitiesInput{}
result, err := svc.ListCloudFrontOriginAccessIdentities(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListDistributions_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListDistributionsInput{}
result, err := svc.ListDistributions(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListDistributionsByWebACLId_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListDistributionsByWebACLIdInput{}
result, err := svc.ListDistributionsByWebACLId(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidWebACLId:
fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListInvalidations_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListInvalidationsInput{}
result, err := svc.ListInvalidations(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListStreamingDistributions_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListStreamingDistributionsInput{}
result, err := svc.ListStreamingDistributions(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_ListTagsForResource_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.ListTagsForResourceInput{}
result, err := svc.ListTagsForResource(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidTagging:
fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error())
case cloudfront.ErrCodeNoSuchResource:
fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_TagResource_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.TagResourceInput{}
result, err := svc.TagResource(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidTagging:
fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error())
case cloudfront.ErrCodeNoSuchResource:
fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_UntagResource_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.UntagResourceInput{}
result, err := svc.UntagResource(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidTagging:
fmt.Println(cloudfront.ErrCodeInvalidTagging, aerr.Error())
case cloudfront.ErrCodeNoSuchResource:
fmt.Println(cloudfront.ErrCodeNoSuchResource, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_UpdateCloudFrontOriginAccessIdentity_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.UpdateCloudFrontOriginAccessIdentityInput{}
result, err := svc.UpdateCloudFrontOriginAccessIdentity(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeIllegalUpdate:
fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeNoSuchCloudFrontOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_UpdateDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.UpdateDistributionInput{}
result, err := svc.UpdateDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeCNAMEAlreadyExists:
fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error())
case cloudfront.ErrCodeIllegalUpdate:
fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeNoSuchDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchDistribution, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionCNAMEs:
fmt.Println(cloudfront.ErrCodeTooManyDistributionCNAMEs, aerr.Error())
case cloudfront.ErrCodeInvalidDefaultRootObject:
fmt.Println(cloudfront.ErrCodeInvalidDefaultRootObject, aerr.Error())
case cloudfront.ErrCodeInvalidRelativePath:
fmt.Println(cloudfront.ErrCodeInvalidRelativePath, aerr.Error())
case cloudfront.ErrCodeInvalidErrorCode:
fmt.Println(cloudfront.ErrCodeInvalidErrorCode, aerr.Error())
case cloudfront.ErrCodeInvalidResponseCode:
fmt.Println(cloudfront.ErrCodeInvalidResponseCode, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeTooManyTrustedSigners:
fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error())
case cloudfront.ErrCodeTrustedSignerDoesNotExist:
fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error())
case cloudfront.ErrCodeInvalidViewerCertificate:
fmt.Println(cloudfront.ErrCodeInvalidViewerCertificate, aerr.Error())
case cloudfront.ErrCodeInvalidMinimumProtocolVersion:
fmt.Println(cloudfront.ErrCodeInvalidMinimumProtocolVersion, aerr.Error())
case cloudfront.ErrCodeInvalidRequiredProtocol:
fmt.Println(cloudfront.ErrCodeInvalidRequiredProtocol, aerr.Error())
case cloudfront.ErrCodeNoSuchOrigin:
fmt.Println(cloudfront.ErrCodeNoSuchOrigin, aerr.Error())
case cloudfront.ErrCodeTooManyOrigins:
fmt.Println(cloudfront.ErrCodeTooManyOrigins, aerr.Error())
case cloudfront.ErrCodeTooManyCacheBehaviors:
fmt.Println(cloudfront.ErrCodeTooManyCacheBehaviors, aerr.Error())
case cloudfront.ErrCodeTooManyCookieNamesInWhiteList:
fmt.Println(cloudfront.ErrCodeTooManyCookieNamesInWhiteList, aerr.Error())
case cloudfront.ErrCodeInvalidForwardCookies:
fmt.Println(cloudfront.ErrCodeInvalidForwardCookies, aerr.Error())
case cloudfront.ErrCodeTooManyHeadersInForwardedValues:
fmt.Println(cloudfront.ErrCodeTooManyHeadersInForwardedValues, aerr.Error())
case cloudfront.ErrCodeInvalidHeadersForS3Origin:
fmt.Println(cloudfront.ErrCodeInvalidHeadersForS3Origin, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
case cloudfront.ErrCodeTooManyCertificates:
fmt.Println(cloudfront.ErrCodeTooManyCertificates, aerr.Error())
case cloudfront.ErrCodeInvalidLocationCode:
fmt.Println(cloudfront.ErrCodeInvalidLocationCode, aerr.Error())
case cloudfront.ErrCodeInvalidGeoRestrictionParameter:
fmt.Println(cloudfront.ErrCodeInvalidGeoRestrictionParameter, aerr.Error())
case cloudfront.ErrCodeInvalidTTLOrder:
fmt.Println(cloudfront.ErrCodeInvalidTTLOrder, aerr.Error())
case cloudfront.ErrCodeInvalidWebACLId:
fmt.Println(cloudfront.ErrCodeInvalidWebACLId, aerr.Error())
case cloudfront.ErrCodeTooManyOriginCustomHeaders:
fmt.Println(cloudfront.ErrCodeTooManyOriginCustomHeaders, aerr.Error())
case cloudfront.ErrCodeTooManyQueryStringParameters:
fmt.Println(cloudfront.ErrCodeTooManyQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeInvalidQueryStringParameters:
fmt.Println(cloudfront.ErrCodeInvalidQueryStringParameters, aerr.Error())
case cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations:
fmt.Println(cloudfront.ErrCodeTooManyDistributionsWithLambdaAssociations, aerr.Error())
case cloudfront.ErrCodeTooManyLambdaFunctionAssociations:
fmt.Println(cloudfront.ErrCodeTooManyLambdaFunctionAssociations, aerr.Error())
case cloudfront.ErrCodeInvalidLambdaFunctionAssociation:
fmt.Println(cloudfront.ErrCodeInvalidLambdaFunctionAssociation, aerr.Error())
case cloudfront.ErrCodeInvalidOriginReadTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginReadTimeout, aerr.Error())
case cloudfront.ErrCodeInvalidOriginKeepaliveTimeout:
fmt.Println(cloudfront.ErrCodeInvalidOriginKeepaliveTimeout, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
//
func ExampleCloudFront_UpdateStreamingDistribution_shared00() {
svc := cloudfront.New(session.New())
input := &cloudfront.UpdateStreamingDistributionInput{}
result, err := svc.UpdateStreamingDistribution(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case cloudfront.ErrCodeAccessDenied:
fmt.Println(cloudfront.ErrCodeAccessDenied, aerr.Error())
case cloudfront.ErrCodeCNAMEAlreadyExists:
fmt.Println(cloudfront.ErrCodeCNAMEAlreadyExists, aerr.Error())
case cloudfront.ErrCodeIllegalUpdate:
fmt.Println(cloudfront.ErrCodeIllegalUpdate, aerr.Error())
case cloudfront.ErrCodeInvalidIfMatchVersion:
fmt.Println(cloudfront.ErrCodeInvalidIfMatchVersion, aerr.Error())
case cloudfront.ErrCodeMissingBody:
fmt.Println(cloudfront.ErrCodeMissingBody, aerr.Error())
case cloudfront.ErrCodeNoSuchStreamingDistribution:
fmt.Println(cloudfront.ErrCodeNoSuchStreamingDistribution, aerr.Error())
case cloudfront.ErrCodePreconditionFailed:
fmt.Println(cloudfront.ErrCodePreconditionFailed, aerr.Error())
case cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs:
fmt.Println(cloudfront.ErrCodeTooManyStreamingDistributionCNAMEs, aerr.Error())
case cloudfront.ErrCodeInvalidArgument:
fmt.Println(cloudfront.ErrCodeInvalidArgument, aerr.Error())
case cloudfront.ErrCodeInvalidOriginAccessIdentity:
fmt.Println(cloudfront.ErrCodeInvalidOriginAccessIdentity, aerr.Error())
case cloudfront.ErrCodeTooManyTrustedSigners:
fmt.Println(cloudfront.ErrCodeTooManyTrustedSigners, aerr.Error())
case cloudfront.ErrCodeTrustedSignerDoesNotExist:
fmt.Println(cloudfront.ErrCodeTrustedSignerDoesNotExist, aerr.Error())
case cloudfront.ErrCodeInconsistentQuantities:
fmt.Println(cloudfront.ErrCodeInconsistentQuantities, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
| 1,083 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.15,integration
package cloudfront_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/cloudfront"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_ListCloudFrontOriginAccessIdentities(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-east-1")
svc := cloudfront.New(sess)
params := &cloudfront.ListCloudFrontOriginAccessIdentitiesInput{
MaxItems: aws.Int64(1),
}
_, err := svc.ListCloudFrontOriginAccessIdentitiesWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_GetDistribution(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-east-1")
svc := cloudfront.New(sess)
params := &cloudfront.GetDistributionInput{
Id: aws.String("fake-id"),
}
_, err := svc.GetDistributionWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
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 len(aerr.Message()) == 0 {
t.Errorf("expect non-empty error message")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
| 68 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudfront
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/restxml"
)
// CloudFront provides the API operation methods for making requests to
// Amazon CloudFront. See this package's package overview docs
// for details on the service.
//
// CloudFront methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudFront 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 = "cloudfront" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudFront" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudFront 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudFront client from just a session.
// svc := cloudfront.New(mySession)
//
// // Create a CloudFront client with additional configuration
// svc := cloudfront.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFront {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudFront {
svc := &CloudFront{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2020-05-31",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CloudFront operation and runs any
// custom request initialization.
func (c *CloudFront) 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
}
| 99 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudfront
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilDistributionDeployed uses the CloudFront API operation
// GetDistribution 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 *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error {
return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilDistributionDeployedWithContext is an extended version of WaitUntilDistributionDeployed.
// 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 *CloudFront) WaitUntilDistributionDeployedWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilDistributionDeployed",
MaxAttempts: 35,
Delay: request.ConstantWaiterDelay(60 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "Distribution.Status",
Expected: "Deployed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *GetDistributionInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetDistributionRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilInvalidationCompleted uses the CloudFront API operation
// GetInvalidation 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 *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error {
return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilInvalidationCompletedWithContext is an extended version of WaitUntilInvalidationCompleted.
// 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 *CloudFront) WaitUntilInvalidationCompletedWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilInvalidationCompleted",
MaxAttempts: 30,
Delay: request.ConstantWaiterDelay(20 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "Invalidation.Status",
Expected: "Completed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *GetInvalidationInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetInvalidationRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilStreamingDistributionDeployed uses the CloudFront API operation
// GetStreamingDistribution 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 *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error {
return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilStreamingDistributionDeployedWithContext is an extended version of WaitUntilStreamingDistributionDeployed.
// 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 *CloudFront) WaitUntilStreamingDistributionDeployedWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilStreamingDistributionDeployed",
MaxAttempts: 25,
Delay: request.ConstantWaiterDelay(60 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "StreamingDistribution.Status",
Expected: "Deployed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *GetStreamingDistributionInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetStreamingDistributionRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
| 149 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudfrontiface provides an interface to enable mocking the Amazon CloudFront 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 cloudfrontiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudfront"
)
// CloudFrontAPI provides an interface to enable mocking the
// cloudfront.CloudFront 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 CloudFront.
// func myFunc(svc cloudfrontiface.CloudFrontAPI) bool {
// // Make svc.AssociateAlias request
// }
//
// func main() {
// sess := session.New()
// svc := cloudfront.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudFrontClient struct {
// cloudfrontiface.CloudFrontAPI
// }
// func (m *mockCloudFrontClient) AssociateAlias(input *cloudfront.AssociateAliasInput) (*cloudfront.AssociateAliasOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudFrontClient{}
//
// 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 CloudFrontAPI interface {
AssociateAlias(*cloudfront.AssociateAliasInput) (*cloudfront.AssociateAliasOutput, error)
AssociateAliasWithContext(aws.Context, *cloudfront.AssociateAliasInput, ...request.Option) (*cloudfront.AssociateAliasOutput, error)
AssociateAliasRequest(*cloudfront.AssociateAliasInput) (*request.Request, *cloudfront.AssociateAliasOutput)
CreateCachePolicy(*cloudfront.CreateCachePolicyInput) (*cloudfront.CreateCachePolicyOutput, error)
CreateCachePolicyWithContext(aws.Context, *cloudfront.CreateCachePolicyInput, ...request.Option) (*cloudfront.CreateCachePolicyOutput, error)
CreateCachePolicyRequest(*cloudfront.CreateCachePolicyInput) (*request.Request, *cloudfront.CreateCachePolicyOutput)
CreateCloudFrontOriginAccessIdentity(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error)
CreateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.CreateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error)
CreateCloudFrontOriginAccessIdentityRequest(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.CreateCloudFrontOriginAccessIdentityOutput)
CreateDistribution(*cloudfront.CreateDistributionInput) (*cloudfront.CreateDistributionOutput, error)
CreateDistributionWithContext(aws.Context, *cloudfront.CreateDistributionInput, ...request.Option) (*cloudfront.CreateDistributionOutput, error)
CreateDistributionRequest(*cloudfront.CreateDistributionInput) (*request.Request, *cloudfront.CreateDistributionOutput)
CreateDistributionWithTags(*cloudfront.CreateDistributionWithTagsInput) (*cloudfront.CreateDistributionWithTagsOutput, error)
CreateDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateDistributionWithTagsOutput, error)
CreateDistributionWithTagsRequest(*cloudfront.CreateDistributionWithTagsInput) (*request.Request, *cloudfront.CreateDistributionWithTagsOutput)
CreateFieldLevelEncryptionConfig(*cloudfront.CreateFieldLevelEncryptionConfigInput) (*cloudfront.CreateFieldLevelEncryptionConfigOutput, error)
CreateFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.CreateFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.CreateFieldLevelEncryptionConfigOutput, error)
CreateFieldLevelEncryptionConfigRequest(*cloudfront.CreateFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.CreateFieldLevelEncryptionConfigOutput)
CreateFieldLevelEncryptionProfile(*cloudfront.CreateFieldLevelEncryptionProfileInput) (*cloudfront.CreateFieldLevelEncryptionProfileOutput, error)
CreateFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.CreateFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.CreateFieldLevelEncryptionProfileOutput, error)
CreateFieldLevelEncryptionProfileRequest(*cloudfront.CreateFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.CreateFieldLevelEncryptionProfileOutput)
CreateFunction(*cloudfront.CreateFunctionInput) (*cloudfront.CreateFunctionOutput, error)
CreateFunctionWithContext(aws.Context, *cloudfront.CreateFunctionInput, ...request.Option) (*cloudfront.CreateFunctionOutput, error)
CreateFunctionRequest(*cloudfront.CreateFunctionInput) (*request.Request, *cloudfront.CreateFunctionOutput)
CreateInvalidation(*cloudfront.CreateInvalidationInput) (*cloudfront.CreateInvalidationOutput, error)
CreateInvalidationWithContext(aws.Context, *cloudfront.CreateInvalidationInput, ...request.Option) (*cloudfront.CreateInvalidationOutput, error)
CreateInvalidationRequest(*cloudfront.CreateInvalidationInput) (*request.Request, *cloudfront.CreateInvalidationOutput)
CreateKeyGroup(*cloudfront.CreateKeyGroupInput) (*cloudfront.CreateKeyGroupOutput, error)
CreateKeyGroupWithContext(aws.Context, *cloudfront.CreateKeyGroupInput, ...request.Option) (*cloudfront.CreateKeyGroupOutput, error)
CreateKeyGroupRequest(*cloudfront.CreateKeyGroupInput) (*request.Request, *cloudfront.CreateKeyGroupOutput)
CreateMonitoringSubscription(*cloudfront.CreateMonitoringSubscriptionInput) (*cloudfront.CreateMonitoringSubscriptionOutput, error)
CreateMonitoringSubscriptionWithContext(aws.Context, *cloudfront.CreateMonitoringSubscriptionInput, ...request.Option) (*cloudfront.CreateMonitoringSubscriptionOutput, error)
CreateMonitoringSubscriptionRequest(*cloudfront.CreateMonitoringSubscriptionInput) (*request.Request, *cloudfront.CreateMonitoringSubscriptionOutput)
CreateOriginRequestPolicy(*cloudfront.CreateOriginRequestPolicyInput) (*cloudfront.CreateOriginRequestPolicyOutput, error)
CreateOriginRequestPolicyWithContext(aws.Context, *cloudfront.CreateOriginRequestPolicyInput, ...request.Option) (*cloudfront.CreateOriginRequestPolicyOutput, error)
CreateOriginRequestPolicyRequest(*cloudfront.CreateOriginRequestPolicyInput) (*request.Request, *cloudfront.CreateOriginRequestPolicyOutput)
CreatePublicKey(*cloudfront.CreatePublicKeyInput) (*cloudfront.CreatePublicKeyOutput, error)
CreatePublicKeyWithContext(aws.Context, *cloudfront.CreatePublicKeyInput, ...request.Option) (*cloudfront.CreatePublicKeyOutput, error)
CreatePublicKeyRequest(*cloudfront.CreatePublicKeyInput) (*request.Request, *cloudfront.CreatePublicKeyOutput)
CreateRealtimeLogConfig(*cloudfront.CreateRealtimeLogConfigInput) (*cloudfront.CreateRealtimeLogConfigOutput, error)
CreateRealtimeLogConfigWithContext(aws.Context, *cloudfront.CreateRealtimeLogConfigInput, ...request.Option) (*cloudfront.CreateRealtimeLogConfigOutput, error)
CreateRealtimeLogConfigRequest(*cloudfront.CreateRealtimeLogConfigInput) (*request.Request, *cloudfront.CreateRealtimeLogConfigOutput)
CreateStreamingDistribution(*cloudfront.CreateStreamingDistributionInput) (*cloudfront.CreateStreamingDistributionOutput, error)
CreateStreamingDistributionWithContext(aws.Context, *cloudfront.CreateStreamingDistributionInput, ...request.Option) (*cloudfront.CreateStreamingDistributionOutput, error)
CreateStreamingDistributionRequest(*cloudfront.CreateStreamingDistributionInput) (*request.Request, *cloudfront.CreateStreamingDistributionOutput)
CreateStreamingDistributionWithTags(*cloudfront.CreateStreamingDistributionWithTagsInput) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error)
CreateStreamingDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateStreamingDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error)
CreateStreamingDistributionWithTagsRequest(*cloudfront.CreateStreamingDistributionWithTagsInput) (*request.Request, *cloudfront.CreateStreamingDistributionWithTagsOutput)
DeleteCachePolicy(*cloudfront.DeleteCachePolicyInput) (*cloudfront.DeleteCachePolicyOutput, error)
DeleteCachePolicyWithContext(aws.Context, *cloudfront.DeleteCachePolicyInput, ...request.Option) (*cloudfront.DeleteCachePolicyOutput, error)
DeleteCachePolicyRequest(*cloudfront.DeleteCachePolicyInput) (*request.Request, *cloudfront.DeleteCachePolicyOutput)
DeleteCloudFrontOriginAccessIdentity(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error)
DeleteCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.DeleteCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error)
DeleteCloudFrontOriginAccessIdentityRequest(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.DeleteCloudFrontOriginAccessIdentityOutput)
DeleteDistribution(*cloudfront.DeleteDistributionInput) (*cloudfront.DeleteDistributionOutput, error)
DeleteDistributionWithContext(aws.Context, *cloudfront.DeleteDistributionInput, ...request.Option) (*cloudfront.DeleteDistributionOutput, error)
DeleteDistributionRequest(*cloudfront.DeleteDistributionInput) (*request.Request, *cloudfront.DeleteDistributionOutput)
DeleteFieldLevelEncryptionConfig(*cloudfront.DeleteFieldLevelEncryptionConfigInput) (*cloudfront.DeleteFieldLevelEncryptionConfigOutput, error)
DeleteFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.DeleteFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.DeleteFieldLevelEncryptionConfigOutput, error)
DeleteFieldLevelEncryptionConfigRequest(*cloudfront.DeleteFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.DeleteFieldLevelEncryptionConfigOutput)
DeleteFieldLevelEncryptionProfile(*cloudfront.DeleteFieldLevelEncryptionProfileInput) (*cloudfront.DeleteFieldLevelEncryptionProfileOutput, error)
DeleteFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.DeleteFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.DeleteFieldLevelEncryptionProfileOutput, error)
DeleteFieldLevelEncryptionProfileRequest(*cloudfront.DeleteFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.DeleteFieldLevelEncryptionProfileOutput)
DeleteFunction(*cloudfront.DeleteFunctionInput) (*cloudfront.DeleteFunctionOutput, error)
DeleteFunctionWithContext(aws.Context, *cloudfront.DeleteFunctionInput, ...request.Option) (*cloudfront.DeleteFunctionOutput, error)
DeleteFunctionRequest(*cloudfront.DeleteFunctionInput) (*request.Request, *cloudfront.DeleteFunctionOutput)
DeleteKeyGroup(*cloudfront.DeleteKeyGroupInput) (*cloudfront.DeleteKeyGroupOutput, error)
DeleteKeyGroupWithContext(aws.Context, *cloudfront.DeleteKeyGroupInput, ...request.Option) (*cloudfront.DeleteKeyGroupOutput, error)
DeleteKeyGroupRequest(*cloudfront.DeleteKeyGroupInput) (*request.Request, *cloudfront.DeleteKeyGroupOutput)
DeleteMonitoringSubscription(*cloudfront.DeleteMonitoringSubscriptionInput) (*cloudfront.DeleteMonitoringSubscriptionOutput, error)
DeleteMonitoringSubscriptionWithContext(aws.Context, *cloudfront.DeleteMonitoringSubscriptionInput, ...request.Option) (*cloudfront.DeleteMonitoringSubscriptionOutput, error)
DeleteMonitoringSubscriptionRequest(*cloudfront.DeleteMonitoringSubscriptionInput) (*request.Request, *cloudfront.DeleteMonitoringSubscriptionOutput)
DeleteOriginRequestPolicy(*cloudfront.DeleteOriginRequestPolicyInput) (*cloudfront.DeleteOriginRequestPolicyOutput, error)
DeleteOriginRequestPolicyWithContext(aws.Context, *cloudfront.DeleteOriginRequestPolicyInput, ...request.Option) (*cloudfront.DeleteOriginRequestPolicyOutput, error)
DeleteOriginRequestPolicyRequest(*cloudfront.DeleteOriginRequestPolicyInput) (*request.Request, *cloudfront.DeleteOriginRequestPolicyOutput)
DeletePublicKey(*cloudfront.DeletePublicKeyInput) (*cloudfront.DeletePublicKeyOutput, error)
DeletePublicKeyWithContext(aws.Context, *cloudfront.DeletePublicKeyInput, ...request.Option) (*cloudfront.DeletePublicKeyOutput, error)
DeletePublicKeyRequest(*cloudfront.DeletePublicKeyInput) (*request.Request, *cloudfront.DeletePublicKeyOutput)
DeleteRealtimeLogConfig(*cloudfront.DeleteRealtimeLogConfigInput) (*cloudfront.DeleteRealtimeLogConfigOutput, error)
DeleteRealtimeLogConfigWithContext(aws.Context, *cloudfront.DeleteRealtimeLogConfigInput, ...request.Option) (*cloudfront.DeleteRealtimeLogConfigOutput, error)
DeleteRealtimeLogConfigRequest(*cloudfront.DeleteRealtimeLogConfigInput) (*request.Request, *cloudfront.DeleteRealtimeLogConfigOutput)
DeleteStreamingDistribution(*cloudfront.DeleteStreamingDistributionInput) (*cloudfront.DeleteStreamingDistributionOutput, error)
DeleteStreamingDistributionWithContext(aws.Context, *cloudfront.DeleteStreamingDistributionInput, ...request.Option) (*cloudfront.DeleteStreamingDistributionOutput, error)
DeleteStreamingDistributionRequest(*cloudfront.DeleteStreamingDistributionInput) (*request.Request, *cloudfront.DeleteStreamingDistributionOutput)
DescribeFunction(*cloudfront.DescribeFunctionInput) (*cloudfront.DescribeFunctionOutput, error)
DescribeFunctionWithContext(aws.Context, *cloudfront.DescribeFunctionInput, ...request.Option) (*cloudfront.DescribeFunctionOutput, error)
DescribeFunctionRequest(*cloudfront.DescribeFunctionInput) (*request.Request, *cloudfront.DescribeFunctionOutput)
GetCachePolicy(*cloudfront.GetCachePolicyInput) (*cloudfront.GetCachePolicyOutput, error)
GetCachePolicyWithContext(aws.Context, *cloudfront.GetCachePolicyInput, ...request.Option) (*cloudfront.GetCachePolicyOutput, error)
GetCachePolicyRequest(*cloudfront.GetCachePolicyInput) (*request.Request, *cloudfront.GetCachePolicyOutput)
GetCachePolicyConfig(*cloudfront.GetCachePolicyConfigInput) (*cloudfront.GetCachePolicyConfigOutput, error)
GetCachePolicyConfigWithContext(aws.Context, *cloudfront.GetCachePolicyConfigInput, ...request.Option) (*cloudfront.GetCachePolicyConfigOutput, error)
GetCachePolicyConfigRequest(*cloudfront.GetCachePolicyConfigInput) (*request.Request, *cloudfront.GetCachePolicyConfigOutput)
GetCloudFrontOriginAccessIdentity(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error)
GetCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error)
GetCloudFrontOriginAccessIdentityRequest(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityOutput)
GetCloudFrontOriginAccessIdentityConfig(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error)
GetCloudFrontOriginAccessIdentityConfigWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityConfigInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error)
GetCloudFrontOriginAccessIdentityConfigRequest(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput)
GetDistribution(*cloudfront.GetDistributionInput) (*cloudfront.GetDistributionOutput, error)
GetDistributionWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.Option) (*cloudfront.GetDistributionOutput, error)
GetDistributionRequest(*cloudfront.GetDistributionInput) (*request.Request, *cloudfront.GetDistributionOutput)
GetDistributionConfig(*cloudfront.GetDistributionConfigInput) (*cloudfront.GetDistributionConfigOutput, error)
GetDistributionConfigWithContext(aws.Context, *cloudfront.GetDistributionConfigInput, ...request.Option) (*cloudfront.GetDistributionConfigOutput, error)
GetDistributionConfigRequest(*cloudfront.GetDistributionConfigInput) (*request.Request, *cloudfront.GetDistributionConfigOutput)
GetFieldLevelEncryption(*cloudfront.GetFieldLevelEncryptionInput) (*cloudfront.GetFieldLevelEncryptionOutput, error)
GetFieldLevelEncryptionWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionOutput, error)
GetFieldLevelEncryptionRequest(*cloudfront.GetFieldLevelEncryptionInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionOutput)
GetFieldLevelEncryptionConfig(*cloudfront.GetFieldLevelEncryptionConfigInput) (*cloudfront.GetFieldLevelEncryptionConfigOutput, error)
GetFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionConfigOutput, error)
GetFieldLevelEncryptionConfigRequest(*cloudfront.GetFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionConfigOutput)
GetFieldLevelEncryptionProfile(*cloudfront.GetFieldLevelEncryptionProfileInput) (*cloudfront.GetFieldLevelEncryptionProfileOutput, error)
GetFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionProfileOutput, error)
GetFieldLevelEncryptionProfileRequest(*cloudfront.GetFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionProfileOutput)
GetFieldLevelEncryptionProfileConfig(*cloudfront.GetFieldLevelEncryptionProfileConfigInput) (*cloudfront.GetFieldLevelEncryptionProfileConfigOutput, error)
GetFieldLevelEncryptionProfileConfigWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionProfileConfigInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionProfileConfigOutput, error)
GetFieldLevelEncryptionProfileConfigRequest(*cloudfront.GetFieldLevelEncryptionProfileConfigInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionProfileConfigOutput)
GetFunction(*cloudfront.GetFunctionInput) (*cloudfront.GetFunctionOutput, error)
GetFunctionWithContext(aws.Context, *cloudfront.GetFunctionInput, ...request.Option) (*cloudfront.GetFunctionOutput, error)
GetFunctionRequest(*cloudfront.GetFunctionInput) (*request.Request, *cloudfront.GetFunctionOutput)
GetInvalidation(*cloudfront.GetInvalidationInput) (*cloudfront.GetInvalidationOutput, error)
GetInvalidationWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.Option) (*cloudfront.GetInvalidationOutput, error)
GetInvalidationRequest(*cloudfront.GetInvalidationInput) (*request.Request, *cloudfront.GetInvalidationOutput)
GetKeyGroup(*cloudfront.GetKeyGroupInput) (*cloudfront.GetKeyGroupOutput, error)
GetKeyGroupWithContext(aws.Context, *cloudfront.GetKeyGroupInput, ...request.Option) (*cloudfront.GetKeyGroupOutput, error)
GetKeyGroupRequest(*cloudfront.GetKeyGroupInput) (*request.Request, *cloudfront.GetKeyGroupOutput)
GetKeyGroupConfig(*cloudfront.GetKeyGroupConfigInput) (*cloudfront.GetKeyGroupConfigOutput, error)
GetKeyGroupConfigWithContext(aws.Context, *cloudfront.GetKeyGroupConfigInput, ...request.Option) (*cloudfront.GetKeyGroupConfigOutput, error)
GetKeyGroupConfigRequest(*cloudfront.GetKeyGroupConfigInput) (*request.Request, *cloudfront.GetKeyGroupConfigOutput)
GetMonitoringSubscription(*cloudfront.GetMonitoringSubscriptionInput) (*cloudfront.GetMonitoringSubscriptionOutput, error)
GetMonitoringSubscriptionWithContext(aws.Context, *cloudfront.GetMonitoringSubscriptionInput, ...request.Option) (*cloudfront.GetMonitoringSubscriptionOutput, error)
GetMonitoringSubscriptionRequest(*cloudfront.GetMonitoringSubscriptionInput) (*request.Request, *cloudfront.GetMonitoringSubscriptionOutput)
GetOriginRequestPolicy(*cloudfront.GetOriginRequestPolicyInput) (*cloudfront.GetOriginRequestPolicyOutput, error)
GetOriginRequestPolicyWithContext(aws.Context, *cloudfront.GetOriginRequestPolicyInput, ...request.Option) (*cloudfront.GetOriginRequestPolicyOutput, error)
GetOriginRequestPolicyRequest(*cloudfront.GetOriginRequestPolicyInput) (*request.Request, *cloudfront.GetOriginRequestPolicyOutput)
GetOriginRequestPolicyConfig(*cloudfront.GetOriginRequestPolicyConfigInput) (*cloudfront.GetOriginRequestPolicyConfigOutput, error)
GetOriginRequestPolicyConfigWithContext(aws.Context, *cloudfront.GetOriginRequestPolicyConfigInput, ...request.Option) (*cloudfront.GetOriginRequestPolicyConfigOutput, error)
GetOriginRequestPolicyConfigRequest(*cloudfront.GetOriginRequestPolicyConfigInput) (*request.Request, *cloudfront.GetOriginRequestPolicyConfigOutput)
GetPublicKey(*cloudfront.GetPublicKeyInput) (*cloudfront.GetPublicKeyOutput, error)
GetPublicKeyWithContext(aws.Context, *cloudfront.GetPublicKeyInput, ...request.Option) (*cloudfront.GetPublicKeyOutput, error)
GetPublicKeyRequest(*cloudfront.GetPublicKeyInput) (*request.Request, *cloudfront.GetPublicKeyOutput)
GetPublicKeyConfig(*cloudfront.GetPublicKeyConfigInput) (*cloudfront.GetPublicKeyConfigOutput, error)
GetPublicKeyConfigWithContext(aws.Context, *cloudfront.GetPublicKeyConfigInput, ...request.Option) (*cloudfront.GetPublicKeyConfigOutput, error)
GetPublicKeyConfigRequest(*cloudfront.GetPublicKeyConfigInput) (*request.Request, *cloudfront.GetPublicKeyConfigOutput)
GetRealtimeLogConfig(*cloudfront.GetRealtimeLogConfigInput) (*cloudfront.GetRealtimeLogConfigOutput, error)
GetRealtimeLogConfigWithContext(aws.Context, *cloudfront.GetRealtimeLogConfigInput, ...request.Option) (*cloudfront.GetRealtimeLogConfigOutput, error)
GetRealtimeLogConfigRequest(*cloudfront.GetRealtimeLogConfigInput) (*request.Request, *cloudfront.GetRealtimeLogConfigOutput)
GetStreamingDistribution(*cloudfront.GetStreamingDistributionInput) (*cloudfront.GetStreamingDistributionOutput, error)
GetStreamingDistributionWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.Option) (*cloudfront.GetStreamingDistributionOutput, error)
GetStreamingDistributionRequest(*cloudfront.GetStreamingDistributionInput) (*request.Request, *cloudfront.GetStreamingDistributionOutput)
GetStreamingDistributionConfig(*cloudfront.GetStreamingDistributionConfigInput) (*cloudfront.GetStreamingDistributionConfigOutput, error)
GetStreamingDistributionConfigWithContext(aws.Context, *cloudfront.GetStreamingDistributionConfigInput, ...request.Option) (*cloudfront.GetStreamingDistributionConfigOutput, error)
GetStreamingDistributionConfigRequest(*cloudfront.GetStreamingDistributionConfigInput) (*request.Request, *cloudfront.GetStreamingDistributionConfigOutput)
ListCachePolicies(*cloudfront.ListCachePoliciesInput) (*cloudfront.ListCachePoliciesOutput, error)
ListCachePoliciesWithContext(aws.Context, *cloudfront.ListCachePoliciesInput, ...request.Option) (*cloudfront.ListCachePoliciesOutput, error)
ListCachePoliciesRequest(*cloudfront.ListCachePoliciesInput) (*request.Request, *cloudfront.ListCachePoliciesOutput)
ListCloudFrontOriginAccessIdentities(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error)
ListCloudFrontOriginAccessIdentitiesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, ...request.Option) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error)
ListCloudFrontOriginAccessIdentitiesRequest(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*request.Request, *cloudfront.ListCloudFrontOriginAccessIdentitiesOutput)
ListCloudFrontOriginAccessIdentitiesPages(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error
ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, ...request.Option) error
ListConflictingAliases(*cloudfront.ListConflictingAliasesInput) (*cloudfront.ListConflictingAliasesOutput, error)
ListConflictingAliasesWithContext(aws.Context, *cloudfront.ListConflictingAliasesInput, ...request.Option) (*cloudfront.ListConflictingAliasesOutput, error)
ListConflictingAliasesRequest(*cloudfront.ListConflictingAliasesInput) (*request.Request, *cloudfront.ListConflictingAliasesOutput)
ListDistributions(*cloudfront.ListDistributionsInput) (*cloudfront.ListDistributionsOutput, error)
ListDistributionsWithContext(aws.Context, *cloudfront.ListDistributionsInput, ...request.Option) (*cloudfront.ListDistributionsOutput, error)
ListDistributionsRequest(*cloudfront.ListDistributionsInput) (*request.Request, *cloudfront.ListDistributionsOutput)
ListDistributionsPages(*cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool) error
ListDistributionsPagesWithContext(aws.Context, *cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool, ...request.Option) error
ListDistributionsByCachePolicyId(*cloudfront.ListDistributionsByCachePolicyIdInput) (*cloudfront.ListDistributionsByCachePolicyIdOutput, error)
ListDistributionsByCachePolicyIdWithContext(aws.Context, *cloudfront.ListDistributionsByCachePolicyIdInput, ...request.Option) (*cloudfront.ListDistributionsByCachePolicyIdOutput, error)
ListDistributionsByCachePolicyIdRequest(*cloudfront.ListDistributionsByCachePolicyIdInput) (*request.Request, *cloudfront.ListDistributionsByCachePolicyIdOutput)
ListDistributionsByKeyGroup(*cloudfront.ListDistributionsByKeyGroupInput) (*cloudfront.ListDistributionsByKeyGroupOutput, error)
ListDistributionsByKeyGroupWithContext(aws.Context, *cloudfront.ListDistributionsByKeyGroupInput, ...request.Option) (*cloudfront.ListDistributionsByKeyGroupOutput, error)
ListDistributionsByKeyGroupRequest(*cloudfront.ListDistributionsByKeyGroupInput) (*request.Request, *cloudfront.ListDistributionsByKeyGroupOutput)
ListDistributionsByOriginRequestPolicyId(*cloudfront.ListDistributionsByOriginRequestPolicyIdInput) (*cloudfront.ListDistributionsByOriginRequestPolicyIdOutput, error)
ListDistributionsByOriginRequestPolicyIdWithContext(aws.Context, *cloudfront.ListDistributionsByOriginRequestPolicyIdInput, ...request.Option) (*cloudfront.ListDistributionsByOriginRequestPolicyIdOutput, error)
ListDistributionsByOriginRequestPolicyIdRequest(*cloudfront.ListDistributionsByOriginRequestPolicyIdInput) (*request.Request, *cloudfront.ListDistributionsByOriginRequestPolicyIdOutput)
ListDistributionsByRealtimeLogConfig(*cloudfront.ListDistributionsByRealtimeLogConfigInput) (*cloudfront.ListDistributionsByRealtimeLogConfigOutput, error)
ListDistributionsByRealtimeLogConfigWithContext(aws.Context, *cloudfront.ListDistributionsByRealtimeLogConfigInput, ...request.Option) (*cloudfront.ListDistributionsByRealtimeLogConfigOutput, error)
ListDistributionsByRealtimeLogConfigRequest(*cloudfront.ListDistributionsByRealtimeLogConfigInput) (*request.Request, *cloudfront.ListDistributionsByRealtimeLogConfigOutput)
ListDistributionsByWebACLId(*cloudfront.ListDistributionsByWebACLIdInput) (*cloudfront.ListDistributionsByWebACLIdOutput, error)
ListDistributionsByWebACLIdWithContext(aws.Context, *cloudfront.ListDistributionsByWebACLIdInput, ...request.Option) (*cloudfront.ListDistributionsByWebACLIdOutput, error)
ListDistributionsByWebACLIdRequest(*cloudfront.ListDistributionsByWebACLIdInput) (*request.Request, *cloudfront.ListDistributionsByWebACLIdOutput)
ListFieldLevelEncryptionConfigs(*cloudfront.ListFieldLevelEncryptionConfigsInput) (*cloudfront.ListFieldLevelEncryptionConfigsOutput, error)
ListFieldLevelEncryptionConfigsWithContext(aws.Context, *cloudfront.ListFieldLevelEncryptionConfigsInput, ...request.Option) (*cloudfront.ListFieldLevelEncryptionConfigsOutput, error)
ListFieldLevelEncryptionConfigsRequest(*cloudfront.ListFieldLevelEncryptionConfigsInput) (*request.Request, *cloudfront.ListFieldLevelEncryptionConfigsOutput)
ListFieldLevelEncryptionProfiles(*cloudfront.ListFieldLevelEncryptionProfilesInput) (*cloudfront.ListFieldLevelEncryptionProfilesOutput, error)
ListFieldLevelEncryptionProfilesWithContext(aws.Context, *cloudfront.ListFieldLevelEncryptionProfilesInput, ...request.Option) (*cloudfront.ListFieldLevelEncryptionProfilesOutput, error)
ListFieldLevelEncryptionProfilesRequest(*cloudfront.ListFieldLevelEncryptionProfilesInput) (*request.Request, *cloudfront.ListFieldLevelEncryptionProfilesOutput)
ListFunctions(*cloudfront.ListFunctionsInput) (*cloudfront.ListFunctionsOutput, error)
ListFunctionsWithContext(aws.Context, *cloudfront.ListFunctionsInput, ...request.Option) (*cloudfront.ListFunctionsOutput, error)
ListFunctionsRequest(*cloudfront.ListFunctionsInput) (*request.Request, *cloudfront.ListFunctionsOutput)
ListInvalidations(*cloudfront.ListInvalidationsInput) (*cloudfront.ListInvalidationsOutput, error)
ListInvalidationsWithContext(aws.Context, *cloudfront.ListInvalidationsInput, ...request.Option) (*cloudfront.ListInvalidationsOutput, error)
ListInvalidationsRequest(*cloudfront.ListInvalidationsInput) (*request.Request, *cloudfront.ListInvalidationsOutput)
ListInvalidationsPages(*cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool) error
ListInvalidationsPagesWithContext(aws.Context, *cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool, ...request.Option) error
ListKeyGroups(*cloudfront.ListKeyGroupsInput) (*cloudfront.ListKeyGroupsOutput, error)
ListKeyGroupsWithContext(aws.Context, *cloudfront.ListKeyGroupsInput, ...request.Option) (*cloudfront.ListKeyGroupsOutput, error)
ListKeyGroupsRequest(*cloudfront.ListKeyGroupsInput) (*request.Request, *cloudfront.ListKeyGroupsOutput)
ListOriginRequestPolicies(*cloudfront.ListOriginRequestPoliciesInput) (*cloudfront.ListOriginRequestPoliciesOutput, error)
ListOriginRequestPoliciesWithContext(aws.Context, *cloudfront.ListOriginRequestPoliciesInput, ...request.Option) (*cloudfront.ListOriginRequestPoliciesOutput, error)
ListOriginRequestPoliciesRequest(*cloudfront.ListOriginRequestPoliciesInput) (*request.Request, *cloudfront.ListOriginRequestPoliciesOutput)
ListPublicKeys(*cloudfront.ListPublicKeysInput) (*cloudfront.ListPublicKeysOutput, error)
ListPublicKeysWithContext(aws.Context, *cloudfront.ListPublicKeysInput, ...request.Option) (*cloudfront.ListPublicKeysOutput, error)
ListPublicKeysRequest(*cloudfront.ListPublicKeysInput) (*request.Request, *cloudfront.ListPublicKeysOutput)
ListRealtimeLogConfigs(*cloudfront.ListRealtimeLogConfigsInput) (*cloudfront.ListRealtimeLogConfigsOutput, error)
ListRealtimeLogConfigsWithContext(aws.Context, *cloudfront.ListRealtimeLogConfigsInput, ...request.Option) (*cloudfront.ListRealtimeLogConfigsOutput, error)
ListRealtimeLogConfigsRequest(*cloudfront.ListRealtimeLogConfigsInput) (*request.Request, *cloudfront.ListRealtimeLogConfigsOutput)
ListStreamingDistributions(*cloudfront.ListStreamingDistributionsInput) (*cloudfront.ListStreamingDistributionsOutput, error)
ListStreamingDistributionsWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, ...request.Option) (*cloudfront.ListStreamingDistributionsOutput, error)
ListStreamingDistributionsRequest(*cloudfront.ListStreamingDistributionsInput) (*request.Request, *cloudfront.ListStreamingDistributionsOutput)
ListStreamingDistributionsPages(*cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool) error
ListStreamingDistributionsPagesWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*cloudfront.ListTagsForResourceInput) (*cloudfront.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *cloudfront.ListTagsForResourceInput, ...request.Option) (*cloudfront.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*cloudfront.ListTagsForResourceInput) (*request.Request, *cloudfront.ListTagsForResourceOutput)
PublishFunction(*cloudfront.PublishFunctionInput) (*cloudfront.PublishFunctionOutput, error)
PublishFunctionWithContext(aws.Context, *cloudfront.PublishFunctionInput, ...request.Option) (*cloudfront.PublishFunctionOutput, error)
PublishFunctionRequest(*cloudfront.PublishFunctionInput) (*request.Request, *cloudfront.PublishFunctionOutput)
TagResource(*cloudfront.TagResourceInput) (*cloudfront.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *cloudfront.TagResourceInput, ...request.Option) (*cloudfront.TagResourceOutput, error)
TagResourceRequest(*cloudfront.TagResourceInput) (*request.Request, *cloudfront.TagResourceOutput)
TestFunction(*cloudfront.TestFunctionInput) (*cloudfront.TestFunctionOutput, error)
TestFunctionWithContext(aws.Context, *cloudfront.TestFunctionInput, ...request.Option) (*cloudfront.TestFunctionOutput, error)
TestFunctionRequest(*cloudfront.TestFunctionInput) (*request.Request, *cloudfront.TestFunctionOutput)
UntagResource(*cloudfront.UntagResourceInput) (*cloudfront.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *cloudfront.UntagResourceInput, ...request.Option) (*cloudfront.UntagResourceOutput, error)
UntagResourceRequest(*cloudfront.UntagResourceInput) (*request.Request, *cloudfront.UntagResourceOutput)
UpdateCachePolicy(*cloudfront.UpdateCachePolicyInput) (*cloudfront.UpdateCachePolicyOutput, error)
UpdateCachePolicyWithContext(aws.Context, *cloudfront.UpdateCachePolicyInput, ...request.Option) (*cloudfront.UpdateCachePolicyOutput, error)
UpdateCachePolicyRequest(*cloudfront.UpdateCachePolicyInput) (*request.Request, *cloudfront.UpdateCachePolicyOutput)
UpdateCloudFrontOriginAccessIdentity(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error)
UpdateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.UpdateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error)
UpdateCloudFrontOriginAccessIdentityRequest(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.UpdateCloudFrontOriginAccessIdentityOutput)
UpdateDistribution(*cloudfront.UpdateDistributionInput) (*cloudfront.UpdateDistributionOutput, error)
UpdateDistributionWithContext(aws.Context, *cloudfront.UpdateDistributionInput, ...request.Option) (*cloudfront.UpdateDistributionOutput, error)
UpdateDistributionRequest(*cloudfront.UpdateDistributionInput) (*request.Request, *cloudfront.UpdateDistributionOutput)
UpdateFieldLevelEncryptionConfig(*cloudfront.UpdateFieldLevelEncryptionConfigInput) (*cloudfront.UpdateFieldLevelEncryptionConfigOutput, error)
UpdateFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.UpdateFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.UpdateFieldLevelEncryptionConfigOutput, error)
UpdateFieldLevelEncryptionConfigRequest(*cloudfront.UpdateFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.UpdateFieldLevelEncryptionConfigOutput)
UpdateFieldLevelEncryptionProfile(*cloudfront.UpdateFieldLevelEncryptionProfileInput) (*cloudfront.UpdateFieldLevelEncryptionProfileOutput, error)
UpdateFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.UpdateFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.UpdateFieldLevelEncryptionProfileOutput, error)
UpdateFieldLevelEncryptionProfileRequest(*cloudfront.UpdateFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.UpdateFieldLevelEncryptionProfileOutput)
UpdateFunction(*cloudfront.UpdateFunctionInput) (*cloudfront.UpdateFunctionOutput, error)
UpdateFunctionWithContext(aws.Context, *cloudfront.UpdateFunctionInput, ...request.Option) (*cloudfront.UpdateFunctionOutput, error)
UpdateFunctionRequest(*cloudfront.UpdateFunctionInput) (*request.Request, *cloudfront.UpdateFunctionOutput)
UpdateKeyGroup(*cloudfront.UpdateKeyGroupInput) (*cloudfront.UpdateKeyGroupOutput, error)
UpdateKeyGroupWithContext(aws.Context, *cloudfront.UpdateKeyGroupInput, ...request.Option) (*cloudfront.UpdateKeyGroupOutput, error)
UpdateKeyGroupRequest(*cloudfront.UpdateKeyGroupInput) (*request.Request, *cloudfront.UpdateKeyGroupOutput)
UpdateOriginRequestPolicy(*cloudfront.UpdateOriginRequestPolicyInput) (*cloudfront.UpdateOriginRequestPolicyOutput, error)
UpdateOriginRequestPolicyWithContext(aws.Context, *cloudfront.UpdateOriginRequestPolicyInput, ...request.Option) (*cloudfront.UpdateOriginRequestPolicyOutput, error)
UpdateOriginRequestPolicyRequest(*cloudfront.UpdateOriginRequestPolicyInput) (*request.Request, *cloudfront.UpdateOriginRequestPolicyOutput)
UpdatePublicKey(*cloudfront.UpdatePublicKeyInput) (*cloudfront.UpdatePublicKeyOutput, error)
UpdatePublicKeyWithContext(aws.Context, *cloudfront.UpdatePublicKeyInput, ...request.Option) (*cloudfront.UpdatePublicKeyOutput, error)
UpdatePublicKeyRequest(*cloudfront.UpdatePublicKeyInput) (*request.Request, *cloudfront.UpdatePublicKeyOutput)
UpdateRealtimeLogConfig(*cloudfront.UpdateRealtimeLogConfigInput) (*cloudfront.UpdateRealtimeLogConfigOutput, error)
UpdateRealtimeLogConfigWithContext(aws.Context, *cloudfront.UpdateRealtimeLogConfigInput, ...request.Option) (*cloudfront.UpdateRealtimeLogConfigOutput, error)
UpdateRealtimeLogConfigRequest(*cloudfront.UpdateRealtimeLogConfigInput) (*request.Request, *cloudfront.UpdateRealtimeLogConfigOutput)
UpdateStreamingDistribution(*cloudfront.UpdateStreamingDistributionInput) (*cloudfront.UpdateStreamingDistributionOutput, error)
UpdateStreamingDistributionWithContext(aws.Context, *cloudfront.UpdateStreamingDistributionInput, ...request.Option) (*cloudfront.UpdateStreamingDistributionOutput, error)
UpdateStreamingDistributionRequest(*cloudfront.UpdateStreamingDistributionInput) (*request.Request, *cloudfront.UpdateStreamingDistributionOutput)
WaitUntilDistributionDeployed(*cloudfront.GetDistributionInput) error
WaitUntilDistributionDeployedWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.WaiterOption) error
WaitUntilInvalidationCompleted(*cloudfront.GetInvalidationInput) error
WaitUntilInvalidationCompletedWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.WaiterOption) error
WaitUntilStreamingDistributionDeployed(*cloudfront.GetStreamingDistributionInput) error
WaitUntilStreamingDistributionDeployedWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.WaiterOption) error
}
var _ CloudFrontAPI = (*cloudfront.CloudFront)(nil)
| 426 |
session-manager-plugin | aws | Go | package sign
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/url"
"strings"
"time"
"unicode"
)
// An AWSEpochTime wraps a time value providing JSON serialization needed for
// AWS Policy epoch time fields.
type AWSEpochTime struct {
time.Time
}
// NewAWSEpochTime returns a new AWSEpochTime pointer wrapping the Go time provided.
func NewAWSEpochTime(t time.Time) *AWSEpochTime {
return &AWSEpochTime{t}
}
// MarshalJSON serializes the epoch time as AWS Profile epoch time.
func (t AWSEpochTime) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`{"AWS:EpochTime":%d}`, t.UTC().Unix())), nil
}
// UnmarshalJSON unserializes AWS Profile epoch time.
func (t *AWSEpochTime) UnmarshalJSON(data []byte) error {
var epochTime struct {
Sec int64 `json:"AWS:EpochTime"`
}
err := json.Unmarshal(data, &epochTime)
if err != nil {
return err
}
t.Time = time.Unix(epochTime.Sec, 0).UTC()
return nil
}
// An IPAddress wraps an IPAddress source IP providing JSON serialization information
type IPAddress struct {
SourceIP string `json:"AWS:SourceIp"`
}
// A Condition defines the restrictions for how a signed URL can be used.
type Condition struct {
// Optional IP address mask the signed URL must be requested from.
IPAddress *IPAddress `json:"IpAddress,omitempty"`
// Optional date that the signed URL cannot be used until. It is invalid
// to make requests with the signed URL prior to this date.
DateGreaterThan *AWSEpochTime `json:",omitempty"`
// Required date that the signed URL will expire. A DateLessThan is required
// sign cloud front URLs
DateLessThan *AWSEpochTime `json:",omitempty"`
}
// A Statement is a collection of conditions for resources
type Statement struct {
// The Web or RTMP resource the URL will be signed for
Resource string
// The set of conditions for this resource
Condition Condition
}
// A Policy defines the resources that a signed will be signed for.
//
// See the following page for more information on how policies are constructed.
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html#private-content-custom-policy-statement
type Policy struct {
// List of resource and condition statements.
// Signed URLs should only provide a single statement.
Statements []Statement `json:"Statement"`
}
// Override for testing to mock out usage of crypto/rand.Reader
var randReader = rand.Reader
// Sign will sign a policy using an RSA private key. It will return a base 64
// encoded signature and policy if no error is encountered.
//
// The signature and policy should be added to the signed URL following the
// guidelines in:
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
func (p *Policy) Sign(privKey *rsa.PrivateKey) (b64Signature, b64Policy []byte, err error) {
if err = p.Validate(); err != nil {
return nil, nil, err
}
// Build and escape the policy
b64Policy, jsonPolicy, err := encodePolicy(p)
if err != nil {
return nil, nil, err
}
awsEscapeEncoded(b64Policy)
// Build and escape the signature
b64Signature, err = signEncodedPolicy(randReader, jsonPolicy, privKey)
if err != nil {
return nil, nil, err
}
awsEscapeEncoded(b64Signature)
return b64Signature, b64Policy, nil
}
// Validate verifies that the policy is valid and usable, and returns an
// error if there is a problem.
func (p *Policy) Validate() error {
if len(p.Statements) == 0 {
return fmt.Errorf("at least one policy statement is required")
}
for i, s := range p.Statements {
if s.Resource == "" {
return fmt.Errorf("statement at index %d does not have a resource", i)
}
if !isASCII(s.Resource) {
return fmt.Errorf("unable to sign resource, [%s]. "+
"Resources must only contain ascii characters. "+
"Hostnames with unicode should be encoded as Punycode, (e.g. golang.org/x/net/idna), "+
"and URL unicode path/query characters should be escaped.", s.Resource)
}
}
return nil
}
// CreateResource constructs, validates, and returns a resource URL string. An
// error will be returned if unable to create the resource string.
func CreateResource(scheme, u string) (string, error) {
scheme = strings.ToLower(scheme)
if scheme == "http" || scheme == "https" || scheme == "http*" || scheme == "*" {
return u, nil
}
if scheme == "rtmp" {
parsed, err := url.Parse(u)
if err != nil {
return "", fmt.Errorf("unable to parse rtmp URL, err: %s", err)
}
rtmpURL := strings.TrimLeft(parsed.Path, "/")
if parsed.RawQuery != "" {
rtmpURL = fmt.Sprintf("%s?%s", rtmpURL, parsed.RawQuery)
}
return rtmpURL, nil
}
return "", fmt.Errorf("invalid URL scheme must be http, https, or rtmp. Provided: %s", scheme)
}
// NewCannedPolicy returns a new Canned Policy constructed using the resource
// and expires time. This can be used to generate the basic model for a Policy
// that can be then augmented with additional conditions.
//
// See the following page for more information on how policies are constructed.
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html#private-content-custom-policy-statement
func NewCannedPolicy(resource string, expires time.Time) *Policy {
return &Policy{
Statements: []Statement{
{
Resource: resource,
Condition: Condition{
DateLessThan: NewAWSEpochTime(expires),
},
},
},
}
}
// encodePolicy encodes the Policy as JSON and also base 64 encodes it.
func encodePolicy(p *Policy) (b64Policy, jsonPolicy []byte, err error) {
jsonPolicy, err = encodePolicyJSON(p)
if err != nil {
return nil, nil, fmt.Errorf("failed to encode policy, %s", err.Error())
}
// Remove leading and trailing white space, JSON encoding will note include
// whitespace within the encoding.
jsonPolicy = bytes.TrimSpace(jsonPolicy)
b64Policy = make([]byte, base64.StdEncoding.EncodedLen(len(jsonPolicy)))
base64.StdEncoding.Encode(b64Policy, jsonPolicy)
return b64Policy, jsonPolicy, nil
}
// signEncodedPolicy will sign and base 64 encode the JSON encoded policy.
func signEncodedPolicy(randReader io.Reader, jsonPolicy []byte, privKey *rsa.PrivateKey) ([]byte, error) {
hash := sha1.New()
if _, err := bytes.NewReader(jsonPolicy).WriteTo(hash); err != nil {
return nil, fmt.Errorf("failed to calculate signing hash, %s", err.Error())
}
sig, err := rsa.SignPKCS1v15(randReader, privKey, crypto.SHA1, hash.Sum(nil))
if err != nil {
return nil, fmt.Errorf("failed to sign policy, %s", err.Error())
}
b64Sig := make([]byte, base64.StdEncoding.EncodedLen(len(sig)))
base64.StdEncoding.Encode(b64Sig, sig)
return b64Sig, nil
}
// special characters to be replaced with awsEscapeEncoded
var invalidEncodedChar = map[byte]byte{
'+': '-',
'=': '_',
'/': '~',
}
// awsEscapeEncoded will replace base64 encoding's special characters to be URL safe.
func awsEscapeEncoded(b []byte) {
for i, v := range b {
if r, ok := invalidEncodedChar[v]; ok {
b[i] = r
}
}
}
func isASCII(u string) bool {
for _, c := range u {
if c > unicode.MaxASCII {
return false
}
}
return true
}
| 239 |
session-manager-plugin | aws | Go | // +build !go1.7
package sign
import (
"bytes"
"encoding/json"
)
func encodePolicyJSON(p *Policy) ([]byte, error) {
src, err := json.Marshal(p)
// Convert \u0026 back to &
return bytes.Replace(src, []byte("\\u0026"), []byte("&"), -1), err
}
| 15 |
session-manager-plugin | aws | Go | // +build go1.7
package sign
import (
"bytes"
"encoding/json"
)
func encodePolicyJSON(p *Policy) ([]byte, error) {
buffer := &bytes.Buffer{}
encoder := json.NewEncoder(buffer)
encoder.SetEscapeHTML(false)
err := encoder.Encode(p)
return buffer.Bytes(), err
}
| 17 |
session-manager-plugin | aws | Go | package sign
import (
"bytes"
"crypto"
"crypto/rsa"
"crypto/sha1"
"encoding/base64"
"encoding/json"
"fmt"
"math/rand"
"strings"
"testing"
"time"
)
func TestEpochTimeMarshal(t *testing.T) {
v := AWSEpochTime{time.Now()}
b, err := v.MarshalJSON()
if err != nil {
t.Fatalf("Unexpected error, %#v", err)
}
expected := fmt.Sprintf(`{"AWS:EpochTime":%d}`, v.UTC().Unix())
if string(b) != expected {
t.Errorf("Expected marshaled time to match, expect: %s, actual: %s",
expected, string(b))
}
}
func TestEpochTimeUnmarshal(t *testing.T) {
now := time.Now().Round(time.Second)
data := fmt.Sprintf(`{"AWS:EpochTime":%d}`, now.Unix())
var v AWSEpochTime
err := json.Unmarshal([]byte(data), &v)
if err != nil {
t.Fatalf("Unexpected error, %#v", err)
}
expected := now.UTC()
if v.Time != expected {
t.Errorf("Expected unmarshaled time to match, expect: %s, actual: %s",
expected, v.Time)
}
}
var testCreateResource = []struct {
scheme, u string
expect string
errPrefix string
}{
{
"https", "https://example.com/a?b=1&c=2",
"https://example.com/a?b=1&c=2", "",
},
{
"https", "https://example.com/a?b=1",
"https://example.com/a?b=1", "",
},
{
"http", "http*://example.com/a?b=1",
"http*://example.com/a?b=1", "",
},
{
"rtmp", "https://example.com/a?b=1",
"a?b=1", "",
},
{
"rtmp", "https://example.com/a?b=1&c=2",
"a?b=1&c=2", "",
},
{
"ftp", "ftp://example.com/a?b=1",
"", "invalid URL scheme",
},
}
func TestCreateResource(t *testing.T) {
for i, v := range testCreateResource {
r, err := CreateResource(v.scheme, v.u)
if err != nil {
if v.errPrefix == "" {
t.Errorf("%d, Unexpected error %s", i, err.Error())
continue
}
if !strings.HasPrefix(err.Error(), v.errPrefix) {
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.errPrefix, err.Error())
continue
}
} else if v.errPrefix != "" {
t.Errorf("%d, Expected error %s", i, v.errPrefix)
continue
}
if v.expect != r {
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.expect, r)
}
}
}
var testTime = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
func TestEncodePolicy(t *testing.T) {
const (
expectedJSONPolicy = `{"Statement":[{"Resource":"https://example.com/a","Condition":{"DateLessThan":{"AWS:EpochTime":1257894000}}}]}`
expectedB64Policy = `eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9hIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk0MDAwfX19XX0=`
)
p := NewCannedPolicy("https://example.com/a", testTime)
b64Policy, jsonPolicy, err := encodePolicy(p)
if err != nil {
t.Fatalf("Unexpected error, %#v", err)
}
if string(jsonPolicy) != expectedJSONPolicy {
t.Errorf("Expected json encoding to match, \nexpect: %s\nactual: %s\n", expectedJSONPolicy, jsonPolicy)
}
if string(b64Policy) != expectedB64Policy {
t.Errorf("Expected b64 encoding to match, \nexpect: %s\nactual: %s\n", expectedB64Policy, b64Policy)
}
}
func TestEncodePolicyWithQueryParams(t *testing.T) {
const (
expectedJSONPolicy = `{"Statement":[{"Resource":"https://example.com/a?b=1&c=2","Condition":{"DateLessThan":{"AWS:EpochTime":1257894000}}}]}`
expectedB64Policy = `eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9hP2I9MSZjPTIiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ==`
)
p := NewCannedPolicy("https://example.com/a?b=1&c=2", testTime)
b64Policy, jsonPolicy, err := encodePolicy(p)
if err != nil {
t.Fatalf("Unexpected error, %#v", err)
}
if string(jsonPolicy) != expectedJSONPolicy {
t.Errorf("Expected json encoding to match, \nexpect: %s\nactual: %s\n", expectedJSONPolicy, jsonPolicy)
}
if string(b64Policy) != expectedB64Policy {
t.Errorf("Expected b64 encoding to match, \nexpect: %s\nactual: %s\n", expectedB64Policy, b64Policy)
}
}
func TestSignEncodedPolicy(t *testing.T) {
p := NewCannedPolicy("https://example.com/a", testTime)
_, jsonPolicy, err := encodePolicy(p)
if err != nil {
t.Fatalf("Unexpected policy encode error, %#v", err)
}
r := newRandomReader(rand.New(rand.NewSource(1)))
privKey, err := rsa.GenerateKey(r, 1024)
if err != nil {
t.Fatalf("Unexpected priv key error, %#v", err)
}
b64Signature, err := signEncodedPolicy(r, jsonPolicy, privKey)
if err != nil {
t.Fatalf("Unexpected policy sign error, %#v", err)
}
hash := sha1.New()
if _, err = bytes.NewReader(jsonPolicy).WriteTo(hash); err != nil {
t.Fatalf("Unexpected hash error, %#v", err)
}
decodedSig, err := base64.StdEncoding.DecodeString(string(b64Signature))
if err != nil {
t.Fatalf("Unexpected base64 decode signature, %#v", err)
}
if err := rsa.VerifyPKCS1v15(&privKey.PublicKey, crypto.SHA1, hash.Sum(nil), decodedSig); err != nil {
t.Fatalf("Unable to verify signature, %#v", err)
}
}
func TestAWSEscape(t *testing.T) {
expect := "a-b_c~"
actual := []byte("a+b=c/")
awsEscapeEncoded(actual)
if string(actual) != expect {
t.Errorf("expect: %s, actual: %s", expect, string(actual))
}
}
| 187 |
session-manager-plugin | aws | Go | package sign
import (
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"io"
"io/ioutil"
"os"
)
// LoadPEMPrivKeyFile reads a PEM encoded RSA private key from the file name.
// A new RSA private key will be returned if no error.
func LoadPEMPrivKeyFile(name string) (*rsa.PrivateKey, error) {
file, err := os.Open(name)
if err != nil {
return nil, err
}
defer file.Close()
return LoadPEMPrivKey(file)
}
// LoadPEMPrivKey reads a PEM encoded RSA private key from the io.Reader.
// A new RSA private key will be returned if no error.
func LoadPEMPrivKey(reader io.Reader) (*rsa.PrivateKey, error) {
block, err := loadPem(reader)
if err != nil {
return nil, err
}
return x509.ParsePKCS1PrivateKey(block.Bytes)
}
// LoadEncryptedPEMPrivKey decrypts the PEM encoded private key using the
// password provided returning a RSA private key. If the PEM data is invalid,
// or unable to decrypt an error will be returned.
func LoadEncryptedPEMPrivKey(reader io.Reader, password []byte) (*rsa.PrivateKey, error) {
block, err := loadPem(reader)
if err != nil {
return nil, err
}
decryptedBlock, err := x509.DecryptPEMBlock(block, password)
if err != nil {
return nil, err
}
return x509.ParsePKCS1PrivateKey(decryptedBlock)
}
func loadPem(reader io.Reader) (*pem.Block, error) {
b, err := ioutil.ReadAll(reader)
if err != nil {
return nil, err
}
block, _ := pem.Decode(b)
if block == nil {
// pem.Decode will set block to nil if there is no PEM data in the input
// the second parameter will contain the provided bytes that failed
// to be decoded.
return nil, fmt.Errorf("no valid PEM data provided")
}
return block, nil
}
| 69 |
session-manager-plugin | aws | Go | package sign
import (
"bytes"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"io"
"math/rand"
"strings"
"testing"
)
func generatePEM(randReader io.Reader, password []byte) (buf *bytes.Buffer, err error) {
k, err := rsa.GenerateKey(randReader, 1024)
if err != nil {
return nil, err
}
derBytes := x509.MarshalPKCS1PrivateKey(k)
var block *pem.Block
if password != nil {
block, err = x509.EncryptPEMBlock(randReader, "RSA PRIVATE KEY", derBytes, password, x509.PEMCipherAES128)
} else {
block = &pem.Block{
Type: "RSA PRIVATE KEY",
Bytes: derBytes,
}
}
buf = &bytes.Buffer{}
err = pem.Encode(buf, block)
return buf, err
}
func TestLoadPemPrivKey(t *testing.T) {
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), nil)
if err != nil {
t.Errorf("Unexpected pem generation err %s", err.Error())
}
privKey, err := LoadPEMPrivKey(reader)
if err != nil {
t.Errorf("Unexpected key load error, %s", err.Error())
}
if privKey == nil {
t.Errorf("Expected valid privKey, but got nil")
}
}
func TestLoadPemPrivKeyInvalidPEM(t *testing.T) {
reader := strings.NewReader("invalid PEM data")
privKey, err := LoadPEMPrivKey(reader)
if err == nil {
t.Errorf("Expected error invalid PEM data error")
}
if privKey != nil {
t.Errorf("Expected nil privKey but got %#v", privKey)
}
}
func TestLoadEncryptedPEMPrivKey(t *testing.T) {
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), []byte("password"))
if err != nil {
t.Errorf("Unexpected pem generation err %s", err.Error())
}
privKey, err := LoadEncryptedPEMPrivKey(reader, []byte("password"))
if err != nil {
t.Errorf("Unexpected key load error, %s", err.Error())
}
if privKey == nil {
t.Errorf("Expected valid privKey, but got nil")
}
}
func TestLoadEncryptedPEMPrivKeyWrongPassword(t *testing.T) {
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), []byte("password"))
privKey, err := LoadEncryptedPEMPrivKey(reader, []byte("wrong password"))
if err == nil {
t.Errorf("Expected error invalid PEM data error")
}
if privKey != nil {
t.Errorf("Expected nil privKey but got %#v", privKey)
}
}
| 91 |
session-manager-plugin | aws | Go | package sign
import (
"bytes"
"encoding/binary"
"math/rand"
)
// A randomReader wraps a math/rand.Rand within an reader so that it can used
// as a predictable testing replacement for crypto/rand.Reader
type randomReader struct {
b *bytes.Buffer
r *rand.Rand
}
// newRandomReader returns a new instance of the random reader
func newRandomReader(r *rand.Rand) *randomReader {
return &randomReader{b: &bytes.Buffer{}, r: r}
}
// Read will read random bytes from up to the length of b.
func (m *randomReader) Read(b []byte) (int, error) {
for i := 0; i < len(b); {
binary.Write(m.b, binary.LittleEndian, m.r.Int63())
n, _ := m.b.Read(b[i:])
i += n
}
return len(b), nil
}
| 31 |
session-manager-plugin | aws | Go | package sign
import (
"crypto/rsa"
"fmt"
"net/http"
"strings"
"time"
)
const (
// CookiePolicyName name of the policy cookie
CookiePolicyName = "CloudFront-Policy"
// CookieSignatureName name of the signature cookie
CookieSignatureName = "CloudFront-Signature"
// CookieKeyIDName name of the signing Key ID cookie
CookieKeyIDName = "CloudFront-Key-Pair-Id"
)
// A CookieOptions optional additional options that can be applied to the signed
// cookies.
type CookieOptions struct {
Path string
Domain string
Secure bool
}
// apply will integration the options provided into the base cookie options
// a new copy will be returned. The base CookieOption will not be modified.
func (o CookieOptions) apply(opts ...func(*CookieOptions)) CookieOptions {
if len(opts) == 0 {
return o
}
for _, opt := range opts {
opt(&o)
}
return o
}
// A CookieSigner provides signing utilities to sign Cookies for Amazon CloudFront
// resources. Using a private key and Credential Key Pair key ID the CookieSigner
// only needs to be created once per Credential Key Pair key ID and private key.
//
// More information about signed Cookies and their structure can be found at:
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html
//
// To sign a Cookie, create a CookieSigner with your private key and credential
// pair key ID. Once you have a CookieSigner instance you can call Sign or
// SignWithPolicy to sign the URLs.
//
// The signer is safe to use concurrently, but the optional cookies options
// are not safe to modify concurrently.
type CookieSigner struct {
keyID string
privKey *rsa.PrivateKey
Opts CookieOptions
}
// NewCookieSigner constructs and returns a new CookieSigner to be used to for
// signing Amazon CloudFront URL resources with.
func NewCookieSigner(keyID string, privKey *rsa.PrivateKey, opts ...func(*CookieOptions)) *CookieSigner {
signer := &CookieSigner{
keyID: keyID,
privKey: privKey,
Opts: CookieOptions{}.apply(opts...),
}
return signer
}
// Sign returns the cookies needed to allow user agents to make arbetrary
// requests to cloudfront for the resource(s) defined by the policy.
//
// Sign will create a CloudFront policy with only a resource and condition of
// DateLessThan equal to the expires time provided.
//
// The returned slice cookies should all be added to the Client's cookies or
// server's response.
//
// Example:
// s := sign.NewCookieSigner(keyID, privKey)
//
// // Get Signed cookies for a resource that will expire in 1 hour
// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour))
// if err != nil {
// fmt.Println("failed to create signed cookies", err)
// return
// }
//
// // Or get Signed cookies for a resource that will expire in 1 hour
// // and set path and domain of cookies
// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour), func(o *sign.CookieOptions) {
// o.Path = "/"
// o.Domain = ".example.com"
// })
// if err != nil {
// fmt.Println("failed to create signed cookies", err)
// return
// }
//
// // Server Response via http.ResponseWriter
// for _, c := range cookies {
// http.SetCookie(w, c)
// }
//
// // Client request via the cookie jar
// if client.CookieJar != nil {
// for _, c := range cookies {
// client.Cookie(w, c)
// }
// }
func (s CookieSigner) Sign(u string, expires time.Time, opts ...func(*CookieOptions)) ([]*http.Cookie, error) {
scheme, err := cookieURLScheme(u)
if err != nil {
return nil, err
}
resource, err := CreateResource(scheme, u)
if err != nil {
return nil, err
}
p := NewCannedPolicy(resource, expires)
return createCookies(p, s.keyID, s.privKey, s.Opts.apply(opts...))
}
// Returns and validates the URL's scheme.
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html#private-content-custom-policy-statement-cookies
func cookieURLScheme(u string) (string, error) {
parts := strings.SplitN(u, "://", 2)
if len(parts) != 2 {
return "", fmt.Errorf("invalid cookie URL, missing scheme")
}
scheme := strings.ToLower(parts[0])
if scheme != "http" && scheme != "https" && scheme != "http*" {
return "", fmt.Errorf("invalid cookie URL scheme. Expect http, https, or http*. Go, %s", scheme)
}
return scheme, nil
}
// SignWithPolicy returns the cookies needed to allow user agents to make
// arbetrairy requets to cloudfront for the resource(s) defined by the policy.
//
// The returned slice cookies should all be added to the Client's cookies or
// server's response.
//
// Example:
// s := sign.NewCookieSigner(keyID, privKey)
//
// policy := &sign.Policy{
// Statements: []sign.Statement{
// {
// // Read the provided documentation on how to set this
// // correctly, you'll probably want to use wildcards.
// Resource: rawCloudFrontURL,
// Condition: sign.Condition{
// // Optional IP source address range
// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"},
// // Optional date URL is not valid until
// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)},
// // Required date the URL will expire after
// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)},
// },
// },
// },
// }
//
// // Get Signed cookies for a resource that will expire in 1 hour
// cookies, err := s.SignWithPolicy(policy)
// if err != nil {
// fmt.Println("failed to create signed cookies", err)
// return
// }
//
// // Or get Signed cookies for a resource that will expire in 1 hour
// // and set path and domain of cookies
// cookies, err := s.SignWithPolicy(policy, func(o *sign.CookieOptions) {
// o.Path = "/"
// o.Domain = ".example.com"
// })
// if err != nil {
// fmt.Println("failed to create signed cookies", err)
// return
// }
//
// // Server Response via http.ResponseWriter
// for _, c := range cookies {
// http.SetCookie(w, c)
// }
//
// // Client request via the cookie jar
// if client.CookieJar != nil {
// for _, c := range cookies {
// client.Cookie(w, c)
// }
// }
func (s CookieSigner) SignWithPolicy(p *Policy, opts ...func(*CookieOptions)) ([]*http.Cookie, error) {
return createCookies(p, s.keyID, s.privKey, s.Opts.apply(opts...))
}
// Prepares the cookies to be attached to the header. An (optional) options
// struct is provided in case people don't want to manually edit their cookies.
func createCookies(p *Policy, keyID string, privKey *rsa.PrivateKey, opt CookieOptions) ([]*http.Cookie, error) {
b64Sig, b64Policy, err := p.Sign(privKey)
if err != nil {
return nil, err
}
// Creates proper cookies
cPolicy := &http.Cookie{
Name: CookiePolicyName,
Value: string(b64Policy),
HttpOnly: true,
}
cSignature := &http.Cookie{
Name: CookieSignatureName,
Value: string(b64Sig),
HttpOnly: true,
}
cKey := &http.Cookie{
Name: CookieKeyIDName,
Value: keyID,
HttpOnly: true,
}
cookies := []*http.Cookie{cPolicy, cSignature, cKey}
// Applie the cookie options
for _, c := range cookies {
c.Path = opt.Path
c.Domain = opt.Domain
c.Secure = opt.Secure
}
return cookies, nil
}
| 242 |
session-manager-plugin | aws | Go | package sign
import (
"fmt"
"io"
"net/http"
"time"
"github.com/aws/aws-sdk-go/awstesting/mock"
)
func examplePEMReader() io.Reader {
reader, err := generatePEM(randReader, nil)
if err != nil {
panic(fmt.Sprintf("Unexpected pem generation err %v", err))
}
return reader
}
func ExampleCookieSigner_Sign() {
// Load your private key so it can be used by the CookieSigner
// To load private key from file use `sign.LoadPEMPrivKeyFile`.
privKey := mock.RSAPrivateKey
cookieSigner := NewCookieSigner("keyID", privKey)
// Use the signer to sign the URL
cookies, err := cookieSigner.Sign("http://example.com/somepath/*", testSignTime.Add(30*time.Minute))
if err != nil {
fmt.Println("failed to sign cookies with policy,", err)
return
}
printExampleCookies(cookies)
// Output:
// Cookies:
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL3NvbWVwYXRoLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTU4MDB9fX1dfQ__, , , false
// CloudFront-Signature: Gx67J8t1VanOFWN84BQlpN064aGCicJv916esnPr9Rdb2RKEzl7VoDOsh9Uez7SY5blWATkN5F3xNicTpOupdN-ywrTf5zCTLz5RmvLrIyEDS3Y1knTGoWvp6nnIb9FOuI1rSyBaJ8VKuNVQGmvqzXGXsnipgSBPjpkL6Ja3dBXeKIbUeaLKQBZrtMWv9nS5VyG4nOP-CRcTgQ5DA3-h~WP2ZzhONb6yoYXeOSvBu8HBl0IZI27InLpxiKlkWUchNncnkZ32Md0CwLLrA4wxFl0fYsxxg6Us2XBYRGmudugJHgkkopem9Cc4eOiDGMABcJGAuZprVXT0WuOBYJngTA__, , , false
// CloudFront-Key-Pair-Id: keyID, , , false
}
func ExampleCookieSigner_SignWithPolicy() {
// Sign cookie to be valid for 30 minutes from now, expires one hour
// from now, and restricted to the 192.0.2.0/24 IP address range.
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html
p := &Policy{
// Only a single policy statement can be used with CloudFront
// cookie signatures.
Statements: []Statement{{
// Read the provided documentation on how to set this correctly,
// you'll probably want to use wildcards
Resource: "http://sub.cloudfront.com",
Condition: Condition{
// Optional IP source address range
IPAddress: &IPAddress{SourceIP: "192.0.2.0/24"},
// Optional date URL is not valid until
DateGreaterThan: &AWSEpochTime{testSignTime.Add(30 * time.Minute)},
// Required date the URL will expire after
DateLessThan: &AWSEpochTime{testSignTime.Add(1 * time.Hour)},
},
},
},
}
// Load your private key so it can be used by the CookieSigner
// To load private key from file use `sign.LoadPEMPrivKeyFile`.
privKey := mock.RSAPrivateKey
// Key ID that represents the key pair associated with the private key
keyID := "privateKeyID"
// Set credentials to the CookieSigner.
cookieSigner := NewCookieSigner(keyID, privKey)
// Avoid adding an Expire or MaxAge. See provided AWS Documentation for
// more info.
cookies, err := cookieSigner.SignWithPolicy(p)
if err != nil {
fmt.Println("failed to sign cookies with policy,", err)
return
}
printExampleCookies(cookies)
// Output:
// Cookies:
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3N1Yi5jbG91ZGZyb250LmNvbSIsIkNvbmRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiMTkyLjAuMi4wLzI0In0sIkRhdGVHcmVhdGVyVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk1ODAwfSwiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTc2MDB9fX1dfQ__, , , false
// CloudFront-Signature: Ixn4bF1LLrLcB8XG-t5bZbIB0vfwSF2s4gkef~PcNBdx73MVvZD3v8DZ5GzcqNrybMiqdYJY5KqK6vTsf5JXDgwFFz-h98wdsbV-izcuonPdzMHp4Ay4qyXM6Ed5jB9dUWYGwMkA6rsWXpftfX8xmk4tG1LwFuJV6nAsx4cfpuKwo4vU2Hyr2-fkA7MZG8AHkpDdVUnjm1q-Re9HdG0nCq-2lnBAdOchBpJt37narOj-Zg6cbx~6rzQLVQd8XIv-Bn7VTc1tkBAJVtGOHb0q~PLzSRmtNGYTnpL0z~gp3tq8lhZc2HuvJW5-tZaYP9yufeIzk5bqsT6DT4iDuclKKw__, , , false
// CloudFront-Key-Pair-Id: privateKeyID, , , false
}
func ExampleCookieOptions() {
privKey := mock.RSAPrivateKey
// Create the CookieSigner with options set. These options can be set
// directly with cookieSigner.Opts. These values can be overridden on
// individual Sign and SignWithProfile calls.
cookieSigner := NewCookieSigner("keyID", privKey, func(o *CookieOptions) {
//provide an optional struct fields to specify other options
o.Path = "/"
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html
o.Domain = ".cNameAssociatedWithMyDistribution.com"
// Make sure your app/site can handle https payloads, otherwise
// set this to false.
o.Secure = true
})
// Use the signer to sign the URL
cookies, err := cookieSigner.Sign("http*://*", testSignTime.Add(30*time.Minute), func(o *CookieOptions) {
o.Path = "/mypath/"
})
if err != nil {
fmt.Println("failed to sign cookies with policy,", err)
return
}
printExampleCookies(cookies)
// Output:
// Cookies:
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk1ODAwfX19XX0_, /mypath/, .cNameAssociatedWithMyDistribution.com, true
// CloudFront-Signature: DBXEcU6NoyAelecgEcr6mE1IHCqqlHdGwAC2X1dYn0QOLZ8Ar~oehlMub~hEh~UEMijR15ii-yUYf-3ML0b1SwWkh4rTa-SFURWDVuu~vW3cQzRZ4wQrgDR3DGJINrtGtEsDSzA6zdwtZsfvc1W9IRPn9rnVmwDdUurSrcp9M7CdcjkEw9Au~gULX7aUuW87DI5GI7jLo6emmBB1p4V~xAv8rDqOyxdhBzWKDTvl6ErIXnzHitgMclNZrkn-m27BhTQsJOs2R~gT2VrQw-IWX6NMD8r0TDH4DE2HQ8N7jZ0nf8gezbyFk-OhD1P9FUNb1PlwcZWfXtfgHQmM-BmrSQ__, /mypath/, .cNameAssociatedWithMyDistribution.com, true
// CloudFront-Key-Pair-Id: keyID, /mypath/, .cNameAssociatedWithMyDistribution.com, true
}
func printExampleCookies(cookies []*http.Cookie) {
fmt.Println("Cookies:")
for _, c := range cookies {
fmt.Printf("%s: %s, %s, %s, %t\n", c.Name, c.Value, c.Path, c.Domain, c.Secure)
}
}
| 133 |
session-manager-plugin | aws | Go | package sign
import (
"crypto/rsa"
"testing"
"time"
)
func TestNewCookieSigner(t *testing.T) {
privKey, err := rsa.GenerateKey(randReader, 1024)
if err != nil {
t.Fatalf("Unexpected priv key error, %#v", err)
}
signer := NewCookieSigner("keyID", privKey)
if e, a := "keyID", signer.keyID; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := privKey, signer.privKey; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestSignCookie(t *testing.T) {
privKey, err := rsa.GenerateKey(randReader, 1024)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
signer := NewCookieSigner("keyID", privKey)
cookies, err := signer.Sign("http*://*", time.Now().Add(1*time.Hour))
if err != nil {
t.Errorf("expect no error, got %v", err)
}
if e, a := CookiePolicyName, cookies[0].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieSignatureName, cookies[1].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieKeyIDName, cookies[2].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestSignCookie_WithPolicy(t *testing.T) {
privKey, err := rsa.GenerateKey(randReader, 1024)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
p := &Policy{
Statements: []Statement{
{
Resource: "*",
Condition: Condition{
DateLessThan: &AWSEpochTime{time.Now().Add(1 * time.Hour)},
},
},
},
}
signer := NewCookieSigner("keyID", privKey)
cookies, err := signer.SignWithPolicy(p)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
if e, a := CookiePolicyName, cookies[0].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieSignatureName, cookies[1].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieKeyIDName, cookies[2].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestSignCookie_WithCookieOptions(t *testing.T) {
privKey, err := rsa.GenerateKey(randReader, 1024)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
expires := time.Now().Add(1 * time.Hour)
signer := NewCookieSigner("keyID", privKey)
cookies, err := signer.Sign("https://example.com/*", expires, func(o *CookieOptions) {
o.Path = "/"
o.Domain = ".example.com"
o.Secure = true
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
if e, a := CookiePolicyName, cookies[0].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieSignatureName, cookies[1].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := CookieKeyIDName, cookies[2].Name; e != a {
t.Errorf("expect %v, got %v", e, a)
}
for _, c := range cookies {
if e, a := "/", c.Path; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := ".example.com", c.Domain; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if !c.Secure {
t.Errorf("expect to be true")
}
}
}
| 122 |
session-manager-plugin | aws | Go | // Package sign provides utilities to generate signed URLs for Amazon CloudFront.
//
// More information about signed URLs and their structure can be found at:
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html
//
// To sign a URL create a URLSigner with your private key and credential pair key ID.
// Once you have a URLSigner instance you can call Sign or SignWithPolicy to
// sign the URLs.
//
// Example:
//
// // Sign URL to be valid for 1 hour from now.
// signer := sign.NewURLSigner(keyID, privKey)
// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour))
// if err != nil {
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
// }
//
package sign
import (
"crypto/rsa"
"fmt"
"net/url"
"strings"
"time"
)
// An URLSigner provides URL signing utilities to sign URLs for Amazon CloudFront
// resources. Using a private key and Credential Key Pair key ID the URLSigner
// only needs to be created once per Credential Key Pair key ID and private key.
//
// The signer is safe to use concurrently.
type URLSigner struct {
keyID string
privKey *rsa.PrivateKey
}
// NewURLSigner constructs and returns a new URLSigner to be used to for signing
// Amazon CloudFront URL resources with.
func NewURLSigner(keyID string, privKey *rsa.PrivateKey) *URLSigner {
return &URLSigner{
keyID: keyID,
privKey: privKey,
}
}
// Sign will sign a single URL to expire at the time of expires sign using the
// Amazon CloudFront default Canned Policy. The URL will be signed with the
// private key and Credential Key Pair Key ID previously provided to URLSigner.
//
// This is the default method of signing Amazon CloudFront URLs. If extra policy
// conditions are need other than URL expiry use SignWithPolicy instead.
//
// Example:
//
// // Sign URL to be valid for 1 hour from now.
// signer := sign.NewURLSigner(keyID, privKey)
// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour))
// if err != nil {
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
// }
//
func (s URLSigner) Sign(url string, expires time.Time) (string, error) {
scheme, cleanedURL, err := cleanURLScheme(url)
if err != nil {
return "", err
}
resource, err := CreateResource(scheme, url)
if err != nil {
return "", err
}
return signURL(scheme, cleanedURL, s.keyID, NewCannedPolicy(resource, expires), false, s.privKey)
}
// SignWithPolicy will sign a URL with the Policy provided. The URL will be
// signed with the private key and Credential Key Pair Key ID previously provided to URLSigner.
//
// Use this signing method if you are looking to sign a URL with more than just
// the URL's expiry time, or reusing Policies between multiple URL signings.
// If only the expiry time is needed you can use Sign and provide just the
// URL's expiry time. A minimum of at least one policy statement is required for a signed URL.
//
// Note: It is not safe to use Polices between multiple signers concurrently
//
// Example:
//
// // Sign URL to be valid for 30 minutes from now, expires one hour from now, and
// // restricted to the 192.0.2.0/24 IP address range.
// policy := &sign.Policy{
// Statements: []sign.Statement{
// {
// Resource: rawURL,
// Condition: sign.Condition{
// // Optional IP source address range
// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"},
// // Optional date URL is not valid until
// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)},
// // Required date the URL will expire after
// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)},
// },
// },
// },
// }
//
// signer := sign.NewURLSigner(keyID, privKey)
// signedURL, err := signer.SignWithPolicy(rawURL, policy)
// if err != nil {
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
// }
//
func (s URLSigner) SignWithPolicy(url string, p *Policy) (string, error) {
scheme, cleanedURL, err := cleanURLScheme(url)
if err != nil {
return "", err
}
return signURL(scheme, cleanedURL, s.keyID, p, true, s.privKey)
}
func signURL(scheme, url, keyID string, p *Policy, customPolicy bool, privKey *rsa.PrivateKey) (string, error) {
// Validation URL elements
if err := validateURL(url); err != nil {
return "", err
}
b64Signature, b64Policy, err := p.Sign(privKey)
if err != nil {
return "", err
}
// build and return signed URL
builtURL := buildSignedURL(url, keyID, p, customPolicy, b64Policy, b64Signature)
if scheme == "rtmp" {
return buildRTMPURL(builtURL)
}
return builtURL, nil
}
func buildSignedURL(baseURL, keyID string, p *Policy, customPolicy bool, b64Policy, b64Signature []byte) string {
pred := "?"
if strings.Contains(baseURL, "?") {
pred = "&"
}
signedURL := baseURL + pred
if customPolicy {
signedURL += "Policy=" + string(b64Policy)
} else {
signedURL += fmt.Sprintf("Expires=%d", p.Statements[0].Condition.DateLessThan.UTC().Unix())
}
signedURL += fmt.Sprintf("&Signature=%s&Key-Pair-Id=%s", string(b64Signature), keyID)
return signedURL
}
func buildRTMPURL(u string) (string, error) {
parsed, err := url.Parse(u)
if err != nil {
return "", fmt.Errorf("unable to parse rtmp signed URL, err: %s", err)
}
rtmpURL := strings.TrimLeft(parsed.Path, "/")
if parsed.RawQuery != "" {
rtmpURL = fmt.Sprintf("%s?%s", rtmpURL, parsed.RawQuery)
}
return rtmpURL, nil
}
func cleanURLScheme(u string) (scheme, cleanedURL string, err error) {
parts := strings.SplitN(u, "://", 2)
if len(parts) != 2 {
return "", "", fmt.Errorf("invalid URL, missing scheme and domain/path")
}
scheme = strings.Replace(parts[0], "*", "", 1)
cleanedURL = fmt.Sprintf("%s://%s", scheme, parts[1])
return strings.ToLower(scheme), cleanedURL, nil
}
var illegalQueryParms = []string{"Expires", "Policy", "Signature", "Key-Pair-Id"}
func validateURL(u string) error {
parsed, err := url.Parse(u)
if err != nil {
return fmt.Errorf("unable to parse URL, err: %s", err.Error())
}
if parsed.Scheme == "" {
return fmt.Errorf("URL missing valid scheme, %s", u)
}
q := parsed.Query()
for _, p := range illegalQueryParms {
if _, ok := q[p]; ok {
return fmt.Errorf("%s cannot be a query parameter for a signed URL", p)
}
}
return nil
}
| 206 |
session-manager-plugin | aws | Go | package sign
import (
"strings"
"testing"
"time"
"github.com/aws/aws-sdk-go/awstesting/mock"
)
var testSignTime = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
var testSignURL = []struct {
u string
p *Policy
t time.Time
customPolicy bool
expectErr bool
out string
}{
{
"http://example.com/a", NewCannedPolicy("http://example.com/a", testSignTime), time.Time{}, true, false,
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=cMutWOvPMOPuh0KFDsOdbML~1fe0eEBC1hdMLGRbYr3mTRrVbKDdUXL6l3vlbE0Og3rTRS6mlaSORTwesN1srESH1pXFUyCVba8tWqNy1frEiL7jZLyzA1KndH0olfJDfgHXdw-Edtk0m8mqY~AnGIYGYDu659dWeP49jVeYn30XF9sYkRCdS5IezAkqh8TO9tTDNGS4Ic6DQue4agHUFLNv1VErTafUxlSBp8hlPCuMdtZLEBLr9UJVc3oWJI3zc1~9JgVTDjbXYV1-HgTn8qQsbAU2KcieUonIzTme2td-7c2FCC0EAbOF~6QXTHWcAiSB5nVmbxn-Mx-QMVsiLw__&Key-Pair-Id=KeyID",
},
{
"https://example.com/a?b=1&c=2", NewCannedPolicy("https://example.com/a?b=1&c=2", testSignTime), time.Time{}, true, false,
"https://example.com/a?b=1&c=2&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9hP2I9MSZjPTIiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=E6xB7RtIDvx8AxM1Wuup3ROYTQwBDW-qqcrb8lSUvtL78wenjh3P0YLXK-mFK0PSzdNtzI2ZIXja6Nh2yma0IVQiZMjn3wijvVsMy9fRXyusVXB1zYSfiInVr2uhqSb-ZCn1RD32ebyMD6IWn5Kss1fT4wefc8Q76J0Y4jprAvmLCtGnrW~quZdOg~KKmY-qK11ifNwv2ECADBxZeEx1PIDHdWuXYrCBJIwSl-bVscwQWDm2BzeYuHCaLuAVDuc62JJzc7nX3E1CA1VRHY~vegYjOV6zVxtp7aBV4RJUY4yfHNM4n640FXUPPwMacqE-lnNOfx704YVTl4tjzuvzuA__&Key-Pair-Id=KeyID",
},
{
"http://example.com/a", nil, testSignTime, false, false,
"http://example.com/a?Expires=1257894000&Signature=cMutWOvPMOPuh0KFDsOdbML~1fe0eEBC1hdMLGRbYr3mTRrVbKDdUXL6l3vlbE0Og3rTRS6mlaSORTwesN1srESH1pXFUyCVba8tWqNy1frEiL7jZLyzA1KndH0olfJDfgHXdw-Edtk0m8mqY~AnGIYGYDu659dWeP49jVeYn30XF9sYkRCdS5IezAkqh8TO9tTDNGS4Ic6DQue4agHUFLNv1VErTafUxlSBp8hlPCuMdtZLEBLr9UJVc3oWJI3zc1~9JgVTDjbXYV1-HgTn8qQsbAU2KcieUonIzTme2td-7c2FCC0EAbOF~6QXTHWcAiSB5nVmbxn-Mx-QMVsiLw__&Key-Pair-Id=KeyID",
},
{
"http://example.com/Ç·", nil, testSignTime, false, true,
"http://example.com/Ç·?Expires=1257894000&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
},
{
"http://example.com/a", &Policy{}, time.Time{}, true, true,
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
},
{
"http://example.com/a", NewCannedPolicy("", testSignTime), time.Time{}, true, true,
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
},
{
"rtmp://example.com/a", nil, testSignTime, false, false,
"a?Expires=1257894000&Signature=GIOIWRaT1u5~JyNhyvsbvLfu1eYjmObAHPpV3p7wNL3X-Vts9uj2JPW3bX-xZp4HD~deps5f-GpPkIE7RPq7VCOZMLdckC4V9bvSphmMYP~OVoHwPiRMHgVW8pt9lsODGMAKVcMK-h2WROOxgzwDhfcGJQ~afs~Cz04Cus9tKScLFTNYHbLxpN0VI-vJwOvDW0tavGKxOmLeMDLTgLZSh90MjgESMME8zssks8rXngWxDgV-bLySe1VYHOcC07BMb5RkPaO036gjHJnw5hXhUCug0rkKcSxwU1IsJnGpgTkf7dVo453L2sLeRzK8R-6z9O2Onv6ow-ZoHx7fVw8rww__&Key-Pair-Id=KeyID",
},
{
"rtmp://example.com/a", NewCannedPolicy("a", testSignTime), time.Time{}, true, false,
"a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiYSIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTI1Nzg5NDAwMH19fV19&Signature=GIOIWRaT1u5~JyNhyvsbvLfu1eYjmObAHPpV3p7wNL3X-Vts9uj2JPW3bX-xZp4HD~deps5f-GpPkIE7RPq7VCOZMLdckC4V9bvSphmMYP~OVoHwPiRMHgVW8pt9lsODGMAKVcMK-h2WROOxgzwDhfcGJQ~afs~Cz04Cus9tKScLFTNYHbLxpN0VI-vJwOvDW0tavGKxOmLeMDLTgLZSh90MjgESMME8zssks8rXngWxDgV-bLySe1VYHOcC07BMb5RkPaO036gjHJnw5hXhUCug0rkKcSxwU1IsJnGpgTkf7dVo453L2sLeRzK8R-6z9O2Onv6ow-ZoHx7fVw8rww__&Key-Pair-Id=KeyID",
},
}
// TODO Sign URL HTTP
// TODO Sign URL RMTP
func TestSignURL(t *testing.T) {
privKey := mock.RSAPrivateKey
s := NewURLSigner("KeyID", privKey)
for i, v := range testSignURL {
var u string
var err error
if v.customPolicy {
u, err = s.SignWithPolicy(v.u, v.p)
} else {
u, err = s.Sign(v.u, v.t)
}
if err != nil {
if v.expectErr {
continue
}
t.Errorf("%d, Unexpected error, %s", i, err.Error())
continue
} else if v.expectErr {
t.Errorf("%d Expected error, but got none", i)
continue
}
if u != v.out {
t.Errorf("%d, Unexpected URL\nexpect: %s\nactual: %s\n", i, v.out, u)
}
}
}
var testBuildSignedURL = []struct {
u, keyID string
p *Policy
customPolicy bool
b64Policy, b64Sig []byte
out string
}{
{
"https://example.com/a?b=1", "KeyID", NewCannedPolicy("", testSignTime), true, []byte("b64Policy"), []byte("b64Sig"),
"https://example.com/a?b=1&Policy=b64Policy&Signature=b64Sig&Key-Pair-Id=KeyID",
},
{
"https://example.com/a?b=1&c=2", "KeyID", NewCannedPolicy("", testSignTime), true, []byte("b64Policy"), []byte("b64Sig"),
"https://example.com/a?b=1&c=2&Policy=b64Policy&Signature=b64Sig&Key-Pair-Id=KeyID",
},
{
"https://example.com/a", "KeyID", NewCannedPolicy("", testSignTime), true, []byte("b64Policy"), []byte("b64Sig"),
"https://example.com/a?Policy=b64Policy&Signature=b64Sig&Key-Pair-Id=KeyID",
},
{
"https://example.com/a?b=1", "KeyID", NewCannedPolicy("https://example.com/a?b=1", testSignTime), false, []byte("b64Policy"), []byte("b64Sig"),
"https://example.com/a?b=1&Expires=1257894000&Signature=b64Sig&Key-Pair-Id=KeyID",
},
}
func TestBuildSignedURL(t *testing.T) {
for i, v := range testBuildSignedURL {
u := buildSignedURL(v.u, v.keyID, v.p, v.customPolicy, v.b64Policy, v.b64Sig)
if u != v.out {
t.Errorf("%d, Unexpected URL\nexpect: %s\nactual: %s\n", i, v.out, u)
}
}
}
var testValidURL = []struct {
in, errPrefix string
}{
{"https://example.com/a?b=1&else=b", ""},
{"https://example.com/a?b=1&Policy=something&else=b", "Policy"},
{"https://example.com/a?b=1&Signature=something&else=b", "Signature"},
{"https://example.com/a?b=1&Key-Pair-Id=something&else=b", "Key-Pair-Id"},
{"http?://example.com/a?b=1", "URL missing valid scheme"},
}
func TestValidateURL(t *testing.T) {
for i, v := range testValidURL {
err := validateURL(v.in)
if err != nil {
if v.errPrefix == "" {
t.Errorf("%d, Unexpected error %s", i, err.Error())
}
if !strings.HasPrefix(err.Error(), v.errPrefix) {
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.errPrefix, err.Error())
}
} else if v.errPrefix != "" {
t.Errorf("%d, Expected error %s", i, v.errPrefix)
}
}
}
| 149 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsm
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
)
const opAddTagsToResource = "AddTagsToResource"
// AddTagsToResourceRequest generates a "aws/request.Request" representing the
// client's request for the AddTagsToResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddTagsToResource for more information on using the AddTagsToResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddTagsToResourceRequest method.
// req, resp := client.AddTagsToResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/AddTagsToResource
func (c *CloudHSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) {
op := &request.Operation{
Name: opAddTagsToResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsToResourceInput{}
}
output = &AddTagsToResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// AddTagsToResource API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Adds or overwrites one or more tags for the specified AWS CloudHSM resource.
//
// Each tag consists of a key and a value. Tag keys must be unique to each resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation AddTagsToResource for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/AddTagsToResource
func (c *CloudHSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) {
req, out := c.AddTagsToResourceRequest(input)
return out, req.Send()
}
// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of
// the ability to pass a context and additional request options.
//
// See AddTagsToResource for details on how to use this API operation.
//
// 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 *CloudHSM) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) {
req, out := c.AddTagsToResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateHapg = "CreateHapg"
// CreateHapgRequest generates a "aws/request.Request" representing the
// client's request for the CreateHapg operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateHapg for more information on using the CreateHapg
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateHapgRequest method.
// req, resp := client.CreateHapgRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateHapg
func (c *CloudHSM) CreateHapgRequest(input *CreateHapgInput) (req *request.Request, output *CreateHapgOutput) {
op := &request.Operation{
Name: opCreateHapg,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHapgInput{}
}
output = &CreateHapgOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateHapg API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Creates a high-availability partition group. A high-availability partition
// group is a group of partitions that spans multiple physical HSMs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation CreateHapg for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateHapg
func (c *CloudHSM) CreateHapg(input *CreateHapgInput) (*CreateHapgOutput, error) {
req, out := c.CreateHapgRequest(input)
return out, req.Send()
}
// CreateHapgWithContext is the same as CreateHapg with the addition of
// the ability to pass a context and additional request options.
//
// See CreateHapg for details on how to use this API operation.
//
// 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 *CloudHSM) CreateHapgWithContext(ctx aws.Context, input *CreateHapgInput, opts ...request.Option) (*CreateHapgOutput, error) {
req, out := c.CreateHapgRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateHsm = "CreateHsm"
// CreateHsmRequest generates a "aws/request.Request" representing the
// client's request for the CreateHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateHsm for more information on using the CreateHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateHsmRequest method.
// req, resp := client.CreateHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateHsm
func (c *CloudHSM) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) {
op := &request.Operation{
Name: opCreateHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHsmInput{}
}
output = &CreateHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateHsm API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Creates an uninitialized HSM instance.
//
// There is an upfront fee charged for each HSM instance that you create with
// the CreateHsm operation. If you accidentally provision an HSM and want to
// request a refund, delete the instance using the DeleteHsm operation, go to
// the AWS Support Center (https://console.aws.amazon.com/support/home), create
// a new case, and select Account and Billing Support.
//
// It can take up to 20 minutes to create and provision an HSM. You can monitor
// the status of the HSM with the DescribeHsm operation. The HSM is ready to
// be initialized when the status changes to RUNNING.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation CreateHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateHsm
func (c *CloudHSM) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) {
req, out := c.CreateHsmRequest(input)
return out, req.Send()
}
// CreateHsmWithContext is the same as CreateHsm with the addition of
// the ability to pass a context and additional request options.
//
// See CreateHsm for details on how to use this API operation.
//
// 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 *CloudHSM) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) {
req, out := c.CreateHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLunaClient = "CreateLunaClient"
// CreateLunaClientRequest generates a "aws/request.Request" representing the
// client's request for the CreateLunaClient operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateLunaClient for more information on using the CreateLunaClient
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateLunaClientRequest method.
// req, resp := client.CreateLunaClientRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateLunaClient
func (c *CloudHSM) CreateLunaClientRequest(input *CreateLunaClientInput) (req *request.Request, output *CreateLunaClientOutput) {
op := &request.Operation{
Name: opCreateLunaClient,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLunaClientInput{}
}
output = &CreateLunaClientOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLunaClient API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Creates an HSM client.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation CreateLunaClient for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/CreateLunaClient
func (c *CloudHSM) CreateLunaClient(input *CreateLunaClientInput) (*CreateLunaClientOutput, error) {
req, out := c.CreateLunaClientRequest(input)
return out, req.Send()
}
// CreateLunaClientWithContext is the same as CreateLunaClient with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLunaClient for details on how to use this API operation.
//
// 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 *CloudHSM) CreateLunaClientWithContext(ctx aws.Context, input *CreateLunaClientInput, opts ...request.Option) (*CreateLunaClientOutput, error) {
req, out := c.CreateLunaClientRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteHapg = "DeleteHapg"
// DeleteHapgRequest generates a "aws/request.Request" representing the
// client's request for the DeleteHapg operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteHapg for more information on using the DeleteHapg
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteHapgRequest method.
// req, resp := client.DeleteHapgRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteHapg
func (c *CloudHSM) DeleteHapgRequest(input *DeleteHapgInput) (req *request.Request, output *DeleteHapgOutput) {
op := &request.Operation{
Name: opDeleteHapg,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteHapgInput{}
}
output = &DeleteHapgOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteHapg API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Deletes a high-availability partition group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DeleteHapg for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteHapg
func (c *CloudHSM) DeleteHapg(input *DeleteHapgInput) (*DeleteHapgOutput, error) {
req, out := c.DeleteHapgRequest(input)
return out, req.Send()
}
// DeleteHapgWithContext is the same as DeleteHapg with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteHapg for details on how to use this API operation.
//
// 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 *CloudHSM) DeleteHapgWithContext(ctx aws.Context, input *DeleteHapgInput, opts ...request.Option) (*DeleteHapgOutput, error) {
req, out := c.DeleteHapgRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteHsm = "DeleteHsm"
// DeleteHsmRequest generates a "aws/request.Request" representing the
// client's request for the DeleteHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteHsm for more information on using the DeleteHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteHsmRequest method.
// req, resp := client.DeleteHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteHsm
func (c *CloudHSM) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) {
op := &request.Operation{
Name: opDeleteHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteHsmInput{}
}
output = &DeleteHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteHsm API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Deletes an HSM. After completion, this operation cannot be undone and your
// key material cannot be recovered.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DeleteHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteHsm
func (c *CloudHSM) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) {
req, out := c.DeleteHsmRequest(input)
return out, req.Send()
}
// DeleteHsmWithContext is the same as DeleteHsm with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteHsm for details on how to use this API operation.
//
// 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 *CloudHSM) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) {
req, out := c.DeleteHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLunaClient = "DeleteLunaClient"
// DeleteLunaClientRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLunaClient operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLunaClient for more information on using the DeleteLunaClient
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteLunaClientRequest method.
// req, resp := client.DeleteLunaClientRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteLunaClient
func (c *CloudHSM) DeleteLunaClientRequest(input *DeleteLunaClientInput) (req *request.Request, output *DeleteLunaClientOutput) {
op := &request.Operation{
Name: opDeleteLunaClient,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLunaClientInput{}
}
output = &DeleteLunaClientOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteLunaClient API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Deletes a client.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DeleteLunaClient for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DeleteLunaClient
func (c *CloudHSM) DeleteLunaClient(input *DeleteLunaClientInput) (*DeleteLunaClientOutput, error) {
req, out := c.DeleteLunaClientRequest(input)
return out, req.Send()
}
// DeleteLunaClientWithContext is the same as DeleteLunaClient with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLunaClient for details on how to use this API operation.
//
// 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 *CloudHSM) DeleteLunaClientWithContext(ctx aws.Context, input *DeleteLunaClientInput, opts ...request.Option) (*DeleteLunaClientOutput, error) {
req, out := c.DeleteLunaClientRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeHapg = "DescribeHapg"
// DescribeHapgRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHapg operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeHapg for more information on using the DescribeHapg
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeHapgRequest method.
// req, resp := client.DescribeHapgRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeHapg
func (c *CloudHSM) DescribeHapgRequest(input *DescribeHapgInput) (req *request.Request, output *DescribeHapgOutput) {
op := &request.Operation{
Name: opDescribeHapg,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeHapgInput{}
}
output = &DescribeHapgOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeHapg API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Retrieves information about a high-availability partition group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DescribeHapg for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeHapg
func (c *CloudHSM) DescribeHapg(input *DescribeHapgInput) (*DescribeHapgOutput, error) {
req, out := c.DescribeHapgRequest(input)
return out, req.Send()
}
// DescribeHapgWithContext is the same as DescribeHapg with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeHapg for details on how to use this API operation.
//
// 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 *CloudHSM) DescribeHapgWithContext(ctx aws.Context, input *DescribeHapgInput, opts ...request.Option) (*DescribeHapgOutput, error) {
req, out := c.DescribeHapgRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeHsm = "DescribeHsm"
// DescribeHsmRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeHsm for more information on using the DescribeHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeHsmRequest method.
// req, resp := client.DescribeHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeHsm
func (c *CloudHSM) DescribeHsmRequest(input *DescribeHsmInput) (req *request.Request, output *DescribeHsmOutput) {
op := &request.Operation{
Name: opDescribeHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeHsmInput{}
}
output = &DescribeHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeHsm API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Retrieves information about an HSM. You can identify the HSM by its ARN or
// its serial number.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DescribeHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeHsm
func (c *CloudHSM) DescribeHsm(input *DescribeHsmInput) (*DescribeHsmOutput, error) {
req, out := c.DescribeHsmRequest(input)
return out, req.Send()
}
// DescribeHsmWithContext is the same as DescribeHsm with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeHsm for details on how to use this API operation.
//
// 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 *CloudHSM) DescribeHsmWithContext(ctx aws.Context, input *DescribeHsmInput, opts ...request.Option) (*DescribeHsmOutput, error) {
req, out := c.DescribeHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLunaClient = "DescribeLunaClient"
// DescribeLunaClientRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLunaClient operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLunaClient for more information on using the DescribeLunaClient
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeLunaClientRequest method.
// req, resp := client.DescribeLunaClientRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeLunaClient
func (c *CloudHSM) DescribeLunaClientRequest(input *DescribeLunaClientInput) (req *request.Request, output *DescribeLunaClientOutput) {
op := &request.Operation{
Name: opDescribeLunaClient,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLunaClientInput{}
}
output = &DescribeLunaClientOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLunaClient API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Retrieves information about an HSM client.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation DescribeLunaClient for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/DescribeLunaClient
func (c *CloudHSM) DescribeLunaClient(input *DescribeLunaClientInput) (*DescribeLunaClientOutput, error) {
req, out := c.DescribeLunaClientRequest(input)
return out, req.Send()
}
// DescribeLunaClientWithContext is the same as DescribeLunaClient with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLunaClient for details on how to use this API operation.
//
// 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 *CloudHSM) DescribeLunaClientWithContext(ctx aws.Context, input *DescribeLunaClientInput, opts ...request.Option) (*DescribeLunaClientOutput, error) {
req, out := c.DescribeLunaClientRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetConfig = "GetConfig"
// GetConfigRequest generates a "aws/request.Request" representing the
// client's request for the GetConfig operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetConfig for more information on using the GetConfig
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetConfigRequest method.
// req, resp := client.GetConfigRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/GetConfig
func (c *CloudHSM) GetConfigRequest(input *GetConfigInput) (req *request.Request, output *GetConfigOutput) {
op := &request.Operation{
Name: opGetConfig,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetConfigInput{}
}
output = &GetConfigOutput{}
req = c.newRequest(op, input, output)
return
}
// GetConfig API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Gets the configuration files necessary to connect to all high availability
// partition groups the client is associated with.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation GetConfig for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/GetConfig
func (c *CloudHSM) GetConfig(input *GetConfigInput) (*GetConfigOutput, error) {
req, out := c.GetConfigRequest(input)
return out, req.Send()
}
// GetConfigWithContext is the same as GetConfig with the addition of
// the ability to pass a context and additional request options.
//
// See GetConfig for details on how to use this API operation.
//
// 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 *CloudHSM) GetConfigWithContext(ctx aws.Context, input *GetConfigInput, opts ...request.Option) (*GetConfigOutput, error) {
req, out := c.GetConfigRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListAvailableZones = "ListAvailableZones"
// ListAvailableZonesRequest generates a "aws/request.Request" representing the
// client's request for the ListAvailableZones operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAvailableZones for more information on using the ListAvailableZones
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAvailableZonesRequest method.
// req, resp := client.ListAvailableZonesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListAvailableZones
func (c *CloudHSM) ListAvailableZonesRequest(input *ListAvailableZonesInput) (req *request.Request, output *ListAvailableZonesOutput) {
op := &request.Operation{
Name: opListAvailableZones,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListAvailableZonesInput{}
}
output = &ListAvailableZonesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAvailableZones API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Lists the Availability Zones that have available AWS CloudHSM capacity.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ListAvailableZones for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListAvailableZones
func (c *CloudHSM) ListAvailableZones(input *ListAvailableZonesInput) (*ListAvailableZonesOutput, error) {
req, out := c.ListAvailableZonesRequest(input)
return out, req.Send()
}
// ListAvailableZonesWithContext is the same as ListAvailableZones with the addition of
// the ability to pass a context and additional request options.
//
// See ListAvailableZones for details on how to use this API operation.
//
// 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 *CloudHSM) ListAvailableZonesWithContext(ctx aws.Context, input *ListAvailableZonesInput, opts ...request.Option) (*ListAvailableZonesOutput, error) {
req, out := c.ListAvailableZonesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListHapgs = "ListHapgs"
// ListHapgsRequest generates a "aws/request.Request" representing the
// client's request for the ListHapgs operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListHapgs for more information on using the ListHapgs
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListHapgsRequest method.
// req, resp := client.ListHapgsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListHapgs
func (c *CloudHSM) ListHapgsRequest(input *ListHapgsInput) (req *request.Request, output *ListHapgsOutput) {
op := &request.Operation{
Name: opListHapgs,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListHapgsInput{}
}
output = &ListHapgsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListHapgs API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Lists the high-availability partition groups for the account.
//
// This operation supports pagination with the use of the NextToken member.
// If more results are available, the NextToken member of the response contains
// a token that you pass in the next call to ListHapgs to retrieve the next
// set of items.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ListHapgs for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListHapgs
func (c *CloudHSM) ListHapgs(input *ListHapgsInput) (*ListHapgsOutput, error) {
req, out := c.ListHapgsRequest(input)
return out, req.Send()
}
// ListHapgsWithContext is the same as ListHapgs with the addition of
// the ability to pass a context and additional request options.
//
// See ListHapgs for details on how to use this API operation.
//
// 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 *CloudHSM) ListHapgsWithContext(ctx aws.Context, input *ListHapgsInput, opts ...request.Option) (*ListHapgsOutput, error) {
req, out := c.ListHapgsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListHsms = "ListHsms"
// ListHsmsRequest generates a "aws/request.Request" representing the
// client's request for the ListHsms operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListHsms for more information on using the ListHsms
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListHsmsRequest method.
// req, resp := client.ListHsmsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListHsms
func (c *CloudHSM) ListHsmsRequest(input *ListHsmsInput) (req *request.Request, output *ListHsmsOutput) {
op := &request.Operation{
Name: opListHsms,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListHsmsInput{}
}
output = &ListHsmsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListHsms API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Retrieves the identifiers of all of the HSMs provisioned for the current
// customer.
//
// This operation supports pagination with the use of the NextToken member.
// If more results are available, the NextToken member of the response contains
// a token that you pass in the next call to ListHsms to retrieve the next set
// of items.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ListHsms for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListHsms
func (c *CloudHSM) ListHsms(input *ListHsmsInput) (*ListHsmsOutput, error) {
req, out := c.ListHsmsRequest(input)
return out, req.Send()
}
// ListHsmsWithContext is the same as ListHsms with the addition of
// the ability to pass a context and additional request options.
//
// See ListHsms for details on how to use this API operation.
//
// 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 *CloudHSM) ListHsmsWithContext(ctx aws.Context, input *ListHsmsInput, opts ...request.Option) (*ListHsmsOutput, error) {
req, out := c.ListHsmsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListLunaClients = "ListLunaClients"
// ListLunaClientsRequest generates a "aws/request.Request" representing the
// client's request for the ListLunaClients operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListLunaClients for more information on using the ListLunaClients
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListLunaClientsRequest method.
// req, resp := client.ListLunaClientsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListLunaClients
func (c *CloudHSM) ListLunaClientsRequest(input *ListLunaClientsInput) (req *request.Request, output *ListLunaClientsOutput) {
op := &request.Operation{
Name: opListLunaClients,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListLunaClientsInput{}
}
output = &ListLunaClientsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListLunaClients API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Lists all of the clients.
//
// This operation supports pagination with the use of the NextToken member.
// If more results are available, the NextToken member of the response contains
// a token that you pass in the next call to ListLunaClients to retrieve the
// next set of items.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ListLunaClients for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListLunaClients
func (c *CloudHSM) ListLunaClients(input *ListLunaClientsInput) (*ListLunaClientsOutput, error) {
req, out := c.ListLunaClientsRequest(input)
return out, req.Send()
}
// ListLunaClientsWithContext is the same as ListLunaClients with the addition of
// the ability to pass a context and additional request options.
//
// See ListLunaClients for details on how to use this API operation.
//
// 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 *CloudHSM) ListLunaClientsWithContext(ctx aws.Context, input *ListLunaClientsInput, opts ...request.Option) (*ListLunaClientsOutput, error) {
req, out := c.ListLunaClientsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListTagsForResource = "ListTagsForResource"
// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTagsForResource for more information on using the ListTagsForResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsForResourceRequest method.
// req, resp := client.ListTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListTagsForResource
func (c *CloudHSM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Returns a list of all tags for the specified AWS CloudHSM resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ListTagsForResource
func (c *CloudHSM) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
return out, req.Send()
}
// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListTagsForResource for details on how to use this API operation.
//
// 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 *CloudHSM) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opModifyHapg = "ModifyHapg"
// ModifyHapgRequest generates a "aws/request.Request" representing the
// client's request for the ModifyHapg operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ModifyHapg for more information on using the ModifyHapg
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ModifyHapgRequest method.
// req, resp := client.ModifyHapgRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyHapg
func (c *CloudHSM) ModifyHapgRequest(input *ModifyHapgInput) (req *request.Request, output *ModifyHapgOutput) {
op := &request.Operation{
Name: opModifyHapg,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyHapgInput{}
}
output = &ModifyHapgOutput{}
req = c.newRequest(op, input, output)
return
}
// ModifyHapg API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Modifies an existing high-availability partition group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ModifyHapg for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyHapg
func (c *CloudHSM) ModifyHapg(input *ModifyHapgInput) (*ModifyHapgOutput, error) {
req, out := c.ModifyHapgRequest(input)
return out, req.Send()
}
// ModifyHapgWithContext is the same as ModifyHapg with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyHapg for details on how to use this API operation.
//
// 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 *CloudHSM) ModifyHapgWithContext(ctx aws.Context, input *ModifyHapgInput, opts ...request.Option) (*ModifyHapgOutput, error) {
req, out := c.ModifyHapgRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opModifyHsm = "ModifyHsm"
// ModifyHsmRequest generates a "aws/request.Request" representing the
// client's request for the ModifyHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ModifyHsm for more information on using the ModifyHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ModifyHsmRequest method.
// req, resp := client.ModifyHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyHsm
func (c *CloudHSM) ModifyHsmRequest(input *ModifyHsmInput) (req *request.Request, output *ModifyHsmOutput) {
op := &request.Operation{
Name: opModifyHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyHsmInput{}
}
output = &ModifyHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// ModifyHsm API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Modifies an HSM.
//
// This operation can result in the HSM being offline for up to 15 minutes while
// the AWS CloudHSM service is reconfigured. If you are modifying a production
// HSM, you should ensure that your AWS CloudHSM service is configured for high
// availability, and consider executing this operation during a maintenance
// window.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ModifyHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyHsm
func (c *CloudHSM) ModifyHsm(input *ModifyHsmInput) (*ModifyHsmOutput, error) {
req, out := c.ModifyHsmRequest(input)
return out, req.Send()
}
// ModifyHsmWithContext is the same as ModifyHsm with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyHsm for details on how to use this API operation.
//
// 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 *CloudHSM) ModifyHsmWithContext(ctx aws.Context, input *ModifyHsmInput, opts ...request.Option) (*ModifyHsmOutput, error) {
req, out := c.ModifyHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opModifyLunaClient = "ModifyLunaClient"
// ModifyLunaClientRequest generates a "aws/request.Request" representing the
// client's request for the ModifyLunaClient operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ModifyLunaClient for more information on using the ModifyLunaClient
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ModifyLunaClientRequest method.
// req, resp := client.ModifyLunaClientRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyLunaClient
func (c *CloudHSM) ModifyLunaClientRequest(input *ModifyLunaClientInput) (req *request.Request, output *ModifyLunaClientOutput) {
op := &request.Operation{
Name: opModifyLunaClient,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyLunaClientInput{}
}
output = &ModifyLunaClientOutput{}
req = c.newRequest(op, input, output)
return
}
// ModifyLunaClient API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Modifies the certificate used by the client.
//
// This action can potentially start a workflow to install the new certificate
// on the client's HSMs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation ModifyLunaClient for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/ModifyLunaClient
func (c *CloudHSM) ModifyLunaClient(input *ModifyLunaClientInput) (*ModifyLunaClientOutput, error) {
req, out := c.ModifyLunaClientRequest(input)
return out, req.Send()
}
// ModifyLunaClientWithContext is the same as ModifyLunaClient with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyLunaClient for details on how to use this API operation.
//
// 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 *CloudHSM) ModifyLunaClientWithContext(ctx aws.Context, input *ModifyLunaClientInput, opts ...request.Option) (*ModifyLunaClientOutput, error) {
req, out := c.ModifyLunaClientRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRemoveTagsFromResource = "RemoveTagsFromResource"
// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the
// client's request for the RemoveTagsFromResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RemoveTagsFromResourceRequest method.
// req, resp := client.RemoveTagsFromResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/RemoveTagsFromResource
func (c *CloudHSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) {
op := &request.Operation{
Name: opRemoveTagsFromResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RemoveTagsFromResourceInput{}
}
output = &RemoveTagsFromResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// RemoveTagsFromResource API operation for Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// Removes one or more tags from the specified AWS CloudHSM resource.
//
// To remove a tag, specify only the tag key to remove (not the value). To overwrite
// the value for an existing tag, use AddTagsToResource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudHSM's
// API operation RemoveTagsFromResource for usage and error information.
//
// Returned Error Types:
// * CloudHsmServiceException
// Indicates that an exception occurred in the AWS CloudHSM service.
//
// * CloudHsmInternalException
// Indicates that an internal error occurred.
//
// * InvalidRequestException
// Indicates that one or more of the request parameters are not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30/RemoveTagsFromResource
func (c *CloudHSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) {
req, out := c.RemoveTagsFromResourceRequest(input)
return out, req.Send()
}
// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of
// the ability to pass a context and additional request options.
//
// See RemoveTagsFromResource for details on how to use this API operation.
//
// 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 *CloudHSM) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) {
req, out := c.RemoveTagsFromResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type AddTagsToResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the AWS CloudHSM resource to tag.
//
// ResourceArn is a required field
ResourceArn *string `type:"string" required:"true"`
// One or more tags.
//
// TagList is a required field
TagList []*Tag `type:"list" required:"true"`
}
// String returns the string representation
func (s AddTagsToResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AddTagsToResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AddTagsToResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"}
if s.ResourceArn == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
}
if s.TagList == nil {
invalidParams.Add(request.NewErrParamRequired("TagList"))
}
if s.TagList != nil {
for i, v := range s.TagList {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceArn sets the ResourceArn field's value.
func (s *AddTagsToResourceInput) SetResourceArn(v string) *AddTagsToResourceInput {
s.ResourceArn = &v
return s
}
// SetTagList sets the TagList field's value.
func (s *AddTagsToResourceInput) SetTagList(v []*Tag) *AddTagsToResourceInput {
s.TagList = v
return s
}
type AddTagsToResourceOutput struct {
_ struct{} `type:"structure"`
// The status of the operation.
//
// Status is a required field
Status *string `type:"string" required:"true"`
}
// String returns the string representation
func (s AddTagsToResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AddTagsToResourceOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *AddTagsToResourceOutput) SetStatus(v string) *AddTagsToResourceOutput {
s.Status = &v
return s
}
// Indicates that an internal error occurred.
type CloudHsmInternalException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s CloudHsmInternalException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmInternalException) GoString() string {
return s.String()
}
func newErrorCloudHsmInternalException(v protocol.ResponseMetadata) error {
return &CloudHsmInternalException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmInternalException) Code() string {
return "CloudHsmInternalException"
}
// Message returns the exception's message.
func (s *CloudHsmInternalException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmInternalException) OrigErr() error {
return nil
}
func (s *CloudHsmInternalException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmInternalException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmInternalException) RequestID() string {
return s.RespMetadata.RequestID
}
// Indicates that an exception occurred in the AWS CloudHSM service.
type CloudHsmServiceException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
// Additional information about the error.
Message_ *string `locationName:"message" type:"string"`
// Indicates if the action can be retried.
Retryable *bool `locationName:"retryable" type:"boolean"`
}
// String returns the string representation
func (s CloudHsmServiceException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmServiceException) GoString() string {
return s.String()
}
func newErrorCloudHsmServiceException(v protocol.ResponseMetadata) error {
return &CloudHsmServiceException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmServiceException) Code() string {
return "CloudHsmServiceException"
}
// Message returns the exception's message.
func (s *CloudHsmServiceException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmServiceException) OrigErr() error {
return nil
}
func (s *CloudHsmServiceException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmServiceException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmServiceException) RequestID() string {
return s.RespMetadata.RequestID
}
// Contains the inputs for the CreateHapgRequest action.
type CreateHapgInput struct {
_ struct{} `type:"structure"`
// The label of the new high-availability partition group.
//
// Label is a required field
Label *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreateHapgInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHapgInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHapgInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHapgInput"}
if s.Label == nil {
invalidParams.Add(request.NewErrParamRequired("Label"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetLabel sets the Label field's value.
func (s *CreateHapgInput) SetLabel(v string) *CreateHapgInput {
s.Label = &v
return s
}
// Contains the output of the CreateHAPartitionGroup action.
type CreateHapgOutput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group.
HapgArn *string `type:"string"`
}
// String returns the string representation
func (s CreateHapgOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHapgOutput) GoString() string {
return s.String()
}
// SetHapgArn sets the HapgArn field's value.
func (s *CreateHapgOutput) SetHapgArn(v string) *CreateHapgOutput {
s.HapgArn = &v
return s
}
// Contains the inputs for the CreateHsm operation.
type CreateHsmInput struct {
_ struct{} `type:"structure"`
// A user-defined token to ensure idempotence. Subsequent calls to this operation
// with the same token will be ignored.
ClientToken *string `type:"string"`
// The IP address to assign to the HSM's ENI.
//
// If an IP address is not specified, an IP address will be randomly chosen
// from the CIDR range of the subnet.
EniIp *string `type:"string"`
// The external ID from IamRoleArn, if present.
ExternalId *string `type:"string"`
// The ARN of an IAM role to enable the AWS CloudHSM service to allocate an
// ENI on your behalf.
//
// IamRoleArn is a required field
IamRoleArn *string `type:"string" required:"true"`
// The SSH public key to install on the HSM.
//
// SshKey is a required field
SshKey *string `type:"string" required:"true"`
// The identifier of the subnet in your VPC in which to place the HSM.
//
// SubnetId is a required field
SubnetId *string `type:"string" required:"true"`
// Specifies the type of subscription for the HSM.
//
// * PRODUCTION - The HSM is being used in a production environment.
//
// * TRIAL - The HSM is being used in a product trial.
//
// SubscriptionType is a required field
SubscriptionType *string `type:"string" required:"true" enum:"SubscriptionType"`
// The IP address for the syslog monitoring server. The AWS CloudHSM service
// only supports one syslog monitoring server.
SyslogIp *string `type:"string"`
}
// String returns the string representation
func (s CreateHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHsmInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHsmInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"}
if s.IamRoleArn == nil {
invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
}
if s.SshKey == nil {
invalidParams.Add(request.NewErrParamRequired("SshKey"))
}
if s.SubnetId == nil {
invalidParams.Add(request.NewErrParamRequired("SubnetId"))
}
if s.SubscriptionType == nil {
invalidParams.Add(request.NewErrParamRequired("SubscriptionType"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClientToken sets the ClientToken field's value.
func (s *CreateHsmInput) SetClientToken(v string) *CreateHsmInput {
s.ClientToken = &v
return s
}
// SetEniIp sets the EniIp field's value.
func (s *CreateHsmInput) SetEniIp(v string) *CreateHsmInput {
s.EniIp = &v
return s
}
// SetExternalId sets the ExternalId field's value.
func (s *CreateHsmInput) SetExternalId(v string) *CreateHsmInput {
s.ExternalId = &v
return s
}
// SetIamRoleArn sets the IamRoleArn field's value.
func (s *CreateHsmInput) SetIamRoleArn(v string) *CreateHsmInput {
s.IamRoleArn = &v
return s
}
// SetSshKey sets the SshKey field's value.
func (s *CreateHsmInput) SetSshKey(v string) *CreateHsmInput {
s.SshKey = &v
return s
}
// SetSubnetId sets the SubnetId field's value.
func (s *CreateHsmInput) SetSubnetId(v string) *CreateHsmInput {
s.SubnetId = &v
return s
}
// SetSubscriptionType sets the SubscriptionType field's value.
func (s *CreateHsmInput) SetSubscriptionType(v string) *CreateHsmInput {
s.SubscriptionType = &v
return s
}
// SetSyslogIp sets the SyslogIp field's value.
func (s *CreateHsmInput) SetSyslogIp(v string) *CreateHsmInput {
s.SyslogIp = &v
return s
}
// Contains the output of the CreateHsm operation.
type CreateHsmOutput struct {
_ struct{} `type:"structure"`
// The ARN of the HSM.
HsmArn *string `type:"string"`
}
// String returns the string representation
func (s CreateHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHsmOutput) GoString() string {
return s.String()
}
// SetHsmArn sets the HsmArn field's value.
func (s *CreateHsmOutput) SetHsmArn(v string) *CreateHsmOutput {
s.HsmArn = &v
return s
}
// Contains the inputs for the CreateLunaClient action.
type CreateLunaClientInput struct {
_ struct{} `type:"structure"`
// The contents of a Base64-Encoded X.509 v3 certificate to be installed on
// the HSMs used by this client.
//
// Certificate is a required field
Certificate *string `min:"600" type:"string" required:"true"`
// The label for the client.
Label *string `type:"string"`
}
// String returns the string representation
func (s CreateLunaClientInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateLunaClientInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateLunaClientInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateLunaClientInput"}
if s.Certificate == nil {
invalidParams.Add(request.NewErrParamRequired("Certificate"))
}
if s.Certificate != nil && len(*s.Certificate) < 600 {
invalidParams.Add(request.NewErrParamMinLen("Certificate", 600))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCertificate sets the Certificate field's value.
func (s *CreateLunaClientInput) SetCertificate(v string) *CreateLunaClientInput {
s.Certificate = &v
return s
}
// SetLabel sets the Label field's value.
func (s *CreateLunaClientInput) SetLabel(v string) *CreateLunaClientInput {
s.Label = &v
return s
}
// Contains the output of the CreateLunaClient action.
type CreateLunaClientOutput struct {
_ struct{} `type:"structure"`
// The ARN of the client.
ClientArn *string `type:"string"`
}
// String returns the string representation
func (s CreateLunaClientOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateLunaClientOutput) GoString() string {
return s.String()
}
// SetClientArn sets the ClientArn field's value.
func (s *CreateLunaClientOutput) SetClientArn(v string) *CreateLunaClientOutput {
s.ClientArn = &v
return s
}
// Contains the inputs for the DeleteHapg action.
type DeleteHapgInput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group to delete.
//
// HapgArn is a required field
HapgArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteHapgInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHapgInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteHapgInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteHapgInput"}
if s.HapgArn == nil {
invalidParams.Add(request.NewErrParamRequired("HapgArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHapgArn sets the HapgArn field's value.
func (s *DeleteHapgInput) SetHapgArn(v string) *DeleteHapgInput {
s.HapgArn = &v
return s
}
// Contains the output of the DeleteHapg action.
type DeleteHapgOutput struct {
_ struct{} `type:"structure"`
// The status of the action.
//
// Status is a required field
Status *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteHapgOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHapgOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *DeleteHapgOutput) SetStatus(v string) *DeleteHapgOutput {
s.Status = &v
return s
}
// Contains the inputs for the DeleteHsm operation.
type DeleteHsmInput struct {
_ struct{} `type:"structure"`
// The ARN of the HSM to delete.
//
// HsmArn is a required field
HsmArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHsmInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteHsmInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"}
if s.HsmArn == nil {
invalidParams.Add(request.NewErrParamRequired("HsmArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHsmArn sets the HsmArn field's value.
func (s *DeleteHsmInput) SetHsmArn(v string) *DeleteHsmInput {
s.HsmArn = &v
return s
}
// Contains the output of the DeleteHsm operation.
type DeleteHsmOutput struct {
_ struct{} `type:"structure"`
// The status of the operation.
//
// Status is a required field
Status *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHsmOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *DeleteHsmOutput) SetStatus(v string) *DeleteHsmOutput {
s.Status = &v
return s
}
type DeleteLunaClientInput struct {
_ struct{} `type:"structure"`
// The ARN of the client to delete.
//
// ClientArn is a required field
ClientArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteLunaClientInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteLunaClientInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteLunaClientInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteLunaClientInput"}
if s.ClientArn == nil {
invalidParams.Add(request.NewErrParamRequired("ClientArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClientArn sets the ClientArn field's value.
func (s *DeleteLunaClientInput) SetClientArn(v string) *DeleteLunaClientInput {
s.ClientArn = &v
return s
}
type DeleteLunaClientOutput struct {
_ struct{} `type:"structure"`
// The status of the action.
//
// Status is a required field
Status *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteLunaClientOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteLunaClientOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *DeleteLunaClientOutput) SetStatus(v string) *DeleteLunaClientOutput {
s.Status = &v
return s
}
// Contains the inputs for the DescribeHapg action.
type DescribeHapgInput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group to describe.
//
// HapgArn is a required field
HapgArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeHapgInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeHapgInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeHapgInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeHapgInput"}
if s.HapgArn == nil {
invalidParams.Add(request.NewErrParamRequired("HapgArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHapgArn sets the HapgArn field's value.
func (s *DescribeHapgInput) SetHapgArn(v string) *DescribeHapgInput {
s.HapgArn = &v
return s
}
// Contains the output of the DescribeHapg action.
type DescribeHapgOutput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group.
HapgArn *string `type:"string"`
// The serial number of the high-availability partition group.
HapgSerial *string `type:"string"`
// Contains a list of ARNs that identify the HSMs.
HsmsLastActionFailed []*string `type:"list"`
// Contains a list of ARNs that identify the HSMs.
HsmsPendingDeletion []*string `type:"list"`
// Contains a list of ARNs that identify the HSMs.
HsmsPendingRegistration []*string `type:"list"`
// The label for the high-availability partition group.
Label *string `type:"string"`
// The date and time the high-availability partition group was last modified.
LastModifiedTimestamp *string `type:"string"`
// The list of partition serial numbers that belong to the high-availability
// partition group.
PartitionSerialList []*string `type:"list"`
// The state of the high-availability partition group.
State *string `type:"string" enum:"CloudHsmObjectState"`
}
// String returns the string representation
func (s DescribeHapgOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeHapgOutput) GoString() string {
return s.String()
}
// SetHapgArn sets the HapgArn field's value.
func (s *DescribeHapgOutput) SetHapgArn(v string) *DescribeHapgOutput {
s.HapgArn = &v
return s
}
// SetHapgSerial sets the HapgSerial field's value.
func (s *DescribeHapgOutput) SetHapgSerial(v string) *DescribeHapgOutput {
s.HapgSerial = &v
return s
}
// SetHsmsLastActionFailed sets the HsmsLastActionFailed field's value.
func (s *DescribeHapgOutput) SetHsmsLastActionFailed(v []*string) *DescribeHapgOutput {
s.HsmsLastActionFailed = v
return s
}
// SetHsmsPendingDeletion sets the HsmsPendingDeletion field's value.
func (s *DescribeHapgOutput) SetHsmsPendingDeletion(v []*string) *DescribeHapgOutput {
s.HsmsPendingDeletion = v
return s
}
// SetHsmsPendingRegistration sets the HsmsPendingRegistration field's value.
func (s *DescribeHapgOutput) SetHsmsPendingRegistration(v []*string) *DescribeHapgOutput {
s.HsmsPendingRegistration = v
return s
}
// SetLabel sets the Label field's value.
func (s *DescribeHapgOutput) SetLabel(v string) *DescribeHapgOutput {
s.Label = &v
return s
}
// SetLastModifiedTimestamp sets the LastModifiedTimestamp field's value.
func (s *DescribeHapgOutput) SetLastModifiedTimestamp(v string) *DescribeHapgOutput {
s.LastModifiedTimestamp = &v
return s
}
// SetPartitionSerialList sets the PartitionSerialList field's value.
func (s *DescribeHapgOutput) SetPartitionSerialList(v []*string) *DescribeHapgOutput {
s.PartitionSerialList = v
return s
}
// SetState sets the State field's value.
func (s *DescribeHapgOutput) SetState(v string) *DescribeHapgOutput {
s.State = &v
return s
}
// Contains the inputs for the DescribeHsm operation.
type DescribeHsmInput struct {
_ struct{} `type:"structure"`
// The ARN of the HSM. Either the HsmArn or the SerialNumber parameter must
// be specified.
HsmArn *string `type:"string"`
// The serial number of the HSM. Either the HsmArn or the HsmSerialNumber parameter
// must be specified.
HsmSerialNumber *string `type:"string"`
}
// String returns the string representation
func (s DescribeHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeHsmInput) GoString() string {
return s.String()
}
// SetHsmArn sets the HsmArn field's value.
func (s *DescribeHsmInput) SetHsmArn(v string) *DescribeHsmInput {
s.HsmArn = &v
return s
}
// SetHsmSerialNumber sets the HsmSerialNumber field's value.
func (s *DescribeHsmInput) SetHsmSerialNumber(v string) *DescribeHsmInput {
s.HsmSerialNumber = &v
return s
}
// Contains the output of the DescribeHsm operation.
type DescribeHsmOutput struct {
_ struct{} `type:"structure"`
// The Availability Zone that the HSM is in.
AvailabilityZone *string `type:"string"`
// The identifier of the elastic network interface (ENI) attached to the HSM.
EniId *string `type:"string"`
// The IP address assigned to the HSM's ENI.
EniIp *string `type:"string"`
// The ARN of the HSM.
HsmArn *string `type:"string"`
// The HSM model type.
HsmType *string `type:"string"`
// The ARN of the IAM role assigned to the HSM.
IamRoleArn *string `type:"string"`
// The list of partitions on the HSM.
Partitions []*string `type:"list"`
// The serial number of the HSM.
SerialNumber *string `type:"string"`
// The date and time that the server certificate was last updated.
ServerCertLastUpdated *string `type:"string"`
// The URI of the certificate server.
ServerCertUri *string `type:"string"`
// The HSM software version.
SoftwareVersion *string `type:"string"`
// The date and time that the SSH key was last updated.
SshKeyLastUpdated *string `type:"string"`
// The public SSH key.
SshPublicKey *string `type:"string"`
// The status of the HSM.
Status *string `type:"string" enum:"HsmStatus"`
// Contains additional information about the status of the HSM.
StatusDetails *string `type:"string"`
// The identifier of the subnet that the HSM is in.
SubnetId *string `type:"string"`
// The subscription end date.
SubscriptionEndDate *string `type:"string"`
// The subscription start date.
SubscriptionStartDate *string `type:"string"`
// Specifies the type of subscription for the HSM.
//
// * PRODUCTION - The HSM is being used in a production environment.
//
// * TRIAL - The HSM is being used in a product trial.
SubscriptionType *string `type:"string" enum:"SubscriptionType"`
// The name of the HSM vendor.
VendorName *string `type:"string"`
// The identifier of the VPC that the HSM is in.
VpcId *string `type:"string"`
}
// String returns the string representation
func (s DescribeHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeHsmOutput) GoString() string {
return s.String()
}
// SetAvailabilityZone sets the AvailabilityZone field's value.
func (s *DescribeHsmOutput) SetAvailabilityZone(v string) *DescribeHsmOutput {
s.AvailabilityZone = &v
return s
}
// SetEniId sets the EniId field's value.
func (s *DescribeHsmOutput) SetEniId(v string) *DescribeHsmOutput {
s.EniId = &v
return s
}
// SetEniIp sets the EniIp field's value.
func (s *DescribeHsmOutput) SetEniIp(v string) *DescribeHsmOutput {
s.EniIp = &v
return s
}
// SetHsmArn sets the HsmArn field's value.
func (s *DescribeHsmOutput) SetHsmArn(v string) *DescribeHsmOutput {
s.HsmArn = &v
return s
}
// SetHsmType sets the HsmType field's value.
func (s *DescribeHsmOutput) SetHsmType(v string) *DescribeHsmOutput {
s.HsmType = &v
return s
}
// SetIamRoleArn sets the IamRoleArn field's value.
func (s *DescribeHsmOutput) SetIamRoleArn(v string) *DescribeHsmOutput {
s.IamRoleArn = &v
return s
}
// SetPartitions sets the Partitions field's value.
func (s *DescribeHsmOutput) SetPartitions(v []*string) *DescribeHsmOutput {
s.Partitions = v
return s
}
// SetSerialNumber sets the SerialNumber field's value.
func (s *DescribeHsmOutput) SetSerialNumber(v string) *DescribeHsmOutput {
s.SerialNumber = &v
return s
}
// SetServerCertLastUpdated sets the ServerCertLastUpdated field's value.
func (s *DescribeHsmOutput) SetServerCertLastUpdated(v string) *DescribeHsmOutput {
s.ServerCertLastUpdated = &v
return s
}
// SetServerCertUri sets the ServerCertUri field's value.
func (s *DescribeHsmOutput) SetServerCertUri(v string) *DescribeHsmOutput {
s.ServerCertUri = &v
return s
}
// SetSoftwareVersion sets the SoftwareVersion field's value.
func (s *DescribeHsmOutput) SetSoftwareVersion(v string) *DescribeHsmOutput {
s.SoftwareVersion = &v
return s
}
// SetSshKeyLastUpdated sets the SshKeyLastUpdated field's value.
func (s *DescribeHsmOutput) SetSshKeyLastUpdated(v string) *DescribeHsmOutput {
s.SshKeyLastUpdated = &v
return s
}
// SetSshPublicKey sets the SshPublicKey field's value.
func (s *DescribeHsmOutput) SetSshPublicKey(v string) *DescribeHsmOutput {
s.SshPublicKey = &v
return s
}
// SetStatus sets the Status field's value.
func (s *DescribeHsmOutput) SetStatus(v string) *DescribeHsmOutput {
s.Status = &v
return s
}
// SetStatusDetails sets the StatusDetails field's value.
func (s *DescribeHsmOutput) SetStatusDetails(v string) *DescribeHsmOutput {
s.StatusDetails = &v
return s
}
// SetSubnetId sets the SubnetId field's value.
func (s *DescribeHsmOutput) SetSubnetId(v string) *DescribeHsmOutput {
s.SubnetId = &v
return s
}
// SetSubscriptionEndDate sets the SubscriptionEndDate field's value.
func (s *DescribeHsmOutput) SetSubscriptionEndDate(v string) *DescribeHsmOutput {
s.SubscriptionEndDate = &v
return s
}
// SetSubscriptionStartDate sets the SubscriptionStartDate field's value.
func (s *DescribeHsmOutput) SetSubscriptionStartDate(v string) *DescribeHsmOutput {
s.SubscriptionStartDate = &v
return s
}
// SetSubscriptionType sets the SubscriptionType field's value.
func (s *DescribeHsmOutput) SetSubscriptionType(v string) *DescribeHsmOutput {
s.SubscriptionType = &v
return s
}
// SetVendorName sets the VendorName field's value.
func (s *DescribeHsmOutput) SetVendorName(v string) *DescribeHsmOutput {
s.VendorName = &v
return s
}
// SetVpcId sets the VpcId field's value.
func (s *DescribeHsmOutput) SetVpcId(v string) *DescribeHsmOutput {
s.VpcId = &v
return s
}
type DescribeLunaClientInput struct {
_ struct{} `type:"structure"`
// The certificate fingerprint.
CertificateFingerprint *string `type:"string"`
// The ARN of the client.
ClientArn *string `type:"string"`
}
// String returns the string representation
func (s DescribeLunaClientInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeLunaClientInput) GoString() string {
return s.String()
}
// SetCertificateFingerprint sets the CertificateFingerprint field's value.
func (s *DescribeLunaClientInput) SetCertificateFingerprint(v string) *DescribeLunaClientInput {
s.CertificateFingerprint = &v
return s
}
// SetClientArn sets the ClientArn field's value.
func (s *DescribeLunaClientInput) SetClientArn(v string) *DescribeLunaClientInput {
s.ClientArn = &v
return s
}
type DescribeLunaClientOutput struct {
_ struct{} `type:"structure"`
// The certificate installed on the HSMs used by this client.
Certificate *string `min:"600" type:"string"`
// The certificate fingerprint.
CertificateFingerprint *string `type:"string"`
// The ARN of the client.
ClientArn *string `type:"string"`
// The label of the client.
Label *string `type:"string"`
// The date and time the client was last modified.
LastModifiedTimestamp *string `type:"string"`
}
// String returns the string representation
func (s DescribeLunaClientOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeLunaClientOutput) GoString() string {
return s.String()
}
// SetCertificate sets the Certificate field's value.
func (s *DescribeLunaClientOutput) SetCertificate(v string) *DescribeLunaClientOutput {
s.Certificate = &v
return s
}
// SetCertificateFingerprint sets the CertificateFingerprint field's value.
func (s *DescribeLunaClientOutput) SetCertificateFingerprint(v string) *DescribeLunaClientOutput {
s.CertificateFingerprint = &v
return s
}
// SetClientArn sets the ClientArn field's value.
func (s *DescribeLunaClientOutput) SetClientArn(v string) *DescribeLunaClientOutput {
s.ClientArn = &v
return s
}
// SetLabel sets the Label field's value.
func (s *DescribeLunaClientOutput) SetLabel(v string) *DescribeLunaClientOutput {
s.Label = &v
return s
}
// SetLastModifiedTimestamp sets the LastModifiedTimestamp field's value.
func (s *DescribeLunaClientOutput) SetLastModifiedTimestamp(v string) *DescribeLunaClientOutput {
s.LastModifiedTimestamp = &v
return s
}
type GetConfigInput struct {
_ struct{} `type:"structure"`
// The ARN of the client.
//
// ClientArn is a required field
ClientArn *string `type:"string" required:"true"`
// The client version.
//
// ClientVersion is a required field
ClientVersion *string `type:"string" required:"true" enum:"ClientVersion"`
// A list of ARNs that identify the high-availability partition groups that
// are associated with the client.
//
// HapgList is a required field
HapgList []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s GetConfigInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetConfigInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetConfigInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetConfigInput"}
if s.ClientArn == nil {
invalidParams.Add(request.NewErrParamRequired("ClientArn"))
}
if s.ClientVersion == nil {
invalidParams.Add(request.NewErrParamRequired("ClientVersion"))
}
if s.HapgList == nil {
invalidParams.Add(request.NewErrParamRequired("HapgList"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClientArn sets the ClientArn field's value.
func (s *GetConfigInput) SetClientArn(v string) *GetConfigInput {
s.ClientArn = &v
return s
}
// SetClientVersion sets the ClientVersion field's value.
func (s *GetConfigInput) SetClientVersion(v string) *GetConfigInput {
s.ClientVersion = &v
return s
}
// SetHapgList sets the HapgList field's value.
func (s *GetConfigInput) SetHapgList(v []*string) *GetConfigInput {
s.HapgList = v
return s
}
type GetConfigOutput struct {
_ struct{} `type:"structure"`
// The certificate file containing the server.pem files of the HSMs.
ConfigCred *string `type:"string"`
// The chrystoki.conf configuration file.
ConfigFile *string `type:"string"`
// The type of credentials.
ConfigType *string `type:"string"`
}
// String returns the string representation
func (s GetConfigOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetConfigOutput) GoString() string {
return s.String()
}
// SetConfigCred sets the ConfigCred field's value.
func (s *GetConfigOutput) SetConfigCred(v string) *GetConfigOutput {
s.ConfigCred = &v
return s
}
// SetConfigFile sets the ConfigFile field's value.
func (s *GetConfigOutput) SetConfigFile(v string) *GetConfigOutput {
s.ConfigFile = &v
return s
}
// SetConfigType sets the ConfigType field's value.
func (s *GetConfigOutput) SetConfigType(v string) *GetConfigOutput {
s.ConfigType = &v
return s
}
// Indicates that one or more of the request parameters are not valid.
type InvalidRequestException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s InvalidRequestException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InvalidRequestException) GoString() string {
return s.String()
}
func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
return &InvalidRequestException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InvalidRequestException) Code() string {
return "InvalidRequestException"
}
// Message returns the exception's message.
func (s *InvalidRequestException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidRequestException) OrigErr() error {
return nil
}
func (s *InvalidRequestException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InvalidRequestException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InvalidRequestException) RequestID() string {
return s.RespMetadata.RequestID
}
// Contains the inputs for the ListAvailableZones action.
type ListAvailableZonesInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s ListAvailableZonesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAvailableZonesInput) GoString() string {
return s.String()
}
type ListAvailableZonesOutput struct {
_ struct{} `type:"structure"`
// The list of Availability Zones that have available AWS CloudHSM capacity.
AZList []*string `type:"list"`
}
// String returns the string representation
func (s ListAvailableZonesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAvailableZonesOutput) GoString() string {
return s.String()
}
// SetAZList sets the AZList field's value.
func (s *ListAvailableZonesOutput) SetAZList(v []*string) *ListAvailableZonesOutput {
s.AZList = v
return s
}
type ListHapgsInput struct {
_ struct{} `type:"structure"`
// The NextToken value from a previous call to ListHapgs. Pass null if this
// is the first call.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListHapgsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListHapgsInput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListHapgsInput) SetNextToken(v string) *ListHapgsInput {
s.NextToken = &v
return s
}
type ListHapgsOutput struct {
_ struct{} `type:"structure"`
// The list of high-availability partition groups.
//
// HapgList is a required field
HapgList []*string `type:"list" required:"true"`
// If not null, more results are available. Pass this value to ListHapgs to
// retrieve the next set of items.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListHapgsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListHapgsOutput) GoString() string {
return s.String()
}
// SetHapgList sets the HapgList field's value.
func (s *ListHapgsOutput) SetHapgList(v []*string) *ListHapgsOutput {
s.HapgList = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListHapgsOutput) SetNextToken(v string) *ListHapgsOutput {
s.NextToken = &v
return s
}
type ListHsmsInput struct {
_ struct{} `type:"structure"`
// The NextToken value from a previous call to ListHsms. Pass null if this is
// the first call.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListHsmsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListHsmsInput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListHsmsInput) SetNextToken(v string) *ListHsmsInput {
s.NextToken = &v
return s
}
// Contains the output of the ListHsms operation.
type ListHsmsOutput struct {
_ struct{} `type:"structure"`
// The list of ARNs that identify the HSMs.
HsmList []*string `type:"list"`
// If not null, more results are available. Pass this value to ListHsms to retrieve
// the next set of items.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListHsmsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListHsmsOutput) GoString() string {
return s.String()
}
// SetHsmList sets the HsmList field's value.
func (s *ListHsmsOutput) SetHsmList(v []*string) *ListHsmsOutput {
s.HsmList = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListHsmsOutput) SetNextToken(v string) *ListHsmsOutput {
s.NextToken = &v
return s
}
type ListLunaClientsInput struct {
_ struct{} `type:"structure"`
// The NextToken value from a previous call to ListLunaClients. Pass null if
// this is the first call.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListLunaClientsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListLunaClientsInput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListLunaClientsInput) SetNextToken(v string) *ListLunaClientsInput {
s.NextToken = &v
return s
}
type ListLunaClientsOutput struct {
_ struct{} `type:"structure"`
// The list of clients.
//
// ClientList is a required field
ClientList []*string `type:"list" required:"true"`
// If not null, more results are available. Pass this to ListLunaClients to
// retrieve the next set of items.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListLunaClientsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListLunaClientsOutput) GoString() string {
return s.String()
}
// SetClientList sets the ClientList field's value.
func (s *ListLunaClientsOutput) SetClientList(v []*string) *ListLunaClientsOutput {
s.ClientList = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListLunaClientsOutput) SetNextToken(v string) *ListLunaClientsOutput {
s.NextToken = &v
return s
}
type ListTagsForResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the AWS CloudHSM resource.
//
// ResourceArn is a required field
ResourceArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ListTagsForResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsForResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsForResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
if s.ResourceArn == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceArn sets the ResourceArn field's value.
func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
s.ResourceArn = &v
return s
}
type ListTagsForResourceOutput struct {
_ struct{} `type:"structure"`
// One or more tags.
//
// TagList is a required field
TagList []*Tag `type:"list" required:"true"`
}
// String returns the string representation
func (s ListTagsForResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsForResourceOutput) GoString() string {
return s.String()
}
// SetTagList sets the TagList field's value.
func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput {
s.TagList = v
return s
}
type ModifyHapgInput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group to modify.
//
// HapgArn is a required field
HapgArn *string `type:"string" required:"true"`
// The new label for the high-availability partition group.
Label *string `type:"string"`
// The list of partition serial numbers to make members of the high-availability
// partition group.
PartitionSerialList []*string `type:"list"`
}
// String returns the string representation
func (s ModifyHapgInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyHapgInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyHapgInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyHapgInput"}
if s.HapgArn == nil {
invalidParams.Add(request.NewErrParamRequired("HapgArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHapgArn sets the HapgArn field's value.
func (s *ModifyHapgInput) SetHapgArn(v string) *ModifyHapgInput {
s.HapgArn = &v
return s
}
// SetLabel sets the Label field's value.
func (s *ModifyHapgInput) SetLabel(v string) *ModifyHapgInput {
s.Label = &v
return s
}
// SetPartitionSerialList sets the PartitionSerialList field's value.
func (s *ModifyHapgInput) SetPartitionSerialList(v []*string) *ModifyHapgInput {
s.PartitionSerialList = v
return s
}
type ModifyHapgOutput struct {
_ struct{} `type:"structure"`
// The ARN of the high-availability partition group.
HapgArn *string `type:"string"`
}
// String returns the string representation
func (s ModifyHapgOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyHapgOutput) GoString() string {
return s.String()
}
// SetHapgArn sets the HapgArn field's value.
func (s *ModifyHapgOutput) SetHapgArn(v string) *ModifyHapgOutput {
s.HapgArn = &v
return s
}
// Contains the inputs for the ModifyHsm operation.
type ModifyHsmInput struct {
_ struct{} `type:"structure"`
// The new IP address for the elastic network interface (ENI) attached to the
// HSM.
//
// If the HSM is moved to a different subnet, and an IP address is not specified,
// an IP address will be randomly chosen from the CIDR range of the new subnet.
EniIp *string `type:"string"`
// The new external ID.
ExternalId *string `type:"string"`
// The ARN of the HSM to modify.
//
// HsmArn is a required field
HsmArn *string `type:"string" required:"true"`
// The new IAM role ARN.
IamRoleArn *string `type:"string"`
// The new identifier of the subnet that the HSM is in. The new subnet must
// be in the same Availability Zone as the current subnet.
SubnetId *string `type:"string"`
// The new IP address for the syslog monitoring server. The AWS CloudHSM service
// only supports one syslog monitoring server.
SyslogIp *string `type:"string"`
}
// String returns the string representation
func (s ModifyHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyHsmInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyHsmInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyHsmInput"}
if s.HsmArn == nil {
invalidParams.Add(request.NewErrParamRequired("HsmArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEniIp sets the EniIp field's value.
func (s *ModifyHsmInput) SetEniIp(v string) *ModifyHsmInput {
s.EniIp = &v
return s
}
// SetExternalId sets the ExternalId field's value.
func (s *ModifyHsmInput) SetExternalId(v string) *ModifyHsmInput {
s.ExternalId = &v
return s
}
// SetHsmArn sets the HsmArn field's value.
func (s *ModifyHsmInput) SetHsmArn(v string) *ModifyHsmInput {
s.HsmArn = &v
return s
}
// SetIamRoleArn sets the IamRoleArn field's value.
func (s *ModifyHsmInput) SetIamRoleArn(v string) *ModifyHsmInput {
s.IamRoleArn = &v
return s
}
// SetSubnetId sets the SubnetId field's value.
func (s *ModifyHsmInput) SetSubnetId(v string) *ModifyHsmInput {
s.SubnetId = &v
return s
}
// SetSyslogIp sets the SyslogIp field's value.
func (s *ModifyHsmInput) SetSyslogIp(v string) *ModifyHsmInput {
s.SyslogIp = &v
return s
}
// Contains the output of the ModifyHsm operation.
type ModifyHsmOutput struct {
_ struct{} `type:"structure"`
// The ARN of the HSM.
HsmArn *string `type:"string"`
}
// String returns the string representation
func (s ModifyHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyHsmOutput) GoString() string {
return s.String()
}
// SetHsmArn sets the HsmArn field's value.
func (s *ModifyHsmOutput) SetHsmArn(v string) *ModifyHsmOutput {
s.HsmArn = &v
return s
}
type ModifyLunaClientInput struct {
_ struct{} `type:"structure"`
// The new certificate for the client.
//
// Certificate is a required field
Certificate *string `min:"600" type:"string" required:"true"`
// The ARN of the client.
//
// ClientArn is a required field
ClientArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ModifyLunaClientInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyLunaClientInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyLunaClientInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyLunaClientInput"}
if s.Certificate == nil {
invalidParams.Add(request.NewErrParamRequired("Certificate"))
}
if s.Certificate != nil && len(*s.Certificate) < 600 {
invalidParams.Add(request.NewErrParamMinLen("Certificate", 600))
}
if s.ClientArn == nil {
invalidParams.Add(request.NewErrParamRequired("ClientArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCertificate sets the Certificate field's value.
func (s *ModifyLunaClientInput) SetCertificate(v string) *ModifyLunaClientInput {
s.Certificate = &v
return s
}
// SetClientArn sets the ClientArn field's value.
func (s *ModifyLunaClientInput) SetClientArn(v string) *ModifyLunaClientInput {
s.ClientArn = &v
return s
}
type ModifyLunaClientOutput struct {
_ struct{} `type:"structure"`
// The ARN of the client.
ClientArn *string `type:"string"`
}
// String returns the string representation
func (s ModifyLunaClientOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyLunaClientOutput) GoString() string {
return s.String()
}
// SetClientArn sets the ClientArn field's value.
func (s *ModifyLunaClientOutput) SetClientArn(v string) *ModifyLunaClientOutput {
s.ClientArn = &v
return s
}
type RemoveTagsFromResourceInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the AWS CloudHSM resource.
//
// ResourceArn is a required field
ResourceArn *string `type:"string" required:"true"`
// The tag key or keys to remove.
//
// Specify only the tag key to remove (not the value). To overwrite the value
// for an existing tag, use AddTagsToResource.
//
// TagKeyList is a required field
TagKeyList []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s RemoveTagsFromResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RemoveTagsFromResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RemoveTagsFromResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"}
if s.ResourceArn == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
}
if s.TagKeyList == nil {
invalidParams.Add(request.NewErrParamRequired("TagKeyList"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceArn sets the ResourceArn field's value.
func (s *RemoveTagsFromResourceInput) SetResourceArn(v string) *RemoveTagsFromResourceInput {
s.ResourceArn = &v
return s
}
// SetTagKeyList sets the TagKeyList field's value.
func (s *RemoveTagsFromResourceInput) SetTagKeyList(v []*string) *RemoveTagsFromResourceInput {
s.TagKeyList = v
return s
}
type RemoveTagsFromResourceOutput struct {
_ struct{} `type:"structure"`
// The status of the operation.
//
// Status is a required field
Status *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RemoveTagsFromResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RemoveTagsFromResourceOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *RemoveTagsFromResourceOutput) SetStatus(v string) *RemoveTagsFromResourceOutput {
s.Status = &v
return s
}
// A key-value pair that identifies or specifies metadata about an AWS CloudHSM
// resource.
type Tag struct {
_ struct{} `type:"structure"`
// The key of the tag.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true"`
// The value of the tag.
//
// Value is a required field
Value *string `type:"string" required:"true"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Tag) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Tag"}
if s.Key == nil {
invalidParams.Add(request.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Key", 1))
}
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
s.Key = &v
return s
}
// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
s.Value = &v
return s
}
const (
// ClientVersion51 is a ClientVersion enum value
ClientVersion51 = "5.1"
// ClientVersion53 is a ClientVersion enum value
ClientVersion53 = "5.3"
)
// ClientVersion_Values returns all elements of the ClientVersion enum
func ClientVersion_Values() []string {
return []string{
ClientVersion51,
ClientVersion53,
}
}
const (
// CloudHsmObjectStateReady is a CloudHsmObjectState enum value
CloudHsmObjectStateReady = "READY"
// CloudHsmObjectStateUpdating is a CloudHsmObjectState enum value
CloudHsmObjectStateUpdating = "UPDATING"
// CloudHsmObjectStateDegraded is a CloudHsmObjectState enum value
CloudHsmObjectStateDegraded = "DEGRADED"
)
// CloudHsmObjectState_Values returns all elements of the CloudHsmObjectState enum
func CloudHsmObjectState_Values() []string {
return []string{
CloudHsmObjectStateReady,
CloudHsmObjectStateUpdating,
CloudHsmObjectStateDegraded,
}
}
const (
// HsmStatusPending is a HsmStatus enum value
HsmStatusPending = "PENDING"
// HsmStatusRunning is a HsmStatus enum value
HsmStatusRunning = "RUNNING"
// HsmStatusUpdating is a HsmStatus enum value
HsmStatusUpdating = "UPDATING"
// HsmStatusSuspended is a HsmStatus enum value
HsmStatusSuspended = "SUSPENDED"
// HsmStatusTerminating is a HsmStatus enum value
HsmStatusTerminating = "TERMINATING"
// HsmStatusTerminated is a HsmStatus enum value
HsmStatusTerminated = "TERMINATED"
// HsmStatusDegraded is a HsmStatus enum value
HsmStatusDegraded = "DEGRADED"
)
// HsmStatus_Values returns all elements of the HsmStatus enum
func HsmStatus_Values() []string {
return []string{
HsmStatusPending,
HsmStatusRunning,
HsmStatusUpdating,
HsmStatusSuspended,
HsmStatusTerminating,
HsmStatusTerminated,
HsmStatusDegraded,
}
}
// Specifies the type of subscription for the HSM.
//
// * PRODUCTION - The HSM is being used in a production environment.
//
// * TRIAL - The HSM is being used in a product trial.
const (
// SubscriptionTypeProduction is a SubscriptionType enum value
SubscriptionTypeProduction = "PRODUCTION"
)
// SubscriptionType_Values returns all elements of the SubscriptionType enum
func SubscriptionType_Values() []string {
return []string{
SubscriptionTypeProduction,
}
}
| 4,026 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudhsm provides the client and types for making API
// requests to Amazon CloudHSM.
//
// This is documentation for AWS CloudHSM Classic. For more information, see
// AWS CloudHSM Classic FAQs (http://aws.amazon.com/cloudhsm/faqs-classic/),
// the AWS CloudHSM Classic User Guide (https://docs.aws.amazon.com/cloudhsm/classic/userguide/),
// and the AWS CloudHSM Classic API Reference (https://docs.aws.amazon.com/cloudhsm/classic/APIReference/).
//
// For information about the current version of AWS CloudHSM, see AWS CloudHSM
// (http://aws.amazon.com/cloudhsm/), the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/),
// and the AWS CloudHSM API Reference (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30 for more information on this service.
//
// See cloudhsm package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsm/
//
// Using the Client
//
// To contact Amazon CloudHSM 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 CloudHSM client CloudHSM for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsm/#New
package cloudhsm
| 36 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsm
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCloudHsmInternalException for service response error code
// "CloudHsmInternalException".
//
// Indicates that an internal error occurred.
ErrCodeCloudHsmInternalException = "CloudHsmInternalException"
// ErrCodeCloudHsmServiceException for service response error code
// "CloudHsmServiceException".
//
// Indicates that an exception occurred in the AWS CloudHSM service.
ErrCodeCloudHsmServiceException = "CloudHsmServiceException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// Indicates that one or more of the request parameters are not valid.
ErrCodeInvalidRequestException = "InvalidRequestException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CloudHsmInternalException": newErrorCloudHsmInternalException,
"CloudHsmServiceException": newErrorCloudHsmServiceException,
"InvalidRequestException": newErrorInvalidRequestException,
}
| 35 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsm
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"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// CloudHSM provides the API operation methods for making requests to
// Amazon CloudHSM. See this package's package overview docs
// for details on the service.
//
// CloudHSM methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudHSM 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 = "cloudhsm" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudHSM" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudHSM 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudHSM client from just a session.
// svc := cloudhsm.New(mySession)
//
// // Create a CloudHSM client with additional configuration
// svc := cloudhsm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSM {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudHSM {
svc := &CloudHSM{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2014-05-30",
JSONVersion: "1.1",
TargetPrefix: "CloudHsmFrontendService",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CloudHSM operation and runs any
// custom request initialization.
func (c *CloudHSM) 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
}
| 104 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudhsmiface provides an interface to enable mocking the Amazon CloudHSM 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 cloudhsmiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudhsm"
)
// CloudHSMAPI provides an interface to enable mocking the
// cloudhsm.CloudHSM 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 CloudHSM.
// func myFunc(svc cloudhsmiface.CloudHSMAPI) bool {
// // Make svc.AddTagsToResource request
// }
//
// func main() {
// sess := session.New()
// svc := cloudhsm.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudHSMClient struct {
// cloudhsmiface.CloudHSMAPI
// }
// func (m *mockCloudHSMClient) AddTagsToResource(input *cloudhsm.AddTagsToResourceInput) (*cloudhsm.AddTagsToResourceOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudHSMClient{}
//
// 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 CloudHSMAPI interface {
AddTagsToResource(*cloudhsm.AddTagsToResourceInput) (*cloudhsm.AddTagsToResourceOutput, error)
AddTagsToResourceWithContext(aws.Context, *cloudhsm.AddTagsToResourceInput, ...request.Option) (*cloudhsm.AddTagsToResourceOutput, error)
AddTagsToResourceRequest(*cloudhsm.AddTagsToResourceInput) (*request.Request, *cloudhsm.AddTagsToResourceOutput)
CreateHapg(*cloudhsm.CreateHapgInput) (*cloudhsm.CreateHapgOutput, error)
CreateHapgWithContext(aws.Context, *cloudhsm.CreateHapgInput, ...request.Option) (*cloudhsm.CreateHapgOutput, error)
CreateHapgRequest(*cloudhsm.CreateHapgInput) (*request.Request, *cloudhsm.CreateHapgOutput)
CreateHsm(*cloudhsm.CreateHsmInput) (*cloudhsm.CreateHsmOutput, error)
CreateHsmWithContext(aws.Context, *cloudhsm.CreateHsmInput, ...request.Option) (*cloudhsm.CreateHsmOutput, error)
CreateHsmRequest(*cloudhsm.CreateHsmInput) (*request.Request, *cloudhsm.CreateHsmOutput)
CreateLunaClient(*cloudhsm.CreateLunaClientInput) (*cloudhsm.CreateLunaClientOutput, error)
CreateLunaClientWithContext(aws.Context, *cloudhsm.CreateLunaClientInput, ...request.Option) (*cloudhsm.CreateLunaClientOutput, error)
CreateLunaClientRequest(*cloudhsm.CreateLunaClientInput) (*request.Request, *cloudhsm.CreateLunaClientOutput)
DeleteHapg(*cloudhsm.DeleteHapgInput) (*cloudhsm.DeleteHapgOutput, error)
DeleteHapgWithContext(aws.Context, *cloudhsm.DeleteHapgInput, ...request.Option) (*cloudhsm.DeleteHapgOutput, error)
DeleteHapgRequest(*cloudhsm.DeleteHapgInput) (*request.Request, *cloudhsm.DeleteHapgOutput)
DeleteHsm(*cloudhsm.DeleteHsmInput) (*cloudhsm.DeleteHsmOutput, error)
DeleteHsmWithContext(aws.Context, *cloudhsm.DeleteHsmInput, ...request.Option) (*cloudhsm.DeleteHsmOutput, error)
DeleteHsmRequest(*cloudhsm.DeleteHsmInput) (*request.Request, *cloudhsm.DeleteHsmOutput)
DeleteLunaClient(*cloudhsm.DeleteLunaClientInput) (*cloudhsm.DeleteLunaClientOutput, error)
DeleteLunaClientWithContext(aws.Context, *cloudhsm.DeleteLunaClientInput, ...request.Option) (*cloudhsm.DeleteLunaClientOutput, error)
DeleteLunaClientRequest(*cloudhsm.DeleteLunaClientInput) (*request.Request, *cloudhsm.DeleteLunaClientOutput)
DescribeHapg(*cloudhsm.DescribeHapgInput) (*cloudhsm.DescribeHapgOutput, error)
DescribeHapgWithContext(aws.Context, *cloudhsm.DescribeHapgInput, ...request.Option) (*cloudhsm.DescribeHapgOutput, error)
DescribeHapgRequest(*cloudhsm.DescribeHapgInput) (*request.Request, *cloudhsm.DescribeHapgOutput)
DescribeHsm(*cloudhsm.DescribeHsmInput) (*cloudhsm.DescribeHsmOutput, error)
DescribeHsmWithContext(aws.Context, *cloudhsm.DescribeHsmInput, ...request.Option) (*cloudhsm.DescribeHsmOutput, error)
DescribeHsmRequest(*cloudhsm.DescribeHsmInput) (*request.Request, *cloudhsm.DescribeHsmOutput)
DescribeLunaClient(*cloudhsm.DescribeLunaClientInput) (*cloudhsm.DescribeLunaClientOutput, error)
DescribeLunaClientWithContext(aws.Context, *cloudhsm.DescribeLunaClientInput, ...request.Option) (*cloudhsm.DescribeLunaClientOutput, error)
DescribeLunaClientRequest(*cloudhsm.DescribeLunaClientInput) (*request.Request, *cloudhsm.DescribeLunaClientOutput)
GetConfig(*cloudhsm.GetConfigInput) (*cloudhsm.GetConfigOutput, error)
GetConfigWithContext(aws.Context, *cloudhsm.GetConfigInput, ...request.Option) (*cloudhsm.GetConfigOutput, error)
GetConfigRequest(*cloudhsm.GetConfigInput) (*request.Request, *cloudhsm.GetConfigOutput)
ListAvailableZones(*cloudhsm.ListAvailableZonesInput) (*cloudhsm.ListAvailableZonesOutput, error)
ListAvailableZonesWithContext(aws.Context, *cloudhsm.ListAvailableZonesInput, ...request.Option) (*cloudhsm.ListAvailableZonesOutput, error)
ListAvailableZonesRequest(*cloudhsm.ListAvailableZonesInput) (*request.Request, *cloudhsm.ListAvailableZonesOutput)
ListHapgs(*cloudhsm.ListHapgsInput) (*cloudhsm.ListHapgsOutput, error)
ListHapgsWithContext(aws.Context, *cloudhsm.ListHapgsInput, ...request.Option) (*cloudhsm.ListHapgsOutput, error)
ListHapgsRequest(*cloudhsm.ListHapgsInput) (*request.Request, *cloudhsm.ListHapgsOutput)
ListHsms(*cloudhsm.ListHsmsInput) (*cloudhsm.ListHsmsOutput, error)
ListHsmsWithContext(aws.Context, *cloudhsm.ListHsmsInput, ...request.Option) (*cloudhsm.ListHsmsOutput, error)
ListHsmsRequest(*cloudhsm.ListHsmsInput) (*request.Request, *cloudhsm.ListHsmsOutput)
ListLunaClients(*cloudhsm.ListLunaClientsInput) (*cloudhsm.ListLunaClientsOutput, error)
ListLunaClientsWithContext(aws.Context, *cloudhsm.ListLunaClientsInput, ...request.Option) (*cloudhsm.ListLunaClientsOutput, error)
ListLunaClientsRequest(*cloudhsm.ListLunaClientsInput) (*request.Request, *cloudhsm.ListLunaClientsOutput)
ListTagsForResource(*cloudhsm.ListTagsForResourceInput) (*cloudhsm.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *cloudhsm.ListTagsForResourceInput, ...request.Option) (*cloudhsm.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*cloudhsm.ListTagsForResourceInput) (*request.Request, *cloudhsm.ListTagsForResourceOutput)
ModifyHapg(*cloudhsm.ModifyHapgInput) (*cloudhsm.ModifyHapgOutput, error)
ModifyHapgWithContext(aws.Context, *cloudhsm.ModifyHapgInput, ...request.Option) (*cloudhsm.ModifyHapgOutput, error)
ModifyHapgRequest(*cloudhsm.ModifyHapgInput) (*request.Request, *cloudhsm.ModifyHapgOutput)
ModifyHsm(*cloudhsm.ModifyHsmInput) (*cloudhsm.ModifyHsmOutput, error)
ModifyHsmWithContext(aws.Context, *cloudhsm.ModifyHsmInput, ...request.Option) (*cloudhsm.ModifyHsmOutput, error)
ModifyHsmRequest(*cloudhsm.ModifyHsmInput) (*request.Request, *cloudhsm.ModifyHsmOutput)
ModifyLunaClient(*cloudhsm.ModifyLunaClientInput) (*cloudhsm.ModifyLunaClientOutput, error)
ModifyLunaClientWithContext(aws.Context, *cloudhsm.ModifyLunaClientInput, ...request.Option) (*cloudhsm.ModifyLunaClientOutput, error)
ModifyLunaClientRequest(*cloudhsm.ModifyLunaClientInput) (*request.Request, *cloudhsm.ModifyLunaClientOutput)
RemoveTagsFromResource(*cloudhsm.RemoveTagsFromResourceInput) (*cloudhsm.RemoveTagsFromResourceOutput, error)
RemoveTagsFromResourceWithContext(aws.Context, *cloudhsm.RemoveTagsFromResourceInput, ...request.Option) (*cloudhsm.RemoveTagsFromResourceOutput, error)
RemoveTagsFromResourceRequest(*cloudhsm.RemoveTagsFromResourceInput) (*request.Request, *cloudhsm.RemoveTagsFromResourceOutput)
}
var _ CloudHSMAPI = (*cloudhsm.CloudHSM)(nil)
| 145 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsmv2
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opCopyBackupToRegion = "CopyBackupToRegion"
// CopyBackupToRegionRequest generates a "aws/request.Request" representing the
// client's request for the CopyBackupToRegion operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CopyBackupToRegion for more information on using the CopyBackupToRegion
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CopyBackupToRegionRequest method.
// req, resp := client.CopyBackupToRegionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion
func (c *CloudHSMV2) CopyBackupToRegionRequest(input *CopyBackupToRegionInput) (req *request.Request, output *CopyBackupToRegionOutput) {
op := &request.Operation{
Name: opCopyBackupToRegion,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CopyBackupToRegionInput{}
}
output = &CopyBackupToRegionOutput{}
req = c.newRequest(op, input, output)
return
}
// CopyBackupToRegion API operation for AWS CloudHSM V2.
//
// Copy an AWS CloudHSM cluster backup to a different region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation CopyBackupToRegion for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion
func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error) {
req, out := c.CopyBackupToRegionRequest(input)
return out, req.Send()
}
// CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of
// the ability to pass a context and additional request options.
//
// See CopyBackupToRegion for details on how to use this API operation.
//
// 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 *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error) {
req, out := c.CopyBackupToRegionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateCluster = "CreateCluster"
// CreateClusterRequest generates a "aws/request.Request" representing the
// client's request for the CreateCluster operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateCluster for more information on using the CreateCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateClusterRequest method.
// req, resp := client.CreateClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster
func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
op := &request.Operation{
Name: opCreateCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateClusterInput{}
}
output = &CreateClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateCluster API operation for AWS CloudHSM V2.
//
// Creates a new AWS CloudHSM cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation CreateCluster for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster
func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
req, out := c.CreateClusterRequest(input)
return out, req.Send()
}
// CreateClusterWithContext is the same as CreateCluster with the addition of
// the ability to pass a context and additional request options.
//
// See CreateCluster for details on how to use this API operation.
//
// 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 *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) {
req, out := c.CreateClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateHsm = "CreateHsm"
// CreateHsmRequest generates a "aws/request.Request" representing the
// client's request for the CreateHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateHsm for more information on using the CreateHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateHsmRequest method.
// req, resp := client.CreateHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm
func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) {
op := &request.Operation{
Name: opCreateHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHsmInput{}
}
output = &CreateHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateHsm API operation for AWS CloudHSM V2.
//
// Creates a new hardware security module (HSM) in the specified AWS CloudHSM
// cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation CreateHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm
func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) {
req, out := c.CreateHsmRequest(input)
return out, req.Send()
}
// CreateHsmWithContext is the same as CreateHsm with the addition of
// the ability to pass a context and additional request options.
//
// See CreateHsm for details on how to use this API operation.
//
// 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 *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) {
req, out := c.CreateHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteBackup = "DeleteBackup"
// DeleteBackupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBackup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteBackup for more information on using the DeleteBackup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteBackupRequest method.
// req, resp := client.DeleteBackupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup
func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) {
op := &request.Operation{
Name: opDeleteBackup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBackupInput{}
}
output = &DeleteBackupOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteBackup API operation for AWS CloudHSM V2.
//
// Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7
// days after the DeleteBackup request is made. For more information on restoring
// a backup, see RestoreBackup.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation DeleteBackup for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup
func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) {
req, out := c.DeleteBackupRequest(input)
return out, req.Send()
}
// DeleteBackupWithContext is the same as DeleteBackup with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteBackup for details on how to use this API operation.
//
// 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 *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) {
req, out := c.DeleteBackupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteCluster = "DeleteCluster"
// DeleteClusterRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCluster operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteCluster for more information on using the DeleteCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteClusterRequest method.
// req, resp := client.DeleteClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster
func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) {
op := &request.Operation{
Name: opDeleteCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteClusterInput{}
}
output = &DeleteClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteCluster API operation for AWS CloudHSM V2.
//
// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster,
// you must delete all HSMs in the cluster. To see if the cluster contains any
// HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation DeleteCluster for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster
func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) {
req, out := c.DeleteClusterRequest(input)
return out, req.Send()
}
// DeleteClusterWithContext is the same as DeleteCluster with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteCluster for details on how to use this API operation.
//
// 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 *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) {
req, out := c.DeleteClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteHsm = "DeleteHsm"
// DeleteHsmRequest generates a "aws/request.Request" representing the
// client's request for the DeleteHsm operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteHsm for more information on using the DeleteHsm
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteHsmRequest method.
// req, resp := client.DeleteHsmRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm
func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) {
op := &request.Operation{
Name: opDeleteHsm,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteHsmInput{}
}
output = &DeleteHsmOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteHsm API operation for AWS CloudHSM V2.
//
// Deletes the specified HSM. To specify an HSM, you can use its identifier
// (ID), the IP address of the HSM's elastic network interface (ENI), or the
// ID of the HSM's ENI. You need to specify only one of these values. To find
// these values, use DescribeClusters.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation DeleteHsm for usage and error information.
//
// Returned Error Types:
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm
func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) {
req, out := c.DeleteHsmRequest(input)
return out, req.Send()
}
// DeleteHsmWithContext is the same as DeleteHsm with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteHsm for details on how to use this API operation.
//
// 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 *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) {
req, out := c.DeleteHsmRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeBackups = "DescribeBackups"
// DescribeBackupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBackups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeBackups for more information on using the DescribeBackups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeBackupsRequest method.
// req, resp := client.DescribeBackupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups
func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) {
op := &request.Operation{
Name: opDescribeBackups,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeBackupsInput{}
}
output = &DescribeBackupsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeBackups API operation for AWS CloudHSM V2.
//
// Gets information about backups of AWS CloudHSM clusters.
//
// This is a paginated operation, which means that each response might contain
// only a subset of all the backups. When the response contains only a subset
// of backups, it includes a NextToken value. Use this value in a subsequent
// DescribeBackups request to get more backups. When you receive a response
// with no NextToken (or an empty or null value), that means there are no more
// backups to get.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation DescribeBackups for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups
func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) {
req, out := c.DescribeBackupsRequest(input)
return out, req.Send()
}
// DescribeBackupsWithContext is the same as DescribeBackups with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeBackups for details on how to use this API operation.
//
// 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 *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) {
req, out := c.DescribeBackupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeBackupsPages iterates over the pages of a DescribeBackups operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeBackups method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeBackups operation.
// pageNum := 0
// err := client.DescribeBackupsPages(params,
// func(page *cloudhsmv2.DescribeBackupsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error {
return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeBackupsPagesWithContext same as DescribeBackupsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeBackupsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeBackupsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opDescribeClusters = "DescribeClusters"
// DescribeClustersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeClusters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeClusters for more information on using the DescribeClusters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeClustersRequest method.
// req, resp := client.DescribeClustersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters
func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) {
op := &request.Operation{
Name: opDescribeClusters,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeClustersInput{}
}
output = &DescribeClustersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeClusters API operation for AWS CloudHSM V2.
//
// Gets information about AWS CloudHSM clusters.
//
// This is a paginated operation, which means that each response might contain
// only a subset of all the clusters. When the response contains only a subset
// of clusters, it includes a NextToken value. Use this value in a subsequent
// DescribeClusters request to get more clusters. When you receive a response
// with no NextToken (or an empty or null value), that means there are no more
// clusters to get.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation DescribeClusters for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters
func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) {
req, out := c.DescribeClustersRequest(input)
return out, req.Send()
}
// DescribeClustersWithContext is the same as DescribeClusters with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeClusters for details on how to use this API operation.
//
// 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 *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) {
req, out := c.DescribeClustersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeClustersPages iterates over the pages of a DescribeClusters operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeClusters method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeClusters operation.
// pageNum := 0
// err := client.DescribeClustersPages(params,
// func(page *cloudhsmv2.DescribeClustersOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error {
return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeClustersPagesWithContext same as DescribeClustersPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeClustersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeClustersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opInitializeCluster = "InitializeCluster"
// InitializeClusterRequest generates a "aws/request.Request" representing the
// client's request for the InitializeCluster operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See InitializeCluster for more information on using the InitializeCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the InitializeClusterRequest method.
// req, resp := client.InitializeClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster
func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) {
op := &request.Operation{
Name: opInitializeCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &InitializeClusterInput{}
}
output = &InitializeClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// InitializeCluster API operation for AWS CloudHSM V2.
//
// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued
// by your issuing certificate authority (CA) and the CA's root certificate.
// Before you can claim a cluster, you must sign the cluster's certificate signing
// request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation InitializeCluster for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster
func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) {
req, out := c.InitializeClusterRequest(input)
return out, req.Send()
}
// InitializeClusterWithContext is the same as InitializeCluster with the addition of
// the ability to pass a context and additional request options.
//
// See InitializeCluster for details on how to use this API operation.
//
// 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 *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) {
req, out := c.InitializeClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListTags = "ListTags"
// ListTagsRequest generates a "aws/request.Request" representing the
// client's request for the ListTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTags for more information on using the ListTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsRequest method.
// req, resp := client.ListTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags
func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
op := &request.Operation{
Name: opListTags,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListTagsInput{}
}
output = &ListTagsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTags API operation for AWS CloudHSM V2.
//
// Gets a list of tags for the specified AWS CloudHSM cluster.
//
// This is a paginated operation, which means that each response might contain
// only a subset of all the tags. When the response contains only a subset of
// tags, it includes a NextToken value. Use this value in a subsequent ListTags
// request to get more tags. When you receive a response with no NextToken (or
// an empty or null value), that means there are no more tags to get.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation ListTags for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags
func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
req, out := c.ListTagsRequest(input)
return out, req.Send()
}
// ListTagsWithContext is the same as ListTags with the addition of
// the ability to pass a context and additional request options.
//
// See ListTags for details on how to use this API operation.
//
// 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 *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
req, out := c.ListTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListTagsPages iterates over the pages of a ListTags operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListTags method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListTags operation.
// pageNum := 0
// err := client.ListTagsPages(params,
// func(page *cloudhsmv2.ListTagsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListTagsPagesWithContext same as ListTagsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListTagsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListTagsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opModifyBackupAttributes = "ModifyBackupAttributes"
// ModifyBackupAttributesRequest generates a "aws/request.Request" representing the
// client's request for the ModifyBackupAttributes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ModifyBackupAttributes for more information on using the ModifyBackupAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ModifyBackupAttributesRequest method.
// req, resp := client.ModifyBackupAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyBackupAttributes
func (c *CloudHSMV2) ModifyBackupAttributesRequest(input *ModifyBackupAttributesInput) (req *request.Request, output *ModifyBackupAttributesOutput) {
op := &request.Operation{
Name: opModifyBackupAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyBackupAttributesInput{}
}
output = &ModifyBackupAttributesOutput{}
req = c.newRequest(op, input, output)
return
}
// ModifyBackupAttributes API operation for AWS CloudHSM V2.
//
// Modifies attributes for AWS CloudHSM backup.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation ModifyBackupAttributes for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyBackupAttributes
func (c *CloudHSMV2) ModifyBackupAttributes(input *ModifyBackupAttributesInput) (*ModifyBackupAttributesOutput, error) {
req, out := c.ModifyBackupAttributesRequest(input)
return out, req.Send()
}
// ModifyBackupAttributesWithContext is the same as ModifyBackupAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyBackupAttributes for details on how to use this API operation.
//
// 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 *CloudHSMV2) ModifyBackupAttributesWithContext(ctx aws.Context, input *ModifyBackupAttributesInput, opts ...request.Option) (*ModifyBackupAttributesOutput, error) {
req, out := c.ModifyBackupAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opModifyCluster = "ModifyCluster"
// ModifyClusterRequest generates a "aws/request.Request" representing the
// client's request for the ModifyCluster operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ModifyCluster for more information on using the ModifyCluster
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ModifyClusterRequest method.
// req, resp := client.ModifyClusterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyCluster
func (c *CloudHSMV2) ModifyClusterRequest(input *ModifyClusterInput) (req *request.Request, output *ModifyClusterOutput) {
op := &request.Operation{
Name: opModifyCluster,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyClusterInput{}
}
output = &ModifyClusterOutput{}
req = c.newRequest(op, input, output)
return
}
// ModifyCluster API operation for AWS CloudHSM V2.
//
// Modifies AWS CloudHSM cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation ModifyCluster for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ModifyCluster
func (c *CloudHSMV2) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) {
req, out := c.ModifyClusterRequest(input)
return out, req.Send()
}
// ModifyClusterWithContext is the same as ModifyCluster with the addition of
// the ability to pass a context and additional request options.
//
// See ModifyCluster for details on how to use this API operation.
//
// 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 *CloudHSMV2) ModifyClusterWithContext(ctx aws.Context, input *ModifyClusterInput, opts ...request.Option) (*ModifyClusterOutput, error) {
req, out := c.ModifyClusterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRestoreBackup = "RestoreBackup"
// RestoreBackupRequest generates a "aws/request.Request" representing the
// client's request for the RestoreBackup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RestoreBackup for more information on using the RestoreBackup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RestoreBackupRequest method.
// req, resp := client.RestoreBackupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup
func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput) {
op := &request.Operation{
Name: opRestoreBackup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RestoreBackupInput{}
}
output = &RestoreBackupOutput{}
req = c.newRequest(op, input, output)
return
}
// RestoreBackup API operation for AWS CloudHSM V2.
//
// Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION
// state. For mor information on deleting a backup, see DeleteBackup.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation RestoreBackup for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup
func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error) {
req, out := c.RestoreBackupRequest(input)
return out, req.Send()
}
// RestoreBackupWithContext is the same as RestoreBackup with the addition of
// the ability to pass a context and additional request options.
//
// See RestoreBackup for details on how to use this API operation.
//
// 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 *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error) {
req, out := c.RestoreBackupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opTagResource = "TagResource"
// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See TagResource for more information on using the TagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the TagResourceRequest method.
// req, resp := client.TagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource
func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
op := &request.Operation{
Name: opTagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &TagResourceInput{}
}
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// TagResource API operation for AWS CloudHSM V2.
//
// Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation TagResource for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource
func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
return out, req.Send()
}
// TagResourceWithContext is the same as TagResource with the addition of
// the ability to pass a context and additional request options.
//
// See TagResource for details on how to use this API operation.
//
// 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 *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUntagResource = "UntagResource"
// UntagResourceRequest generates a "aws/request.Request" representing the
// client's request for the UntagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UntagResource for more information on using the UntagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UntagResourceRequest method.
// req, resp := client.UntagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource
func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
op := &request.Operation{
Name: opUntagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UntagResourceInput{}
}
output = &UntagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UntagResource API operation for AWS CloudHSM V2.
//
// Removes the specified tag or tags from the specified AWS CloudHSM cluster.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudHSM V2's
// API operation UntagResource for usage and error information.
//
// Returned Error Types:
// * CloudHsmAccessDeniedException
// The request was rejected because the requester does not have permission to
// perform the requested operation.
//
// * CloudHsmInternalFailureException
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
//
// * CloudHsmInvalidRequestException
// The request was rejected because it is not a valid request.
//
// * CloudHsmResourceNotFoundException
// The request was rejected because it refers to a resource that cannot be found.
//
// * CloudHsmServiceException
// The request was rejected because an error occurred.
//
// * CloudHsmTagException
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource
func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
return out, req.Send()
}
// UntagResourceWithContext is the same as UntagResource with the addition of
// the ability to pass a context and additional request options.
//
// See UntagResource for details on how to use this API operation.
//
// 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 *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// Contains information about a backup of an AWS CloudHSM cluster. All backup
// objects contain the BackupId, BackupState, ClusterId, and CreateTimestamp
// parameters. Backups that were copied into a destination region additionally
// contain the CopyTimestamp, SourceBackup, SourceCluster, and SourceRegion
// parameters. A backup that is pending deletion will include the DeleteTimestamp
// parameter.
type Backup struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the backup.
//
// BackupId is a required field
BackupId *string `type:"string" required:"true"`
// The state of the backup.
BackupState *string `type:"string" enum:"BackupState"`
// The identifier (ID) of the cluster that was backed up.
ClusterId *string `type:"string"`
// The date and time when the backup was copied from a source backup.
CopyTimestamp *time.Time `type:"timestamp"`
// The date and time when the backup was created.
CreateTimestamp *time.Time `type:"timestamp"`
// The date and time when the backup will be permanently deleted.
DeleteTimestamp *time.Time `type:"timestamp"`
// Specifies whether the service should exempt a backup from the retention policy
// for the cluster. True exempts a backup from the retention policy. False means
// the service applies the backup retention policy defined at the cluster.
NeverExpires *bool `type:"boolean"`
// The identifier (ID) of the source backup from which the new backup was copied.
SourceBackup *string `type:"string"`
// The identifier (ID) of the cluster containing the source backup from which
// the new backup was copied.
SourceCluster *string `type:"string"`
// The AWS Region that contains the source backup from which the new backup
// was copied.
SourceRegion *string `type:"string"`
// The list of tags for the backup.
TagList []*Tag `min:"1" type:"list"`
}
// String returns the string representation
func (s Backup) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Backup) GoString() string {
return s.String()
}
// SetBackupId sets the BackupId field's value.
func (s *Backup) SetBackupId(v string) *Backup {
s.BackupId = &v
return s
}
// SetBackupState sets the BackupState field's value.
func (s *Backup) SetBackupState(v string) *Backup {
s.BackupState = &v
return s
}
// SetClusterId sets the ClusterId field's value.
func (s *Backup) SetClusterId(v string) *Backup {
s.ClusterId = &v
return s
}
// SetCopyTimestamp sets the CopyTimestamp field's value.
func (s *Backup) SetCopyTimestamp(v time.Time) *Backup {
s.CopyTimestamp = &v
return s
}
// SetCreateTimestamp sets the CreateTimestamp field's value.
func (s *Backup) SetCreateTimestamp(v time.Time) *Backup {
s.CreateTimestamp = &v
return s
}
// SetDeleteTimestamp sets the DeleteTimestamp field's value.
func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup {
s.DeleteTimestamp = &v
return s
}
// SetNeverExpires sets the NeverExpires field's value.
func (s *Backup) SetNeverExpires(v bool) *Backup {
s.NeverExpires = &v
return s
}
// SetSourceBackup sets the SourceBackup field's value.
func (s *Backup) SetSourceBackup(v string) *Backup {
s.SourceBackup = &v
return s
}
// SetSourceCluster sets the SourceCluster field's value.
func (s *Backup) SetSourceCluster(v string) *Backup {
s.SourceCluster = &v
return s
}
// SetSourceRegion sets the SourceRegion field's value.
func (s *Backup) SetSourceRegion(v string) *Backup {
s.SourceRegion = &v
return s
}
// SetTagList sets the TagList field's value.
func (s *Backup) SetTagList(v []*Tag) *Backup {
s.TagList = v
return s
}
// A policy that defines the number of days to retain backups.
type BackupRetentionPolicy struct {
_ struct{} `type:"structure"`
// The type of backup retention policy. For the DAYS type, the value is the
// number of days to retain backups.
Type *string `type:"string" enum:"BackupRetentionType"`
// Use a value between 7 - 379.
Value *string `min:"1" type:"string"`
}
// String returns the string representation
func (s BackupRetentionPolicy) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BackupRetentionPolicy) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BackupRetentionPolicy) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BackupRetentionPolicy"}
if s.Value != nil && len(*s.Value) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Value", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetType sets the Type field's value.
func (s *BackupRetentionPolicy) SetType(v string) *BackupRetentionPolicy {
s.Type = &v
return s
}
// SetValue sets the Value field's value.
func (s *BackupRetentionPolicy) SetValue(v string) *BackupRetentionPolicy {
s.Value = &v
return s
}
// Contains one or more certificates or a certificate signing request (CSR).
type Certificates struct {
_ struct{} `type:"structure"`
// The HSM hardware certificate issued (signed) by AWS CloudHSM.
AwsHardwareCertificate *string `type:"string"`
// The cluster certificate issued (signed) by the issuing certificate authority
// (CA) of the cluster's owner.
ClusterCertificate *string `type:"string"`
// The cluster's certificate signing request (CSR). The CSR exists only when
// the cluster's state is UNINITIALIZED.
ClusterCsr *string `type:"string"`
// The HSM certificate issued (signed) by the HSM hardware.
HsmCertificate *string `type:"string"`
// The HSM hardware certificate issued (signed) by the hardware manufacturer.
ManufacturerHardwareCertificate *string `type:"string"`
}
// String returns the string representation
func (s Certificates) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Certificates) GoString() string {
return s.String()
}
// SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value.
func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates {
s.AwsHardwareCertificate = &v
return s
}
// SetClusterCertificate sets the ClusterCertificate field's value.
func (s *Certificates) SetClusterCertificate(v string) *Certificates {
s.ClusterCertificate = &v
return s
}
// SetClusterCsr sets the ClusterCsr field's value.
func (s *Certificates) SetClusterCsr(v string) *Certificates {
s.ClusterCsr = &v
return s
}
// SetHsmCertificate sets the HsmCertificate field's value.
func (s *Certificates) SetHsmCertificate(v string) *Certificates {
s.HsmCertificate = &v
return s
}
// SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value.
func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates {
s.ManufacturerHardwareCertificate = &v
return s
}
// The request was rejected because the requester does not have permission to
// perform the requested operation.
type CloudHsmAccessDeniedException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmAccessDeniedException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmAccessDeniedException) GoString() string {
return s.String()
}
func newErrorCloudHsmAccessDeniedException(v protocol.ResponseMetadata) error {
return &CloudHsmAccessDeniedException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmAccessDeniedException) Code() string {
return "CloudHsmAccessDeniedException"
}
// Message returns the exception's message.
func (s *CloudHsmAccessDeniedException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmAccessDeniedException) OrigErr() error {
return nil
}
func (s *CloudHsmAccessDeniedException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmAccessDeniedException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmAccessDeniedException) RequestID() string {
return s.RespMetadata.RequestID
}
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
type CloudHsmInternalFailureException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmInternalFailureException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmInternalFailureException) GoString() string {
return s.String()
}
func newErrorCloudHsmInternalFailureException(v protocol.ResponseMetadata) error {
return &CloudHsmInternalFailureException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmInternalFailureException) Code() string {
return "CloudHsmInternalFailureException"
}
// Message returns the exception's message.
func (s *CloudHsmInternalFailureException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmInternalFailureException) OrigErr() error {
return nil
}
func (s *CloudHsmInternalFailureException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmInternalFailureException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmInternalFailureException) RequestID() string {
return s.RespMetadata.RequestID
}
// The request was rejected because it is not a valid request.
type CloudHsmInvalidRequestException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmInvalidRequestException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmInvalidRequestException) GoString() string {
return s.String()
}
func newErrorCloudHsmInvalidRequestException(v protocol.ResponseMetadata) error {
return &CloudHsmInvalidRequestException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmInvalidRequestException) Code() string {
return "CloudHsmInvalidRequestException"
}
// Message returns the exception's message.
func (s *CloudHsmInvalidRequestException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmInvalidRequestException) OrigErr() error {
return nil
}
func (s *CloudHsmInvalidRequestException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmInvalidRequestException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmInvalidRequestException) RequestID() string {
return s.RespMetadata.RequestID
}
// The request was rejected because it refers to a resource that cannot be found.
type CloudHsmResourceNotFoundException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmResourceNotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmResourceNotFoundException) GoString() string {
return s.String()
}
func newErrorCloudHsmResourceNotFoundException(v protocol.ResponseMetadata) error {
return &CloudHsmResourceNotFoundException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmResourceNotFoundException) Code() string {
return "CloudHsmResourceNotFoundException"
}
// Message returns the exception's message.
func (s *CloudHsmResourceNotFoundException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmResourceNotFoundException) OrigErr() error {
return nil
}
func (s *CloudHsmResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmResourceNotFoundException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmResourceNotFoundException) RequestID() string {
return s.RespMetadata.RequestID
}
// The request was rejected because an error occurred.
type CloudHsmServiceException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmServiceException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmServiceException) GoString() string {
return s.String()
}
func newErrorCloudHsmServiceException(v protocol.ResponseMetadata) error {
return &CloudHsmServiceException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmServiceException) Code() string {
return "CloudHsmServiceException"
}
// Message returns the exception's message.
func (s *CloudHsmServiceException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmServiceException) OrigErr() error {
return nil
}
func (s *CloudHsmServiceException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmServiceException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmServiceException) RequestID() string {
return s.RespMetadata.RequestID
}
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
type CloudHsmTagException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s CloudHsmTagException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CloudHsmTagException) GoString() string {
return s.String()
}
func newErrorCloudHsmTagException(v protocol.ResponseMetadata) error {
return &CloudHsmTagException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *CloudHsmTagException) Code() string {
return "CloudHsmTagException"
}
// Message returns the exception's message.
func (s *CloudHsmTagException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudHsmTagException) OrigErr() error {
return nil
}
func (s *CloudHsmTagException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *CloudHsmTagException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *CloudHsmTagException) RequestID() string {
return s.RespMetadata.RequestID
}
// Contains information about an AWS CloudHSM cluster.
type Cluster struct {
_ struct{} `type:"structure"`
// The cluster's backup policy.
BackupPolicy *string `type:"string" enum:"BackupPolicy"`
// A policy that defines how the service retains backups.
BackupRetentionPolicy *BackupRetentionPolicy `type:"structure"`
// Contains one or more certificates or a certificate signing request (CSR).
Certificates *Certificates `type:"structure"`
// The cluster's identifier (ID).
ClusterId *string `type:"string"`
// The date and time when the cluster was created.
CreateTimestamp *time.Time `type:"timestamp"`
// The type of HSM that the cluster contains.
HsmType *string `type:"string"`
// Contains information about the HSMs in the cluster.
Hsms []*Hsm `type:"list"`
// The default password for the cluster's Pre-Crypto Officer (PRECO) user.
PreCoPassword *string `min:"7" type:"string"`
// The identifier (ID) of the cluster's security group.
SecurityGroup *string `type:"string"`
// The identifier (ID) of the backup used to create the cluster. This value
// exists only when the cluster was created from a backup.
SourceBackupId *string `type:"string"`
// The cluster's state.
State *string `type:"string" enum:"ClusterState"`
// A description of the cluster's state.
StateMessage *string `type:"string"`
// A map from availability zone to the cluster’s subnet in that availability
// zone.
SubnetMapping map[string]*string `type:"map"`
// The list of tags for the cluster.
TagList []*Tag `min:"1" type:"list"`
// The identifier (ID) of the virtual private cloud (VPC) that contains the
// cluster.
VpcId *string `type:"string"`
}
// String returns the string representation
func (s Cluster) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Cluster) GoString() string {
return s.String()
}
// SetBackupPolicy sets the BackupPolicy field's value.
func (s *Cluster) SetBackupPolicy(v string) *Cluster {
s.BackupPolicy = &v
return s
}
// SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value.
func (s *Cluster) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *Cluster {
s.BackupRetentionPolicy = v
return s
}
// SetCertificates sets the Certificates field's value.
func (s *Cluster) SetCertificates(v *Certificates) *Cluster {
s.Certificates = v
return s
}
// SetClusterId sets the ClusterId field's value.
func (s *Cluster) SetClusterId(v string) *Cluster {
s.ClusterId = &v
return s
}
// SetCreateTimestamp sets the CreateTimestamp field's value.
func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster {
s.CreateTimestamp = &v
return s
}
// SetHsmType sets the HsmType field's value.
func (s *Cluster) SetHsmType(v string) *Cluster {
s.HsmType = &v
return s
}
// SetHsms sets the Hsms field's value.
func (s *Cluster) SetHsms(v []*Hsm) *Cluster {
s.Hsms = v
return s
}
// SetPreCoPassword sets the PreCoPassword field's value.
func (s *Cluster) SetPreCoPassword(v string) *Cluster {
s.PreCoPassword = &v
return s
}
// SetSecurityGroup sets the SecurityGroup field's value.
func (s *Cluster) SetSecurityGroup(v string) *Cluster {
s.SecurityGroup = &v
return s
}
// SetSourceBackupId sets the SourceBackupId field's value.
func (s *Cluster) SetSourceBackupId(v string) *Cluster {
s.SourceBackupId = &v
return s
}
// SetState sets the State field's value.
func (s *Cluster) SetState(v string) *Cluster {
s.State = &v
return s
}
// SetStateMessage sets the StateMessage field's value.
func (s *Cluster) SetStateMessage(v string) *Cluster {
s.StateMessage = &v
return s
}
// SetSubnetMapping sets the SubnetMapping field's value.
func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster {
s.SubnetMapping = v
return s
}
// SetTagList sets the TagList field's value.
func (s *Cluster) SetTagList(v []*Tag) *Cluster {
s.TagList = v
return s
}
// SetVpcId sets the VpcId field's value.
func (s *Cluster) SetVpcId(v string) *Cluster {
s.VpcId = &v
return s
}
type CopyBackupToRegionInput struct {
_ struct{} `type:"structure"`
// The ID of the backup that will be copied to the destination region.
//
// BackupId is a required field
BackupId *string `type:"string" required:"true"`
// The AWS region that will contain your copied CloudHSM cluster backup.
//
// DestinationRegion is a required field
DestinationRegion *string `type:"string" required:"true"`
// Tags to apply to the destination backup during creation. If you specify tags,
// only these tags will be applied to the destination backup. If you do not
// specify tags, the service copies tags from the source backup to the destination
// backup.
TagList []*Tag `min:"1" type:"list"`
}
// String returns the string representation
func (s CopyBackupToRegionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CopyBackupToRegionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CopyBackupToRegionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CopyBackupToRegionInput"}
if s.BackupId == nil {
invalidParams.Add(request.NewErrParamRequired("BackupId"))
}
if s.DestinationRegion == nil {
invalidParams.Add(request.NewErrParamRequired("DestinationRegion"))
}
if s.TagList != nil && len(s.TagList) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TagList", 1))
}
if s.TagList != nil {
for i, v := range s.TagList {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupId sets the BackupId field's value.
func (s *CopyBackupToRegionInput) SetBackupId(v string) *CopyBackupToRegionInput {
s.BackupId = &v
return s
}
// SetDestinationRegion sets the DestinationRegion field's value.
func (s *CopyBackupToRegionInput) SetDestinationRegion(v string) *CopyBackupToRegionInput {
s.DestinationRegion = &v
return s
}
// SetTagList sets the TagList field's value.
func (s *CopyBackupToRegionInput) SetTagList(v []*Tag) *CopyBackupToRegionInput {
s.TagList = v
return s
}
type CopyBackupToRegionOutput struct {
_ struct{} `type:"structure"`
// Information on the backup that will be copied to the destination region,
// including CreateTimestamp, SourceBackup, SourceCluster, and Source Region.
// CreateTimestamp of the destination backup will be the same as that of the
// source backup.
//
// You will need to use the sourceBackupID returned in this operation to use
// the DescribeBackups operation on the backup that will be copied to the destination
// region.
DestinationBackup *DestinationBackup `type:"structure"`
}
// String returns the string representation
func (s CopyBackupToRegionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CopyBackupToRegionOutput) GoString() string {
return s.String()
}
// SetDestinationBackup sets the DestinationBackup field's value.
func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput {
s.DestinationBackup = v
return s
}
type CreateClusterInput struct {
_ struct{} `type:"structure"`
// A policy that defines how the service retains backups.
BackupRetentionPolicy *BackupRetentionPolicy `type:"structure"`
// The type of HSM to use in the cluster. Currently the only allowed value is
// hsm1.medium.
//
// HsmType is a required field
HsmType *string `type:"string" required:"true"`
// The identifier (ID) of the cluster backup to restore. Use this value to restore
// the cluster from a backup instead of creating a new cluster. To find the
// backup ID, use DescribeBackups.
SourceBackupId *string `type:"string"`
// The identifiers (IDs) of the subnets where you are creating the cluster.
// You must specify at least one subnet. If you specify multiple subnets, they
// must meet the following criteria:
//
// * All subnets must be in the same virtual private cloud (VPC).
//
// * You can specify only one subnet per Availability Zone.
//
// SubnetIds is a required field
SubnetIds []*string `min:"1" type:"list" required:"true"`
// Tags to apply to the CloudHSM cluster during creation.
TagList []*Tag `min:"1" type:"list"`
}
// String returns the string representation
func (s CreateClusterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateClusterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateClusterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"}
if s.HsmType == nil {
invalidParams.Add(request.NewErrParamRequired("HsmType"))
}
if s.SubnetIds == nil {
invalidParams.Add(request.NewErrParamRequired("SubnetIds"))
}
if s.SubnetIds != nil && len(s.SubnetIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1))
}
if s.TagList != nil && len(s.TagList) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TagList", 1))
}
if s.BackupRetentionPolicy != nil {
if err := s.BackupRetentionPolicy.Validate(); err != nil {
invalidParams.AddNested("BackupRetentionPolicy", err.(request.ErrInvalidParams))
}
}
if s.TagList != nil {
for i, v := range s.TagList {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value.
func (s *CreateClusterInput) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *CreateClusterInput {
s.BackupRetentionPolicy = v
return s
}
// SetHsmType sets the HsmType field's value.
func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput {
s.HsmType = &v
return s
}
// SetSourceBackupId sets the SourceBackupId field's value.
func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput {
s.SourceBackupId = &v
return s
}
// SetSubnetIds sets the SubnetIds field's value.
func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput {
s.SubnetIds = v
return s
}
// SetTagList sets the TagList field's value.
func (s *CreateClusterInput) SetTagList(v []*Tag) *CreateClusterInput {
s.TagList = v
return s
}
type CreateClusterOutput struct {
_ struct{} `type:"structure"`
// Information about the cluster that was created.
Cluster *Cluster `type:"structure"`
}
// String returns the string representation
func (s CreateClusterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateClusterOutput) GoString() string {
return s.String()
}
// SetCluster sets the Cluster field's value.
func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput {
s.Cluster = v
return s
}
type CreateHsmInput struct {
_ struct{} `type:"structure"`
// The Availability Zone where you are creating the HSM. To find the cluster's
// Availability Zones, use DescribeClusters.
//
// AvailabilityZone is a required field
AvailabilityZone *string `type:"string" required:"true"`
// The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters.
//
// ClusterId is a required field
ClusterId *string `type:"string" required:"true"`
// The HSM's IP address. If you specify an IP address, use an available address
// from the subnet that maps to the Availability Zone where you are creating
// the HSM. If you don't specify an IP address, one is chosen for you from that
// subnet.
IpAddress *string `type:"string"`
}
// String returns the string representation
func (s CreateHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHsmInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHsmInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"}
if s.AvailabilityZone == nil {
invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
}
if s.ClusterId == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAvailabilityZone sets the AvailabilityZone field's value.
func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput {
s.AvailabilityZone = &v
return s
}
// SetClusterId sets the ClusterId field's value.
func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput {
s.ClusterId = &v
return s
}
// SetIpAddress sets the IpAddress field's value.
func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput {
s.IpAddress = &v
return s
}
type CreateHsmOutput struct {
_ struct{} `type:"structure"`
// Information about the HSM that was created.
Hsm *Hsm `type:"structure"`
}
// String returns the string representation
func (s CreateHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHsmOutput) GoString() string {
return s.String()
}
// SetHsm sets the Hsm field's value.
func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput {
s.Hsm = v
return s
}
type DeleteBackupInput struct {
_ struct{} `type:"structure"`
// The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups
// operation.
//
// BackupId is a required field
BackupId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteBackupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteBackupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteBackupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"}
if s.BackupId == nil {
invalidParams.Add(request.NewErrParamRequired("BackupId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupId sets the BackupId field's value.
func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput {
s.BackupId = &v
return s
}
type DeleteBackupOutput struct {
_ struct{} `type:"structure"`
// Information on the Backup object deleted.
Backup *Backup `type:"structure"`
}
// String returns the string representation
func (s DeleteBackupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteBackupOutput) GoString() string {
return s.String()
}
// SetBackup sets the Backup field's value.
func (s *DeleteBackupOutput) SetBackup(v *Backup) *DeleteBackupOutput {
s.Backup = v
return s
}
type DeleteClusterInput struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the cluster that you are deleting. To find the cluster
// ID, use DescribeClusters.
//
// ClusterId is a required field
ClusterId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteClusterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteClusterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteClusterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"}
if s.ClusterId == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClusterId sets the ClusterId field's value.
func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput {
s.ClusterId = &v
return s
}
type DeleteClusterOutput struct {
_ struct{} `type:"structure"`
// Information about the cluster that was deleted.
Cluster *Cluster `type:"structure"`
}
// String returns the string representation
func (s DeleteClusterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteClusterOutput) GoString() string {
return s.String()
}
// SetCluster sets the Cluster field's value.
func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput {
s.Cluster = v
return s
}
type DeleteHsmInput struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the cluster that contains the HSM that you are deleting.
//
// ClusterId is a required field
ClusterId *string `type:"string" required:"true"`
// The identifier (ID) of the elastic network interface (ENI) of the HSM that
// you are deleting.
EniId *string `type:"string"`
// The IP address of the elastic network interface (ENI) of the HSM that you
// are deleting.
EniIp *string `type:"string"`
// The identifier (ID) of the HSM that you are deleting.
HsmId *string `type:"string"`
}
// String returns the string representation
func (s DeleteHsmInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHsmInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteHsmInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"}
if s.ClusterId == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClusterId sets the ClusterId field's value.
func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput {
s.ClusterId = &v
return s
}
// SetEniId sets the EniId field's value.
func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput {
s.EniId = &v
return s
}
// SetEniIp sets the EniIp field's value.
func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput {
s.EniIp = &v
return s
}
// SetHsmId sets the HsmId field's value.
func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput {
s.HsmId = &v
return s
}
type DeleteHsmOutput struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the HSM that was deleted.
HsmId *string `type:"string"`
}
// String returns the string representation
func (s DeleteHsmOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteHsmOutput) GoString() string {
return s.String()
}
// SetHsmId sets the HsmId field's value.
func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput {
s.HsmId = &v
return s
}
type DescribeBackupsInput struct {
_ struct{} `type:"structure"`
// One or more filters to limit the items returned in the response.
//
// Use the backupIds filter to return only the specified backups. Specify backups
// by their backup identifier (ID).
//
// Use the sourceBackupIds filter to return only the backups created from a
// source backup. The sourceBackupID of a source backup is returned by the CopyBackupToRegion
// operation.
//
// Use the clusterIds filter to return only the backups for the specified clusters.
// Specify clusters by their cluster identifier (ID).
//
// Use the states filter to return only backups that match the specified state.
//
// Use the neverExpires filter to return backups filtered by the value in the
// neverExpires parameter. True returns all backups exempt from the backup retention
// policy. False returns all backups with a backup retention policy defined
// at the cluster.
Filters map[string][]*string `type:"map"`
// The maximum number of backups to return in the response. When there are more
// backups than the number you specify, the response contains a NextToken value.
MaxResults *int64 `min:"1" type:"integer"`
// The NextToken value that you received in the previous response. Use this
// value to get more backups.
NextToken *string `type:"string"`
// Designates whether or not to sort the return backups by ascending chronological
// order of generation.
SortAscending *bool `type:"boolean"`
}
// String returns the string representation
func (s DescribeBackupsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeBackupsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeBackupsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFilters sets the Filters field's value.
func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput {
s.Filters = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput {
s.NextToken = &v
return s
}
// SetSortAscending sets the SortAscending field's value.
func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput {
s.SortAscending = &v
return s
}
type DescribeBackupsOutput struct {
_ struct{} `type:"structure"`
// A list of backups.
Backups []*Backup `type:"list"`
// An opaque string that indicates that the response contains only a subset
// of backups. Use this value in a subsequent DescribeBackups request to get
// more backups.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s DescribeBackupsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeBackupsOutput) GoString() string {
return s.String()
}
// SetBackups sets the Backups field's value.
func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput {
s.Backups = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput {
s.NextToken = &v
return s
}
type DescribeClustersInput struct {
_ struct{} `type:"structure"`
// One or more filters to limit the items returned in the response.
//
// Use the clusterIds filter to return only the specified clusters. Specify
// clusters by their cluster identifier (ID).
//
// Use the vpcIds filter to return only the clusters in the specified virtual
// private clouds (VPCs). Specify VPCs by their VPC identifier (ID).
//
// Use the states filter to return only clusters that match the specified state.
Filters map[string][]*string `type:"map"`
// The maximum number of clusters to return in the response. When there are
// more clusters than the number you specify, the response contains a NextToken
// value.
MaxResults *int64 `min:"1" type:"integer"`
// The NextToken value that you received in the previous response. Use this
// value to get more clusters.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s DescribeClustersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeClustersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeClustersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFilters sets the Filters field's value.
func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput {
s.Filters = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput {
s.NextToken = &v
return s
}
type DescribeClustersOutput struct {
_ struct{} `type:"structure"`
// A list of clusters.
Clusters []*Cluster `type:"list"`
// An opaque string that indicates that the response contains only a subset
// of clusters. Use this value in a subsequent DescribeClusters request to get
// more clusters.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s DescribeClustersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeClustersOutput) GoString() string {
return s.String()
}
// SetClusters sets the Clusters field's value.
func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput {
s.Clusters = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput {
s.NextToken = &v
return s
}
// Contains information about the backup that will be copied and created by
// the CopyBackupToRegion operation.
type DestinationBackup struct {
_ struct{} `type:"structure"`
// The date and time when both the source backup was created.
CreateTimestamp *time.Time `type:"timestamp"`
// The identifier (ID) of the source backup from which the new backup was copied.
SourceBackup *string `type:"string"`
// The identifier (ID) of the cluster containing the source backup from which
// the new backup was copied.
SourceCluster *string `type:"string"`
// The AWS region that contains the source backup from which the new backup
// was copied.
SourceRegion *string `type:"string"`
}
// String returns the string representation
func (s DestinationBackup) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DestinationBackup) GoString() string {
return s.String()
}
// SetCreateTimestamp sets the CreateTimestamp field's value.
func (s *DestinationBackup) SetCreateTimestamp(v time.Time) *DestinationBackup {
s.CreateTimestamp = &v
return s
}
// SetSourceBackup sets the SourceBackup field's value.
func (s *DestinationBackup) SetSourceBackup(v string) *DestinationBackup {
s.SourceBackup = &v
return s
}
// SetSourceCluster sets the SourceCluster field's value.
func (s *DestinationBackup) SetSourceCluster(v string) *DestinationBackup {
s.SourceCluster = &v
return s
}
// SetSourceRegion sets the SourceRegion field's value.
func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup {
s.SourceRegion = &v
return s
}
// Contains information about a hardware security module (HSM) in an AWS CloudHSM
// cluster.
type Hsm struct {
_ struct{} `type:"structure"`
// The Availability Zone that contains the HSM.
AvailabilityZone *string `type:"string"`
// The identifier (ID) of the cluster that contains the HSM.
ClusterId *string `type:"string"`
// The identifier (ID) of the HSM's elastic network interface (ENI).
EniId *string `type:"string"`
// The IP address of the HSM's elastic network interface (ENI).
EniIp *string `type:"string"`
// The HSM's identifier (ID).
//
// HsmId is a required field
HsmId *string `type:"string" required:"true"`
// The HSM's state.
State *string `type:"string" enum:"HsmState"`
// A description of the HSM's state.
StateMessage *string `type:"string"`
// The subnet that contains the HSM's elastic network interface (ENI).
SubnetId *string `type:"string"`
}
// String returns the string representation
func (s Hsm) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Hsm) GoString() string {
return s.String()
}
// SetAvailabilityZone sets the AvailabilityZone field's value.
func (s *Hsm) SetAvailabilityZone(v string) *Hsm {
s.AvailabilityZone = &v
return s
}
// SetClusterId sets the ClusterId field's value.
func (s *Hsm) SetClusterId(v string) *Hsm {
s.ClusterId = &v
return s
}
// SetEniId sets the EniId field's value.
func (s *Hsm) SetEniId(v string) *Hsm {
s.EniId = &v
return s
}
// SetEniIp sets the EniIp field's value.
func (s *Hsm) SetEniIp(v string) *Hsm {
s.EniIp = &v
return s
}
// SetHsmId sets the HsmId field's value.
func (s *Hsm) SetHsmId(v string) *Hsm {
s.HsmId = &v
return s
}
// SetState sets the State field's value.
func (s *Hsm) SetState(v string) *Hsm {
s.State = &v
return s
}
// SetStateMessage sets the StateMessage field's value.
func (s *Hsm) SetStateMessage(v string) *Hsm {
s.StateMessage = &v
return s
}
// SetSubnetId sets the SubnetId field's value.
func (s *Hsm) SetSubnetId(v string) *Hsm {
s.SubnetId = &v
return s
}
type InitializeClusterInput struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the cluster that you are claiming. To find the cluster
// ID, use DescribeClusters.
//
// ClusterId is a required field
ClusterId *string `type:"string" required:"true"`
// The cluster certificate issued (signed) by your issuing certificate authority
// (CA). The certificate must be in PEM format and can contain a maximum of
// 5000 characters.
//
// SignedCert is a required field
SignedCert *string `type:"string" required:"true"`
// The issuing certificate of the issuing certificate authority (CA) that issued
// (signed) the cluster certificate. You must use a self-signed certificate.
// The certificate used to sign the HSM CSR must be directly available, and
// thus must be the root certificate. The certificate must be in PEM format
// and can contain a maximum of 5000 characters.
//
// TrustAnchor is a required field
TrustAnchor *string `type:"string" required:"true"`
}
// String returns the string representation
func (s InitializeClusterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InitializeClusterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *InitializeClusterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"}
if s.ClusterId == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterId"))
}
if s.SignedCert == nil {
invalidParams.Add(request.NewErrParamRequired("SignedCert"))
}
if s.TrustAnchor == nil {
invalidParams.Add(request.NewErrParamRequired("TrustAnchor"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClusterId sets the ClusterId field's value.
func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput {
s.ClusterId = &v
return s
}
// SetSignedCert sets the SignedCert field's value.
func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput {
s.SignedCert = &v
return s
}
// SetTrustAnchor sets the TrustAnchor field's value.
func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput {
s.TrustAnchor = &v
return s
}
type InitializeClusterOutput struct {
_ struct{} `type:"structure"`
// The cluster's state.
State *string `type:"string" enum:"ClusterState"`
// A description of the cluster's state.
StateMessage *string `type:"string"`
}
// String returns the string representation
func (s InitializeClusterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InitializeClusterOutput) GoString() string {
return s.String()
}
// SetState sets the State field's value.
func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput {
s.State = &v
return s
}
// SetStateMessage sets the StateMessage field's value.
func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput {
s.StateMessage = &v
return s
}
type ListTagsInput struct {
_ struct{} `type:"structure"`
// The maximum number of tags to return in the response. When there are more
// tags than the number you specify, the response contains a NextToken value.
MaxResults *int64 `min:"1" type:"integer"`
// The NextToken value that you received in the previous response. Use this
// value to get more tags.
NextToken *string `type:"string"`
// The cluster identifier (ID) for the cluster whose tags you are getting. To
// find the cluster ID, use DescribeClusters.
//
// ResourceId is a required field
ResourceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ListTagsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
s.NextToken = &v
return s
}
// SetResourceId sets the ResourceId field's value.
func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput {
s.ResourceId = &v
return s
}
type ListTagsOutput struct {
_ struct{} `type:"structure"`
// An opaque string that indicates that the response contains only a subset
// of tags. Use this value in a subsequent ListTags request to get more tags.
NextToken *string `type:"string"`
// A list of tags.
//
// TagList is a required field
TagList []*Tag `min:"1" type:"list" required:"true"`
}
// String returns the string representation
func (s ListTagsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
s.NextToken = &v
return s
}
// SetTagList sets the TagList field's value.
func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput {
s.TagList = v
return s
}
type ModifyBackupAttributesInput struct {
_ struct{} `type:"structure"`
// The identifier (ID) of the backup to modify. To find the ID of a backup,
// use the DescribeBackups operation.
//
// BackupId is a required field
BackupId *string `type:"string" required:"true"`
// Specifies whether the service should exempt a backup from the retention policy
// for the cluster. True exempts a backup from the retention policy. False means
// the service applies the backup retention policy defined at the cluster.
//
// NeverExpires is a required field
NeverExpires *bool `type:"boolean" required:"true"`
}
// String returns the string representation
func (s ModifyBackupAttributesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyBackupAttributesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyBackupAttributesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyBackupAttributesInput"}
if s.BackupId == nil {
invalidParams.Add(request.NewErrParamRequired("BackupId"))
}
if s.NeverExpires == nil {
invalidParams.Add(request.NewErrParamRequired("NeverExpires"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupId sets the BackupId field's value.
func (s *ModifyBackupAttributesInput) SetBackupId(v string) *ModifyBackupAttributesInput {
s.BackupId = &v
return s
}
// SetNeverExpires sets the NeverExpires field's value.
func (s *ModifyBackupAttributesInput) SetNeverExpires(v bool) *ModifyBackupAttributesInput {
s.NeverExpires = &v
return s
}
type ModifyBackupAttributesOutput struct {
_ struct{} `type:"structure"`
// Contains information about a backup of an AWS CloudHSM cluster. All backup
// objects contain the BackupId, BackupState, ClusterId, and CreateTimestamp
// parameters. Backups that were copied into a destination region additionally
// contain the CopyTimestamp, SourceBackup, SourceCluster, and SourceRegion
// parameters. A backup that is pending deletion will include the DeleteTimestamp
// parameter.
Backup *Backup `type:"structure"`
}
// String returns the string representation
func (s ModifyBackupAttributesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyBackupAttributesOutput) GoString() string {
return s.String()
}
// SetBackup sets the Backup field's value.
func (s *ModifyBackupAttributesOutput) SetBackup(v *Backup) *ModifyBackupAttributesOutput {
s.Backup = v
return s
}
type ModifyClusterInput struct {
_ struct{} `type:"structure"`
// A policy that defines how the service retains backups.
//
// BackupRetentionPolicy is a required field
BackupRetentionPolicy *BackupRetentionPolicy `type:"structure" required:"true"`
// The identifier (ID) of the cluster that you want to modify. To find the cluster
// ID, use DescribeClusters.
//
// ClusterId is a required field
ClusterId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ModifyClusterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyClusterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyClusterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyClusterInput"}
if s.BackupRetentionPolicy == nil {
invalidParams.Add(request.NewErrParamRequired("BackupRetentionPolicy"))
}
if s.ClusterId == nil {
invalidParams.Add(request.NewErrParamRequired("ClusterId"))
}
if s.BackupRetentionPolicy != nil {
if err := s.BackupRetentionPolicy.Validate(); err != nil {
invalidParams.AddNested("BackupRetentionPolicy", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupRetentionPolicy sets the BackupRetentionPolicy field's value.
func (s *ModifyClusterInput) SetBackupRetentionPolicy(v *BackupRetentionPolicy) *ModifyClusterInput {
s.BackupRetentionPolicy = v
return s
}
// SetClusterId sets the ClusterId field's value.
func (s *ModifyClusterInput) SetClusterId(v string) *ModifyClusterInput {
s.ClusterId = &v
return s
}
type ModifyClusterOutput struct {
_ struct{} `type:"structure"`
// Contains information about an AWS CloudHSM cluster.
Cluster *Cluster `type:"structure"`
}
// String returns the string representation
func (s ModifyClusterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ModifyClusterOutput) GoString() string {
return s.String()
}
// SetCluster sets the Cluster field's value.
func (s *ModifyClusterOutput) SetCluster(v *Cluster) *ModifyClusterOutput {
s.Cluster = v
return s
}
type RestoreBackupInput struct {
_ struct{} `type:"structure"`
// The ID of the backup to be restored. To find the ID of a backup, use the
// DescribeBackups operation.
//
// BackupId is a required field
BackupId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RestoreBackupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RestoreBackupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RestoreBackupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RestoreBackupInput"}
if s.BackupId == nil {
invalidParams.Add(request.NewErrParamRequired("BackupId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBackupId sets the BackupId field's value.
func (s *RestoreBackupInput) SetBackupId(v string) *RestoreBackupInput {
s.BackupId = &v
return s
}
type RestoreBackupOutput struct {
_ struct{} `type:"structure"`
// Information on the Backup object created.
Backup *Backup `type:"structure"`
}
// String returns the string representation
func (s RestoreBackupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RestoreBackupOutput) GoString() string {
return s.String()
}
// SetBackup sets the Backup field's value.
func (s *RestoreBackupOutput) SetBackup(v *Backup) *RestoreBackupOutput {
s.Backup = v
return s
}
// Contains a tag. A tag is a key-value pair.
type Tag struct {
_ struct{} `type:"structure"`
// The key of the tag.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true"`
// The value of the tag.
//
// Value is a required field
Value *string `type:"string" required:"true"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Tag) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Tag"}
if s.Key == nil {
invalidParams.Add(request.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Key", 1))
}
if s.Value == nil {
invalidParams.Add(request.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
s.Key = &v
return s
}
// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
s.Value = &v
return s
}
type TagResourceInput struct {
_ struct{} `type:"structure"`
// The cluster identifier (ID) for the cluster that you are tagging. To find
// the cluster ID, use DescribeClusters.
//
// ResourceId is a required field
ResourceId *string `type:"string" required:"true"`
// A list of one or more tags.
//
// TagList is a required field
TagList []*Tag `min:"1" type:"list" required:"true"`
}
// String returns the string representation
func (s TagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.TagList == nil {
invalidParams.Add(request.NewErrParamRequired("TagList"))
}
if s.TagList != nil && len(s.TagList) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TagList", 1))
}
if s.TagList != nil {
for i, v := range s.TagList {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceId sets the ResourceId field's value.
func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput {
s.ResourceId = &v
return s
}
// SetTagList sets the TagList field's value.
func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput {
s.TagList = v
return s
}
type TagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s TagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceOutput) GoString() string {
return s.String()
}
type UntagResourceInput struct {
_ struct{} `type:"structure"`
// The cluster identifier (ID) for the cluster whose tags you are removing.
// To find the cluster ID, use DescribeClusters.
//
// ResourceId is a required field
ResourceId *string `type:"string" required:"true"`
// A list of one or more tag keys for the tags that you are removing. Specify
// only the tag keys, not the tag values.
//
// TagKeyList is a required field
TagKeyList []*string `min:"1" type:"list" required:"true"`
}
// String returns the string representation
func (s UntagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UntagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
if s.ResourceId == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceId"))
}
if s.TagKeyList == nil {
invalidParams.Add(request.NewErrParamRequired("TagKeyList"))
}
if s.TagKeyList != nil && len(s.TagKeyList) < 1 {
invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResourceId sets the ResourceId field's value.
func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput {
s.ResourceId = &v
return s
}
// SetTagKeyList sets the TagKeyList field's value.
func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput {
s.TagKeyList = v
return s
}
type UntagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UntagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceOutput) GoString() string {
return s.String()
}
const (
// BackupPolicyDefault is a BackupPolicy enum value
BackupPolicyDefault = "DEFAULT"
)
// BackupPolicy_Values returns all elements of the BackupPolicy enum
func BackupPolicy_Values() []string {
return []string{
BackupPolicyDefault,
}
}
const (
// BackupRetentionTypeDays is a BackupRetentionType enum value
BackupRetentionTypeDays = "DAYS"
)
// BackupRetentionType_Values returns all elements of the BackupRetentionType enum
func BackupRetentionType_Values() []string {
return []string{
BackupRetentionTypeDays,
}
}
const (
// BackupStateCreateInProgress is a BackupState enum value
BackupStateCreateInProgress = "CREATE_IN_PROGRESS"
// BackupStateReady is a BackupState enum value
BackupStateReady = "READY"
// BackupStateDeleted is a BackupState enum value
BackupStateDeleted = "DELETED"
// BackupStatePendingDeletion is a BackupState enum value
BackupStatePendingDeletion = "PENDING_DELETION"
)
// BackupState_Values returns all elements of the BackupState enum
func BackupState_Values() []string {
return []string{
BackupStateCreateInProgress,
BackupStateReady,
BackupStateDeleted,
BackupStatePendingDeletion,
}
}
const (
// ClusterStateCreateInProgress is a ClusterState enum value
ClusterStateCreateInProgress = "CREATE_IN_PROGRESS"
// ClusterStateUninitialized is a ClusterState enum value
ClusterStateUninitialized = "UNINITIALIZED"
// ClusterStateInitializeInProgress is a ClusterState enum value
ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS"
// ClusterStateInitialized is a ClusterState enum value
ClusterStateInitialized = "INITIALIZED"
// ClusterStateActive is a ClusterState enum value
ClusterStateActive = "ACTIVE"
// ClusterStateUpdateInProgress is a ClusterState enum value
ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS"
// ClusterStateDeleteInProgress is a ClusterState enum value
ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS"
// ClusterStateDeleted is a ClusterState enum value
ClusterStateDeleted = "DELETED"
// ClusterStateDegraded is a ClusterState enum value
ClusterStateDegraded = "DEGRADED"
)
// ClusterState_Values returns all elements of the ClusterState enum
func ClusterState_Values() []string {
return []string{
ClusterStateCreateInProgress,
ClusterStateUninitialized,
ClusterStateInitializeInProgress,
ClusterStateInitialized,
ClusterStateActive,
ClusterStateUpdateInProgress,
ClusterStateDeleteInProgress,
ClusterStateDeleted,
ClusterStateDegraded,
}
}
const (
// HsmStateCreateInProgress is a HsmState enum value
HsmStateCreateInProgress = "CREATE_IN_PROGRESS"
// HsmStateActive is a HsmState enum value
HsmStateActive = "ACTIVE"
// HsmStateDegraded is a HsmState enum value
HsmStateDegraded = "DEGRADED"
// HsmStateDeleteInProgress is a HsmState enum value
HsmStateDeleteInProgress = "DELETE_IN_PROGRESS"
// HsmStateDeleted is a HsmState enum value
HsmStateDeleted = "DELETED"
)
// HsmState_Values returns all elements of the HsmState enum
func HsmState_Values() []string {
return []string{
HsmStateCreateInProgress,
HsmStateActive,
HsmStateDegraded,
HsmStateDeleteInProgress,
HsmStateDeleted,
}
}
| 4,029 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudhsmv2 provides the client and types for making API
// requests to AWS CloudHSM V2.
//
// For more information about AWS CloudHSM, see AWS CloudHSM (http://aws.amazon.com/cloudhsm/)
// and the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28 for more information on this service.
//
// See cloudhsmv2 package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/
//
// Using the Client
//
// To contact AWS CloudHSM V2 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 AWS CloudHSM V2 client CloudHSMV2 for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/#New
package cloudhsmv2
| 30 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsmv2
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCloudHsmAccessDeniedException for service response error code
// "CloudHsmAccessDeniedException".
//
// The request was rejected because the requester does not have permission to
// perform the requested operation.
ErrCodeCloudHsmAccessDeniedException = "CloudHsmAccessDeniedException"
// ErrCodeCloudHsmInternalFailureException for service response error code
// "CloudHsmInternalFailureException".
//
// The request was rejected because of an AWS CloudHSM internal failure. The
// request can be retried.
ErrCodeCloudHsmInternalFailureException = "CloudHsmInternalFailureException"
// ErrCodeCloudHsmInvalidRequestException for service response error code
// "CloudHsmInvalidRequestException".
//
// The request was rejected because it is not a valid request.
ErrCodeCloudHsmInvalidRequestException = "CloudHsmInvalidRequestException"
// ErrCodeCloudHsmResourceNotFoundException for service response error code
// "CloudHsmResourceNotFoundException".
//
// The request was rejected because it refers to a resource that cannot be found.
ErrCodeCloudHsmResourceNotFoundException = "CloudHsmResourceNotFoundException"
// ErrCodeCloudHsmServiceException for service response error code
// "CloudHsmServiceException".
//
// The request was rejected because an error occurred.
ErrCodeCloudHsmServiceException = "CloudHsmServiceException"
// ErrCodeCloudHsmTagException for service response error code
// "CloudHsmTagException".
//
// The request was rejected because of a tagging failure. Verify the tag conditions
// in all applicable policies, and then retry the request.
ErrCodeCloudHsmTagException = "CloudHsmTagException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CloudHsmAccessDeniedException": newErrorCloudHsmAccessDeniedException,
"CloudHsmInternalFailureException": newErrorCloudHsmInternalFailureException,
"CloudHsmInvalidRequestException": newErrorCloudHsmInvalidRequestException,
"CloudHsmResourceNotFoundException": newErrorCloudHsmResourceNotFoundException,
"CloudHsmServiceException": newErrorCloudHsmServiceException,
"CloudHsmTagException": newErrorCloudHsmTagException,
}
| 59 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.15,integration
package cloudhsmv2_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/cloudhsmv2"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_DescribeClusters(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudhsmv2.New(sess)
params := &cloudhsmv2.DescribeClustersInput{}
_, err := svc.DescribeClustersWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_ListTags(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudhsmv2.New(sess)
params := &cloudhsmv2.ListTagsInput{
ResourceId: aws.String("bogus-arn"),
}
_, err := svc.ListTagsWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
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 len(aerr.Message()) == 0 {
t.Errorf("expect non-empty error message")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
| 66 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudhsmv2
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"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// CloudHSMV2 provides the API operation methods for making requests to
// AWS CloudHSM V2. See this package's package overview docs
// for details on the service.
//
// CloudHSMV2 methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudHSMV2 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 = "cloudhsmv2" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudHSM V2" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudHSMV2 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudHSMV2 client from just a session.
// svc := cloudhsmv2.New(mySession)
//
// // Create a CloudHSMV2 client with additional configuration
// svc := cloudhsmv2.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSMV2 {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "cloudhsm"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudHSMV2 {
svc := &CloudHSMV2{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2017-04-28",
JSONVersion: "1.1",
TargetPrefix: "BaldrApiService",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CloudHSMV2 operation and runs any
// custom request initialization.
func (c *CloudHSMV2) 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
}
| 107 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudhsmv2iface provides an interface to enable mocking the AWS CloudHSM V2 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 cloudhsmv2iface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudhsmv2"
)
// CloudHSMV2API provides an interface to enable mocking the
// cloudhsmv2.CloudHSMV2 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
// // AWS CloudHSM V2.
// func myFunc(svc cloudhsmv2iface.CloudHSMV2API) bool {
// // Make svc.CopyBackupToRegion request
// }
//
// func main() {
// sess := session.New()
// svc := cloudhsmv2.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudHSMV2Client struct {
// cloudhsmv2iface.CloudHSMV2API
// }
// func (m *mockCloudHSMV2Client) CopyBackupToRegion(input *cloudhsmv2.CopyBackupToRegionInput) (*cloudhsmv2.CopyBackupToRegionOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudHSMV2Client{}
//
// 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 CloudHSMV2API interface {
CopyBackupToRegion(*cloudhsmv2.CopyBackupToRegionInput) (*cloudhsmv2.CopyBackupToRegionOutput, error)
CopyBackupToRegionWithContext(aws.Context, *cloudhsmv2.CopyBackupToRegionInput, ...request.Option) (*cloudhsmv2.CopyBackupToRegionOutput, error)
CopyBackupToRegionRequest(*cloudhsmv2.CopyBackupToRegionInput) (*request.Request, *cloudhsmv2.CopyBackupToRegionOutput)
CreateCluster(*cloudhsmv2.CreateClusterInput) (*cloudhsmv2.CreateClusterOutput, error)
CreateClusterWithContext(aws.Context, *cloudhsmv2.CreateClusterInput, ...request.Option) (*cloudhsmv2.CreateClusterOutput, error)
CreateClusterRequest(*cloudhsmv2.CreateClusterInput) (*request.Request, *cloudhsmv2.CreateClusterOutput)
CreateHsm(*cloudhsmv2.CreateHsmInput) (*cloudhsmv2.CreateHsmOutput, error)
CreateHsmWithContext(aws.Context, *cloudhsmv2.CreateHsmInput, ...request.Option) (*cloudhsmv2.CreateHsmOutput, error)
CreateHsmRequest(*cloudhsmv2.CreateHsmInput) (*request.Request, *cloudhsmv2.CreateHsmOutput)
DeleteBackup(*cloudhsmv2.DeleteBackupInput) (*cloudhsmv2.DeleteBackupOutput, error)
DeleteBackupWithContext(aws.Context, *cloudhsmv2.DeleteBackupInput, ...request.Option) (*cloudhsmv2.DeleteBackupOutput, error)
DeleteBackupRequest(*cloudhsmv2.DeleteBackupInput) (*request.Request, *cloudhsmv2.DeleteBackupOutput)
DeleteCluster(*cloudhsmv2.DeleteClusterInput) (*cloudhsmv2.DeleteClusterOutput, error)
DeleteClusterWithContext(aws.Context, *cloudhsmv2.DeleteClusterInput, ...request.Option) (*cloudhsmv2.DeleteClusterOutput, error)
DeleteClusterRequest(*cloudhsmv2.DeleteClusterInput) (*request.Request, *cloudhsmv2.DeleteClusterOutput)
DeleteHsm(*cloudhsmv2.DeleteHsmInput) (*cloudhsmv2.DeleteHsmOutput, error)
DeleteHsmWithContext(aws.Context, *cloudhsmv2.DeleteHsmInput, ...request.Option) (*cloudhsmv2.DeleteHsmOutput, error)
DeleteHsmRequest(*cloudhsmv2.DeleteHsmInput) (*request.Request, *cloudhsmv2.DeleteHsmOutput)
DescribeBackups(*cloudhsmv2.DescribeBackupsInput) (*cloudhsmv2.DescribeBackupsOutput, error)
DescribeBackupsWithContext(aws.Context, *cloudhsmv2.DescribeBackupsInput, ...request.Option) (*cloudhsmv2.DescribeBackupsOutput, error)
DescribeBackupsRequest(*cloudhsmv2.DescribeBackupsInput) (*request.Request, *cloudhsmv2.DescribeBackupsOutput)
DescribeBackupsPages(*cloudhsmv2.DescribeBackupsInput, func(*cloudhsmv2.DescribeBackupsOutput, bool) bool) error
DescribeBackupsPagesWithContext(aws.Context, *cloudhsmv2.DescribeBackupsInput, func(*cloudhsmv2.DescribeBackupsOutput, bool) bool, ...request.Option) error
DescribeClusters(*cloudhsmv2.DescribeClustersInput) (*cloudhsmv2.DescribeClustersOutput, error)
DescribeClustersWithContext(aws.Context, *cloudhsmv2.DescribeClustersInput, ...request.Option) (*cloudhsmv2.DescribeClustersOutput, error)
DescribeClustersRequest(*cloudhsmv2.DescribeClustersInput) (*request.Request, *cloudhsmv2.DescribeClustersOutput)
DescribeClustersPages(*cloudhsmv2.DescribeClustersInput, func(*cloudhsmv2.DescribeClustersOutput, bool) bool) error
DescribeClustersPagesWithContext(aws.Context, *cloudhsmv2.DescribeClustersInput, func(*cloudhsmv2.DescribeClustersOutput, bool) bool, ...request.Option) error
InitializeCluster(*cloudhsmv2.InitializeClusterInput) (*cloudhsmv2.InitializeClusterOutput, error)
InitializeClusterWithContext(aws.Context, *cloudhsmv2.InitializeClusterInput, ...request.Option) (*cloudhsmv2.InitializeClusterOutput, error)
InitializeClusterRequest(*cloudhsmv2.InitializeClusterInput) (*request.Request, *cloudhsmv2.InitializeClusterOutput)
ListTags(*cloudhsmv2.ListTagsInput) (*cloudhsmv2.ListTagsOutput, error)
ListTagsWithContext(aws.Context, *cloudhsmv2.ListTagsInput, ...request.Option) (*cloudhsmv2.ListTagsOutput, error)
ListTagsRequest(*cloudhsmv2.ListTagsInput) (*request.Request, *cloudhsmv2.ListTagsOutput)
ListTagsPages(*cloudhsmv2.ListTagsInput, func(*cloudhsmv2.ListTagsOutput, bool) bool) error
ListTagsPagesWithContext(aws.Context, *cloudhsmv2.ListTagsInput, func(*cloudhsmv2.ListTagsOutput, bool) bool, ...request.Option) error
ModifyBackupAttributes(*cloudhsmv2.ModifyBackupAttributesInput) (*cloudhsmv2.ModifyBackupAttributesOutput, error)
ModifyBackupAttributesWithContext(aws.Context, *cloudhsmv2.ModifyBackupAttributesInput, ...request.Option) (*cloudhsmv2.ModifyBackupAttributesOutput, error)
ModifyBackupAttributesRequest(*cloudhsmv2.ModifyBackupAttributesInput) (*request.Request, *cloudhsmv2.ModifyBackupAttributesOutput)
ModifyCluster(*cloudhsmv2.ModifyClusterInput) (*cloudhsmv2.ModifyClusterOutput, error)
ModifyClusterWithContext(aws.Context, *cloudhsmv2.ModifyClusterInput, ...request.Option) (*cloudhsmv2.ModifyClusterOutput, error)
ModifyClusterRequest(*cloudhsmv2.ModifyClusterInput) (*request.Request, *cloudhsmv2.ModifyClusterOutput)
RestoreBackup(*cloudhsmv2.RestoreBackupInput) (*cloudhsmv2.RestoreBackupOutput, error)
RestoreBackupWithContext(aws.Context, *cloudhsmv2.RestoreBackupInput, ...request.Option) (*cloudhsmv2.RestoreBackupOutput, error)
RestoreBackupRequest(*cloudhsmv2.RestoreBackupInput) (*request.Request, *cloudhsmv2.RestoreBackupOutput)
TagResource(*cloudhsmv2.TagResourceInput) (*cloudhsmv2.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *cloudhsmv2.TagResourceInput, ...request.Option) (*cloudhsmv2.TagResourceOutput, error)
TagResourceRequest(*cloudhsmv2.TagResourceInput) (*request.Request, *cloudhsmv2.TagResourceOutput)
UntagResource(*cloudhsmv2.UntagResourceInput) (*cloudhsmv2.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *cloudhsmv2.UntagResourceInput, ...request.Option) (*cloudhsmv2.UntagResourceOutput, error)
UntagResourceRequest(*cloudhsmv2.UntagResourceInput) (*request.Request, *cloudhsmv2.UntagResourceOutput)
}
var _ CloudHSMV2API = (*cloudhsmv2.CloudHSMV2)(nil)
| 134 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearch
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opBuildSuggesters = "BuildSuggesters"
// BuildSuggestersRequest generates a "aws/request.Request" representing the
// client's request for the BuildSuggesters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BuildSuggesters for more information on using the BuildSuggesters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BuildSuggestersRequest method.
// req, resp := client.BuildSuggestersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) BuildSuggestersRequest(input *BuildSuggestersInput) (req *request.Request, output *BuildSuggestersOutput) {
op := &request.Operation{
Name: opBuildSuggesters,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BuildSuggestersInput{}
}
output = &BuildSuggestersOutput{}
req = c.newRequest(op, input, output)
return
}
// BuildSuggesters API operation for Amazon CloudSearch.
//
// Indexes the search suggestions. For more information, see Configuring Suggesters
// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html#configuring-suggesters)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation BuildSuggesters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) BuildSuggesters(input *BuildSuggestersInput) (*BuildSuggestersOutput, error) {
req, out := c.BuildSuggestersRequest(input)
return out, req.Send()
}
// BuildSuggestersWithContext is the same as BuildSuggesters with the addition of
// the ability to pass a context and additional request options.
//
// See BuildSuggesters for details on how to use this API operation.
//
// 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 *CloudSearch) BuildSuggestersWithContext(ctx aws.Context, input *BuildSuggestersInput, opts ...request.Option) (*BuildSuggestersOutput, error) {
req, out := c.BuildSuggestersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateDomain = "CreateDomain"
// CreateDomainRequest generates a "aws/request.Request" representing the
// client's request for the CreateDomain operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateDomain for more information on using the CreateDomain
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateDomainRequest method.
// req, resp := client.CreateDomainRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) {
op := &request.Operation{
Name: opCreateDomain,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDomainInput{}
}
output = &CreateDomainOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateDomain API operation for Amazon CloudSearch.
//
// Creates a new search domain. For more information, see Creating a Search
// Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/creating-domains.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation CreateDomain for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExists"
// The request was rejected because it attempted to create a resource that already
// exists.
//
// * ErrCodeValidationException "ValidationException"
// The request was rejected because it has invalid parameters.
//
func (c *CloudSearch) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) {
req, out := c.CreateDomainRequest(input)
return out, req.Send()
}
// CreateDomainWithContext is the same as CreateDomain with the addition of
// the ability to pass a context and additional request options.
//
// See CreateDomain for details on how to use this API operation.
//
// 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 *CloudSearch) CreateDomainWithContext(ctx aws.Context, input *CreateDomainInput, opts ...request.Option) (*CreateDomainOutput, error) {
req, out := c.CreateDomainRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDefineAnalysisScheme = "DefineAnalysisScheme"
// DefineAnalysisSchemeRequest generates a "aws/request.Request" representing the
// client's request for the DefineAnalysisScheme operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DefineAnalysisScheme for more information on using the DefineAnalysisScheme
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DefineAnalysisSchemeRequest method.
// req, resp := client.DefineAnalysisSchemeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DefineAnalysisSchemeRequest(input *DefineAnalysisSchemeInput) (req *request.Request, output *DefineAnalysisSchemeOutput) {
op := &request.Operation{
Name: opDefineAnalysisScheme,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DefineAnalysisSchemeInput{}
}
output = &DefineAnalysisSchemeOutput{}
req = c.newRequest(op, input, output)
return
}
// DefineAnalysisScheme API operation for Amazon CloudSearch.
//
// Configures an analysis scheme that can be applied to a text or text-array
// field to define language-specific text processing options. For more information,
// see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DefineAnalysisScheme for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DefineAnalysisScheme(input *DefineAnalysisSchemeInput) (*DefineAnalysisSchemeOutput, error) {
req, out := c.DefineAnalysisSchemeRequest(input)
return out, req.Send()
}
// DefineAnalysisSchemeWithContext is the same as DefineAnalysisScheme with the addition of
// the ability to pass a context and additional request options.
//
// See DefineAnalysisScheme for details on how to use this API operation.
//
// 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 *CloudSearch) DefineAnalysisSchemeWithContext(ctx aws.Context, input *DefineAnalysisSchemeInput, opts ...request.Option) (*DefineAnalysisSchemeOutput, error) {
req, out := c.DefineAnalysisSchemeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDefineExpression = "DefineExpression"
// DefineExpressionRequest generates a "aws/request.Request" representing the
// client's request for the DefineExpression operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DefineExpression for more information on using the DefineExpression
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DefineExpressionRequest method.
// req, resp := client.DefineExpressionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DefineExpressionRequest(input *DefineExpressionInput) (req *request.Request, output *DefineExpressionOutput) {
op := &request.Operation{
Name: opDefineExpression,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DefineExpressionInput{}
}
output = &DefineExpressionOutput{}
req = c.newRequest(op, input, output)
return
}
// DefineExpression API operation for Amazon CloudSearch.
//
// Configures an Expression for the search domain. Used to create new expressions
// and modify existing ones. If the expression exists, the new configuration
// replaces the old one. For more information, see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DefineExpression for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DefineExpression(input *DefineExpressionInput) (*DefineExpressionOutput, error) {
req, out := c.DefineExpressionRequest(input)
return out, req.Send()
}
// DefineExpressionWithContext is the same as DefineExpression with the addition of
// the ability to pass a context and additional request options.
//
// See DefineExpression for details on how to use this API operation.
//
// 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 *CloudSearch) DefineExpressionWithContext(ctx aws.Context, input *DefineExpressionInput, opts ...request.Option) (*DefineExpressionOutput, error) {
req, out := c.DefineExpressionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDefineIndexField = "DefineIndexField"
// DefineIndexFieldRequest generates a "aws/request.Request" representing the
// client's request for the DefineIndexField operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DefineIndexField for more information on using the DefineIndexField
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DefineIndexFieldRequest method.
// req, resp := client.DefineIndexFieldRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DefineIndexFieldRequest(input *DefineIndexFieldInput) (req *request.Request, output *DefineIndexFieldOutput) {
op := &request.Operation{
Name: opDefineIndexField,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DefineIndexFieldInput{}
}
output = &DefineIndexFieldOutput{}
req = c.newRequest(op, input, output)
return
}
// DefineIndexField API operation for Amazon CloudSearch.
//
// Configures an IndexField for the search domain. Used to create new fields
// and modify existing ones. You must specify the name of the domain you are
// configuring and an index field configuration. The index field configuration
// specifies a unique name, the index field type, and the options you want to
// configure for the field. The options you can specify depend on the IndexFieldType.
// If the field exists, the new configuration replaces the old one. For more
// information, see Configuring Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DefineIndexField for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DefineIndexField(input *DefineIndexFieldInput) (*DefineIndexFieldOutput, error) {
req, out := c.DefineIndexFieldRequest(input)
return out, req.Send()
}
// DefineIndexFieldWithContext is the same as DefineIndexField with the addition of
// the ability to pass a context and additional request options.
//
// See DefineIndexField for details on how to use this API operation.
//
// 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 *CloudSearch) DefineIndexFieldWithContext(ctx aws.Context, input *DefineIndexFieldInput, opts ...request.Option) (*DefineIndexFieldOutput, error) {
req, out := c.DefineIndexFieldRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDefineSuggester = "DefineSuggester"
// DefineSuggesterRequest generates a "aws/request.Request" representing the
// client's request for the DefineSuggester operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DefineSuggester for more information on using the DefineSuggester
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DefineSuggesterRequest method.
// req, resp := client.DefineSuggesterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DefineSuggesterRequest(input *DefineSuggesterInput) (req *request.Request, output *DefineSuggesterOutput) {
op := &request.Operation{
Name: opDefineSuggester,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DefineSuggesterInput{}
}
output = &DefineSuggesterOutput{}
req = c.newRequest(op, input, output)
return
}
// DefineSuggester API operation for Amazon CloudSearch.
//
// Configures a suggester for a domain. A suggester enables you to display possible
// matches before users finish typing their queries. When you configure a suggester,
// you must specify the name of the text field you want to search for possible
// matches and a unique name for the suggester. For more information, see Getting
// Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DefineSuggester for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DefineSuggester(input *DefineSuggesterInput) (*DefineSuggesterOutput, error) {
req, out := c.DefineSuggesterRequest(input)
return out, req.Send()
}
// DefineSuggesterWithContext is the same as DefineSuggester with the addition of
// the ability to pass a context and additional request options.
//
// See DefineSuggester for details on how to use this API operation.
//
// 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 *CloudSearch) DefineSuggesterWithContext(ctx aws.Context, input *DefineSuggesterInput, opts ...request.Option) (*DefineSuggesterOutput, error) {
req, out := c.DefineSuggesterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAnalysisScheme = "DeleteAnalysisScheme"
// DeleteAnalysisSchemeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAnalysisScheme operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAnalysisScheme for more information on using the DeleteAnalysisScheme
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAnalysisSchemeRequest method.
// req, resp := client.DeleteAnalysisSchemeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DeleteAnalysisSchemeRequest(input *DeleteAnalysisSchemeInput) (req *request.Request, output *DeleteAnalysisSchemeOutput) {
op := &request.Operation{
Name: opDeleteAnalysisScheme,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAnalysisSchemeInput{}
}
output = &DeleteAnalysisSchemeOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteAnalysisScheme API operation for Amazon CloudSearch.
//
// Deletes an analysis scheme. For more information, see Configuring Analysis
// Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DeleteAnalysisScheme for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DeleteAnalysisScheme(input *DeleteAnalysisSchemeInput) (*DeleteAnalysisSchemeOutput, error) {
req, out := c.DeleteAnalysisSchemeRequest(input)
return out, req.Send()
}
// DeleteAnalysisSchemeWithContext is the same as DeleteAnalysisScheme with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAnalysisScheme for details on how to use this API operation.
//
// 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 *CloudSearch) DeleteAnalysisSchemeWithContext(ctx aws.Context, input *DeleteAnalysisSchemeInput, opts ...request.Option) (*DeleteAnalysisSchemeOutput, error) {
req, out := c.DeleteAnalysisSchemeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteDomain = "DeleteDomain"
// DeleteDomainRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDomain operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteDomain for more information on using the DeleteDomain
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteDomainRequest method.
// req, resp := client.DeleteDomainRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) {
op := &request.Operation{
Name: opDeleteDomain,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteDomainInput{}
}
output = &DeleteDomainOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteDomain API operation for Amazon CloudSearch.
//
// Permanently deletes a search domain and all of its data. Once a domain has
// been deleted, it cannot be recovered. For more information, see Deleting
// a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/deleting-domains.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DeleteDomain for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
func (c *CloudSearch) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) {
req, out := c.DeleteDomainRequest(input)
return out, req.Send()
}
// DeleteDomainWithContext is the same as DeleteDomain with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteDomain for details on how to use this API operation.
//
// 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 *CloudSearch) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) {
req, out := c.DeleteDomainRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteExpression = "DeleteExpression"
// DeleteExpressionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteExpression operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteExpression for more information on using the DeleteExpression
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteExpressionRequest method.
// req, resp := client.DeleteExpressionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DeleteExpressionRequest(input *DeleteExpressionInput) (req *request.Request, output *DeleteExpressionOutput) {
op := &request.Operation{
Name: opDeleteExpression,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteExpressionInput{}
}
output = &DeleteExpressionOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteExpression API operation for Amazon CloudSearch.
//
// Removes an Expression from the search domain. For more information, see Configuring
// Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DeleteExpression for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DeleteExpression(input *DeleteExpressionInput) (*DeleteExpressionOutput, error) {
req, out := c.DeleteExpressionRequest(input)
return out, req.Send()
}
// DeleteExpressionWithContext is the same as DeleteExpression with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteExpression for details on how to use this API operation.
//
// 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 *CloudSearch) DeleteExpressionWithContext(ctx aws.Context, input *DeleteExpressionInput, opts ...request.Option) (*DeleteExpressionOutput, error) {
req, out := c.DeleteExpressionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteIndexField = "DeleteIndexField"
// DeleteIndexFieldRequest generates a "aws/request.Request" representing the
// client's request for the DeleteIndexField operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteIndexField for more information on using the DeleteIndexField
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteIndexFieldRequest method.
// req, resp := client.DeleteIndexFieldRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DeleteIndexFieldRequest(input *DeleteIndexFieldInput) (req *request.Request, output *DeleteIndexFieldOutput) {
op := &request.Operation{
Name: opDeleteIndexField,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteIndexFieldInput{}
}
output = &DeleteIndexFieldOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteIndexField API operation for Amazon CloudSearch.
//
// Removes an IndexField from the search domain. For more information, see Configuring
// Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DeleteIndexField for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DeleteIndexField(input *DeleteIndexFieldInput) (*DeleteIndexFieldOutput, error) {
req, out := c.DeleteIndexFieldRequest(input)
return out, req.Send()
}
// DeleteIndexFieldWithContext is the same as DeleteIndexField with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteIndexField for details on how to use this API operation.
//
// 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 *CloudSearch) DeleteIndexFieldWithContext(ctx aws.Context, input *DeleteIndexFieldInput, opts ...request.Option) (*DeleteIndexFieldOutput, error) {
req, out := c.DeleteIndexFieldRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteSuggester = "DeleteSuggester"
// DeleteSuggesterRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSuggester operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteSuggester for more information on using the DeleteSuggester
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteSuggesterRequest method.
// req, resp := client.DeleteSuggesterRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DeleteSuggesterRequest(input *DeleteSuggesterInput) (req *request.Request, output *DeleteSuggesterOutput) {
op := &request.Operation{
Name: opDeleteSuggester,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteSuggesterInput{}
}
output = &DeleteSuggesterOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteSuggester API operation for Amazon CloudSearch.
//
// Deletes a suggester. For more information, see Getting Search Suggestions
// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DeleteSuggester for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DeleteSuggester(input *DeleteSuggesterInput) (*DeleteSuggesterOutput, error) {
req, out := c.DeleteSuggesterRequest(input)
return out, req.Send()
}
// DeleteSuggesterWithContext is the same as DeleteSuggester with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteSuggester for details on how to use this API operation.
//
// 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 *CloudSearch) DeleteSuggesterWithContext(ctx aws.Context, input *DeleteSuggesterInput, opts ...request.Option) (*DeleteSuggesterOutput, error) {
req, out := c.DeleteSuggesterRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAnalysisSchemes = "DescribeAnalysisSchemes"
// DescribeAnalysisSchemesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAnalysisSchemes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAnalysisSchemes for more information on using the DescribeAnalysisSchemes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAnalysisSchemesRequest method.
// req, resp := client.DescribeAnalysisSchemesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeAnalysisSchemesRequest(input *DescribeAnalysisSchemesInput) (req *request.Request, output *DescribeAnalysisSchemesOutput) {
op := &request.Operation{
Name: opDescribeAnalysisSchemes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAnalysisSchemesInput{}
}
output = &DescribeAnalysisSchemesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAnalysisSchemes API operation for Amazon CloudSearch.
//
// Gets the analysis schemes configured for a domain. An analysis scheme defines
// language-specific text processing options for a text field. Can be limited
// to specific analysis schemes by name. By default, shows all analysis schemes
// and includes any pending changes to the configuration. Set the Deployed option
// to true to show the active configuration and exclude pending changes. For
// more information, see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeAnalysisSchemes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeAnalysisSchemes(input *DescribeAnalysisSchemesInput) (*DescribeAnalysisSchemesOutput, error) {
req, out := c.DescribeAnalysisSchemesRequest(input)
return out, req.Send()
}
// DescribeAnalysisSchemesWithContext is the same as DescribeAnalysisSchemes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAnalysisSchemes for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeAnalysisSchemesWithContext(ctx aws.Context, input *DescribeAnalysisSchemesInput, opts ...request.Option) (*DescribeAnalysisSchemesOutput, error) {
req, out := c.DescribeAnalysisSchemesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAvailabilityOptions = "DescribeAvailabilityOptions"
// DescribeAvailabilityOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAvailabilityOptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAvailabilityOptions for more information on using the DescribeAvailabilityOptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAvailabilityOptionsRequest method.
// req, resp := client.DescribeAvailabilityOptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeAvailabilityOptionsRequest(input *DescribeAvailabilityOptionsInput) (req *request.Request, output *DescribeAvailabilityOptionsOutput) {
op := &request.Operation{
Name: opDescribeAvailabilityOptions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAvailabilityOptionsInput{}
}
output = &DescribeAvailabilityOptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAvailabilityOptions API operation for Amazon CloudSearch.
//
// Gets the availability options configured for a domain. By default, shows
// the configuration with any pending changes. Set the Deployed option to true
// to show the active configuration and exclude pending changes. For more information,
// see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeAvailabilityOptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeDisabledOperationException "DisabledAction"
// The request was rejected because it attempted an operation which is not enabled.
//
func (c *CloudSearch) DescribeAvailabilityOptions(input *DescribeAvailabilityOptionsInput) (*DescribeAvailabilityOptionsOutput, error) {
req, out := c.DescribeAvailabilityOptionsRequest(input)
return out, req.Send()
}
// DescribeAvailabilityOptionsWithContext is the same as DescribeAvailabilityOptions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAvailabilityOptions for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeAvailabilityOptionsWithContext(ctx aws.Context, input *DescribeAvailabilityOptionsInput, opts ...request.Option) (*DescribeAvailabilityOptionsOutput, error) {
req, out := c.DescribeAvailabilityOptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeDomainEndpointOptions = "DescribeDomainEndpointOptions"
// DescribeDomainEndpointOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDomainEndpointOptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeDomainEndpointOptions for more information on using the DescribeDomainEndpointOptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeDomainEndpointOptionsRequest method.
// req, resp := client.DescribeDomainEndpointOptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeDomainEndpointOptionsRequest(input *DescribeDomainEndpointOptionsInput) (req *request.Request, output *DescribeDomainEndpointOptionsOutput) {
op := &request.Operation{
Name: opDescribeDomainEndpointOptions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeDomainEndpointOptionsInput{}
}
output = &DescribeDomainEndpointOptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeDomainEndpointOptions API operation for Amazon CloudSearch.
//
// Returns the domain's endpoint options, specifically whether all requests
// to the domain must arrive over HTTPS. For more information, see Configuring
// Domain Endpoint Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-domain-endpoint-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeDomainEndpointOptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeDisabledOperationException "DisabledAction"
// The request was rejected because it attempted an operation which is not enabled.
//
func (c *CloudSearch) DescribeDomainEndpointOptions(input *DescribeDomainEndpointOptionsInput) (*DescribeDomainEndpointOptionsOutput, error) {
req, out := c.DescribeDomainEndpointOptionsRequest(input)
return out, req.Send()
}
// DescribeDomainEndpointOptionsWithContext is the same as DescribeDomainEndpointOptions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeDomainEndpointOptions for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeDomainEndpointOptionsWithContext(ctx aws.Context, input *DescribeDomainEndpointOptionsInput, opts ...request.Option) (*DescribeDomainEndpointOptionsOutput, error) {
req, out := c.DescribeDomainEndpointOptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeDomains = "DescribeDomains"
// DescribeDomainsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDomains operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeDomains for more information on using the DescribeDomains
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeDomainsRequest method.
// req, resp := client.DescribeDomainsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeDomainsRequest(input *DescribeDomainsInput) (req *request.Request, output *DescribeDomainsOutput) {
op := &request.Operation{
Name: opDescribeDomains,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeDomainsInput{}
}
output = &DescribeDomainsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeDomains API operation for Amazon CloudSearch.
//
// Gets information about the search domains owned by this account. Can be limited
// to specific domains. Shows all domains by default. To get the number of searchable
// documents in a domain, use the console or submit a matchall request to your
// domain's search endpoint: q=matchall&q.parser=structured&size=0.
// For more information, see Getting Information about a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeDomains for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
func (c *CloudSearch) DescribeDomains(input *DescribeDomainsInput) (*DescribeDomainsOutput, error) {
req, out := c.DescribeDomainsRequest(input)
return out, req.Send()
}
// DescribeDomainsWithContext is the same as DescribeDomains with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeDomains for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeDomainsWithContext(ctx aws.Context, input *DescribeDomainsInput, opts ...request.Option) (*DescribeDomainsOutput, error) {
req, out := c.DescribeDomainsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeExpressions = "DescribeExpressions"
// DescribeExpressionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExpressions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeExpressions for more information on using the DescribeExpressions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeExpressionsRequest method.
// req, resp := client.DescribeExpressionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeExpressionsRequest(input *DescribeExpressionsInput) (req *request.Request, output *DescribeExpressionsOutput) {
op := &request.Operation{
Name: opDescribeExpressions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeExpressionsInput{}
}
output = &DescribeExpressionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeExpressions API operation for Amazon CloudSearch.
//
// Gets the expressions configured for the search domain. Can be limited to
// specific expressions by name. By default, shows all expressions and includes
// any pending changes to the configuration. Set the Deployed option to true
// to show the active configuration and exclude pending changes. For more information,
// see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeExpressions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeExpressions(input *DescribeExpressionsInput) (*DescribeExpressionsOutput, error) {
req, out := c.DescribeExpressionsRequest(input)
return out, req.Send()
}
// DescribeExpressionsWithContext is the same as DescribeExpressions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeExpressions for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeExpressionsWithContext(ctx aws.Context, input *DescribeExpressionsInput, opts ...request.Option) (*DescribeExpressionsOutput, error) {
req, out := c.DescribeExpressionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeIndexFields = "DescribeIndexFields"
// DescribeIndexFieldsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIndexFields operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeIndexFields for more information on using the DescribeIndexFields
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeIndexFieldsRequest method.
// req, resp := client.DescribeIndexFieldsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeIndexFieldsRequest(input *DescribeIndexFieldsInput) (req *request.Request, output *DescribeIndexFieldsOutput) {
op := &request.Operation{
Name: opDescribeIndexFields,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeIndexFieldsInput{}
}
output = &DescribeIndexFieldsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeIndexFields API operation for Amazon CloudSearch.
//
// Gets information about the index fields configured for the search domain.
// Can be limited to specific fields by name. By default, shows all fields and
// includes any pending changes to the configuration. Set the Deployed option
// to true to show the active configuration and exclude pending changes. For
// more information, see Getting Domain Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeIndexFields for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeIndexFields(input *DescribeIndexFieldsInput) (*DescribeIndexFieldsOutput, error) {
req, out := c.DescribeIndexFieldsRequest(input)
return out, req.Send()
}
// DescribeIndexFieldsWithContext is the same as DescribeIndexFields with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeIndexFields for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeIndexFieldsWithContext(ctx aws.Context, input *DescribeIndexFieldsInput, opts ...request.Option) (*DescribeIndexFieldsOutput, error) {
req, out := c.DescribeIndexFieldsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeScalingParameters = "DescribeScalingParameters"
// DescribeScalingParametersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScalingParameters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeScalingParameters for more information on using the DescribeScalingParameters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeScalingParametersRequest method.
// req, resp := client.DescribeScalingParametersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeScalingParametersRequest(input *DescribeScalingParametersInput) (req *request.Request, output *DescribeScalingParametersOutput) {
op := &request.Operation{
Name: opDescribeScalingParameters,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeScalingParametersInput{}
}
output = &DescribeScalingParametersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeScalingParameters API operation for Amazon CloudSearch.
//
// Gets the scaling parameters configured for a domain. A domain's scaling parameters
// specify the desired search instance type and replication count. For more
// information, see Configuring Scaling Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeScalingParameters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeScalingParameters(input *DescribeScalingParametersInput) (*DescribeScalingParametersOutput, error) {
req, out := c.DescribeScalingParametersRequest(input)
return out, req.Send()
}
// DescribeScalingParametersWithContext is the same as DescribeScalingParameters with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeScalingParameters for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeScalingParametersWithContext(ctx aws.Context, input *DescribeScalingParametersInput, opts ...request.Option) (*DescribeScalingParametersOutput, error) {
req, out := c.DescribeScalingParametersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeServiceAccessPolicies = "DescribeServiceAccessPolicies"
// DescribeServiceAccessPoliciesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeServiceAccessPolicies operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeServiceAccessPolicies for more information on using the DescribeServiceAccessPolicies
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeServiceAccessPoliciesRequest method.
// req, resp := client.DescribeServiceAccessPoliciesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeServiceAccessPoliciesRequest(input *DescribeServiceAccessPoliciesInput) (req *request.Request, output *DescribeServiceAccessPoliciesOutput) {
op := &request.Operation{
Name: opDescribeServiceAccessPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeServiceAccessPoliciesInput{}
}
output = &DescribeServiceAccessPoliciesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeServiceAccessPolicies API operation for Amazon CloudSearch.
//
// Gets information about the access policies that control access to the domain's
// document and search endpoints. By default, shows the configuration with any
// pending changes. Set the Deployed option to true to show the active configuration
// and exclude pending changes. For more information, see Configuring Access
// for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeServiceAccessPolicies for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeServiceAccessPolicies(input *DescribeServiceAccessPoliciesInput) (*DescribeServiceAccessPoliciesOutput, error) {
req, out := c.DescribeServiceAccessPoliciesRequest(input)
return out, req.Send()
}
// DescribeServiceAccessPoliciesWithContext is the same as DescribeServiceAccessPolicies with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeServiceAccessPolicies for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeServiceAccessPoliciesWithContext(ctx aws.Context, input *DescribeServiceAccessPoliciesInput, opts ...request.Option) (*DescribeServiceAccessPoliciesOutput, error) {
req, out := c.DescribeServiceAccessPoliciesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeSuggesters = "DescribeSuggesters"
// DescribeSuggestersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSuggesters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeSuggesters for more information on using the DescribeSuggesters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeSuggestersRequest method.
// req, resp := client.DescribeSuggestersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) DescribeSuggestersRequest(input *DescribeSuggestersInput) (req *request.Request, output *DescribeSuggestersOutput) {
op := &request.Operation{
Name: opDescribeSuggesters,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeSuggestersInput{}
}
output = &DescribeSuggestersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeSuggesters API operation for Amazon CloudSearch.
//
// Gets the suggesters configured for a domain. A suggester enables you to display
// possible matches before users finish typing their queries. Can be limited
// to specific suggesters by name. By default, shows all suggesters and includes
// any pending changes to the configuration. Set the Deployed option to true
// to show the active configuration and exclude pending changes. For more information,
// see Getting Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation DescribeSuggesters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) DescribeSuggesters(input *DescribeSuggestersInput) (*DescribeSuggestersOutput, error) {
req, out := c.DescribeSuggestersRequest(input)
return out, req.Send()
}
// DescribeSuggestersWithContext is the same as DescribeSuggesters with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeSuggesters for details on how to use this API operation.
//
// 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 *CloudSearch) DescribeSuggestersWithContext(ctx aws.Context, input *DescribeSuggestersInput, opts ...request.Option) (*DescribeSuggestersOutput, error) {
req, out := c.DescribeSuggestersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opIndexDocuments = "IndexDocuments"
// IndexDocumentsRequest generates a "aws/request.Request" representing the
// client's request for the IndexDocuments operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See IndexDocuments for more information on using the IndexDocuments
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the IndexDocumentsRequest method.
// req, resp := client.IndexDocumentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) IndexDocumentsRequest(input *IndexDocumentsInput) (req *request.Request, output *IndexDocumentsOutput) {
op := &request.Operation{
Name: opIndexDocuments,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &IndexDocumentsInput{}
}
output = &IndexDocumentsOutput{}
req = c.newRequest(op, input, output)
return
}
// IndexDocuments API operation for Amazon CloudSearch.
//
// Tells the search domain to start indexing its documents using the latest
// indexing options. This operation must be invoked to activate options whose
// OptionStatus is RequiresIndexDocuments.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation IndexDocuments for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
func (c *CloudSearch) IndexDocuments(input *IndexDocumentsInput) (*IndexDocumentsOutput, error) {
req, out := c.IndexDocumentsRequest(input)
return out, req.Send()
}
// IndexDocumentsWithContext is the same as IndexDocuments with the addition of
// the ability to pass a context and additional request options.
//
// See IndexDocuments for details on how to use this API operation.
//
// 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 *CloudSearch) IndexDocumentsWithContext(ctx aws.Context, input *IndexDocumentsInput, opts ...request.Option) (*IndexDocumentsOutput, error) {
req, out := c.IndexDocumentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListDomainNames = "ListDomainNames"
// ListDomainNamesRequest generates a "aws/request.Request" representing the
// client's request for the ListDomainNames operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListDomainNames for more information on using the ListDomainNames
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListDomainNamesRequest method.
// req, resp := client.ListDomainNamesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) ListDomainNamesRequest(input *ListDomainNamesInput) (req *request.Request, output *ListDomainNamesOutput) {
op := &request.Operation{
Name: opListDomainNames,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListDomainNamesInput{}
}
output = &ListDomainNamesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListDomainNames API operation for Amazon CloudSearch.
//
// Lists all search domains owned by an account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation ListDomainNames for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
func (c *CloudSearch) ListDomainNames(input *ListDomainNamesInput) (*ListDomainNamesOutput, error) {
req, out := c.ListDomainNamesRequest(input)
return out, req.Send()
}
// ListDomainNamesWithContext is the same as ListDomainNames with the addition of
// the ability to pass a context and additional request options.
//
// See ListDomainNames for details on how to use this API operation.
//
// 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 *CloudSearch) ListDomainNamesWithContext(ctx aws.Context, input *ListDomainNamesInput, opts ...request.Option) (*ListDomainNamesOutput, error) {
req, out := c.ListDomainNamesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateAvailabilityOptions = "UpdateAvailabilityOptions"
// UpdateAvailabilityOptionsRequest generates a "aws/request.Request" representing the
// client's request for the UpdateAvailabilityOptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateAvailabilityOptions for more information on using the UpdateAvailabilityOptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateAvailabilityOptionsRequest method.
// req, resp := client.UpdateAvailabilityOptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) UpdateAvailabilityOptionsRequest(input *UpdateAvailabilityOptionsInput) (req *request.Request, output *UpdateAvailabilityOptionsOutput) {
op := &request.Operation{
Name: opUpdateAvailabilityOptions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateAvailabilityOptionsInput{}
}
output = &UpdateAvailabilityOptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateAvailabilityOptions API operation for Amazon CloudSearch.
//
// Configures the availability options for a domain. Enabling the Multi-AZ option
// expands an Amazon CloudSearch domain to an additional Availability Zone in
// the same Region to increase fault tolerance in the event of a service disruption.
// Changes to the Multi-AZ option can take about half an hour to become active.
// For more information, see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation UpdateAvailabilityOptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeDisabledOperationException "DisabledAction"
// The request was rejected because it attempted an operation which is not enabled.
//
// * ErrCodeValidationException "ValidationException"
// The request was rejected because it has invalid parameters.
//
func (c *CloudSearch) UpdateAvailabilityOptions(input *UpdateAvailabilityOptionsInput) (*UpdateAvailabilityOptionsOutput, error) {
req, out := c.UpdateAvailabilityOptionsRequest(input)
return out, req.Send()
}
// UpdateAvailabilityOptionsWithContext is the same as UpdateAvailabilityOptions with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateAvailabilityOptions for details on how to use this API operation.
//
// 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 *CloudSearch) UpdateAvailabilityOptionsWithContext(ctx aws.Context, input *UpdateAvailabilityOptionsInput, opts ...request.Option) (*UpdateAvailabilityOptionsOutput, error) {
req, out := c.UpdateAvailabilityOptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateDomainEndpointOptions = "UpdateDomainEndpointOptions"
// UpdateDomainEndpointOptionsRequest generates a "aws/request.Request" representing the
// client's request for the UpdateDomainEndpointOptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateDomainEndpointOptions for more information on using the UpdateDomainEndpointOptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateDomainEndpointOptionsRequest method.
// req, resp := client.UpdateDomainEndpointOptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) UpdateDomainEndpointOptionsRequest(input *UpdateDomainEndpointOptionsInput) (req *request.Request, output *UpdateDomainEndpointOptionsOutput) {
op := &request.Operation{
Name: opUpdateDomainEndpointOptions,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateDomainEndpointOptionsInput{}
}
output = &UpdateDomainEndpointOptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateDomainEndpointOptions API operation for Amazon CloudSearch.
//
// Updates the domain's endpoint options, specifically whether all requests
// to the domain must arrive over HTTPS. For more information, see Configuring
// Domain Endpoint Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-domain-endpoint-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation UpdateDomainEndpointOptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeDisabledOperationException "DisabledAction"
// The request was rejected because it attempted an operation which is not enabled.
//
// * ErrCodeValidationException "ValidationException"
// The request was rejected because it has invalid parameters.
//
func (c *CloudSearch) UpdateDomainEndpointOptions(input *UpdateDomainEndpointOptionsInput) (*UpdateDomainEndpointOptionsOutput, error) {
req, out := c.UpdateDomainEndpointOptionsRequest(input)
return out, req.Send()
}
// UpdateDomainEndpointOptionsWithContext is the same as UpdateDomainEndpointOptions with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateDomainEndpointOptions for details on how to use this API operation.
//
// 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 *CloudSearch) UpdateDomainEndpointOptionsWithContext(ctx aws.Context, input *UpdateDomainEndpointOptionsInput, opts ...request.Option) (*UpdateDomainEndpointOptionsOutput, error) {
req, out := c.UpdateDomainEndpointOptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateScalingParameters = "UpdateScalingParameters"
// UpdateScalingParametersRequest generates a "aws/request.Request" representing the
// client's request for the UpdateScalingParameters operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateScalingParameters for more information on using the UpdateScalingParameters
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateScalingParametersRequest method.
// req, resp := client.UpdateScalingParametersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) UpdateScalingParametersRequest(input *UpdateScalingParametersInput) (req *request.Request, output *UpdateScalingParametersOutput) {
op := &request.Operation{
Name: opUpdateScalingParameters,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateScalingParametersInput{}
}
output = &UpdateScalingParametersOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateScalingParameters API operation for Amazon CloudSearch.
//
// Configures scaling parameters for a domain. A domain's scaling parameters
// specify the desired search instance type and replication count. Amazon CloudSearch
// will still automatically scale your domain based on the volume of data and
// traffic, but not below the desired instance type and replication count. If
// the Multi-AZ option is enabled, these values control the resources used per
// Availability Zone. For more information, see Configuring Scaling Options
// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation UpdateScalingParameters for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
func (c *CloudSearch) UpdateScalingParameters(input *UpdateScalingParametersInput) (*UpdateScalingParametersOutput, error) {
req, out := c.UpdateScalingParametersRequest(input)
return out, req.Send()
}
// UpdateScalingParametersWithContext is the same as UpdateScalingParameters with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateScalingParameters for details on how to use this API operation.
//
// 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 *CloudSearch) UpdateScalingParametersWithContext(ctx aws.Context, input *UpdateScalingParametersInput, opts ...request.Option) (*UpdateScalingParametersOutput, error) {
req, out := c.UpdateScalingParametersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateServiceAccessPolicies = "UpdateServiceAccessPolicies"
// UpdateServiceAccessPoliciesRequest generates a "aws/request.Request" representing the
// client's request for the UpdateServiceAccessPolicies operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateServiceAccessPolicies for more information on using the UpdateServiceAccessPolicies
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateServiceAccessPoliciesRequest method.
// req, resp := client.UpdateServiceAccessPoliciesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearch) UpdateServiceAccessPoliciesRequest(input *UpdateServiceAccessPoliciesInput) (req *request.Request, output *UpdateServiceAccessPoliciesOutput) {
op := &request.Operation{
Name: opUpdateServiceAccessPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateServiceAccessPoliciesInput{}
}
output = &UpdateServiceAccessPoliciesOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateServiceAccessPolicies API operation for Amazon CloudSearch.
//
// Configures the access rules that control access to the domain's document
// and search endpoints. For more information, see Configuring Access for an
// Amazon CloudSearch Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch's
// API operation UpdateServiceAccessPolicies for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBaseException "BaseException"
// An error occurred while processing the request.
//
// * ErrCodeInternalException "InternalException"
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
//
// * ErrCodeLimitExceededException "LimitExceeded"
// The request was rejected because a resource limit has already been met.
//
// * ErrCodeResourceNotFoundException "ResourceNotFound"
// The request was rejected because it attempted to reference a resource that
// does not exist.
//
// * ErrCodeInvalidTypeException "InvalidType"
// The request was rejected because it specified an invalid type definition.
//
func (c *CloudSearch) UpdateServiceAccessPolicies(input *UpdateServiceAccessPoliciesInput) (*UpdateServiceAccessPoliciesOutput, error) {
req, out := c.UpdateServiceAccessPoliciesRequest(input)
return out, req.Send()
}
// UpdateServiceAccessPoliciesWithContext is the same as UpdateServiceAccessPolicies with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateServiceAccessPolicies for details on how to use this API operation.
//
// 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 *CloudSearch) UpdateServiceAccessPoliciesWithContext(ctx aws.Context, input *UpdateServiceAccessPoliciesInput, opts ...request.Option) (*UpdateServiceAccessPoliciesOutput, error) {
req, out := c.UpdateServiceAccessPoliciesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// The configured access rules for the domain's document and search endpoints,
// and the current status of those rules.
type AccessPoliciesStatus struct {
_ struct{} `type:"structure"`
// Access rules for a domain's document or search service endpoints. For more
// information, see Configuring Access for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html)
// in the Amazon CloudSearch Developer Guide. The maximum size of a policy document
// is 100 KB.
//
// Options is a required field
Options *string `type:"string" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s AccessPoliciesStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccessPoliciesStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *AccessPoliciesStatus) SetOptions(v string) *AccessPoliciesStatus {
s.Options = &v
return s
}
// SetStatus sets the Status field's value.
func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus {
s.Status = v
return s
}
// Synonyms, stopwords, and stemming options for an analysis scheme. Includes
// tokenization dictionary for Japanese.
type AnalysisOptions struct {
_ struct{} `type:"structure"`
// The level of algorithmic stemming to perform: none, minimal, light, or full.
// The available levels vary depending on the language. For more information,
// see Language Specific Text Processing Settings (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings)
// in the Amazon CloudSearch Developer Guide
AlgorithmicStemming *string `type:"string" enum:"AlgorithmicStemming"`
// A JSON array that contains a collection of terms, tokens, readings and part
// of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary
// enables you to override the default tokenization for selected terms. This
// is only valid for Japanese language fields.
JapaneseTokenizationDictionary *string `type:"string"`
// A JSON object that contains a collection of string:value pairs that each
// map a term to its stem. For example, {"term1": "stem1", "term2": "stem2",
// "term3": "stem3"}. The stemming dictionary is applied in addition to any
// algorithmic stemming. This enables you to override the results of the algorithmic
// stemming to correct specific cases of overstemming or understemming. The
// maximum size of a stemming dictionary is 500 KB.
StemmingDictionary *string `type:"string"`
// A JSON array of terms to ignore during indexing and searching. For example,
// ["a", "an", "the", "of"]. The stopwords dictionary must explicitly list each
// word you want to ignore. Wildcards and regular expressions are not supported.
Stopwords *string `type:"string"`
// A JSON object that defines synonym groups and aliases. A synonym group is
// an array of arrays, where each sub-array is a group of terms where each term
// in the group is considered a synonym of every other term in the group. The
// aliases value is an object that contains a collection of string:value pairs
// where the string specifies a term and the array of values specifies each
// of the aliases for that term. An alias is considered a synonym of the specified
// term, but the term is not considered a synonym of the alias. For more information
// about specifying synonyms, see Synonyms (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms)
// in the Amazon CloudSearch Developer Guide.
Synonyms *string `type:"string"`
}
// String returns the string representation
func (s AnalysisOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AnalysisOptions) GoString() string {
return s.String()
}
// SetAlgorithmicStemming sets the AlgorithmicStemming field's value.
func (s *AnalysisOptions) SetAlgorithmicStemming(v string) *AnalysisOptions {
s.AlgorithmicStemming = &v
return s
}
// SetJapaneseTokenizationDictionary sets the JapaneseTokenizationDictionary field's value.
func (s *AnalysisOptions) SetJapaneseTokenizationDictionary(v string) *AnalysisOptions {
s.JapaneseTokenizationDictionary = &v
return s
}
// SetStemmingDictionary sets the StemmingDictionary field's value.
func (s *AnalysisOptions) SetStemmingDictionary(v string) *AnalysisOptions {
s.StemmingDictionary = &v
return s
}
// SetStopwords sets the Stopwords field's value.
func (s *AnalysisOptions) SetStopwords(v string) *AnalysisOptions {
s.Stopwords = &v
return s
}
// SetSynonyms sets the Synonyms field's value.
func (s *AnalysisOptions) SetSynonyms(v string) *AnalysisOptions {
s.Synonyms = &v
return s
}
// Configuration information for an analysis scheme. Each analysis scheme has
// a unique name and specifies the language of the text to be processed. The
// following options can be configured for an analysis scheme: Synonyms, Stopwords,
// StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.
type AnalysisScheme struct {
_ struct{} `type:"structure"`
// Synonyms, stopwords, and stemming options for an analysis scheme. Includes
// tokenization dictionary for Japanese.
AnalysisOptions *AnalysisOptions `type:"structure"`
// An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul
// for multiple languages.
//
// AnalysisSchemeLanguage is a required field
AnalysisSchemeLanguage *string `type:"string" required:"true" enum:"AnalysisSchemeLanguage"`
// Names must begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore).
//
// AnalysisSchemeName is a required field
AnalysisSchemeName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AnalysisScheme) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AnalysisScheme) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AnalysisScheme) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AnalysisScheme"}
if s.AnalysisSchemeLanguage == nil {
invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeLanguage"))
}
if s.AnalysisSchemeName == nil {
invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName"))
}
if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAnalysisOptions sets the AnalysisOptions field's value.
func (s *AnalysisScheme) SetAnalysisOptions(v *AnalysisOptions) *AnalysisScheme {
s.AnalysisOptions = v
return s
}
// SetAnalysisSchemeLanguage sets the AnalysisSchemeLanguage field's value.
func (s *AnalysisScheme) SetAnalysisSchemeLanguage(v string) *AnalysisScheme {
s.AnalysisSchemeLanguage = &v
return s
}
// SetAnalysisSchemeName sets the AnalysisSchemeName field's value.
func (s *AnalysisScheme) SetAnalysisSchemeName(v string) *AnalysisScheme {
s.AnalysisSchemeName = &v
return s
}
// The status and configuration of an AnalysisScheme.
type AnalysisSchemeStatus struct {
_ struct{} `type:"structure"`
// Configuration information for an analysis scheme. Each analysis scheme has
// a unique name and specifies the language of the text to be processed. The
// following options can be configured for an analysis scheme: Synonyms, Stopwords,
// StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.
//
// Options is a required field
Options *AnalysisScheme `type:"structure" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s AnalysisSchemeStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AnalysisSchemeStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *AnalysisSchemeStatus) SetOptions(v *AnalysisScheme) *AnalysisSchemeStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *AnalysisSchemeStatus) SetStatus(v *OptionStatus) *AnalysisSchemeStatus {
s.Status = v
return s
}
// The status and configuration of the domain's availability options.
type AvailabilityOptionsStatus struct {
_ struct{} `type:"structure"`
// The availability options configured for the domain.
//
// Options is a required field
Options *bool `type:"boolean" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s AvailabilityOptionsStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AvailabilityOptionsStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *AvailabilityOptionsStatus) SetOptions(v bool) *AvailabilityOptionsStatus {
s.Options = &v
return s
}
// SetStatus sets the Status field's value.
func (s *AvailabilityOptionsStatus) SetStatus(v *OptionStatus) *AvailabilityOptionsStatus {
s.Status = v
return s
}
// Container for the parameters to the BuildSuggester operation. Specifies the
// name of the domain you want to update.
type BuildSuggestersInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s BuildSuggestersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BuildSuggestersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BuildSuggestersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BuildSuggestersInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *BuildSuggestersInput) SetDomainName(v string) *BuildSuggestersInput {
s.DomainName = &v
return s
}
// The result of a BuildSuggester request. Contains a list of the fields used
// for suggestions.
type BuildSuggestersOutput struct {
_ struct{} `type:"structure"`
// A list of field names.
FieldNames []*string `type:"list"`
}
// String returns the string representation
func (s BuildSuggestersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BuildSuggestersOutput) GoString() string {
return s.String()
}
// SetFieldNames sets the FieldNames field's value.
func (s *BuildSuggestersOutput) SetFieldNames(v []*string) *BuildSuggestersOutput {
s.FieldNames = v
return s
}
// Container for the parameters to the CreateDomain operation. Specifies a name
// for the new search domain.
type CreateDomainInput struct {
_ struct{} `type:"structure"`
// A name for the domain you are creating. Allowed characters are a-z (lower-case
// letters), 0-9, and hyphen (-). Domain names must start with a letter or number
// and be at least 3 and no more than 28 characters long.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateDomainInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateDomainInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateDomainInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput {
s.DomainName = &v
return s
}
// The result of a CreateDomainRequest. Contains the status of a newly created
// domain.
type CreateDomainOutput struct {
_ struct{} `type:"structure"`
// The current status of the search domain.
DomainStatus *DomainStatus `type:"structure"`
}
// String returns the string representation
func (s CreateDomainOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateDomainOutput) GoString() string {
return s.String()
}
// SetDomainStatus sets the DomainStatus field's value.
func (s *CreateDomainOutput) SetDomainStatus(v *DomainStatus) *CreateDomainOutput {
s.DomainStatus = v
return s
}
// Options for a field that contains an array of dates. Present if IndexFieldType
// specifies the field is of type date-array. All options are enabled by default.
type DateArrayOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// A list of source fields to map to the field.
SourceFields *string `type:"string"`
}
// String returns the string representation
func (s DateArrayOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DateArrayOptions) GoString() string {
return s.String()
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *DateArrayOptions) SetDefaultValue(v string) *DateArrayOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *DateArrayOptions) SetFacetEnabled(v bool) *DateArrayOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *DateArrayOptions) SetReturnEnabled(v bool) *DateArrayOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *DateArrayOptions) SetSearchEnabled(v bool) *DateArrayOptions {
s.SearchEnabled = &v
return s
}
// SetSourceFields sets the SourceFields field's value.
func (s *DateArrayOptions) SetSourceFields(v string) *DateArrayOptions {
s.SourceFields = &v
return s
}
// Options for a date field. Dates and times are specified in UTC (Coordinated
// Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present
// if IndexFieldType specifies the field is of type date. All options are enabled
// by default.
type DateOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// A string that represents the name of an index field. CloudSearch supports
// regular index fields as well as dynamic fields. A dynamic field's name defines
// a pattern that begins or ends with a wildcard. Any document fields that don't
// map to a regular index field but do match a dynamic field's pattern are configured
// with the dynamic field's indexing options.
//
// Regular field names begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin
// or end with a wildcard (*). The wildcard can also be the only character in
// a dynamic field name. Multiple wildcards, and wildcards embedded within a
// string are not supported.
//
// The name score is reserved and cannot be used as a field name. To reference
// a document's ID, you can use the name _id.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s DateOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DateOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DateOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DateOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *DateOptions) SetDefaultValue(v string) *DateOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *DateOptions) SetFacetEnabled(v bool) *DateOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *DateOptions) SetReturnEnabled(v bool) *DateOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *DateOptions) SetSearchEnabled(v bool) *DateOptions {
s.SearchEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *DateOptions) SetSortEnabled(v bool) *DateOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *DateOptions) SetSourceField(v string) *DateOptions {
s.SourceField = &v
return s
}
// Container for the parameters to the DefineAnalysisScheme operation. Specifies
// the name of the domain you want to update and the analysis scheme configuration.
type DefineAnalysisSchemeInput struct {
_ struct{} `type:"structure"`
// Configuration information for an analysis scheme. Each analysis scheme has
// a unique name and specifies the language of the text to be processed. The
// following options can be configured for an analysis scheme: Synonyms, Stopwords,
// StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.
//
// AnalysisScheme is a required field
AnalysisScheme *AnalysisScheme `type:"structure" required:"true"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DefineAnalysisSchemeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineAnalysisSchemeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DefineAnalysisSchemeInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DefineAnalysisSchemeInput"}
if s.AnalysisScheme == nil {
invalidParams.Add(request.NewErrParamRequired("AnalysisScheme"))
}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.AnalysisScheme != nil {
if err := s.AnalysisScheme.Validate(); err != nil {
invalidParams.AddNested("AnalysisScheme", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAnalysisScheme sets the AnalysisScheme field's value.
func (s *DefineAnalysisSchemeInput) SetAnalysisScheme(v *AnalysisScheme) *DefineAnalysisSchemeInput {
s.AnalysisScheme = v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DefineAnalysisSchemeInput) SetDomainName(v string) *DefineAnalysisSchemeInput {
s.DomainName = &v
return s
}
// The result of a DefineAnalysisScheme request. Contains the status of the
// newly-configured analysis scheme.
type DefineAnalysisSchemeOutput struct {
_ struct{} `type:"structure"`
// The status and configuration of an AnalysisScheme.
//
// AnalysisScheme is a required field
AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineAnalysisSchemeOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineAnalysisSchemeOutput) GoString() string {
return s.String()
}
// SetAnalysisScheme sets the AnalysisScheme field's value.
func (s *DefineAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DefineAnalysisSchemeOutput {
s.AnalysisScheme = v
return s
}
// Container for the parameters to the DefineExpression operation. Specifies
// the name of the domain you want to update and the expression you want to
// configure.
type DefineExpressionInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// A named expression that can be evaluated at search time. Can be used to sort
// the search results, define other expressions, or return computed information
// in the search results.
//
// Expression is a required field
Expression *Expression `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineExpressionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineExpressionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DefineExpressionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DefineExpressionInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.Expression == nil {
invalidParams.Add(request.NewErrParamRequired("Expression"))
}
if s.Expression != nil {
if err := s.Expression.Validate(); err != nil {
invalidParams.AddNested("Expression", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DefineExpressionInput) SetDomainName(v string) *DefineExpressionInput {
s.DomainName = &v
return s
}
// SetExpression sets the Expression field's value.
func (s *DefineExpressionInput) SetExpression(v *Expression) *DefineExpressionInput {
s.Expression = v
return s
}
// The result of a DefineExpression request. Contains the status of the newly-configured
// expression.
type DefineExpressionOutput struct {
_ struct{} `type:"structure"`
// The value of an Expression and its current status.
//
// Expression is a required field
Expression *ExpressionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineExpressionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineExpressionOutput) GoString() string {
return s.String()
}
// SetExpression sets the Expression field's value.
func (s *DefineExpressionOutput) SetExpression(v *ExpressionStatus) *DefineExpressionOutput {
s.Expression = v
return s
}
// Container for the parameters to the DefineIndexField operation. Specifies
// the name of the domain you want to update and the index field configuration.
type DefineIndexFieldInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// The index field and field options you want to configure.
//
// IndexField is a required field
IndexField *IndexField `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineIndexFieldInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineIndexFieldInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DefineIndexFieldInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DefineIndexFieldInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.IndexField == nil {
invalidParams.Add(request.NewErrParamRequired("IndexField"))
}
if s.IndexField != nil {
if err := s.IndexField.Validate(); err != nil {
invalidParams.AddNested("IndexField", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DefineIndexFieldInput) SetDomainName(v string) *DefineIndexFieldInput {
s.DomainName = &v
return s
}
// SetIndexField sets the IndexField field's value.
func (s *DefineIndexFieldInput) SetIndexField(v *IndexField) *DefineIndexFieldInput {
s.IndexField = v
return s
}
// The result of a DefineIndexField request. Contains the status of the newly-configured
// index field.
type DefineIndexFieldOutput struct {
_ struct{} `type:"structure"`
// The value of an IndexField and its current status.
//
// IndexField is a required field
IndexField *IndexFieldStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineIndexFieldOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineIndexFieldOutput) GoString() string {
return s.String()
}
// SetIndexField sets the IndexField field's value.
func (s *DefineIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DefineIndexFieldOutput {
s.IndexField = v
return s
}
// Container for the parameters to the DefineSuggester operation. Specifies
// the name of the domain you want to update and the suggester configuration.
type DefineSuggesterInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// Configuration information for a search suggester. Each suggester has a unique
// name and specifies the text field you want to use for suggestions. The following
// options can be configured for a suggester: FuzzyMatching, SortExpression.
//
// Suggester is a required field
Suggester *Suggester `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineSuggesterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineSuggesterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DefineSuggesterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DefineSuggesterInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.Suggester == nil {
invalidParams.Add(request.NewErrParamRequired("Suggester"))
}
if s.Suggester != nil {
if err := s.Suggester.Validate(); err != nil {
invalidParams.AddNested("Suggester", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DefineSuggesterInput) SetDomainName(v string) *DefineSuggesterInput {
s.DomainName = &v
return s
}
// SetSuggester sets the Suggester field's value.
func (s *DefineSuggesterInput) SetSuggester(v *Suggester) *DefineSuggesterInput {
s.Suggester = v
return s
}
// The result of a DefineSuggester request. Contains the status of the newly-configured
// suggester.
type DefineSuggesterOutput struct {
_ struct{} `type:"structure"`
// The value of a Suggester and its current status.
//
// Suggester is a required field
Suggester *SuggesterStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DefineSuggesterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DefineSuggesterOutput) GoString() string {
return s.String()
}
// SetSuggester sets the Suggester field's value.
func (s *DefineSuggesterOutput) SetSuggester(v *SuggesterStatus) *DefineSuggesterOutput {
s.Suggester = v
return s
}
// Container for the parameters to the DeleteAnalysisScheme operation. Specifies
// the name of the domain you want to update and the analysis scheme you want
// to delete.
type DeleteAnalysisSchemeInput struct {
_ struct{} `type:"structure"`
// The name of the analysis scheme you want to delete.
//
// AnalysisSchemeName is a required field
AnalysisSchemeName *string `min:"1" type:"string" required:"true"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteAnalysisSchemeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAnalysisSchemeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteAnalysisSchemeInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteAnalysisSchemeInput"}
if s.AnalysisSchemeName == nil {
invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName"))
}
if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1))
}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAnalysisSchemeName sets the AnalysisSchemeName field's value.
func (s *DeleteAnalysisSchemeInput) SetAnalysisSchemeName(v string) *DeleteAnalysisSchemeInput {
s.AnalysisSchemeName = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DeleteAnalysisSchemeInput) SetDomainName(v string) *DeleteAnalysisSchemeInput {
s.DomainName = &v
return s
}
// The result of a DeleteAnalysisScheme request. Contains the status of the
// deleted analysis scheme.
type DeleteAnalysisSchemeOutput struct {
_ struct{} `type:"structure"`
// The status of the analysis scheme being deleted.
//
// AnalysisScheme is a required field
AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DeleteAnalysisSchemeOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAnalysisSchemeOutput) GoString() string {
return s.String()
}
// SetAnalysisScheme sets the AnalysisScheme field's value.
func (s *DeleteAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DeleteAnalysisSchemeOutput {
s.AnalysisScheme = v
return s
}
// Container for the parameters to the DeleteDomain operation. Specifies the
// name of the domain you want to delete.
type DeleteDomainInput struct {
_ struct{} `type:"structure"`
// The name of the domain you want to permanently delete.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteDomainInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteDomainInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteDomainInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput {
s.DomainName = &v
return s
}
// The result of a DeleteDomain request. Contains the status of a newly deleted
// domain, or no status if the domain has already been completely deleted.
type DeleteDomainOutput struct {
_ struct{} `type:"structure"`
// The current status of the search domain.
DomainStatus *DomainStatus `type:"structure"`
}
// String returns the string representation
func (s DeleteDomainOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteDomainOutput) GoString() string {
return s.String()
}
// SetDomainStatus sets the DomainStatus field's value.
func (s *DeleteDomainOutput) SetDomainStatus(v *DomainStatus) *DeleteDomainOutput {
s.DomainStatus = v
return s
}
// Container for the parameters to the DeleteExpression operation. Specifies
// the name of the domain you want to update and the name of the expression
// you want to delete.
type DeleteExpressionInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// The name of the Expression to delete.
//
// ExpressionName is a required field
ExpressionName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteExpressionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteExpressionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteExpressionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteExpressionInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.ExpressionName == nil {
invalidParams.Add(request.NewErrParamRequired("ExpressionName"))
}
if s.ExpressionName != nil && len(*s.ExpressionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DeleteExpressionInput) SetDomainName(v string) *DeleteExpressionInput {
s.DomainName = &v
return s
}
// SetExpressionName sets the ExpressionName field's value.
func (s *DeleteExpressionInput) SetExpressionName(v string) *DeleteExpressionInput {
s.ExpressionName = &v
return s
}
// The result of a DeleteExpression request. Specifies the expression being
// deleted.
type DeleteExpressionOutput struct {
_ struct{} `type:"structure"`
// The status of the expression being deleted.
//
// Expression is a required field
Expression *ExpressionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DeleteExpressionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteExpressionOutput) GoString() string {
return s.String()
}
// SetExpression sets the Expression field's value.
func (s *DeleteExpressionOutput) SetExpression(v *ExpressionStatus) *DeleteExpressionOutput {
s.Expression = v
return s
}
// Container for the parameters to the DeleteIndexField operation. Specifies
// the name of the domain you want to update and the name of the index field
// you want to delete.
type DeleteIndexFieldInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// The name of the index field your want to remove from the domain's indexing
// options.
//
// IndexFieldName is a required field
IndexFieldName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteIndexFieldInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteIndexFieldInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteIndexFieldInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteIndexFieldInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.IndexFieldName == nil {
invalidParams.Add(request.NewErrParamRequired("IndexFieldName"))
}
if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DeleteIndexFieldInput) SetDomainName(v string) *DeleteIndexFieldInput {
s.DomainName = &v
return s
}
// SetIndexFieldName sets the IndexFieldName field's value.
func (s *DeleteIndexFieldInput) SetIndexFieldName(v string) *DeleteIndexFieldInput {
s.IndexFieldName = &v
return s
}
// The result of a DeleteIndexField request.
type DeleteIndexFieldOutput struct {
_ struct{} `type:"structure"`
// The status of the index field being deleted.
//
// IndexField is a required field
IndexField *IndexFieldStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DeleteIndexFieldOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteIndexFieldOutput) GoString() string {
return s.String()
}
// SetIndexField sets the IndexField field's value.
func (s *DeleteIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DeleteIndexFieldOutput {
s.IndexField = v
return s
}
// Container for the parameters to the DeleteSuggester operation. Specifies
// the name of the domain you want to update and name of the suggester you want
// to delete.
type DeleteSuggesterInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// Specifies the name of the suggester you want to delete.
//
// SuggesterName is a required field
SuggesterName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteSuggesterInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteSuggesterInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteSuggesterInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteSuggesterInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.SuggesterName == nil {
invalidParams.Add(request.NewErrParamRequired("SuggesterName"))
}
if s.SuggesterName != nil && len(*s.SuggesterName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DeleteSuggesterInput) SetDomainName(v string) *DeleteSuggesterInput {
s.DomainName = &v
return s
}
// SetSuggesterName sets the SuggesterName field's value.
func (s *DeleteSuggesterInput) SetSuggesterName(v string) *DeleteSuggesterInput {
s.SuggesterName = &v
return s
}
// The result of a DeleteSuggester request. Contains the status of the deleted
// suggester.
type DeleteSuggesterOutput struct {
_ struct{} `type:"structure"`
// The status of the suggester being deleted.
//
// Suggester is a required field
Suggester *SuggesterStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DeleteSuggesterOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteSuggesterOutput) GoString() string {
return s.String()
}
// SetSuggester sets the Suggester field's value.
func (s *DeleteSuggesterOutput) SetSuggester(v *SuggesterStatus) *DeleteSuggesterOutput {
s.Suggester = v
return s
}
// Container for the parameters to the DescribeAnalysisSchemes operation. Specifies
// the name of the domain you want to describe. To limit the response to particular
// analysis schemes, specify the names of the analysis schemes you want to describe.
// To show the active configuration and exclude any pending changes, set the
// Deployed option to true.
type DescribeAnalysisSchemesInput struct {
_ struct{} `type:"structure"`
// The analysis schemes you want to describe.
AnalysisSchemeNames []*string `type:"list"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeAnalysisSchemesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeAnalysisSchemesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeAnalysisSchemesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeAnalysisSchemesInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAnalysisSchemeNames sets the AnalysisSchemeNames field's value.
func (s *DescribeAnalysisSchemesInput) SetAnalysisSchemeNames(v []*string) *DescribeAnalysisSchemesInput {
s.AnalysisSchemeNames = v
return s
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeAnalysisSchemesInput) SetDeployed(v bool) *DescribeAnalysisSchemesInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeAnalysisSchemesInput) SetDomainName(v string) *DescribeAnalysisSchemesInput {
s.DomainName = &v
return s
}
// The result of a DescribeAnalysisSchemes request. Contains the analysis schemes
// configured for the domain specified in the request.
type DescribeAnalysisSchemesOutput struct {
_ struct{} `type:"structure"`
// The analysis scheme descriptions.
//
// AnalysisSchemes is a required field
AnalysisSchemes []*AnalysisSchemeStatus `type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeAnalysisSchemesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeAnalysisSchemesOutput) GoString() string {
return s.String()
}
// SetAnalysisSchemes sets the AnalysisSchemes field's value.
func (s *DescribeAnalysisSchemesOutput) SetAnalysisSchemes(v []*AnalysisSchemeStatus) *DescribeAnalysisSchemesOutput {
s.AnalysisSchemes = v
return s
}
// Container for the parameters to the DescribeAvailabilityOptions operation.
// Specifies the name of the domain you want to describe. To show the active
// configuration and exclude any pending changes, set the Deployed option to
// true.
type DescribeAvailabilityOptionsInput struct {
_ struct{} `type:"structure"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeAvailabilityOptionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeAvailabilityOptionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeAvailabilityOptionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeAvailabilityOptionsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeAvailabilityOptionsInput) SetDeployed(v bool) *DescribeAvailabilityOptionsInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeAvailabilityOptionsInput) SetDomainName(v string) *DescribeAvailabilityOptionsInput {
s.DomainName = &v
return s
}
// The result of a DescribeAvailabilityOptions request. Indicates whether or
// not the Multi-AZ option is enabled for the domain specified in the request.
type DescribeAvailabilityOptionsOutput struct {
_ struct{} `type:"structure"`
// The availability options configured for the domain. Indicates whether Multi-AZ
// is enabled for the domain.
AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"`
}
// String returns the string representation
func (s DescribeAvailabilityOptionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeAvailabilityOptionsOutput) GoString() string {
return s.String()
}
// SetAvailabilityOptions sets the AvailabilityOptions field's value.
func (s *DescribeAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *DescribeAvailabilityOptionsOutput {
s.AvailabilityOptions = v
return s
}
// Container for the parameters to the DescribeDomainEndpointOptions operation.
// Specify the name of the domain you want to describe. To show the active configuration
// and exclude any pending changes, set the Deployed option to true.
type DescribeDomainEndpointOptionsInput struct {
_ struct{} `type:"structure"`
// Whether to retrieve the latest configuration (which might be in a Processing
// state) or the current, active configuration. Defaults to false.
Deployed *bool `type:"boolean"`
// A string that represents the name of a domain.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeDomainEndpointOptionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeDomainEndpointOptionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeDomainEndpointOptionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeDomainEndpointOptionsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeDomainEndpointOptionsInput) SetDeployed(v bool) *DescribeDomainEndpointOptionsInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeDomainEndpointOptionsInput) SetDomainName(v string) *DescribeDomainEndpointOptionsInput {
s.DomainName = &v
return s
}
// The result of a DescribeDomainEndpointOptions request. Contains the status
// and configuration of a search domain's endpoint options.
type DescribeDomainEndpointOptionsOutput struct {
_ struct{} `type:"structure"`
// The status and configuration of a search domain's endpoint options.
DomainEndpointOptions *DomainEndpointOptionsStatus `type:"structure"`
}
// String returns the string representation
func (s DescribeDomainEndpointOptionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeDomainEndpointOptionsOutput) GoString() string {
return s.String()
}
// SetDomainEndpointOptions sets the DomainEndpointOptions field's value.
func (s *DescribeDomainEndpointOptionsOutput) SetDomainEndpointOptions(v *DomainEndpointOptionsStatus) *DescribeDomainEndpointOptionsOutput {
s.DomainEndpointOptions = v
return s
}
// Container for the parameters to the DescribeDomains operation. By default
// shows the status of all domains. To restrict the response to particular domains,
// specify the names of the domains you want to describe.
type DescribeDomainsInput struct {
_ struct{} `type:"structure"`
// The names of the domains you want to include in the response.
DomainNames []*string `type:"list"`
}
// String returns the string representation
func (s DescribeDomainsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeDomainsInput) GoString() string {
return s.String()
}
// SetDomainNames sets the DomainNames field's value.
func (s *DescribeDomainsInput) SetDomainNames(v []*string) *DescribeDomainsInput {
s.DomainNames = v
return s
}
// The result of a DescribeDomains request. Contains the status of the domains
// specified in the request or all domains owned by the account.
type DescribeDomainsOutput struct {
_ struct{} `type:"structure"`
// A list that contains the status of each requested domain.
//
// DomainStatusList is a required field
DomainStatusList []*DomainStatus `type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeDomainsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeDomainsOutput) GoString() string {
return s.String()
}
// SetDomainStatusList sets the DomainStatusList field's value.
func (s *DescribeDomainsOutput) SetDomainStatusList(v []*DomainStatus) *DescribeDomainsOutput {
s.DomainStatusList = v
return s
}
// Container for the parameters to the DescribeDomains operation. Specifies
// the name of the domain you want to describe. To restrict the response to
// particular expressions, specify the names of the expressions you want to
// describe. To show the active configuration and exclude any pending changes,
// set the Deployed option to true.
type DescribeExpressionsInput struct {
_ struct{} `type:"structure"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// Limits the DescribeExpressions response to the specified expressions. If
// not specified, all expressions are shown.
ExpressionNames []*string `type:"list"`
}
// String returns the string representation
func (s DescribeExpressionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeExpressionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeExpressionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeExpressionsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeExpressionsInput) SetDeployed(v bool) *DescribeExpressionsInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeExpressionsInput) SetDomainName(v string) *DescribeExpressionsInput {
s.DomainName = &v
return s
}
// SetExpressionNames sets the ExpressionNames field's value.
func (s *DescribeExpressionsInput) SetExpressionNames(v []*string) *DescribeExpressionsInput {
s.ExpressionNames = v
return s
}
// The result of a DescribeExpressions request. Contains the expressions configured
// for the domain specified in the request.
type DescribeExpressionsOutput struct {
_ struct{} `type:"structure"`
// The expressions configured for the domain.
//
// Expressions is a required field
Expressions []*ExpressionStatus `type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeExpressionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeExpressionsOutput) GoString() string {
return s.String()
}
// SetExpressions sets the Expressions field's value.
func (s *DescribeExpressionsOutput) SetExpressions(v []*ExpressionStatus) *DescribeExpressionsOutput {
s.Expressions = v
return s
}
// Container for the parameters to the DescribeIndexFields operation. Specifies
// the name of the domain you want to describe. To restrict the response to
// particular index fields, specify the names of the index fields you want to
// describe. To show the active configuration and exclude any pending changes,
// set the Deployed option to true.
type DescribeIndexFieldsInput struct {
_ struct{} `type:"structure"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// A list of the index fields you want to describe. If not specified, information
// is returned for all configured index fields.
FieldNames []*string `type:"list"`
}
// String returns the string representation
func (s DescribeIndexFieldsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeIndexFieldsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeIndexFieldsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeIndexFieldsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeIndexFieldsInput) SetDeployed(v bool) *DescribeIndexFieldsInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeIndexFieldsInput) SetDomainName(v string) *DescribeIndexFieldsInput {
s.DomainName = &v
return s
}
// SetFieldNames sets the FieldNames field's value.
func (s *DescribeIndexFieldsInput) SetFieldNames(v []*string) *DescribeIndexFieldsInput {
s.FieldNames = v
return s
}
// The result of a DescribeIndexFields request. Contains the index fields configured
// for the domain specified in the request.
type DescribeIndexFieldsOutput struct {
_ struct{} `type:"structure"`
// The index fields configured for the domain.
//
// IndexFields is a required field
IndexFields []*IndexFieldStatus `type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeIndexFieldsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeIndexFieldsOutput) GoString() string {
return s.String()
}
// SetIndexFields sets the IndexFields field's value.
func (s *DescribeIndexFieldsOutput) SetIndexFields(v []*IndexFieldStatus) *DescribeIndexFieldsOutput {
s.IndexFields = v
return s
}
// Container for the parameters to the DescribeScalingParameters operation.
// Specifies the name of the domain you want to describe.
type DescribeScalingParametersInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeScalingParametersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingParametersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeScalingParametersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeScalingParametersInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeScalingParametersInput) SetDomainName(v string) *DescribeScalingParametersInput {
s.DomainName = &v
return s
}
// The result of a DescribeScalingParameters request. Contains the scaling parameters
// configured for the domain specified in the request.
type DescribeScalingParametersOutput struct {
_ struct{} `type:"structure"`
// The status and configuration of a search domain's scaling parameters.
//
// ScalingParameters is a required field
ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DescribeScalingParametersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeScalingParametersOutput) GoString() string {
return s.String()
}
// SetScalingParameters sets the ScalingParameters field's value.
func (s *DescribeScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *DescribeScalingParametersOutput {
s.ScalingParameters = v
return s
}
// Container for the parameters to the DescribeServiceAccessPolicies operation.
// Specifies the name of the domain you want to describe. To show the active
// configuration and exclude any pending changes, set the Deployed option to
// true.
type DescribeServiceAccessPoliciesInput struct {
_ struct{} `type:"structure"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeServiceAccessPoliciesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeServiceAccessPoliciesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeServiceAccessPoliciesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeServiceAccessPoliciesInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeServiceAccessPoliciesInput) SetDeployed(v bool) *DescribeServiceAccessPoliciesInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeServiceAccessPoliciesInput) SetDomainName(v string) *DescribeServiceAccessPoliciesInput {
s.DomainName = &v
return s
}
// The result of a DescribeServiceAccessPolicies request.
type DescribeServiceAccessPoliciesOutput struct {
_ struct{} `type:"structure"`
// The access rules configured for the domain specified in the request.
//
// AccessPolicies is a required field
AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DescribeServiceAccessPoliciesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeServiceAccessPoliciesOutput) GoString() string {
return s.String()
}
// SetAccessPolicies sets the AccessPolicies field's value.
func (s *DescribeServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *DescribeServiceAccessPoliciesOutput {
s.AccessPolicies = v
return s
}
// Container for the parameters to the DescribeSuggester operation. Specifies
// the name of the domain you want to describe. To restrict the response to
// particular suggesters, specify the names of the suggesters you want to describe.
// To show the active configuration and exclude any pending changes, set the
// Deployed option to true.
type DescribeSuggestersInput struct {
_ struct{} `type:"structure"`
// Whether to display the deployed configuration (true) or include any pending
// changes (false). Defaults to false.
Deployed *bool `type:"boolean"`
// The name of the domain you want to describe.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// The suggesters you want to describe.
SuggesterNames []*string `type:"list"`
}
// String returns the string representation
func (s DescribeSuggestersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeSuggestersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeSuggestersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeSuggestersInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeployed sets the Deployed field's value.
func (s *DescribeSuggestersInput) SetDeployed(v bool) *DescribeSuggestersInput {
s.Deployed = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DescribeSuggestersInput) SetDomainName(v string) *DescribeSuggestersInput {
s.DomainName = &v
return s
}
// SetSuggesterNames sets the SuggesterNames field's value.
func (s *DescribeSuggestersInput) SetSuggesterNames(v []*string) *DescribeSuggestersInput {
s.SuggesterNames = v
return s
}
// The result of a DescribeSuggesters request.
type DescribeSuggestersOutput struct {
_ struct{} `type:"structure"`
// The suggesters configured for the domain specified in the request.
//
// Suggesters is a required field
Suggesters []*SuggesterStatus `type:"list" required:"true"`
}
// String returns the string representation
func (s DescribeSuggestersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeSuggestersOutput) GoString() string {
return s.String()
}
// SetSuggesters sets the Suggesters field's value.
func (s *DescribeSuggestersOutput) SetSuggesters(v []*SuggesterStatus) *DescribeSuggestersOutput {
s.Suggesters = v
return s
}
// Options for a search suggester.
type DocumentSuggesterOptions struct {
_ struct{} `type:"structure"`
// The level of fuzziness allowed when suggesting matches for a string: none,
// low, or high. With none, the specified string is treated as an exact prefix.
// With low, suggestions must differ from the specified string by no more than
// one character. With high, suggestions can differ by up to two characters.
// The default is none.
FuzzyMatching *string `type:"string" enum:"SuggesterFuzzyMatching"`
// An expression that computes a score for each suggestion to control how they
// are sorted. The scores are rounded to the nearest integer, with a floor of
// 0 and a ceiling of 2^31-1. A document's relevance score is not computed for
// suggestions, so sort expressions cannot reference the _score value. To sort
// suggestions using a numeric field or existing expression, simply specify
// the name of the field or expression. If no expression is configured for the
// suggester, the suggestions are sorted with the closest matches listed first.
SortExpression *string `type:"string"`
// The name of the index field you want to use for suggestions.
//
// SourceField is a required field
SourceField *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DocumentSuggesterOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DocumentSuggesterOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DocumentSuggesterOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DocumentSuggesterOptions"}
if s.SourceField == nil {
invalidParams.Add(request.NewErrParamRequired("SourceField"))
}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFuzzyMatching sets the FuzzyMatching field's value.
func (s *DocumentSuggesterOptions) SetFuzzyMatching(v string) *DocumentSuggesterOptions {
s.FuzzyMatching = &v
return s
}
// SetSortExpression sets the SortExpression field's value.
func (s *DocumentSuggesterOptions) SetSortExpression(v string) *DocumentSuggesterOptions {
s.SortExpression = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *DocumentSuggesterOptions) SetSourceField(v string) *DocumentSuggesterOptions {
s.SourceField = &v
return s
}
// The domain's endpoint options.
type DomainEndpointOptions struct {
_ struct{} `type:"structure"`
// Whether the domain is HTTPS only enabled.
EnforceHTTPS *bool `type:"boolean"`
// The minimum required TLS version
TLSSecurityPolicy *string `type:"string" enum:"TLSSecurityPolicy"`
}
// String returns the string representation
func (s DomainEndpointOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DomainEndpointOptions) GoString() string {
return s.String()
}
// SetEnforceHTTPS sets the EnforceHTTPS field's value.
func (s *DomainEndpointOptions) SetEnforceHTTPS(v bool) *DomainEndpointOptions {
s.EnforceHTTPS = &v
return s
}
// SetTLSSecurityPolicy sets the TLSSecurityPolicy field's value.
func (s *DomainEndpointOptions) SetTLSSecurityPolicy(v string) *DomainEndpointOptions {
s.TLSSecurityPolicy = &v
return s
}
// The configuration and status of the domain's endpoint options.
type DomainEndpointOptionsStatus struct {
_ struct{} `type:"structure"`
// The domain endpoint options configured for the domain.
//
// Options is a required field
Options *DomainEndpointOptions `type:"structure" required:"true"`
// The status of the configured domain endpoint options.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s DomainEndpointOptionsStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DomainEndpointOptionsStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *DomainEndpointOptionsStatus) SetOptions(v *DomainEndpointOptions) *DomainEndpointOptionsStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *DomainEndpointOptionsStatus) SetStatus(v *OptionStatus) *DomainEndpointOptionsStatus {
s.Status = v
return s
}
// The current status of the search domain.
type DomainStatus struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the search domain. See Identifiers for
// IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html)
// in Using AWS Identity and Access Management for more information.
ARN *string `type:"string"`
// True if the search domain is created. It can take several minutes to initialize
// a domain when CreateDomain is called. Newly created search domains are returned
// from DescribeDomains with a false value for Created until domain creation
// is complete.
Created *bool `type:"boolean"`
// True if the search domain has been deleted. The system must clean up resources
// dedicated to the search domain when DeleteDomain is called. Newly deleted
// search domains are returned from DescribeDomains with a true value for IsDeleted
// for several minutes until resource cleanup is complete.
Deleted *bool `type:"boolean"`
// The service endpoint for updating documents in a search domain.
DocService *ServiceEndpoint `type:"structure"`
// An internally generated unique identifier for a domain.
//
// DomainId is a required field
DomainId *string `min:"1" type:"string" required:"true"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
Limits *Limits `type:"structure"`
// True if processing is being done to activate the current domain configuration.
Processing *bool `type:"boolean"`
// True if IndexDocuments needs to be called to activate the current domain
// configuration.
//
// RequiresIndexDocuments is a required field
RequiresIndexDocuments *bool `type:"boolean" required:"true"`
// The number of search instances that are available to process search requests.
SearchInstanceCount *int64 `min:"1" type:"integer"`
// The instance type that is being used to process search requests.
SearchInstanceType *string `type:"string"`
// The number of partitions across which the search index is spread.
SearchPartitionCount *int64 `min:"1" type:"integer"`
// The service endpoint for requesting search results from a search domain.
SearchService *ServiceEndpoint `type:"structure"`
}
// String returns the string representation
func (s DomainStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DomainStatus) GoString() string {
return s.String()
}
// SetARN sets the ARN field's value.
func (s *DomainStatus) SetARN(v string) *DomainStatus {
s.ARN = &v
return s
}
// SetCreated sets the Created field's value.
func (s *DomainStatus) SetCreated(v bool) *DomainStatus {
s.Created = &v
return s
}
// SetDeleted sets the Deleted field's value.
func (s *DomainStatus) SetDeleted(v bool) *DomainStatus {
s.Deleted = &v
return s
}
// SetDocService sets the DocService field's value.
func (s *DomainStatus) SetDocService(v *ServiceEndpoint) *DomainStatus {
s.DocService = v
return s
}
// SetDomainId sets the DomainId field's value.
func (s *DomainStatus) SetDomainId(v string) *DomainStatus {
s.DomainId = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *DomainStatus) SetDomainName(v string) *DomainStatus {
s.DomainName = &v
return s
}
// SetLimits sets the Limits field's value.
func (s *DomainStatus) SetLimits(v *Limits) *DomainStatus {
s.Limits = v
return s
}
// SetProcessing sets the Processing field's value.
func (s *DomainStatus) SetProcessing(v bool) *DomainStatus {
s.Processing = &v
return s
}
// SetRequiresIndexDocuments sets the RequiresIndexDocuments field's value.
func (s *DomainStatus) SetRequiresIndexDocuments(v bool) *DomainStatus {
s.RequiresIndexDocuments = &v
return s
}
// SetSearchInstanceCount sets the SearchInstanceCount field's value.
func (s *DomainStatus) SetSearchInstanceCount(v int64) *DomainStatus {
s.SearchInstanceCount = &v
return s
}
// SetSearchInstanceType sets the SearchInstanceType field's value.
func (s *DomainStatus) SetSearchInstanceType(v string) *DomainStatus {
s.SearchInstanceType = &v
return s
}
// SetSearchPartitionCount sets the SearchPartitionCount field's value.
func (s *DomainStatus) SetSearchPartitionCount(v int64) *DomainStatus {
s.SearchPartitionCount = &v
return s
}
// SetSearchService sets the SearchService field's value.
func (s *DomainStatus) SetSearchService(v *ServiceEndpoint) *DomainStatus {
s.SearchService = v
return s
}
// Options for a field that contains an array of double-precision 64-bit floating
// point values. Present if IndexFieldType specifies the field is of type double-array.
// All options are enabled by default.
type DoubleArrayOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *float64 `type:"double"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// A list of source fields to map to the field.
SourceFields *string `type:"string"`
}
// String returns the string representation
func (s DoubleArrayOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DoubleArrayOptions) GoString() string {
return s.String()
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *DoubleArrayOptions) SetDefaultValue(v float64) *DoubleArrayOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *DoubleArrayOptions) SetFacetEnabled(v bool) *DoubleArrayOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *DoubleArrayOptions) SetReturnEnabled(v bool) *DoubleArrayOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *DoubleArrayOptions) SetSearchEnabled(v bool) *DoubleArrayOptions {
s.SearchEnabled = &v
return s
}
// SetSourceFields sets the SourceFields field's value.
func (s *DoubleArrayOptions) SetSourceFields(v string) *DoubleArrayOptions {
s.SourceFields = &v
return s
}
// Options for a double-precision 64-bit floating point field. Present if IndexFieldType
// specifies the field is of type double. All options are enabled by default.
type DoubleOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
// This can be important if you are using the field in an expression and that
// field is not present in every document.
DefaultValue *float64 `type:"double"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// The name of the source field to map to the field.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s DoubleOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DoubleOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DoubleOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DoubleOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *DoubleOptions) SetDefaultValue(v float64) *DoubleOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *DoubleOptions) SetFacetEnabled(v bool) *DoubleOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *DoubleOptions) SetReturnEnabled(v bool) *DoubleOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *DoubleOptions) SetSearchEnabled(v bool) *DoubleOptions {
s.SearchEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *DoubleOptions) SetSortEnabled(v bool) *DoubleOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *DoubleOptions) SetSourceField(v string) *DoubleOptions {
s.SourceField = &v
return s
}
// A named expression that can be evaluated at search time. Can be used to sort
// the search results, define other expressions, or return computed information
// in the search results.
type Expression struct {
_ struct{} `type:"structure"`
// Names must begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore).
//
// ExpressionName is a required field
ExpressionName *string `min:"1" type:"string" required:"true"`
// The expression to evaluate for sorting while processing a search request.
// The Expression syntax is based on JavaScript expressions. For more information,
// see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html)
// in the Amazon CloudSearch Developer Guide.
//
// ExpressionValue is a required field
ExpressionValue *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s Expression) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Expression) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Expression) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Expression"}
if s.ExpressionName == nil {
invalidParams.Add(request.NewErrParamRequired("ExpressionName"))
}
if s.ExpressionName != nil && len(*s.ExpressionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1))
}
if s.ExpressionValue == nil {
invalidParams.Add(request.NewErrParamRequired("ExpressionValue"))
}
if s.ExpressionValue != nil && len(*s.ExpressionValue) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ExpressionValue", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetExpressionName sets the ExpressionName field's value.
func (s *Expression) SetExpressionName(v string) *Expression {
s.ExpressionName = &v
return s
}
// SetExpressionValue sets the ExpressionValue field's value.
func (s *Expression) SetExpressionValue(v string) *Expression {
s.ExpressionValue = &v
return s
}
// The value of an Expression and its current status.
type ExpressionStatus struct {
_ struct{} `type:"structure"`
// The expression that is evaluated for sorting while processing a search request.
//
// Options is a required field
Options *Expression `type:"structure" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s ExpressionStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ExpressionStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *ExpressionStatus) SetOptions(v *Expression) *ExpressionStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *ExpressionStatus) SetStatus(v *OptionStatus) *ExpressionStatus {
s.Status = v
return s
}
// Container for the parameters to the IndexDocuments operation. Specifies the
// name of the domain you want to re-index.
type IndexDocumentsInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s IndexDocumentsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IndexDocumentsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *IndexDocumentsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "IndexDocumentsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *IndexDocumentsInput) SetDomainName(v string) *IndexDocumentsInput {
s.DomainName = &v
return s
}
// The result of an IndexDocuments request. Contains the status of the indexing
// operation, including the fields being indexed.
type IndexDocumentsOutput struct {
_ struct{} `type:"structure"`
// The names of the fields that are currently being indexed.
FieldNames []*string `type:"list"`
}
// String returns the string representation
func (s IndexDocumentsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IndexDocumentsOutput) GoString() string {
return s.String()
}
// SetFieldNames sets the FieldNames field's value.
func (s *IndexDocumentsOutput) SetFieldNames(v []*string) *IndexDocumentsOutput {
s.FieldNames = v
return s
}
// Configuration information for a field in the index, including its name, type,
// and options. The supported options depend on the IndexFieldType.
type IndexField struct {
_ struct{} `type:"structure"`
// Options for a field that contains an array of dates. Present if IndexFieldType
// specifies the field is of type date-array. All options are enabled by default.
DateArrayOptions *DateArrayOptions `type:"structure"`
// Options for a date field. Dates and times are specified in UTC (Coordinated
// Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present
// if IndexFieldType specifies the field is of type date. All options are enabled
// by default.
DateOptions *DateOptions `type:"structure"`
// Options for a field that contains an array of double-precision 64-bit floating
// point values. Present if IndexFieldType specifies the field is of type double-array.
// All options are enabled by default.
DoubleArrayOptions *DoubleArrayOptions `type:"structure"`
// Options for a double-precision 64-bit floating point field. Present if IndexFieldType
// specifies the field is of type double. All options are enabled by default.
DoubleOptions *DoubleOptions `type:"structure"`
// A string that represents the name of an index field. CloudSearch supports
// regular index fields as well as dynamic fields. A dynamic field's name defines
// a pattern that begins or ends with a wildcard. Any document fields that don't
// map to a regular index field but do match a dynamic field's pattern are configured
// with the dynamic field's indexing options.
//
// Regular field names begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin
// or end with a wildcard (*). The wildcard can also be the only character in
// a dynamic field name. Multiple wildcards, and wildcards embedded within a
// string are not supported.
//
// The name score is reserved and cannot be used as a field name. To reference
// a document's ID, you can use the name _id.
//
// IndexFieldName is a required field
IndexFieldName *string `min:"1" type:"string" required:"true"`
// The type of field. The valid options for a field depend on the field type.
// For more information about the supported field types, see Configuring Index
// Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html)
// in the Amazon CloudSearch Developer Guide.
//
// IndexFieldType is a required field
IndexFieldType *string `type:"string" required:"true" enum:"IndexFieldType"`
// Options for a field that contains an array of 64-bit signed integers. Present
// if IndexFieldType specifies the field is of type int-array. All options are
// enabled by default.
IntArrayOptions *IntArrayOptions `type:"structure"`
// Options for a 64-bit signed integer field. Present if IndexFieldType specifies
// the field is of type int. All options are enabled by default.
IntOptions *IntOptions `type:"structure"`
// Options for a latlon field. A latlon field contains a location stored as
// a latitude and longitude value pair. Present if IndexFieldType specifies
// the field is of type latlon. All options are enabled by default.
LatLonOptions *LatLonOptions `type:"structure"`
// Options for a field that contains an array of literal strings. Present if
// IndexFieldType specifies the field is of type literal-array. All options
// are enabled by default.
LiteralArrayOptions *LiteralArrayOptions `type:"structure"`
// Options for literal field. Present if IndexFieldType specifies the field
// is of type literal. All options are enabled by default.
LiteralOptions *LiteralOptions `type:"structure"`
// Options for a field that contains an array of text strings. Present if IndexFieldType
// specifies the field is of type text-array. A text-array field is always searchable.
// All options are enabled by default.
TextArrayOptions *TextArrayOptions `type:"structure"`
// Options for text field. Present if IndexFieldType specifies the field is
// of type text. A text field is always searchable. All options are enabled
// by default.
TextOptions *TextOptions `type:"structure"`
}
// String returns the string representation
func (s IndexField) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IndexField) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *IndexField) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "IndexField"}
if s.IndexFieldName == nil {
invalidParams.Add(request.NewErrParamRequired("IndexFieldName"))
}
if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1))
}
if s.IndexFieldType == nil {
invalidParams.Add(request.NewErrParamRequired("IndexFieldType"))
}
if s.DateOptions != nil {
if err := s.DateOptions.Validate(); err != nil {
invalidParams.AddNested("DateOptions", err.(request.ErrInvalidParams))
}
}
if s.DoubleOptions != nil {
if err := s.DoubleOptions.Validate(); err != nil {
invalidParams.AddNested("DoubleOptions", err.(request.ErrInvalidParams))
}
}
if s.IntOptions != nil {
if err := s.IntOptions.Validate(); err != nil {
invalidParams.AddNested("IntOptions", err.(request.ErrInvalidParams))
}
}
if s.LatLonOptions != nil {
if err := s.LatLonOptions.Validate(); err != nil {
invalidParams.AddNested("LatLonOptions", err.(request.ErrInvalidParams))
}
}
if s.LiteralOptions != nil {
if err := s.LiteralOptions.Validate(); err != nil {
invalidParams.AddNested("LiteralOptions", err.(request.ErrInvalidParams))
}
}
if s.TextOptions != nil {
if err := s.TextOptions.Validate(); err != nil {
invalidParams.AddNested("TextOptions", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDateArrayOptions sets the DateArrayOptions field's value.
func (s *IndexField) SetDateArrayOptions(v *DateArrayOptions) *IndexField {
s.DateArrayOptions = v
return s
}
// SetDateOptions sets the DateOptions field's value.
func (s *IndexField) SetDateOptions(v *DateOptions) *IndexField {
s.DateOptions = v
return s
}
// SetDoubleArrayOptions sets the DoubleArrayOptions field's value.
func (s *IndexField) SetDoubleArrayOptions(v *DoubleArrayOptions) *IndexField {
s.DoubleArrayOptions = v
return s
}
// SetDoubleOptions sets the DoubleOptions field's value.
func (s *IndexField) SetDoubleOptions(v *DoubleOptions) *IndexField {
s.DoubleOptions = v
return s
}
// SetIndexFieldName sets the IndexFieldName field's value.
func (s *IndexField) SetIndexFieldName(v string) *IndexField {
s.IndexFieldName = &v
return s
}
// SetIndexFieldType sets the IndexFieldType field's value.
func (s *IndexField) SetIndexFieldType(v string) *IndexField {
s.IndexFieldType = &v
return s
}
// SetIntArrayOptions sets the IntArrayOptions field's value.
func (s *IndexField) SetIntArrayOptions(v *IntArrayOptions) *IndexField {
s.IntArrayOptions = v
return s
}
// SetIntOptions sets the IntOptions field's value.
func (s *IndexField) SetIntOptions(v *IntOptions) *IndexField {
s.IntOptions = v
return s
}
// SetLatLonOptions sets the LatLonOptions field's value.
func (s *IndexField) SetLatLonOptions(v *LatLonOptions) *IndexField {
s.LatLonOptions = v
return s
}
// SetLiteralArrayOptions sets the LiteralArrayOptions field's value.
func (s *IndexField) SetLiteralArrayOptions(v *LiteralArrayOptions) *IndexField {
s.LiteralArrayOptions = v
return s
}
// SetLiteralOptions sets the LiteralOptions field's value.
func (s *IndexField) SetLiteralOptions(v *LiteralOptions) *IndexField {
s.LiteralOptions = v
return s
}
// SetTextArrayOptions sets the TextArrayOptions field's value.
func (s *IndexField) SetTextArrayOptions(v *TextArrayOptions) *IndexField {
s.TextArrayOptions = v
return s
}
// SetTextOptions sets the TextOptions field's value.
func (s *IndexField) SetTextOptions(v *TextOptions) *IndexField {
s.TextOptions = v
return s
}
// The value of an IndexField and its current status.
type IndexFieldStatus struct {
_ struct{} `type:"structure"`
// Configuration information for a field in the index, including its name, type,
// and options. The supported options depend on the IndexFieldType.
//
// Options is a required field
Options *IndexField `type:"structure" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s IndexFieldStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IndexFieldStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *IndexFieldStatus) SetOptions(v *IndexField) *IndexFieldStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *IndexFieldStatus) SetStatus(v *OptionStatus) *IndexFieldStatus {
s.Status = v
return s
}
// Options for a field that contains an array of 64-bit signed integers. Present
// if IndexFieldType specifies the field is of type int-array. All options are
// enabled by default.
type IntArrayOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *int64 `type:"long"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// A list of source fields to map to the field.
SourceFields *string `type:"string"`
}
// String returns the string representation
func (s IntArrayOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IntArrayOptions) GoString() string {
return s.String()
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *IntArrayOptions) SetDefaultValue(v int64) *IntArrayOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *IntArrayOptions) SetFacetEnabled(v bool) *IntArrayOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *IntArrayOptions) SetReturnEnabled(v bool) *IntArrayOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *IntArrayOptions) SetSearchEnabled(v bool) *IntArrayOptions {
s.SearchEnabled = &v
return s
}
// SetSourceFields sets the SourceFields field's value.
func (s *IntArrayOptions) SetSourceFields(v string) *IntArrayOptions {
s.SourceFields = &v
return s
}
// Options for a 64-bit signed integer field. Present if IndexFieldType specifies
// the field is of type int. All options are enabled by default.
type IntOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
// This can be important if you are using the field in an expression and that
// field is not present in every document.
DefaultValue *int64 `type:"long"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// The name of the source field to map to the field.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s IntOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s IntOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *IntOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "IntOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *IntOptions) SetDefaultValue(v int64) *IntOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *IntOptions) SetFacetEnabled(v bool) *IntOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *IntOptions) SetReturnEnabled(v bool) *IntOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *IntOptions) SetSearchEnabled(v bool) *IntOptions {
s.SearchEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *IntOptions) SetSortEnabled(v bool) *IntOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *IntOptions) SetSourceField(v string) *IntOptions {
s.SourceField = &v
return s
}
// Options for a latlon field. A latlon field contains a location stored as
// a latitude and longitude value pair. Present if IndexFieldType specifies
// the field is of type latlon. All options are enabled by default.
type LatLonOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// A string that represents the name of an index field. CloudSearch supports
// regular index fields as well as dynamic fields. A dynamic field's name defines
// a pattern that begins or ends with a wildcard. Any document fields that don't
// map to a regular index field but do match a dynamic field's pattern are configured
// with the dynamic field's indexing options.
//
// Regular field names begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin
// or end with a wildcard (*). The wildcard can also be the only character in
// a dynamic field name. Multiple wildcards, and wildcards embedded within a
// string are not supported.
//
// The name score is reserved and cannot be used as a field name. To reference
// a document's ID, you can use the name _id.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s LatLonOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s LatLonOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *LatLonOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "LatLonOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *LatLonOptions) SetDefaultValue(v string) *LatLonOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *LatLonOptions) SetFacetEnabled(v bool) *LatLonOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *LatLonOptions) SetReturnEnabled(v bool) *LatLonOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *LatLonOptions) SetSearchEnabled(v bool) *LatLonOptions {
s.SearchEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *LatLonOptions) SetSortEnabled(v bool) *LatLonOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *LatLonOptions) SetSourceField(v string) *LatLonOptions {
s.SourceField = &v
return s
}
type Limits struct {
_ struct{} `type:"structure"`
// MaximumPartitionCount is a required field
MaximumPartitionCount *int64 `min:"1" type:"integer" required:"true"`
// MaximumReplicationCount is a required field
MaximumReplicationCount *int64 `min:"1" type:"integer" required:"true"`
}
// String returns the string representation
func (s Limits) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Limits) GoString() string {
return s.String()
}
// SetMaximumPartitionCount sets the MaximumPartitionCount field's value.
func (s *Limits) SetMaximumPartitionCount(v int64) *Limits {
s.MaximumPartitionCount = &v
return s
}
// SetMaximumReplicationCount sets the MaximumReplicationCount field's value.
func (s *Limits) SetMaximumReplicationCount(v int64) *Limits {
s.MaximumReplicationCount = &v
return s
}
type ListDomainNamesInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s ListDomainNamesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListDomainNamesInput) GoString() string {
return s.String()
}
// The result of a ListDomainNames request. Contains a list of the domains owned
// by an account.
type ListDomainNamesOutput struct {
_ struct{} `type:"structure"`
// The names of the search domains owned by an account.
DomainNames map[string]*string `type:"map"`
}
// String returns the string representation
func (s ListDomainNamesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListDomainNamesOutput) GoString() string {
return s.String()
}
// SetDomainNames sets the DomainNames field's value.
func (s *ListDomainNamesOutput) SetDomainNames(v map[string]*string) *ListDomainNamesOutput {
s.DomainNames = v
return s
}
// Options for a field that contains an array of literal strings. Present if
// IndexFieldType specifies the field is of type literal-array. All options
// are enabled by default.
type LiteralArrayOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// A list of source fields to map to the field.
SourceFields *string `type:"string"`
}
// String returns the string representation
func (s LiteralArrayOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s LiteralArrayOptions) GoString() string {
return s.String()
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *LiteralArrayOptions) SetDefaultValue(v string) *LiteralArrayOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *LiteralArrayOptions) SetFacetEnabled(v bool) *LiteralArrayOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *LiteralArrayOptions) SetReturnEnabled(v bool) *LiteralArrayOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *LiteralArrayOptions) SetSearchEnabled(v bool) *LiteralArrayOptions {
s.SearchEnabled = &v
return s
}
// SetSourceFields sets the SourceFields field's value.
func (s *LiteralArrayOptions) SetSourceFields(v string) *LiteralArrayOptions {
s.SourceFields = &v
return s
}
// Options for literal field. Present if IndexFieldType specifies the field
// is of type literal. All options are enabled by default.
type LiteralOptions struct {
_ struct{} `type:"structure"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether facet information can be returned for the field.
FacetEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the contents of the field are searchable.
SearchEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// A string that represents the name of an index field. CloudSearch supports
// regular index fields as well as dynamic fields. A dynamic field's name defines
// a pattern that begins or ends with a wildcard. Any document fields that don't
// map to a regular index field but do match a dynamic field's pattern are configured
// with the dynamic field's indexing options.
//
// Regular field names begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin
// or end with a wildcard (*). The wildcard can also be the only character in
// a dynamic field name. Multiple wildcards, and wildcards embedded within a
// string are not supported.
//
// The name score is reserved and cannot be used as a field name. To reference
// a document's ID, you can use the name _id.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s LiteralOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s LiteralOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *LiteralOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "LiteralOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *LiteralOptions) SetDefaultValue(v string) *LiteralOptions {
s.DefaultValue = &v
return s
}
// SetFacetEnabled sets the FacetEnabled field's value.
func (s *LiteralOptions) SetFacetEnabled(v bool) *LiteralOptions {
s.FacetEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *LiteralOptions) SetReturnEnabled(v bool) *LiteralOptions {
s.ReturnEnabled = &v
return s
}
// SetSearchEnabled sets the SearchEnabled field's value.
func (s *LiteralOptions) SetSearchEnabled(v bool) *LiteralOptions {
s.SearchEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *LiteralOptions) SetSortEnabled(v bool) *LiteralOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *LiteralOptions) SetSourceField(v string) *LiteralOptions {
s.SourceField = &v
return s
}
// The status of domain configuration option.
type OptionStatus struct {
_ struct{} `type:"structure"`
// A timestamp for when this option was created.
//
// CreationDate is a required field
CreationDate *time.Time `type:"timestamp" required:"true"`
// Indicates that the option will be deleted once processing is complete.
PendingDeletion *bool `type:"boolean"`
// The state of processing a change to an option. Possible values:
//
// * RequiresIndexDocuments: the option's latest value will not be deployed
// until IndexDocuments has been called and indexing is complete.
//
// * Processing: the option's latest value is in the process of being activated.
//
// * Active: the option's latest value is completely deployed.
//
// * FailedToValidate: the option value is not compatible with the domain's
// data and cannot be used to index the data. You must either modify the
// option value or update or remove the incompatible documents.
//
// State is a required field
State *string `type:"string" required:"true" enum:"OptionState"`
// A timestamp for when this option was last updated.
//
// UpdateDate is a required field
UpdateDate *time.Time `type:"timestamp" required:"true"`
// A unique integer that indicates when this option was last updated.
UpdateVersion *int64 `type:"integer"`
}
// String returns the string representation
func (s OptionStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s OptionStatus) GoString() string {
return s.String()
}
// SetCreationDate sets the CreationDate field's value.
func (s *OptionStatus) SetCreationDate(v time.Time) *OptionStatus {
s.CreationDate = &v
return s
}
// SetPendingDeletion sets the PendingDeletion field's value.
func (s *OptionStatus) SetPendingDeletion(v bool) *OptionStatus {
s.PendingDeletion = &v
return s
}
// SetState sets the State field's value.
func (s *OptionStatus) SetState(v string) *OptionStatus {
s.State = &v
return s
}
// SetUpdateDate sets the UpdateDate field's value.
func (s *OptionStatus) SetUpdateDate(v time.Time) *OptionStatus {
s.UpdateDate = &v
return s
}
// SetUpdateVersion sets the UpdateVersion field's value.
func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus {
s.UpdateVersion = &v
return s
}
// The desired instance type and desired number of replicas of each index partition.
type ScalingParameters struct {
_ struct{} `type:"structure"`
// The instance type that you want to preconfigure for your domain. For example,
// search.m1.small.
DesiredInstanceType *string `type:"string" enum:"PartitionInstanceType"`
// The number of partitions you want to preconfigure for your domain. Only valid
// when you select m2.2xlarge as the desired instance type.
DesiredPartitionCount *int64 `type:"integer"`
// The number of replicas you want to preconfigure for each index partition.
DesiredReplicationCount *int64 `type:"integer"`
}
// String returns the string representation
func (s ScalingParameters) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ScalingParameters) GoString() string {
return s.String()
}
// SetDesiredInstanceType sets the DesiredInstanceType field's value.
func (s *ScalingParameters) SetDesiredInstanceType(v string) *ScalingParameters {
s.DesiredInstanceType = &v
return s
}
// SetDesiredPartitionCount sets the DesiredPartitionCount field's value.
func (s *ScalingParameters) SetDesiredPartitionCount(v int64) *ScalingParameters {
s.DesiredPartitionCount = &v
return s
}
// SetDesiredReplicationCount sets the DesiredReplicationCount field's value.
func (s *ScalingParameters) SetDesiredReplicationCount(v int64) *ScalingParameters {
s.DesiredReplicationCount = &v
return s
}
// The status and configuration of a search domain's scaling parameters.
type ScalingParametersStatus struct {
_ struct{} `type:"structure"`
// The desired instance type and desired number of replicas of each index partition.
//
// Options is a required field
Options *ScalingParameters `type:"structure" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s ScalingParametersStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ScalingParametersStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *ScalingParametersStatus) SetStatus(v *OptionStatus) *ScalingParametersStatus {
s.Status = v
return s
}
// The endpoint to which service requests can be submitted.
type ServiceEndpoint struct {
_ struct{} `type:"structure"`
// The endpoint to which service requests can be submitted. For example, search-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com
// or doc-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com.
Endpoint *string `type:"string"`
}
// String returns the string representation
func (s ServiceEndpoint) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceEndpoint) GoString() string {
return s.String()
}
// SetEndpoint sets the Endpoint field's value.
func (s *ServiceEndpoint) SetEndpoint(v string) *ServiceEndpoint {
s.Endpoint = &v
return s
}
// Configuration information for a search suggester. Each suggester has a unique
// name and specifies the text field you want to use for suggestions. The following
// options can be configured for a suggester: FuzzyMatching, SortExpression.
type Suggester struct {
_ struct{} `type:"structure"`
// Options for a search suggester.
//
// DocumentSuggesterOptions is a required field
DocumentSuggesterOptions *DocumentSuggesterOptions `type:"structure" required:"true"`
// Names must begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore).
//
// SuggesterName is a required field
SuggesterName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s Suggester) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Suggester) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Suggester) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Suggester"}
if s.DocumentSuggesterOptions == nil {
invalidParams.Add(request.NewErrParamRequired("DocumentSuggesterOptions"))
}
if s.SuggesterName == nil {
invalidParams.Add(request.NewErrParamRequired("SuggesterName"))
}
if s.SuggesterName != nil && len(*s.SuggesterName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1))
}
if s.DocumentSuggesterOptions != nil {
if err := s.DocumentSuggesterOptions.Validate(); err != nil {
invalidParams.AddNested("DocumentSuggesterOptions", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDocumentSuggesterOptions sets the DocumentSuggesterOptions field's value.
func (s *Suggester) SetDocumentSuggesterOptions(v *DocumentSuggesterOptions) *Suggester {
s.DocumentSuggesterOptions = v
return s
}
// SetSuggesterName sets the SuggesterName field's value.
func (s *Suggester) SetSuggesterName(v string) *Suggester {
s.SuggesterName = &v
return s
}
// The value of a Suggester and its current status.
type SuggesterStatus struct {
_ struct{} `type:"structure"`
// Configuration information for a search suggester. Each suggester has a unique
// name and specifies the text field you want to use for suggestions. The following
// options can be configured for a suggester: FuzzyMatching, SortExpression.
//
// Options is a required field
Options *Suggester `type:"structure" required:"true"`
// The status of domain configuration option.
//
// Status is a required field
Status *OptionStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s SuggesterStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggesterStatus) GoString() string {
return s.String()
}
// SetOptions sets the Options field's value.
func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus {
s.Options = v
return s
}
// SetStatus sets the Status field's value.
func (s *SuggesterStatus) SetStatus(v *OptionStatus) *SuggesterStatus {
s.Status = v
return s
}
// Options for a field that contains an array of text strings. Present if IndexFieldType
// specifies the field is of type text-array. A text-array field is always searchable.
// All options are enabled by default.
type TextArrayOptions struct {
_ struct{} `type:"structure"`
// The name of an analysis scheme for a text-array field.
AnalysisScheme *string `type:"string"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether highlights can be returned for the field.
HighlightEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// A list of source fields to map to the field.
SourceFields *string `type:"string"`
}
// String returns the string representation
func (s TextArrayOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TextArrayOptions) GoString() string {
return s.String()
}
// SetAnalysisScheme sets the AnalysisScheme field's value.
func (s *TextArrayOptions) SetAnalysisScheme(v string) *TextArrayOptions {
s.AnalysisScheme = &v
return s
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *TextArrayOptions) SetDefaultValue(v string) *TextArrayOptions {
s.DefaultValue = &v
return s
}
// SetHighlightEnabled sets the HighlightEnabled field's value.
func (s *TextArrayOptions) SetHighlightEnabled(v bool) *TextArrayOptions {
s.HighlightEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *TextArrayOptions) SetReturnEnabled(v bool) *TextArrayOptions {
s.ReturnEnabled = &v
return s
}
// SetSourceFields sets the SourceFields field's value.
func (s *TextArrayOptions) SetSourceFields(v string) *TextArrayOptions {
s.SourceFields = &v
return s
}
// Options for text field. Present if IndexFieldType specifies the field is
// of type text. A text field is always searchable. All options are enabled
// by default.
type TextOptions struct {
_ struct{} `type:"structure"`
// The name of an analysis scheme for a text field.
AnalysisScheme *string `type:"string"`
// A value to use for the field if the field isn't specified for a document.
DefaultValue *string `type:"string"`
// Whether highlights can be returned for the field.
HighlightEnabled *bool `type:"boolean"`
// Whether the contents of the field can be returned in the search results.
ReturnEnabled *bool `type:"boolean"`
// Whether the field can be used to sort the search results.
SortEnabled *bool `type:"boolean"`
// A string that represents the name of an index field. CloudSearch supports
// regular index fields as well as dynamic fields. A dynamic field's name defines
// a pattern that begins or ends with a wildcard. Any document fields that don't
// map to a regular index field but do match a dynamic field's pattern are configured
// with the dynamic field's indexing options.
//
// Regular field names begin with a letter and can contain the following characters:
// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin
// or end with a wildcard (*). The wildcard can also be the only character in
// a dynamic field name. Multiple wildcards, and wildcards embedded within a
// string are not supported.
//
// The name score is reserved and cannot be used as a field name. To reference
// a document's ID, you can use the name _id.
SourceField *string `min:"1" type:"string"`
}
// String returns the string representation
func (s TextOptions) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TextOptions) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TextOptions) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "TextOptions"}
if s.SourceField != nil && len(*s.SourceField) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SourceField", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAnalysisScheme sets the AnalysisScheme field's value.
func (s *TextOptions) SetAnalysisScheme(v string) *TextOptions {
s.AnalysisScheme = &v
return s
}
// SetDefaultValue sets the DefaultValue field's value.
func (s *TextOptions) SetDefaultValue(v string) *TextOptions {
s.DefaultValue = &v
return s
}
// SetHighlightEnabled sets the HighlightEnabled field's value.
func (s *TextOptions) SetHighlightEnabled(v bool) *TextOptions {
s.HighlightEnabled = &v
return s
}
// SetReturnEnabled sets the ReturnEnabled field's value.
func (s *TextOptions) SetReturnEnabled(v bool) *TextOptions {
s.ReturnEnabled = &v
return s
}
// SetSortEnabled sets the SortEnabled field's value.
func (s *TextOptions) SetSortEnabled(v bool) *TextOptions {
s.SortEnabled = &v
return s
}
// SetSourceField sets the SourceField field's value.
func (s *TextOptions) SetSourceField(v string) *TextOptions {
s.SourceField = &v
return s
}
// Container for the parameters to the UpdateAvailabilityOptions operation.
// Specifies the name of the domain you want to update and the Multi-AZ availability
// option.
type UpdateAvailabilityOptionsInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// You expand an existing search domain to a second Availability Zone by setting
// the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option
// to downgrade the domain to a single Availability Zone by setting the Multi-AZ
// option to false.
//
// MultiAZ is a required field
MultiAZ *bool `type:"boolean" required:"true"`
}
// String returns the string representation
func (s UpdateAvailabilityOptionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateAvailabilityOptionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateAvailabilityOptionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateAvailabilityOptionsInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.MultiAZ == nil {
invalidParams.Add(request.NewErrParamRequired("MultiAZ"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *UpdateAvailabilityOptionsInput) SetDomainName(v string) *UpdateAvailabilityOptionsInput {
s.DomainName = &v
return s
}
// SetMultiAZ sets the MultiAZ field's value.
func (s *UpdateAvailabilityOptionsInput) SetMultiAZ(v bool) *UpdateAvailabilityOptionsInput {
s.MultiAZ = &v
return s
}
// The result of a UpdateAvailabilityOptions request. Contains the status of
// the domain's availability options.
type UpdateAvailabilityOptionsOutput struct {
_ struct{} `type:"structure"`
// The newly-configured availability options. Indicates whether Multi-AZ is
// enabled for the domain.
AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"`
}
// String returns the string representation
func (s UpdateAvailabilityOptionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateAvailabilityOptionsOutput) GoString() string {
return s.String()
}
// SetAvailabilityOptions sets the AvailabilityOptions field's value.
func (s *UpdateAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *UpdateAvailabilityOptionsOutput {
s.AvailabilityOptions = v
return s
}
// Container for the parameters to the UpdateDomainEndpointOptions operation.
// Specifies the name of the domain you want to update and the domain endpoint
// options.
type UpdateDomainEndpointOptionsInput struct {
_ struct{} `type:"structure"`
// Whether to require that all requests to the domain arrive over HTTPS. We
// recommend Policy-Min-TLS-1-2-2019-07 for TLSSecurityPolicy. For compatibility
// with older clients, the default is Policy-Min-TLS-1-0-2019-07.
//
// DomainEndpointOptions is a required field
DomainEndpointOptions *DomainEndpointOptions `type:"structure" required:"true"`
// A string that represents the name of a domain.
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateDomainEndpointOptionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateDomainEndpointOptionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateDomainEndpointOptionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateDomainEndpointOptionsInput"}
if s.DomainEndpointOptions == nil {
invalidParams.Add(request.NewErrParamRequired("DomainEndpointOptions"))
}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainEndpointOptions sets the DomainEndpointOptions field's value.
func (s *UpdateDomainEndpointOptionsInput) SetDomainEndpointOptions(v *DomainEndpointOptions) *UpdateDomainEndpointOptionsInput {
s.DomainEndpointOptions = v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *UpdateDomainEndpointOptionsInput) SetDomainName(v string) *UpdateDomainEndpointOptionsInput {
s.DomainName = &v
return s
}
// The result of a UpdateDomainEndpointOptions request. Contains the configuration
// and status of the domain's endpoint options.
type UpdateDomainEndpointOptionsOutput struct {
_ struct{} `type:"structure"`
// The newly-configured domain endpoint options.
DomainEndpointOptions *DomainEndpointOptionsStatus `type:"structure"`
}
// String returns the string representation
func (s UpdateDomainEndpointOptionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateDomainEndpointOptionsOutput) GoString() string {
return s.String()
}
// SetDomainEndpointOptions sets the DomainEndpointOptions field's value.
func (s *UpdateDomainEndpointOptionsOutput) SetDomainEndpointOptions(v *DomainEndpointOptionsStatus) *UpdateDomainEndpointOptionsOutput {
s.DomainEndpointOptions = v
return s
}
// Container for the parameters to the UpdateScalingParameters operation. Specifies
// the name of the domain you want to update and the scaling parameters you
// want to configure.
type UpdateScalingParametersInput struct {
_ struct{} `type:"structure"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
// The desired instance type and desired number of replicas of each index partition.
//
// ScalingParameters is a required field
ScalingParameters *ScalingParameters `type:"structure" required:"true"`
}
// String returns the string representation
func (s UpdateScalingParametersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateScalingParametersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateScalingParametersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateScalingParametersInput"}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if s.ScalingParameters == nil {
invalidParams.Add(request.NewErrParamRequired("ScalingParameters"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDomainName sets the DomainName field's value.
func (s *UpdateScalingParametersInput) SetDomainName(v string) *UpdateScalingParametersInput {
s.DomainName = &v
return s
}
// SetScalingParameters sets the ScalingParameters field's value.
func (s *UpdateScalingParametersInput) SetScalingParameters(v *ScalingParameters) *UpdateScalingParametersInput {
s.ScalingParameters = v
return s
}
// The result of a UpdateScalingParameters request. Contains the status of the
// newly-configured scaling parameters.
type UpdateScalingParametersOutput struct {
_ struct{} `type:"structure"`
// The status and configuration of a search domain's scaling parameters.
//
// ScalingParameters is a required field
ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s UpdateScalingParametersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateScalingParametersOutput) GoString() string {
return s.String()
}
// SetScalingParameters sets the ScalingParameters field's value.
func (s *UpdateScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *UpdateScalingParametersOutput {
s.ScalingParameters = v
return s
}
// Container for the parameters to the UpdateServiceAccessPolicies operation.
// Specifies the name of the domain you want to update and the access rules
// you want to configure.
type UpdateServiceAccessPoliciesInput struct {
_ struct{} `type:"structure"`
// The access rules you want to configure. These rules replace any existing
// rules.
//
// AccessPolicies is a required field
AccessPolicies *string `type:"string" required:"true"`
// A string that represents the name of a domain. Domain names are unique across
// the domains owned by an account within an AWS region. Domain names start
// with a letter or number and can contain the following characters: a-z (lowercase),
// 0-9, and - (hyphen).
//
// DomainName is a required field
DomainName *string `min:"3" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateServiceAccessPoliciesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateServiceAccessPoliciesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateServiceAccessPoliciesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateServiceAccessPoliciesInput"}
if s.AccessPolicies == nil {
invalidParams.Add(request.NewErrParamRequired("AccessPolicies"))
}
if s.DomainName == nil {
invalidParams.Add(request.NewErrParamRequired("DomainName"))
}
if s.DomainName != nil && len(*s.DomainName) < 3 {
invalidParams.Add(request.NewErrParamMinLen("DomainName", 3))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccessPolicies sets the AccessPolicies field's value.
func (s *UpdateServiceAccessPoliciesInput) SetAccessPolicies(v string) *UpdateServiceAccessPoliciesInput {
s.AccessPolicies = &v
return s
}
// SetDomainName sets the DomainName field's value.
func (s *UpdateServiceAccessPoliciesInput) SetDomainName(v string) *UpdateServiceAccessPoliciesInput {
s.DomainName = &v
return s
}
// The result of an UpdateServiceAccessPolicies request. Contains the new access
// policies.
type UpdateServiceAccessPoliciesOutput struct {
_ struct{} `type:"structure"`
// The access rules configured for the domain.
//
// AccessPolicies is a required field
AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"`
}
// String returns the string representation
func (s UpdateServiceAccessPoliciesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateServiceAccessPoliciesOutput) GoString() string {
return s.String()
}
// SetAccessPolicies sets the AccessPolicies field's value.
func (s *UpdateServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *UpdateServiceAccessPoliciesOutput {
s.AccessPolicies = v
return s
}
const (
// AlgorithmicStemmingNone is a AlgorithmicStemming enum value
AlgorithmicStemmingNone = "none"
// AlgorithmicStemmingMinimal is a AlgorithmicStemming enum value
AlgorithmicStemmingMinimal = "minimal"
// AlgorithmicStemmingLight is a AlgorithmicStemming enum value
AlgorithmicStemmingLight = "light"
// AlgorithmicStemmingFull is a AlgorithmicStemming enum value
AlgorithmicStemmingFull = "full"
)
// AlgorithmicStemming_Values returns all elements of the AlgorithmicStemming enum
func AlgorithmicStemming_Values() []string {
return []string{
AlgorithmicStemmingNone,
AlgorithmicStemmingMinimal,
AlgorithmicStemmingLight,
AlgorithmicStemmingFull,
}
}
// An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul
// for multiple languages.
const (
// AnalysisSchemeLanguageAr is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageAr = "ar"
// AnalysisSchemeLanguageBg is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageBg = "bg"
// AnalysisSchemeLanguageCa is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageCa = "ca"
// AnalysisSchemeLanguageCs is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageCs = "cs"
// AnalysisSchemeLanguageDa is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageDa = "da"
// AnalysisSchemeLanguageDe is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageDe = "de"
// AnalysisSchemeLanguageEl is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageEl = "el"
// AnalysisSchemeLanguageEn is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageEn = "en"
// AnalysisSchemeLanguageEs is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageEs = "es"
// AnalysisSchemeLanguageEu is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageEu = "eu"
// AnalysisSchemeLanguageFa is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageFa = "fa"
// AnalysisSchemeLanguageFi is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageFi = "fi"
// AnalysisSchemeLanguageFr is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageFr = "fr"
// AnalysisSchemeLanguageGa is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageGa = "ga"
// AnalysisSchemeLanguageGl is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageGl = "gl"
// AnalysisSchemeLanguageHe is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageHe = "he"
// AnalysisSchemeLanguageHi is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageHi = "hi"
// AnalysisSchemeLanguageHu is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageHu = "hu"
// AnalysisSchemeLanguageHy is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageHy = "hy"
// AnalysisSchemeLanguageId is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageId = "id"
// AnalysisSchemeLanguageIt is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageIt = "it"
// AnalysisSchemeLanguageJa is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageJa = "ja"
// AnalysisSchemeLanguageKo is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageKo = "ko"
// AnalysisSchemeLanguageLv is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageLv = "lv"
// AnalysisSchemeLanguageMul is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageMul = "mul"
// AnalysisSchemeLanguageNl is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageNl = "nl"
// AnalysisSchemeLanguageNo is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageNo = "no"
// AnalysisSchemeLanguagePt is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguagePt = "pt"
// AnalysisSchemeLanguageRo is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageRo = "ro"
// AnalysisSchemeLanguageRu is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageRu = "ru"
// AnalysisSchemeLanguageSv is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageSv = "sv"
// AnalysisSchemeLanguageTh is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageTh = "th"
// AnalysisSchemeLanguageTr is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageTr = "tr"
// AnalysisSchemeLanguageZhHans is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageZhHans = "zh-Hans"
// AnalysisSchemeLanguageZhHant is a AnalysisSchemeLanguage enum value
AnalysisSchemeLanguageZhHant = "zh-Hant"
)
// AnalysisSchemeLanguage_Values returns all elements of the AnalysisSchemeLanguage enum
func AnalysisSchemeLanguage_Values() []string {
return []string{
AnalysisSchemeLanguageAr,
AnalysisSchemeLanguageBg,
AnalysisSchemeLanguageCa,
AnalysisSchemeLanguageCs,
AnalysisSchemeLanguageDa,
AnalysisSchemeLanguageDe,
AnalysisSchemeLanguageEl,
AnalysisSchemeLanguageEn,
AnalysisSchemeLanguageEs,
AnalysisSchemeLanguageEu,
AnalysisSchemeLanguageFa,
AnalysisSchemeLanguageFi,
AnalysisSchemeLanguageFr,
AnalysisSchemeLanguageGa,
AnalysisSchemeLanguageGl,
AnalysisSchemeLanguageHe,
AnalysisSchemeLanguageHi,
AnalysisSchemeLanguageHu,
AnalysisSchemeLanguageHy,
AnalysisSchemeLanguageId,
AnalysisSchemeLanguageIt,
AnalysisSchemeLanguageJa,
AnalysisSchemeLanguageKo,
AnalysisSchemeLanguageLv,
AnalysisSchemeLanguageMul,
AnalysisSchemeLanguageNl,
AnalysisSchemeLanguageNo,
AnalysisSchemeLanguagePt,
AnalysisSchemeLanguageRo,
AnalysisSchemeLanguageRu,
AnalysisSchemeLanguageSv,
AnalysisSchemeLanguageTh,
AnalysisSchemeLanguageTr,
AnalysisSchemeLanguageZhHans,
AnalysisSchemeLanguageZhHant,
}
}
// The type of field. The valid options for a field depend on the field type.
// For more information about the supported field types, see Configuring Index
// Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html)
// in the Amazon CloudSearch Developer Guide.
const (
// IndexFieldTypeInt is a IndexFieldType enum value
IndexFieldTypeInt = "int"
// IndexFieldTypeDouble is a IndexFieldType enum value
IndexFieldTypeDouble = "double"
// IndexFieldTypeLiteral is a IndexFieldType enum value
IndexFieldTypeLiteral = "literal"
// IndexFieldTypeText is a IndexFieldType enum value
IndexFieldTypeText = "text"
// IndexFieldTypeDate is a IndexFieldType enum value
IndexFieldTypeDate = "date"
// IndexFieldTypeLatlon is a IndexFieldType enum value
IndexFieldTypeLatlon = "latlon"
// IndexFieldTypeIntArray is a IndexFieldType enum value
IndexFieldTypeIntArray = "int-array"
// IndexFieldTypeDoubleArray is a IndexFieldType enum value
IndexFieldTypeDoubleArray = "double-array"
// IndexFieldTypeLiteralArray is a IndexFieldType enum value
IndexFieldTypeLiteralArray = "literal-array"
// IndexFieldTypeTextArray is a IndexFieldType enum value
IndexFieldTypeTextArray = "text-array"
// IndexFieldTypeDateArray is a IndexFieldType enum value
IndexFieldTypeDateArray = "date-array"
)
// IndexFieldType_Values returns all elements of the IndexFieldType enum
func IndexFieldType_Values() []string {
return []string{
IndexFieldTypeInt,
IndexFieldTypeDouble,
IndexFieldTypeLiteral,
IndexFieldTypeText,
IndexFieldTypeDate,
IndexFieldTypeLatlon,
IndexFieldTypeIntArray,
IndexFieldTypeDoubleArray,
IndexFieldTypeLiteralArray,
IndexFieldTypeTextArray,
IndexFieldTypeDateArray,
}
}
// The state of processing a change to an option. One of:
//
// * RequiresIndexDocuments: The option's latest value will not be deployed
// until IndexDocuments has been called and indexing is complete.
//
// * Processing: The option's latest value is in the process of being activated.
//
// * Active: The option's latest value is fully deployed.
//
// * FailedToValidate: The option value is not compatible with the domain's
// data and cannot be used to index the data. You must either modify the
// option value or update or remove the incompatible documents.
const (
// OptionStateRequiresIndexDocuments is a OptionState enum value
OptionStateRequiresIndexDocuments = "RequiresIndexDocuments"
// OptionStateProcessing is a OptionState enum value
OptionStateProcessing = "Processing"
// OptionStateActive is a OptionState enum value
OptionStateActive = "Active"
// OptionStateFailedToValidate is a OptionState enum value
OptionStateFailedToValidate = "FailedToValidate"
)
// OptionState_Values returns all elements of the OptionState enum
func OptionState_Values() []string {
return []string{
OptionStateRequiresIndexDocuments,
OptionStateProcessing,
OptionStateActive,
OptionStateFailedToValidate,
}
}
// The instance type (such as search.m1.small) on which an index partition is
// hosted.
const (
// PartitionInstanceTypeSearchM1Small is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM1Small = "search.m1.small"
// PartitionInstanceTypeSearchM1Large is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM1Large = "search.m1.large"
// PartitionInstanceTypeSearchM2Xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM2Xlarge = "search.m2.xlarge"
// PartitionInstanceTypeSearchM22xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM22xlarge = "search.m2.2xlarge"
// PartitionInstanceTypeSearchM3Medium is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM3Medium = "search.m3.medium"
// PartitionInstanceTypeSearchM3Large is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM3Large = "search.m3.large"
// PartitionInstanceTypeSearchM3Xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM3Xlarge = "search.m3.xlarge"
// PartitionInstanceTypeSearchM32xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchM32xlarge = "search.m3.2xlarge"
// PartitionInstanceTypeSearchSmall is a PartitionInstanceType enum value
PartitionInstanceTypeSearchSmall = "search.small"
// PartitionInstanceTypeSearchMedium is a PartitionInstanceType enum value
PartitionInstanceTypeSearchMedium = "search.medium"
// PartitionInstanceTypeSearchLarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchLarge = "search.large"
// PartitionInstanceTypeSearchXlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchXlarge = "search.xlarge"
// PartitionInstanceTypeSearch2xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearch2xlarge = "search.2xlarge"
// PartitionInstanceTypeSearchPreviousgenerationSmall is a PartitionInstanceType enum value
PartitionInstanceTypeSearchPreviousgenerationSmall = "search.previousgeneration.small"
// PartitionInstanceTypeSearchPreviousgenerationLarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchPreviousgenerationLarge = "search.previousgeneration.large"
// PartitionInstanceTypeSearchPreviousgenerationXlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchPreviousgenerationXlarge = "search.previousgeneration.xlarge"
// PartitionInstanceTypeSearchPreviousgeneration2xlarge is a PartitionInstanceType enum value
PartitionInstanceTypeSearchPreviousgeneration2xlarge = "search.previousgeneration.2xlarge"
)
// PartitionInstanceType_Values returns all elements of the PartitionInstanceType enum
func PartitionInstanceType_Values() []string {
return []string{
PartitionInstanceTypeSearchM1Small,
PartitionInstanceTypeSearchM1Large,
PartitionInstanceTypeSearchM2Xlarge,
PartitionInstanceTypeSearchM22xlarge,
PartitionInstanceTypeSearchM3Medium,
PartitionInstanceTypeSearchM3Large,
PartitionInstanceTypeSearchM3Xlarge,
PartitionInstanceTypeSearchM32xlarge,
PartitionInstanceTypeSearchSmall,
PartitionInstanceTypeSearchMedium,
PartitionInstanceTypeSearchLarge,
PartitionInstanceTypeSearchXlarge,
PartitionInstanceTypeSearch2xlarge,
PartitionInstanceTypeSearchPreviousgenerationSmall,
PartitionInstanceTypeSearchPreviousgenerationLarge,
PartitionInstanceTypeSearchPreviousgenerationXlarge,
PartitionInstanceTypeSearchPreviousgeneration2xlarge,
}
}
const (
// SuggesterFuzzyMatchingNone is a SuggesterFuzzyMatching enum value
SuggesterFuzzyMatchingNone = "none"
// SuggesterFuzzyMatchingLow is a SuggesterFuzzyMatching enum value
SuggesterFuzzyMatchingLow = "low"
// SuggesterFuzzyMatchingHigh is a SuggesterFuzzyMatching enum value
SuggesterFuzzyMatchingHigh = "high"
)
// SuggesterFuzzyMatching_Values returns all elements of the SuggesterFuzzyMatching enum
func SuggesterFuzzyMatching_Values() []string {
return []string{
SuggesterFuzzyMatchingNone,
SuggesterFuzzyMatchingLow,
SuggesterFuzzyMatchingHigh,
}
}
// The minimum required TLS version.
const (
// TLSSecurityPolicyPolicyMinTls10201907 is a TLSSecurityPolicy enum value
TLSSecurityPolicyPolicyMinTls10201907 = "Policy-Min-TLS-1-0-2019-07"
// TLSSecurityPolicyPolicyMinTls12201907 is a TLSSecurityPolicy enum value
TLSSecurityPolicyPolicyMinTls12201907 = "Policy-Min-TLS-1-2-2019-07"
)
// TLSSecurityPolicy_Values returns all elements of the TLSSecurityPolicy enum
func TLSSecurityPolicy_Values() []string {
return []string{
TLSSecurityPolicyPolicyMinTls10201907,
TLSSecurityPolicyPolicyMinTls12201907,
}
}
| 7,001 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudsearch provides the client and types for making API
// requests to Amazon CloudSearch.
//
// You use the Amazon CloudSearch configuration service to create, configure,
// and manage search domains. Configuration service requests are submitted using
// the AWS Query protocol. AWS Query requests are HTTP or HTTPS requests submitted
// via HTTP GET or POST with a query parameter named Action.
//
// The endpoint for configuration service requests is region-specific: cloudsearch.region.amazonaws.com.
// For example, cloudsearch.us-east-1.amazonaws.com. For a current list of supported
// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#cloudsearch_region).
//
// See cloudsearch package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/
//
// Using the Client
//
// To contact Amazon CloudSearch 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 CloudSearch client CloudSearch for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/#New
package cloudsearch
| 34 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearch
const (
// ErrCodeBaseException for service response error code
// "BaseException".
//
// An error occurred while processing the request.
ErrCodeBaseException = "BaseException"
// ErrCodeDisabledOperationException for service response error code
// "DisabledAction".
//
// The request was rejected because it attempted an operation which is not enabled.
ErrCodeDisabledOperationException = "DisabledAction"
// ErrCodeInternalException for service response error code
// "InternalException".
//
// An internal error occurred while processing the request. If this problem
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
ErrCodeInternalException = "InternalException"
// ErrCodeInvalidTypeException for service response error code
// "InvalidType".
//
// The request was rejected because it specified an invalid type definition.
ErrCodeInvalidTypeException = "InvalidType"
// ErrCodeLimitExceededException for service response error code
// "LimitExceeded".
//
// The request was rejected because a resource limit has already been met.
ErrCodeLimitExceededException = "LimitExceeded"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExists".
//
// The request was rejected because it attempted to create a resource that already
// exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExists"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFound".
//
// The request was rejected because it attempted to reference a resource that
// does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFound"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The request was rejected because it has invalid parameters.
ErrCodeValidationException = "ValidationException"
)
| 58 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.15,integration
package cloudsearch_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/cloudsearch"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_DescribeDomains(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudsearch.New(sess)
params := &cloudsearch.DescribeDomainsInput{}
_, err := svc.DescribeDomainsWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_DescribeIndexFields(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := cloudsearch.New(sess)
params := &cloudsearch.DescribeIndexFieldsInput{
DomainName: aws.String("fakedomain"),
}
_, err := svc.DescribeIndexFieldsWithContext(ctx, params, func(r *request.Request) {
r.Handlers.Validate.RemoveByName("core.ValidateParametersHandler")
})
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 len(aerr.Message()) == 0 {
t.Errorf("expect non-empty error message")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
| 66 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearch
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"
)
// CloudSearch provides the API operation methods for making requests to
// Amazon CloudSearch. See this package's package overview docs
// for details on the service.
//
// CloudSearch methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudSearch 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 = "cloudsearch" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudSearch" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudSearch 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudSearch client from just a session.
// svc := cloudsearch.New(mySession)
//
// // Create a CloudSearch client with additional configuration
// svc := cloudsearch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearch {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudSearch {
svc := &CloudSearch{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2013-01-01",
},
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 CloudSearch operation and runs any
// custom request initialization.
func (c *CloudSearch) 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
}
| 99 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudsearchiface provides an interface to enable mocking the Amazon CloudSearch 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 cloudsearchiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudsearch"
)
// CloudSearchAPI provides an interface to enable mocking the
// cloudsearch.CloudSearch 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 CloudSearch.
// func myFunc(svc cloudsearchiface.CloudSearchAPI) bool {
// // Make svc.BuildSuggesters request
// }
//
// func main() {
// sess := session.New()
// svc := cloudsearch.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudSearchClient struct {
// cloudsearchiface.CloudSearchAPI
// }
// func (m *mockCloudSearchClient) BuildSuggesters(input *cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudSearchClient{}
//
// 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 CloudSearchAPI interface {
BuildSuggesters(*cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error)
BuildSuggestersWithContext(aws.Context, *cloudsearch.BuildSuggestersInput, ...request.Option) (*cloudsearch.BuildSuggestersOutput, error)
BuildSuggestersRequest(*cloudsearch.BuildSuggestersInput) (*request.Request, *cloudsearch.BuildSuggestersOutput)
CreateDomain(*cloudsearch.CreateDomainInput) (*cloudsearch.CreateDomainOutput, error)
CreateDomainWithContext(aws.Context, *cloudsearch.CreateDomainInput, ...request.Option) (*cloudsearch.CreateDomainOutput, error)
CreateDomainRequest(*cloudsearch.CreateDomainInput) (*request.Request, *cloudsearch.CreateDomainOutput)
DefineAnalysisScheme(*cloudsearch.DefineAnalysisSchemeInput) (*cloudsearch.DefineAnalysisSchemeOutput, error)
DefineAnalysisSchemeWithContext(aws.Context, *cloudsearch.DefineAnalysisSchemeInput, ...request.Option) (*cloudsearch.DefineAnalysisSchemeOutput, error)
DefineAnalysisSchemeRequest(*cloudsearch.DefineAnalysisSchemeInput) (*request.Request, *cloudsearch.DefineAnalysisSchemeOutput)
DefineExpression(*cloudsearch.DefineExpressionInput) (*cloudsearch.DefineExpressionOutput, error)
DefineExpressionWithContext(aws.Context, *cloudsearch.DefineExpressionInput, ...request.Option) (*cloudsearch.DefineExpressionOutput, error)
DefineExpressionRequest(*cloudsearch.DefineExpressionInput) (*request.Request, *cloudsearch.DefineExpressionOutput)
DefineIndexField(*cloudsearch.DefineIndexFieldInput) (*cloudsearch.DefineIndexFieldOutput, error)
DefineIndexFieldWithContext(aws.Context, *cloudsearch.DefineIndexFieldInput, ...request.Option) (*cloudsearch.DefineIndexFieldOutput, error)
DefineIndexFieldRequest(*cloudsearch.DefineIndexFieldInput) (*request.Request, *cloudsearch.DefineIndexFieldOutput)
DefineSuggester(*cloudsearch.DefineSuggesterInput) (*cloudsearch.DefineSuggesterOutput, error)
DefineSuggesterWithContext(aws.Context, *cloudsearch.DefineSuggesterInput, ...request.Option) (*cloudsearch.DefineSuggesterOutput, error)
DefineSuggesterRequest(*cloudsearch.DefineSuggesterInput) (*request.Request, *cloudsearch.DefineSuggesterOutput)
DeleteAnalysisScheme(*cloudsearch.DeleteAnalysisSchemeInput) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
DeleteAnalysisSchemeWithContext(aws.Context, *cloudsearch.DeleteAnalysisSchemeInput, ...request.Option) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
DeleteAnalysisSchemeRequest(*cloudsearch.DeleteAnalysisSchemeInput) (*request.Request, *cloudsearch.DeleteAnalysisSchemeOutput)
DeleteDomain(*cloudsearch.DeleteDomainInput) (*cloudsearch.DeleteDomainOutput, error)
DeleteDomainWithContext(aws.Context, *cloudsearch.DeleteDomainInput, ...request.Option) (*cloudsearch.DeleteDomainOutput, error)
DeleteDomainRequest(*cloudsearch.DeleteDomainInput) (*request.Request, *cloudsearch.DeleteDomainOutput)
DeleteExpression(*cloudsearch.DeleteExpressionInput) (*cloudsearch.DeleteExpressionOutput, error)
DeleteExpressionWithContext(aws.Context, *cloudsearch.DeleteExpressionInput, ...request.Option) (*cloudsearch.DeleteExpressionOutput, error)
DeleteExpressionRequest(*cloudsearch.DeleteExpressionInput) (*request.Request, *cloudsearch.DeleteExpressionOutput)
DeleteIndexField(*cloudsearch.DeleteIndexFieldInput) (*cloudsearch.DeleteIndexFieldOutput, error)
DeleteIndexFieldWithContext(aws.Context, *cloudsearch.DeleteIndexFieldInput, ...request.Option) (*cloudsearch.DeleteIndexFieldOutput, error)
DeleteIndexFieldRequest(*cloudsearch.DeleteIndexFieldInput) (*request.Request, *cloudsearch.DeleteIndexFieldOutput)
DeleteSuggester(*cloudsearch.DeleteSuggesterInput) (*cloudsearch.DeleteSuggesterOutput, error)
DeleteSuggesterWithContext(aws.Context, *cloudsearch.DeleteSuggesterInput, ...request.Option) (*cloudsearch.DeleteSuggesterOutput, error)
DeleteSuggesterRequest(*cloudsearch.DeleteSuggesterInput) (*request.Request, *cloudsearch.DeleteSuggesterOutput)
DescribeAnalysisSchemes(*cloudsearch.DescribeAnalysisSchemesInput) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
DescribeAnalysisSchemesWithContext(aws.Context, *cloudsearch.DescribeAnalysisSchemesInput, ...request.Option) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
DescribeAnalysisSchemesRequest(*cloudsearch.DescribeAnalysisSchemesInput) (*request.Request, *cloudsearch.DescribeAnalysisSchemesOutput)
DescribeAvailabilityOptions(*cloudsearch.DescribeAvailabilityOptionsInput) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
DescribeAvailabilityOptionsWithContext(aws.Context, *cloudsearch.DescribeAvailabilityOptionsInput, ...request.Option) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
DescribeAvailabilityOptionsRequest(*cloudsearch.DescribeAvailabilityOptionsInput) (*request.Request, *cloudsearch.DescribeAvailabilityOptionsOutput)
DescribeDomainEndpointOptions(*cloudsearch.DescribeDomainEndpointOptionsInput) (*cloudsearch.DescribeDomainEndpointOptionsOutput, error)
DescribeDomainEndpointOptionsWithContext(aws.Context, *cloudsearch.DescribeDomainEndpointOptionsInput, ...request.Option) (*cloudsearch.DescribeDomainEndpointOptionsOutput, error)
DescribeDomainEndpointOptionsRequest(*cloudsearch.DescribeDomainEndpointOptionsInput) (*request.Request, *cloudsearch.DescribeDomainEndpointOptionsOutput)
DescribeDomains(*cloudsearch.DescribeDomainsInput) (*cloudsearch.DescribeDomainsOutput, error)
DescribeDomainsWithContext(aws.Context, *cloudsearch.DescribeDomainsInput, ...request.Option) (*cloudsearch.DescribeDomainsOutput, error)
DescribeDomainsRequest(*cloudsearch.DescribeDomainsInput) (*request.Request, *cloudsearch.DescribeDomainsOutput)
DescribeExpressions(*cloudsearch.DescribeExpressionsInput) (*cloudsearch.DescribeExpressionsOutput, error)
DescribeExpressionsWithContext(aws.Context, *cloudsearch.DescribeExpressionsInput, ...request.Option) (*cloudsearch.DescribeExpressionsOutput, error)
DescribeExpressionsRequest(*cloudsearch.DescribeExpressionsInput) (*request.Request, *cloudsearch.DescribeExpressionsOutput)
DescribeIndexFields(*cloudsearch.DescribeIndexFieldsInput) (*cloudsearch.DescribeIndexFieldsOutput, error)
DescribeIndexFieldsWithContext(aws.Context, *cloudsearch.DescribeIndexFieldsInput, ...request.Option) (*cloudsearch.DescribeIndexFieldsOutput, error)
DescribeIndexFieldsRequest(*cloudsearch.DescribeIndexFieldsInput) (*request.Request, *cloudsearch.DescribeIndexFieldsOutput)
DescribeScalingParameters(*cloudsearch.DescribeScalingParametersInput) (*cloudsearch.DescribeScalingParametersOutput, error)
DescribeScalingParametersWithContext(aws.Context, *cloudsearch.DescribeScalingParametersInput, ...request.Option) (*cloudsearch.DescribeScalingParametersOutput, error)
DescribeScalingParametersRequest(*cloudsearch.DescribeScalingParametersInput) (*request.Request, *cloudsearch.DescribeScalingParametersOutput)
DescribeServiceAccessPolicies(*cloudsearch.DescribeServiceAccessPoliciesInput) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
DescribeServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.DescribeServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
DescribeServiceAccessPoliciesRequest(*cloudsearch.DescribeServiceAccessPoliciesInput) (*request.Request, *cloudsearch.DescribeServiceAccessPoliciesOutput)
DescribeSuggesters(*cloudsearch.DescribeSuggestersInput) (*cloudsearch.DescribeSuggestersOutput, error)
DescribeSuggestersWithContext(aws.Context, *cloudsearch.DescribeSuggestersInput, ...request.Option) (*cloudsearch.DescribeSuggestersOutput, error)
DescribeSuggestersRequest(*cloudsearch.DescribeSuggestersInput) (*request.Request, *cloudsearch.DescribeSuggestersOutput)
IndexDocuments(*cloudsearch.IndexDocumentsInput) (*cloudsearch.IndexDocumentsOutput, error)
IndexDocumentsWithContext(aws.Context, *cloudsearch.IndexDocumentsInput, ...request.Option) (*cloudsearch.IndexDocumentsOutput, error)
IndexDocumentsRequest(*cloudsearch.IndexDocumentsInput) (*request.Request, *cloudsearch.IndexDocumentsOutput)
ListDomainNames(*cloudsearch.ListDomainNamesInput) (*cloudsearch.ListDomainNamesOutput, error)
ListDomainNamesWithContext(aws.Context, *cloudsearch.ListDomainNamesInput, ...request.Option) (*cloudsearch.ListDomainNamesOutput, error)
ListDomainNamesRequest(*cloudsearch.ListDomainNamesInput) (*request.Request, *cloudsearch.ListDomainNamesOutput)
UpdateAvailabilityOptions(*cloudsearch.UpdateAvailabilityOptionsInput) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
UpdateAvailabilityOptionsWithContext(aws.Context, *cloudsearch.UpdateAvailabilityOptionsInput, ...request.Option) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
UpdateAvailabilityOptionsRequest(*cloudsearch.UpdateAvailabilityOptionsInput) (*request.Request, *cloudsearch.UpdateAvailabilityOptionsOutput)
UpdateDomainEndpointOptions(*cloudsearch.UpdateDomainEndpointOptionsInput) (*cloudsearch.UpdateDomainEndpointOptionsOutput, error)
UpdateDomainEndpointOptionsWithContext(aws.Context, *cloudsearch.UpdateDomainEndpointOptionsInput, ...request.Option) (*cloudsearch.UpdateDomainEndpointOptionsOutput, error)
UpdateDomainEndpointOptionsRequest(*cloudsearch.UpdateDomainEndpointOptionsInput) (*request.Request, *cloudsearch.UpdateDomainEndpointOptionsOutput)
UpdateScalingParameters(*cloudsearch.UpdateScalingParametersInput) (*cloudsearch.UpdateScalingParametersOutput, error)
UpdateScalingParametersWithContext(aws.Context, *cloudsearch.UpdateScalingParametersInput, ...request.Option) (*cloudsearch.UpdateScalingParametersOutput, error)
UpdateScalingParametersRequest(*cloudsearch.UpdateScalingParametersInput) (*request.Request, *cloudsearch.UpdateScalingParametersOutput)
UpdateServiceAccessPolicies(*cloudsearch.UpdateServiceAccessPoliciesInput) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
UpdateServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.UpdateServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
UpdateServiceAccessPoliciesRequest(*cloudsearch.UpdateServiceAccessPoliciesInput) (*request.Request, *cloudsearch.UpdateServiceAccessPoliciesOutput)
}
var _ CloudSearchAPI = (*cloudsearch.CloudSearch)(nil)
| 169 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearchdomain
import (
"fmt"
"io"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
)
const opSearch = "Search"
// SearchRequest generates a "aws/request.Request" representing the
// client's request for the Search operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See Search for more information on using the Search
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the SearchRequest method.
// req, resp := client.SearchRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearchDomain) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput) {
op := &request.Operation{
Name: opSearch,
HTTPMethod: "GET",
HTTPPath: "/2013-01-01/search?format=sdk&pretty=true",
}
if input == nil {
input = &SearchInput{}
}
output = &SearchOutput{}
req = c.newRequest(op, input, output)
return
}
// Search API operation for Amazon CloudSearch Domain.
//
// Retrieves a list of documents that match the specified search criteria. How
// you specify the search criteria depends on which query parser you use. Amazon
// CloudSearch supports four query parsers:
//
// * simple: search all text and text-array fields for the specified string.
// Search for phrases, individual terms, and prefixes.
//
// * structured: search specific fields, construct compound queries using
// Boolean operators, and use advanced features such as term boosting and
// proximity searching.
//
// * lucene: specify search criteria using the Apache Lucene query parser
// syntax.
//
// * dismax: specify search criteria using the simplified subset of the Apache
// Lucene query parser syntax defined by the DisMax query parser.
//
// For more information, see Searching Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
// in the Amazon CloudSearch Developer Guide.
//
// The endpoint for submitting Search requests is domain-specific. You submit
// search requests to a domain's search endpoint. To get the search endpoint
// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
// action. A domain's endpoints are also displayed on the domain dashboard in
// the Amazon CloudSearch console.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch Domain's
// API operation Search for usage and error information.
//
// Returned Error Types:
// * SearchException
// Information about any problems encountered while processing a search request.
//
func (c *CloudSearchDomain) Search(input *SearchInput) (*SearchOutput, error) {
req, out := c.SearchRequest(input)
return out, req.Send()
}
// SearchWithContext is the same as Search with the addition of
// the ability to pass a context and additional request options.
//
// See Search for details on how to use this API operation.
//
// 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 *CloudSearchDomain) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error) {
req, out := c.SearchRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opSuggest = "Suggest"
// SuggestRequest generates a "aws/request.Request" representing the
// client's request for the Suggest operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See Suggest for more information on using the Suggest
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the SuggestRequest method.
// req, resp := client.SuggestRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearchDomain) SuggestRequest(input *SuggestInput) (req *request.Request, output *SuggestOutput) {
op := &request.Operation{
Name: opSuggest,
HTTPMethod: "GET",
HTTPPath: "/2013-01-01/suggest?format=sdk&pretty=true",
}
if input == nil {
input = &SuggestInput{}
}
output = &SuggestOutput{}
req = c.newRequest(op, input, output)
return
}
// Suggest API operation for Amazon CloudSearch Domain.
//
// Retrieves autocomplete suggestions for a partial query string. You can use
// suggestions enable you to display likely matches before users finish typing.
// In Amazon CloudSearch, suggestions are based on the contents of a particular
// text field. When you request suggestions, Amazon CloudSearch finds all of
// the documents whose values in the suggester field start with the specified
// query string. The beginning of the field must match the query string to be
// considered a match.
//
// For more information about configuring suggesters and retrieving suggestions,
// see Getting Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
// in the Amazon CloudSearch Developer Guide.
//
// The endpoint for submitting Suggest requests is domain-specific. You submit
// suggest requests to a domain's search endpoint. To get the search endpoint
// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
// action. A domain's endpoints are also displayed on the domain dashboard in
// the Amazon CloudSearch console.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch Domain's
// API operation Suggest for usage and error information.
//
// Returned Error Types:
// * SearchException
// Information about any problems encountered while processing a search request.
//
func (c *CloudSearchDomain) Suggest(input *SuggestInput) (*SuggestOutput, error) {
req, out := c.SuggestRequest(input)
return out, req.Send()
}
// SuggestWithContext is the same as Suggest with the addition of
// the ability to pass a context and additional request options.
//
// See Suggest for details on how to use this API operation.
//
// 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 *CloudSearchDomain) SuggestWithContext(ctx aws.Context, input *SuggestInput, opts ...request.Option) (*SuggestOutput, error) {
req, out := c.SuggestRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUploadDocuments = "UploadDocuments"
// UploadDocumentsRequest generates a "aws/request.Request" representing the
// client's request for the UploadDocuments operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UploadDocuments for more information on using the UploadDocuments
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UploadDocumentsRequest method.
// req, resp := client.UploadDocumentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
func (c *CloudSearchDomain) UploadDocumentsRequest(input *UploadDocumentsInput) (req *request.Request, output *UploadDocumentsOutput) {
op := &request.Operation{
Name: opUploadDocuments,
HTTPMethod: "POST",
HTTPPath: "/2013-01-01/documents/batch?format=sdk",
}
if input == nil {
input = &UploadDocumentsInput{}
}
output = &UploadDocumentsOutput{}
req = c.newRequest(op, input, output)
return
}
// UploadDocuments API operation for Amazon CloudSearch Domain.
//
// Posts a batch of documents to a search domain for indexing. A document batch
// is a collection of add and delete operations that represent the documents
// you want to add, update, or delete from your domain. Batches can be described
// in either JSON or XML. Each item that you want Amazon CloudSearch to return
// as a search result (such as a product) is represented as a document. Every
// document has a unique ID and one or more fields that contain the data that
// you want to search and return in results. Individual documents cannot contain
// more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best
// possible upload performance, group add and delete operations in batches that
// are close the 5 MB limit. Submitting a large volume of single-document batches
// can overload a domain's document service.
//
// The endpoint for submitting UploadDocuments requests is domain-specific.
// To get the document endpoint for your domain, use the Amazon CloudSearch
// configuration service DescribeDomains action. A domain's endpoints are also
// displayed on the domain dashboard in the Amazon CloudSearch console.
//
// For more information about formatting your data for Amazon CloudSearch, see
// Preparing Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html)
// in the Amazon CloudSearch Developer Guide. For more information about uploading
// data for indexing, see Uploading Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html)
// in the Amazon CloudSearch Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon CloudSearch Domain's
// API operation UploadDocuments for usage and error information.
//
// Returned Error Types:
// * DocumentServiceException
// Information about any problems encountered while processing an upload request.
//
func (c *CloudSearchDomain) UploadDocuments(input *UploadDocumentsInput) (*UploadDocumentsOutput, error) {
req, out := c.UploadDocumentsRequest(input)
return out, req.Send()
}
// UploadDocumentsWithContext is the same as UploadDocuments with the addition of
// the ability to pass a context and additional request options.
//
// See UploadDocuments for details on how to use this API operation.
//
// 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 *CloudSearchDomain) UploadDocumentsWithContext(ctx aws.Context, input *UploadDocumentsInput, opts ...request.Option) (*UploadDocumentsOutput, error) {
req, out := c.UploadDocumentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// A container for facet information.
type Bucket struct {
_ struct{} `type:"structure"`
// The number of hits that contain the facet value in the specified facet field.
Count *int64 `locationName:"count" type:"long"`
// The facet value being counted.
Value *string `locationName:"value" type:"string"`
}
// String returns the string representation
func (s Bucket) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Bucket) GoString() string {
return s.String()
}
// SetCount sets the Count field's value.
func (s *Bucket) SetCount(v int64) *Bucket {
s.Count = &v
return s
}
// SetValue sets the Value field's value.
func (s *Bucket) SetValue(v string) *Bucket {
s.Value = &v
return s
}
// A container for the calculated facet values and counts.
type BucketInfo struct {
_ struct{} `type:"structure"`
// A list of the calculated facet values and counts.
Buckets []*Bucket `locationName:"buckets" type:"list"`
}
// String returns the string representation
func (s BucketInfo) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BucketInfo) GoString() string {
return s.String()
}
// SetBuckets sets the Buckets field's value.
func (s *BucketInfo) SetBuckets(v []*Bucket) *BucketInfo {
s.Buckets = v
return s
}
// Information about any problems encountered while processing an upload request.
type DocumentServiceException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
// The description of the errors returned by the document service.
Message_ *string `locationName:"message" type:"string"`
// The return status of a document upload request, error or success.
Status *string `locationName:"status" type:"string"`
}
// String returns the string representation
func (s DocumentServiceException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DocumentServiceException) GoString() string {
return s.String()
}
func newErrorDocumentServiceException(v protocol.ResponseMetadata) error {
return &DocumentServiceException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *DocumentServiceException) Code() string {
return "DocumentServiceException"
}
// Message returns the exception's message.
func (s *DocumentServiceException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *DocumentServiceException) OrigErr() error {
return nil
}
func (s *DocumentServiceException) Error() string {
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
}
// Status code returns the HTTP status code for the request's response error.
func (s *DocumentServiceException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *DocumentServiceException) RequestID() string {
return s.RespMetadata.RequestID
}
// A warning returned by the document service when an issue is discovered while
// processing an upload request.
type DocumentServiceWarning struct {
_ struct{} `type:"structure"`
// The description for a warning returned by the document service.
Message *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s DocumentServiceWarning) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DocumentServiceWarning) GoString() string {
return s.String()
}
// SetMessage sets the Message field's value.
func (s *DocumentServiceWarning) SetMessage(v string) *DocumentServiceWarning {
s.Message = &v
return s
}
// The statistics for a field calculated in the request.
type FieldStats struct {
_ struct{} `type:"structure"`
// The number of documents that contain a value in the specified field in the
// result set.
Count *int64 `locationName:"count" type:"long"`
// The maximum value found in the specified field in the result set.
//
// If the field is numeric (int, int-array, double, or double-array), max is
// the string representation of a double-precision 64-bit floating point value.
// If the field is date or date-array, max is the string representation of a
// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
// yyyy-mm-ddTHH:mm:ss.SSSZ.
Max *string `locationName:"max" type:"string"`
// The average of the values found in the specified field in the result set.
//
// If the field is numeric (int, int-array, double, or double-array), mean is
// the string representation of a double-precision 64-bit floating point value.
// If the field is date or date-array, mean is the string representation of
// a date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
// yyyy-mm-ddTHH:mm:ss.SSSZ.
Mean *string `locationName:"mean" type:"string"`
// The minimum value found in the specified field in the result set.
//
// If the field is numeric (int, int-array, double, or double-array), min is
// the string representation of a double-precision 64-bit floating point value.
// If the field is date or date-array, min is the string representation of a
// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
// yyyy-mm-ddTHH:mm:ss.SSSZ.
Min *string `locationName:"min" type:"string"`
// The number of documents that do not contain a value in the specified field
// in the result set.
Missing *int64 `locationName:"missing" type:"long"`
// The standard deviation of the values in the specified field in the result
// set.
Stddev *float64 `locationName:"stddev" type:"double"`
// The sum of the field values across the documents in the result set. null
// for date fields.
Sum *float64 `locationName:"sum" type:"double"`
// The sum of all field values in the result set squared.
SumOfSquares *float64 `locationName:"sumOfSquares" type:"double"`
}
// String returns the string representation
func (s FieldStats) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s FieldStats) GoString() string {
return s.String()
}
// SetCount sets the Count field's value.
func (s *FieldStats) SetCount(v int64) *FieldStats {
s.Count = &v
return s
}
// SetMax sets the Max field's value.
func (s *FieldStats) SetMax(v string) *FieldStats {
s.Max = &v
return s
}
// SetMean sets the Mean field's value.
func (s *FieldStats) SetMean(v string) *FieldStats {
s.Mean = &v
return s
}
// SetMin sets the Min field's value.
func (s *FieldStats) SetMin(v string) *FieldStats {
s.Min = &v
return s
}
// SetMissing sets the Missing field's value.
func (s *FieldStats) SetMissing(v int64) *FieldStats {
s.Missing = &v
return s
}
// SetStddev sets the Stddev field's value.
func (s *FieldStats) SetStddev(v float64) *FieldStats {
s.Stddev = &v
return s
}
// SetSum sets the Sum field's value.
func (s *FieldStats) SetSum(v float64) *FieldStats {
s.Sum = &v
return s
}
// SetSumOfSquares sets the SumOfSquares field's value.
func (s *FieldStats) SetSumOfSquares(v float64) *FieldStats {
s.SumOfSquares = &v
return s
}
// Information about a document that matches the search request.
type Hit struct {
_ struct{} `type:"structure"`
// The expressions returned from a document that matches the search request.
Exprs map[string]*string `locationName:"exprs" type:"map"`
// The fields returned from a document that matches the search request.
Fields map[string][]*string `locationName:"fields" type:"map"`
// The highlights returned from a document that matches the search request.
Highlights map[string]*string `locationName:"highlights" type:"map"`
// The document ID of a document that matches the search request.
Id *string `locationName:"id" type:"string"`
}
// String returns the string representation
func (s Hit) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Hit) GoString() string {
return s.String()
}
// SetExprs sets the Exprs field's value.
func (s *Hit) SetExprs(v map[string]*string) *Hit {
s.Exprs = v
return s
}
// SetFields sets the Fields field's value.
func (s *Hit) SetFields(v map[string][]*string) *Hit {
s.Fields = v
return s
}
// SetHighlights sets the Highlights field's value.
func (s *Hit) SetHighlights(v map[string]*string) *Hit {
s.Highlights = v
return s
}
// SetId sets the Id field's value.
func (s *Hit) SetId(v string) *Hit {
s.Id = &v
return s
}
// The collection of documents that match the search request.
type Hits struct {
_ struct{} `type:"structure"`
// A cursor that can be used to retrieve the next set of matching documents
// when you want to page through a large result set.
Cursor *string `locationName:"cursor" type:"string"`
// The total number of documents that match the search request.
Found *int64 `locationName:"found" type:"long"`
// A document that matches the search request.
Hit []*Hit `locationName:"hit" type:"list"`
// The index of the first matching document.
Start *int64 `locationName:"start" type:"long"`
}
// String returns the string representation
func (s Hits) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Hits) GoString() string {
return s.String()
}
// SetCursor sets the Cursor field's value.
func (s *Hits) SetCursor(v string) *Hits {
s.Cursor = &v
return s
}
// SetFound sets the Found field's value.
func (s *Hits) SetFound(v int64) *Hits {
s.Found = &v
return s
}
// SetHit sets the Hit field's value.
func (s *Hits) SetHit(v []*Hit) *Hits {
s.Hit = v
return s
}
// SetStart sets the Start field's value.
func (s *Hits) SetStart(v int64) *Hits {
s.Start = &v
return s
}
// Information about any problems encountered while processing a search request.
type SearchException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
// A description of the error returned by the search service.
Message_ *string `locationName:"message" type:"string"`
}
// String returns the string representation
func (s SearchException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchException) GoString() string {
return s.String()
}
func newErrorSearchException(v protocol.ResponseMetadata) error {
return &SearchException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *SearchException) Code() string {
return "SearchException"
}
// Message returns the exception's message.
func (s *SearchException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *SearchException) OrigErr() error {
return nil
}
func (s *SearchException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *SearchException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *SearchException) RequestID() string {
return s.RespMetadata.RequestID
}
// Container for the parameters to the Search request.
type SearchInput struct {
_ struct{} `type:"structure"`
// Retrieves a cursor value you can use to page through large result sets. Use
// the size parameter to control the number of hits to include in each response.
// You can specify either the cursor or start parameter in a request; they are
// mutually exclusive. To get the first cursor, set the cursor value to initial.
// In subsequent requests, specify the cursor value returned in the hits section
// of the response.
//
// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
// in the Amazon CloudSearch Developer Guide.
Cursor *string `location:"querystring" locationName:"cursor" type:"string"`
// Defines one or more numeric expressions that can be used to sort results
// or specify search or filter criteria. You can also specify expressions as
// return fields.
//
// You specify the expressions in JSON using the form {"EXPRESSIONNAME":"EXPRESSION"}.
// You can define and use multiple expressions in a search request. For example:
//
// {"expression1":"_score*rating", "expression2":"(1/rank)*year"}
//
// For information about the variables, operators, and functions you can use
// in expressions, see Writing Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions)
// in the Amazon CloudSearch Developer Guide.
Expr *string `location:"querystring" locationName:"expr" type:"string"`
// Specifies one or more fields for which to get facet information, and options
// that control how the facet information is returned. Each specified field
// must be facet-enabled in the domain configuration. The fields and options
// are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
//
// You can specify the following faceting options:
//
// * buckets specifies an array of the facet values or ranges to count. Ranges
// are specified using the same syntax that you use to search for a range
// of values. For more information, see Searching for a Range of Values (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html)
// in the Amazon CloudSearch Developer Guide. Buckets are returned in the
// order they are specified in the request. The sort and size options are
// not valid if you specify buckets.
//
// * size specifies the maximum number of facets to include in the results.
// By default, Amazon CloudSearch returns counts for the top 10. The size
// parameter is only valid when you specify the sort option; it cannot be
// used in conjunction with buckets.
//
// * sort specifies how you want to sort the facets in the results: bucket
// or count. Specify bucket to sort alphabetically or numerically by facet
// value (in ascending order). Specify count to sort by the facet counts
// computed for each facet value (in descending order). To retrieve facet
// counts for particular values or ranges of values, use the buckets option
// instead of sort.
//
// If no facet options are specified, facet counts are computed for all field
// values, the facets are sorted by facet count, and the top 10 facets are returned
// in the results.
//
// To count particular buckets of values, use the buckets option. For example,
// the following request uses the buckets option to calculate and return facet
// counts by decade.
//
// {"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}}
//
// To sort facets by facet count, use the count option. For example, the following
// request sets the sort option to count to sort the facet values by facet count,
// with the facet values that have the most matching documents listed first.
// Setting the size option to 3 returns only the top three facet values.
//
// {"year":{"sort":"count","size":3}}
//
// To sort the facets by value, use the bucket option. For example, the following
// request sets the sort option to bucket to sort the facet values numerically
// by year, with earliest year listed first.
//
// {"year":{"sort":"bucket"}}
//
// For more information, see Getting and Using Facet Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html)
// in the Amazon CloudSearch Developer Guide.
Facet *string `location:"querystring" locationName:"facet" type:"string"`
// Specifies a structured query that filters the results of a search without
// affecting how the results are scored and sorted. You use filterQuery in conjunction
// with the query parameter to filter the documents that match the constraints
// specified in the query parameter. Specifying a filter controls only which
// matching documents are included in the results, it has no effect on how they
// are scored and sorted. The filterQuery parameter supports the full structured
// query syntax.
//
// For more information about using filters, see Filtering Matching Documents
// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html)
// in the Amazon CloudSearch Developer Guide.
FilterQuery *string `location:"querystring" locationName:"fq" type:"string"`
// Retrieves highlights for matches in the specified text or text-array fields.
// Each specified field must be highlight enabled in the domain configuration.
// The fields and options are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
//
// You can specify the following highlight options:
//
// * format: specifies the format of the data in the text field: text or
// html. When data is returned as HTML, all non-alphanumeric characters are
// encoded. The default is html.
//
// * max_phrases: specifies the maximum number of occurrences of the search
// term(s) you want to highlight. By default, the first occurrence is highlighted.
//
// * pre_tag: specifies the string to prepend to an occurrence of a search
// term. The default for HTML highlights is <em>. The default for text
// highlights is *.
//
// * post_tag: specifies the string to append to an occurrence of a search
// term. The default for HTML highlights is </em>. The default for
// text highlights is *.
//
// If no highlight options are specified for a field, the returned field text
// is treated as HTML and the first match is highlighted with emphasis tags:
// <em>search-term</em>.
//
// For example, the following request retrieves highlights for the actors and
// title fields.
//
// { "actors": {}, "title": {"format": "text","max_phrases": 2,"pre_tag": "","post_tag":
// ""} }
Highlight *string `location:"querystring" locationName:"highlight" type:"string"`
// Enables partial results to be returned if one or more index partitions are
// unavailable. When your search index is partitioned across multiple search
// instances, by default Amazon CloudSearch only returns results if every partition
// can be queried. This means that the failure of a single search instance can
// result in 5xx (internal server) errors. When you enable partial results,
// Amazon CloudSearch returns whatever results are available and includes the
// percentage of documents searched in the search results (percent-searched).
// This enables you to more gracefully degrade your users' search experience.
// For example, rather than displaying no results, you could display the partial
// results and a message indicating that the results might be incomplete due
// to a temporary system outage.
Partial *bool `location:"querystring" locationName:"partial" type:"boolean"`
// Specifies the search criteria for the request. How you specify the search
// criteria depends on the query parser used for the request and the parser
// options specified in the queryOptions parameter. By default, the simple query
// parser is used to process requests. To use the structured, lucene, or dismax
// query parser, you must also specify the queryParser parameter.
//
// For more information about specifying search criteria, see Searching Your
// Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
// in the Amazon CloudSearch Developer Guide.
//
// Query is a required field
Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
// Configures options for the query parser specified in the queryParser parameter.
// You specify the options in JSON using the following form {"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"}.
//
// The options you can configure vary according to which parser you use:
//
// * defaultOperator: The default operator used to combine individual terms
// in the search string. For example: defaultOperator: 'or'. For the dismax
// parser, you specify a percentage that represents the percentage of terms
// in the search string (rounded down) that must match, rather than a default
// operator. A value of 0% is the equivalent to OR, and a value of 100% is
// equivalent to AND. The percentage must be specified as a value in the
// range 0-100 followed by the percent (%) symbol. For example, defaultOperator:
// 50%. Valid values: and, or, a percentage in the range 0%-100% (dismax).
// Default: and (simple, structured, lucene) or 100 (dismax). Valid for:
// simple, structured, lucene, and dismax.
//
// * fields: An array of the fields to search when no fields are specified
// in a search. If no fields are specified in a search and this option is
// not specified, all text and text-array fields are searched. You can specify
// a weight for each field to control the relative importance of each field
// when Amazon CloudSearch calculates relevance scores. To specify a field
// weight, append a caret (^) symbol and the weight to the field name. For
// example, to boost the importance of the title field over the description
// field you could specify: "fields":["title^5","description"]. Valid values:
// The name of any configured field and an optional numeric value greater
// than zero. Default: All text and text-array fields. Valid for: simple,
// structured, lucene, and dismax.
//
// * operators: An array of the operators or special characters you want
// to disable for the simple query parser. If you disable the and, or, or
// not operators, the corresponding operators (+, |, -) have no special meaning
// and are dropped from the search string. Similarly, disabling prefix disables
// the wildcard operator (*) and disabling phrase disables the ability to
// search for phrases by enclosing phrases in double quotes. Disabling precedence
// disables the ability to control order of precedence using parentheses.
// Disabling near disables the ability to use the ~ operator to perform a
// sloppy phrase search. Disabling the fuzzy operator disables the ability
// to use the ~ operator to perform a fuzzy search. escape disables the ability
// to use a backslash (\) to escape special characters within the search
// string. Disabling whitespace is an advanced option that prevents the parser
// from tokenizing on whitespace, which can be useful for Vietnamese. (It
// prevents Vietnamese words from being split incorrectly.) For example,
// you could disable all operators other than the phrase operator to support
// just simple term and phrase queries: "operators":["and","not","or", "prefix"].
// Valid values: and, escape, fuzzy, near, not, or, phrase, precedence, prefix,
// whitespace. Default: All operators and special characters are enabled.
// Valid for: simple.
//
// * phraseFields: An array of the text or text-array fields you want to
// use for phrase searches. When the terms in the search string appear in
// close proximity within a field, the field scores higher. You can specify
// a weight for each field to boost that score. The phraseSlop option controls
// how much the matches can deviate from the search string and still be boosted.
// To specify a field weight, append a caret (^) symbol and the weight to
// the field name. For example, to boost phrase matches in the title field
// over the abstract field, you could specify: "phraseFields":["title^3",
// "plot"] Valid values: The name of any text or text-array field and an
// optional numeric value greater than zero. Default: No fields. If you don't
// specify any fields with phraseFields, proximity scoring is disabled even
// if phraseSlop is specified. Valid for: dismax.
//
// * phraseSlop: An integer value that specifies how much matches can deviate
// from the search phrase and still be boosted according to the weights specified
// in the phraseFields option; for example, phraseSlop: 2. You must also
// specify phraseFields to enable proximity scoring. Valid values: positive
// integers. Default: 0. Valid for: dismax.
//
// * explicitPhraseSlop: An integer value that specifies how much a match
// can deviate from the search phrase when the phrase is enclosed in double
// quotes in the search string. (Phrases that exceed this proximity distance
// are not considered a match.) For example, to specify a slop of three for
// dismax phrase queries, you would specify "explicitPhraseSlop":3. Valid
// values: positive integers. Default: 0. Valid for: dismax.
//
// * tieBreaker: When a term in the search string is found in a document's
// field, a score is calculated for that field based on how common the word
// is in that field compared to other documents. If the term occurs in multiple
// fields within a document, by default only the highest scoring field contributes
// to the document's overall score. You can specify a tieBreaker value to
// enable the matches in lower-scoring fields to contribute to the document's
// score. That way, if two documents have the same max field score for a
// particular term, the score for the document that has matches in more fields
// will be higher. The formula for calculating the score with a tieBreaker
// is (max field score) + (tieBreaker) * (sum of the scores for the rest
// of the matching fields). Set tieBreaker to 0 to disregard all but the
// highest scoring field (pure max): "tieBreaker":0. Set to 1 to sum the
// scores from all fields (pure sum): "tieBreaker":1. Valid values: 0.0 to
// 1.0. Default: 0.0. Valid for: dismax.
QueryOptions *string `location:"querystring" locationName:"q.options" type:"string"`
// Specifies which query parser to use to process the request. If queryParser
// is not specified, Amazon CloudSearch uses the simple query parser.
//
// Amazon CloudSearch supports four query parsers:
//
// * simple: perform simple searches of text and text-array fields. By default,
// the simple query parser searches all text and text-array fields. You can
// specify which fields to search by with the queryOptions parameter. If
// you prefix a search term with a plus sign (+) documents must contain the
// term to be considered a match. (This is the default, unless you configure
// the default operator with the queryOptions parameter.) You can use the
// - (NOT), | (OR), and * (wildcard) operators to exclude particular terms,
// find results that match any of the specified terms, or search for a prefix.
// To search for a phrase rather than individual terms, enclose the phrase
// in double quotes. For more information, see Searching for Text in the
// Amazon CloudSearch Developer Guide.
//
// * structured: perform advanced searches by combining multiple expressions
// to define the search criteria. You can also search within particular fields,
// search for values and ranges of values, and use advanced options such
// as term boosting, matchall, and near. For more information, see Constructing
// Compound Queries in the Amazon CloudSearch Developer Guide.
//
// * lucene: search using the Apache Lucene query parser syntax. For more
// information, see Apache Lucene Query Parser Syntax.
//
// * dismax: search using the simplified subset of the Apache Lucene query
// parser syntax defined by the DisMax query parser. For more information,
// see DisMax Query Parser Syntax.
QueryParser *string `location:"querystring" locationName:"q.parser" type:"string" enum:"QueryParser"`
// Specifies the field and expression values to include in the response. Multiple
// fields or expressions are specified as a comma-separated list. By default,
// a search response includes all return enabled fields (_all_fields). To return
// only the document IDs for the matching documents, specify _no_fields. To
// retrieve the relevance score calculated for each document, specify _score.
Return *string `location:"querystring" locationName:"return" type:"string"`
// Specifies the maximum number of search hits to include in the response.
Size *int64 `location:"querystring" locationName:"size" type:"long"`
// Specifies the fields or custom expressions to use to sort the search results.
// Multiple fields or expressions are specified as a comma-separated list. You
// must specify the sort direction (asc or desc) for each field; for example,
// year desc,title asc. To use a field to sort results, the field must be sort-enabled
// in the domain configuration. Array type fields cannot be used for sorting.
// If no sort parameter is specified, results are sorted by their default relevance
// scores in descending order: _score desc. You can also sort by document ID
// (_id asc) and version (_version desc).
//
// For more information, see Sorting Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html)
// in the Amazon CloudSearch Developer Guide.
Sort *string `location:"querystring" locationName:"sort" type:"string"`
// Specifies the offset of the first search hit you want to return. Note that
// the result set is zero-based; the first result is at index 0. You can specify
// either the start or cursor parameter in a request, they are mutually exclusive.
//
// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
// in the Amazon CloudSearch Developer Guide.
Start *int64 `location:"querystring" locationName:"start" type:"long"`
// Specifies one or more fields for which to get statistics information. Each
// specified field must be facet-enabled in the domain configuration. The fields
// are specified in JSON using the form:
//
// {"FIELD-A":{},"FIELD-B":{}}
//
// There are currently no options supported for statistics.
Stats *string `location:"querystring" locationName:"stats" type:"string"`
}
// String returns the string representation
func (s SearchInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *SearchInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SearchInput"}
if s.Query == nil {
invalidParams.Add(request.NewErrParamRequired("Query"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCursor sets the Cursor field's value.
func (s *SearchInput) SetCursor(v string) *SearchInput {
s.Cursor = &v
return s
}
// SetExpr sets the Expr field's value.
func (s *SearchInput) SetExpr(v string) *SearchInput {
s.Expr = &v
return s
}
// SetFacet sets the Facet field's value.
func (s *SearchInput) SetFacet(v string) *SearchInput {
s.Facet = &v
return s
}
// SetFilterQuery sets the FilterQuery field's value.
func (s *SearchInput) SetFilterQuery(v string) *SearchInput {
s.FilterQuery = &v
return s
}
// SetHighlight sets the Highlight field's value.
func (s *SearchInput) SetHighlight(v string) *SearchInput {
s.Highlight = &v
return s
}
// SetPartial sets the Partial field's value.
func (s *SearchInput) SetPartial(v bool) *SearchInput {
s.Partial = &v
return s
}
// SetQuery sets the Query field's value.
func (s *SearchInput) SetQuery(v string) *SearchInput {
s.Query = &v
return s
}
// SetQueryOptions sets the QueryOptions field's value.
func (s *SearchInput) SetQueryOptions(v string) *SearchInput {
s.QueryOptions = &v
return s
}
// SetQueryParser sets the QueryParser field's value.
func (s *SearchInput) SetQueryParser(v string) *SearchInput {
s.QueryParser = &v
return s
}
// SetReturn sets the Return field's value.
func (s *SearchInput) SetReturn(v string) *SearchInput {
s.Return = &v
return s
}
// SetSize sets the Size field's value.
func (s *SearchInput) SetSize(v int64) *SearchInput {
s.Size = &v
return s
}
// SetSort sets the Sort field's value.
func (s *SearchInput) SetSort(v string) *SearchInput {
s.Sort = &v
return s
}
// SetStart sets the Start field's value.
func (s *SearchInput) SetStart(v int64) *SearchInput {
s.Start = &v
return s
}
// SetStats sets the Stats field's value.
func (s *SearchInput) SetStats(v string) *SearchInput {
s.Stats = &v
return s
}
// The result of a Search request. Contains the documents that match the specified
// search criteria and any requested fields, highlights, and facet information.
type SearchOutput struct {
_ struct{} `type:"structure"`
// The requested facet information.
Facets map[string]*BucketInfo `locationName:"facets" type:"map"`
// The documents that match the search criteria.
Hits *Hits `locationName:"hits" type:"structure"`
// The requested field statistics information.
Stats map[string]*FieldStats `locationName:"stats" type:"map"`
// The status information returned for the search request.
Status *SearchStatus `locationName:"status" type:"structure"`
}
// String returns the string representation
func (s SearchOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchOutput) GoString() string {
return s.String()
}
// SetFacets sets the Facets field's value.
func (s *SearchOutput) SetFacets(v map[string]*BucketInfo) *SearchOutput {
s.Facets = v
return s
}
// SetHits sets the Hits field's value.
func (s *SearchOutput) SetHits(v *Hits) *SearchOutput {
s.Hits = v
return s
}
// SetStats sets the Stats field's value.
func (s *SearchOutput) SetStats(v map[string]*FieldStats) *SearchOutput {
s.Stats = v
return s
}
// SetStatus sets the Status field's value.
func (s *SearchOutput) SetStatus(v *SearchStatus) *SearchOutput {
s.Status = v
return s
}
// Contains the resource id (rid) and the time it took to process the request
// (timems).
type SearchStatus struct {
_ struct{} `type:"structure"`
// The encrypted resource ID for the request.
Rid *string `locationName:"rid" type:"string"`
// How long it took to process the request, in milliseconds.
Timems *int64 `locationName:"timems" type:"long"`
}
// String returns the string representation
func (s SearchStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchStatus) GoString() string {
return s.String()
}
// SetRid sets the Rid field's value.
func (s *SearchStatus) SetRid(v string) *SearchStatus {
s.Rid = &v
return s
}
// SetTimems sets the Timems field's value.
func (s *SearchStatus) SetTimems(v int64) *SearchStatus {
s.Timems = &v
return s
}
// Container for the parameters to the Suggest request.
type SuggestInput struct {
_ struct{} `type:"structure"`
// Specifies the string for which you want to get suggestions.
//
// Query is a required field
Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
// Specifies the maximum number of suggestions to return.
Size *int64 `location:"querystring" locationName:"size" type:"long"`
// Specifies the name of the suggester to use to find suggested matches.
//
// Suggester is a required field
Suggester *string `location:"querystring" locationName:"suggester" type:"string" required:"true"`
}
// String returns the string representation
func (s SuggestInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggestInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *SuggestInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SuggestInput"}
if s.Query == nil {
invalidParams.Add(request.NewErrParamRequired("Query"))
}
if s.Suggester == nil {
invalidParams.Add(request.NewErrParamRequired("Suggester"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetQuery sets the Query field's value.
func (s *SuggestInput) SetQuery(v string) *SuggestInput {
s.Query = &v
return s
}
// SetSize sets the Size field's value.
func (s *SuggestInput) SetSize(v int64) *SuggestInput {
s.Size = &v
return s
}
// SetSuggester sets the Suggester field's value.
func (s *SuggestInput) SetSuggester(v string) *SuggestInput {
s.Suggester = &v
return s
}
// Container for the suggestion information returned in a SuggestResponse.
type SuggestModel struct {
_ struct{} `type:"structure"`
// The number of documents that were found to match the query string.
Found *int64 `locationName:"found" type:"long"`
// The query string specified in the suggest request.
Query *string `locationName:"query" type:"string"`
// The documents that match the query string.
Suggestions []*SuggestionMatch `locationName:"suggestions" type:"list"`
}
// String returns the string representation
func (s SuggestModel) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggestModel) GoString() string {
return s.String()
}
// SetFound sets the Found field's value.
func (s *SuggestModel) SetFound(v int64) *SuggestModel {
s.Found = &v
return s
}
// SetQuery sets the Query field's value.
func (s *SuggestModel) SetQuery(v string) *SuggestModel {
s.Query = &v
return s
}
// SetSuggestions sets the Suggestions field's value.
func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel {
s.Suggestions = v
return s
}
// Contains the response to a Suggest request.
type SuggestOutput struct {
_ struct{} `type:"structure"`
// The status of a SuggestRequest. Contains the resource ID (rid) and how long
// it took to process the request (timems).
Status *SuggestStatus `locationName:"status" type:"structure"`
// Container for the matching search suggestion information.
Suggest *SuggestModel `locationName:"suggest" type:"structure"`
}
// String returns the string representation
func (s SuggestOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggestOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *SuggestOutput) SetStatus(v *SuggestStatus) *SuggestOutput {
s.Status = v
return s
}
// SetSuggest sets the Suggest field's value.
func (s *SuggestOutput) SetSuggest(v *SuggestModel) *SuggestOutput {
s.Suggest = v
return s
}
// Contains the resource id (rid) and the time it took to process the request
// (timems).
type SuggestStatus struct {
_ struct{} `type:"structure"`
// The encrypted resource ID for the request.
Rid *string `locationName:"rid" type:"string"`
// How long it took to process the request, in milliseconds.
Timems *int64 `locationName:"timems" type:"long"`
}
// String returns the string representation
func (s SuggestStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggestStatus) GoString() string {
return s.String()
}
// SetRid sets the Rid field's value.
func (s *SuggestStatus) SetRid(v string) *SuggestStatus {
s.Rid = &v
return s
}
// SetTimems sets the Timems field's value.
func (s *SuggestStatus) SetTimems(v int64) *SuggestStatus {
s.Timems = &v
return s
}
// An autocomplete suggestion that matches the query string specified in a SuggestRequest.
type SuggestionMatch struct {
_ struct{} `type:"structure"`
// The document ID of the suggested document.
Id *string `locationName:"id" type:"string"`
// The relevance score of a suggested match.
Score *int64 `locationName:"score" type:"long"`
// The string that matches the query string specified in the SuggestRequest.
Suggestion *string `locationName:"suggestion" type:"string"`
}
// String returns the string representation
func (s SuggestionMatch) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SuggestionMatch) GoString() string {
return s.String()
}
// SetId sets the Id field's value.
func (s *SuggestionMatch) SetId(v string) *SuggestionMatch {
s.Id = &v
return s
}
// SetScore sets the Score field's value.
func (s *SuggestionMatch) SetScore(v int64) *SuggestionMatch {
s.Score = &v
return s
}
// SetSuggestion sets the Suggestion field's value.
func (s *SuggestionMatch) SetSuggestion(v string) *SuggestionMatch {
s.Suggestion = &v
return s
}
// Container for the parameters to the UploadDocuments request.
type UploadDocumentsInput struct {
_ struct{} `type:"structure" payload:"Documents"`
// The format of the batch you are uploading. Amazon CloudSearch supports two
// document batch formats:
//
// * application/json
//
// * application/xml
//
// ContentType is a required field
ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true" enum:"ContentType"`
// A batch of documents formatted in JSON or HTML.
//
// Documents is a required field
Documents io.ReadSeeker `locationName:"documents" type:"blob" required:"true"`
}
// String returns the string representation
func (s UploadDocumentsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UploadDocumentsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UploadDocumentsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UploadDocumentsInput"}
if s.ContentType == nil {
invalidParams.Add(request.NewErrParamRequired("ContentType"))
}
if s.Documents == nil {
invalidParams.Add(request.NewErrParamRequired("Documents"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetContentType sets the ContentType field's value.
func (s *UploadDocumentsInput) SetContentType(v string) *UploadDocumentsInput {
s.ContentType = &v
return s
}
// SetDocuments sets the Documents field's value.
func (s *UploadDocumentsInput) SetDocuments(v io.ReadSeeker) *UploadDocumentsInput {
s.Documents = v
return s
}
// Contains the response to an UploadDocuments request.
type UploadDocumentsOutput struct {
_ struct{} `type:"structure"`
// The number of documents that were added to the search domain.
Adds *int64 `locationName:"adds" type:"long"`
// The number of documents that were deleted from the search domain.
Deletes *int64 `locationName:"deletes" type:"long"`
// The status of an UploadDocumentsRequest.
Status *string `locationName:"status" type:"string"`
// Any warnings returned by the document service about the documents being uploaded.
Warnings []*DocumentServiceWarning `locationName:"warnings" type:"list"`
}
// String returns the string representation
func (s UploadDocumentsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UploadDocumentsOutput) GoString() string {
return s.String()
}
// SetAdds sets the Adds field's value.
func (s *UploadDocumentsOutput) SetAdds(v int64) *UploadDocumentsOutput {
s.Adds = &v
return s
}
// SetDeletes sets the Deletes field's value.
func (s *UploadDocumentsOutput) SetDeletes(v int64) *UploadDocumentsOutput {
s.Deletes = &v
return s
}
// SetStatus sets the Status field's value.
func (s *UploadDocumentsOutput) SetStatus(v string) *UploadDocumentsOutput {
s.Status = &v
return s
}
// SetWarnings sets the Warnings field's value.
func (s *UploadDocumentsOutput) SetWarnings(v []*DocumentServiceWarning) *UploadDocumentsOutput {
s.Warnings = v
return s
}
const (
// ContentTypeApplicationJson is a ContentType enum value
ContentTypeApplicationJson = "application/json"
// ContentTypeApplicationXml is a ContentType enum value
ContentTypeApplicationXml = "application/xml"
)
// ContentType_Values returns all elements of the ContentType enum
func ContentType_Values() []string {
return []string{
ContentTypeApplicationJson,
ContentTypeApplicationXml,
}
}
const (
// QueryParserSimple is a QueryParser enum value
QueryParserSimple = "simple"
// QueryParserStructured is a QueryParser enum value
QueryParserStructured = "structured"
// QueryParserLucene is a QueryParser enum value
QueryParserLucene = "lucene"
// QueryParserDismax is a QueryParser enum value
QueryParserDismax = "dismax"
)
// QueryParser_Values returns all elements of the QueryParser enum
func QueryParser_Values() []string {
return []string{
QueryParserSimple,
QueryParserStructured,
QueryParserLucene,
QueryParserDismax,
}
}
| 1,585 |
session-manager-plugin | aws | Go | package cloudsearchdomain_test
import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
)
func TestRequireEndpointIfRegionProvided(t *testing.T) {
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
Region: aws.String("mock-region"),
DisableParamValidation: aws.Bool(true),
})
req, _ := svc.SearchRequest(nil)
err := req.Build()
if e, a := "", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err == nil {
t.Errorf("expect error, got none")
}
if e, a := aws.ErrMissingEndpoint, err; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
DisableParamValidation: aws.Bool(true),
})
req, _ := svc.SearchRequest(nil)
err := req.Build()
if e, a := "", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err == nil {
t.Errorf("expect error, got none")
}
if e, a := aws.ErrMissingEndpoint, err; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestRequireEndpointUsed(t *testing.T) {
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
Region: aws.String("mock-region"),
DisableParamValidation: aws.Bool(true),
Endpoint: aws.String("https://endpoint"),
})
req, _ := svc.SearchRequest(nil)
err := req.Build()
if e, a := "https://endpoint", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
| 64 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudsearchdomain provides the client and types for making API
// requests to Amazon CloudSearch Domain.
//
// You use the AmazonCloudSearch2013 API to upload documents to a search domain
// and search those documents.
//
// The endpoints for submitting UploadDocuments, Search, and Suggest requests
// are domain-specific. To get the endpoints for your domain, use the Amazon
// CloudSearch configuration service DescribeDomains action. The domain endpoints
// are also displayed on the domain dashboard in the Amazon CloudSearch console.
// You submit suggest requests to the search endpoint.
//
// For more information, see the Amazon CloudSearch Developer Guide (http://docs.aws.amazon.com/cloudsearch/latest/developerguide).
//
// See cloudsearchdomain package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/
//
// Using the Client
//
// To contact Amazon CloudSearch Domain 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 CloudSearch Domain client CloudSearchDomain for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/#New
package cloudsearchdomain
| 36 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearchdomain
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeDocumentServiceException for service response error code
// "DocumentServiceException".
//
// Information about any problems encountered while processing an upload request.
ErrCodeDocumentServiceException = "DocumentServiceException"
// ErrCodeSearchException for service response error code
// "SearchException".
//
// Information about any problems encountered while processing a search request.
ErrCodeSearchException = "SearchException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"DocumentServiceException": newErrorDocumentServiceException,
"SearchException": newErrorSearchException,
}
| 28 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudsearchdomain
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"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// CloudSearchDomain provides the API operation methods for making requests to
// Amazon CloudSearch Domain. See this package's package overview docs
// for details on the service.
//
// CloudSearchDomain methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CloudSearchDomain 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 = "cloudsearchdomain" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CloudSearch Domain" // ServiceID is a unique identifier of a specific service.
)
// New creates a new instance of the CloudSearchDomain 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:
// mySession := session.Must(session.NewSession())
//
// // Create a CloudSearchDomain client from just a session.
// svc := cloudsearchdomain.New(mySession)
//
// // Create a CloudSearchDomain client with additional configuration
// svc := cloudsearchdomain.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearchDomain {
var c client.Config
if v, ok := p.(client.ConfigNoResolveEndpointProvider); ok {
c = v.ClientConfigNoResolveEndpoint(cfgs...)
} else {
c = p.ClientConfig(EndpointsID, cfgs...)
}
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "cloudsearch"
}
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudSearchDomain {
svc := &CloudSearchDomain{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
PartitionID: partitionID,
Endpoint: endpoint,
APIVersion: "2013-01-01",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(
protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CloudSearchDomain operation and runs any
// custom request initialization.
func (c *CloudSearchDomain) 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
}
| 110 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudsearchdomainiface provides an interface to enable mocking the Amazon CloudSearch Domain 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 cloudsearchdomainiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
)
// CloudSearchDomainAPI provides an interface to enable mocking the
// cloudsearchdomain.CloudSearchDomain 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 CloudSearch Domain.
// func myFunc(svc cloudsearchdomainiface.CloudSearchDomainAPI) bool {
// // Make svc.Search request
// }
//
// func main() {
// sess := session.New()
// svc := cloudsearchdomain.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloudSearchDomainClient struct {
// cloudsearchdomainiface.CloudSearchDomainAPI
// }
// func (m *mockCloudSearchDomainClient) Search(input *cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloudSearchDomainClient{}
//
// 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 CloudSearchDomainAPI interface {
Search(*cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error)
SearchWithContext(aws.Context, *cloudsearchdomain.SearchInput, ...request.Option) (*cloudsearchdomain.SearchOutput, error)
SearchRequest(*cloudsearchdomain.SearchInput) (*request.Request, *cloudsearchdomain.SearchOutput)
Suggest(*cloudsearchdomain.SuggestInput) (*cloudsearchdomain.SuggestOutput, error)
SuggestWithContext(aws.Context, *cloudsearchdomain.SuggestInput, ...request.Option) (*cloudsearchdomain.SuggestOutput, error)
SuggestRequest(*cloudsearchdomain.SuggestInput) (*request.Request, *cloudsearchdomain.SuggestOutput)
UploadDocuments(*cloudsearchdomain.UploadDocumentsInput) (*cloudsearchdomain.UploadDocumentsOutput, error)
UploadDocumentsWithContext(aws.Context, *cloudsearchdomain.UploadDocumentsInput, ...request.Option) (*cloudsearchdomain.UploadDocumentsOutput, error)
UploadDocumentsRequest(*cloudsearchdomain.UploadDocumentsInput) (*request.Request, *cloudsearchdomain.UploadDocumentsOutput)
}
var _ CloudSearchDomainAPI = (*cloudsearchdomain.CloudSearchDomain)(nil)
| 77 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloudtrail provides the client and types for making API
// requests to AWS CloudTrail.
//
// This is the CloudTrail API Reference. It provides descriptions of actions,
// data types, common parameters, and common errors for CloudTrail.
//
// CloudTrail is a web service that records AWS API calls for your AWS account
// and delivers log files to an Amazon S3 bucket. The recorded information includes
// the identity of the user, the start time of the AWS API call, the source
// IP address, the request parameters, and the response elements returned by
// the service.
//
// As an alternative to the API, you can use one of the AWS SDKs, which consist
// of libraries and sample code for various programming languages and platforms
// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way
// to create programmatic access to AWSCloudTrail. For example, the SDKs take
// care of cryptographically signing requests, managing errors, and retrying
// requests automatically. For information about the AWS SDKs, including how
// to download and install them, see the Tools for Amazon Web Services page
// (http://aws.amazon.com/tools/).
//
// See the AWS CloudTrail User Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)
// for information about the data that is included with each AWS API call listed
// in the log files.
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01 for more information on this service.
//
// See cloudtrail package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/
//
// Using the Client
//
// To contact AWS CloudTrail 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 AWS CloudTrail client CloudTrail for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/#New
package cloudtrail
| 49 |
session-manager-plugin | aws | Go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudtrail
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeARNInvalidException for service response error code
// "CloudTrailARNInvalidException".
//
// This exception is thrown when an operation is called with an invalid trail
// ARN. The format of a trail ARN is:
//
// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
ErrCodeARNInvalidException = "CloudTrailARNInvalidException"
// ErrCodeAccessNotEnabledException for service response error code
// "CloudTrailAccessNotEnabledException".
//
// This exception is thrown when trusted access has not been enabled between
// AWS CloudTrail and AWS Organizations. For more information, see Enabling
// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
ErrCodeAccessNotEnabledException = "CloudTrailAccessNotEnabledException"
// ErrCodeCloudTrailInvalidClientTokenIdException for service response error code
// "CloudTrailInvalidClientTokenIdException".
//
// This exception is thrown when a call results in the InvalidClientTokenId
// error code. This can occur when you are creating or updating a trail to send
// notifications to an Amazon SNS topic that is in a suspended AWS account.
ErrCodeCloudTrailInvalidClientTokenIdException = "CloudTrailInvalidClientTokenIdException"
// ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code
// "CloudWatchLogsDeliveryUnavailableException".
//
// Cannot set a CloudWatch Logs delivery for this region.
ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// This exception is thrown when the specified resource is not ready for an
// operation. This can occur when you try to run an operation on a trail before
// CloudTrail has time to fully load the trail. If this exception occurs, wait
// a few minutes, and then try the operation again.
ErrCodeConflictException = "ConflictException"
// ErrCodeInsightNotEnabledException for service response error code
// "InsightNotEnabledException".
//
// If you run GetInsightSelectors on a trail that does not have Insights events
// enabled, the operation throws the exception InsightNotEnabledException.
ErrCodeInsightNotEnabledException = "InsightNotEnabledException"
// ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code
// "InsufficientDependencyServiceAccessPermissionException".
//
// This exception is thrown when the IAM user or role that is used to create
// the organization trail is lacking one or more required permissions for creating
// an organization trail in a required service. For more information, see Prepare
// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException"
// ErrCodeInsufficientEncryptionPolicyException for service response error code
// "InsufficientEncryptionPolicyException".
//
// This exception is thrown when the policy on the S3 bucket or KMS key is not
// sufficient.
ErrCodeInsufficientEncryptionPolicyException = "InsufficientEncryptionPolicyException"
// ErrCodeInsufficientS3BucketPolicyException for service response error code
// "InsufficientS3BucketPolicyException".
//
// This exception is thrown when the policy on the S3 bucket is not sufficient.
ErrCodeInsufficientS3BucketPolicyException = "InsufficientS3BucketPolicyException"
// ErrCodeInsufficientSnsTopicPolicyException for service response error code
// "InsufficientSnsTopicPolicyException".
//
// This exception is thrown when the policy on the SNS topic is not sufficient.
ErrCodeInsufficientSnsTopicPolicyException = "InsufficientSnsTopicPolicyException"
// ErrCodeInvalidCloudWatchLogsLogGroupArnException for service response error code
// "InvalidCloudWatchLogsLogGroupArnException".
//
// This exception is thrown when the provided CloudWatch log group is not valid.
ErrCodeInvalidCloudWatchLogsLogGroupArnException = "InvalidCloudWatchLogsLogGroupArnException"
// ErrCodeInvalidCloudWatchLogsRoleArnException for service response error code
// "InvalidCloudWatchLogsRoleArnException".
//
// This exception is thrown when the provided role is not valid.
ErrCodeInvalidCloudWatchLogsRoleArnException = "InvalidCloudWatchLogsRoleArnException"
// ErrCodeInvalidEventCategoryException for service response error code
// "InvalidEventCategoryException".
//
// Occurs if an event category that is not valid is specified as a value of
// EventCategory.
ErrCodeInvalidEventCategoryException = "InvalidEventCategoryException"
// ErrCodeInvalidEventSelectorsException for service response error code
// "InvalidEventSelectorsException".
//
// This exception is thrown when the PutEventSelectors operation is called with
// a number of event selectors, advanced event selectors, or data resources
// that is not valid. The combination of event selectors or advanced event selectors
// and data resources is not valid. A trail can have up to 5 event selectors.
// If a trail uses advanced event selectors, a maximum of 500 total values for
// all conditions in all advanced event selectors is allowed. A trail is limited
// to 250 data resources. These data resources can be distributed across event
// selectors, but the overall total cannot exceed 250.
//
// You can:
//
// * Specify a valid number of event selectors (1 to 5) for a trail.
//
// * Specify a valid number of data resources (1 to 250) for an event selector.
// The limit of number of resources on an individual event selector is configurable
// up to 250. However, this upper limit is allowed only if the total number
// of data resources does not exceed 250 across all event selectors for a
// trail.
//
// * Specify up to 500 values for all conditions in all advanced event selectors
// for a trail.
//
// * Specify a valid value for a parameter. For example, specifying the ReadWriteType
// parameter with a value of read-only is invalid.
ErrCodeInvalidEventSelectorsException = "InvalidEventSelectorsException"
// ErrCodeInvalidHomeRegionException for service response error code
// "InvalidHomeRegionException".
//
// This exception is thrown when an operation is called on a trail from a region
// other than the region in which the trail was created.
ErrCodeInvalidHomeRegionException = "InvalidHomeRegionException"
// ErrCodeInvalidInsightSelectorsException for service response error code
// "InvalidInsightSelectorsException".
//
// The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
// or GetInsightSelectors request is not valid, or the specified insight type
// in the InsightSelectors statement is not a valid insight type.
ErrCodeInvalidInsightSelectorsException = "InvalidInsightSelectorsException"
// ErrCodeInvalidKmsKeyIdException for service response error code
// "InvalidKmsKeyIdException".
//
// This exception is thrown when the KMS key ARN is invalid.
ErrCodeInvalidKmsKeyIdException = "InvalidKmsKeyIdException"
// ErrCodeInvalidLookupAttributesException for service response error code
// "InvalidLookupAttributesException".
//
// Occurs when an invalid lookup attribute is specified.
ErrCodeInvalidLookupAttributesException = "InvalidLookupAttributesException"
// ErrCodeInvalidMaxResultsException for service response error code
// "InvalidMaxResultsException".
//
// This exception is thrown if the limit specified is invalid.
ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// Invalid token or token that was previously used in a request with different
// parameters. This exception is thrown if the token is invalid.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidParameterCombinationException for service response error code
// "InvalidParameterCombinationException".
//
// This exception is thrown when the combination of parameters provided is not
// valid.
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
// ErrCodeInvalidS3BucketNameException for service response error code
// "InvalidS3BucketNameException".
//
// This exception is thrown when the provided S3 bucket name is not valid.
ErrCodeInvalidS3BucketNameException = "InvalidS3BucketNameException"
// ErrCodeInvalidS3PrefixException for service response error code
// "InvalidS3PrefixException".
//
// This exception is thrown when the provided S3 prefix is not valid.
ErrCodeInvalidS3PrefixException = "InvalidS3PrefixException"
// ErrCodeInvalidSnsTopicNameException for service response error code
// "InvalidSnsTopicNameException".
//
// This exception is thrown when the provided SNS topic name is not valid.
ErrCodeInvalidSnsTopicNameException = "InvalidSnsTopicNameException"
// ErrCodeInvalidTagParameterException for service response error code
// "InvalidTagParameterException".
//
// This exception is thrown when the specified tag key or values are not valid.
// It can also occur if there are duplicate tags or too many tags on the resource.
ErrCodeInvalidTagParameterException = "InvalidTagParameterException"
// ErrCodeInvalidTimeRangeException for service response error code
// "InvalidTimeRangeException".
//
// Occurs if the timestamp values are invalid. Either the start time occurs
// after the end time or the time range is outside the range of possible values.
ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
// ErrCodeInvalidTokenException for service response error code
// "InvalidTokenException".
//
// Reserved for future use.
ErrCodeInvalidTokenException = "InvalidTokenException"
// ErrCodeInvalidTrailNameException for service response error code
// "InvalidTrailNameException".
//
// This exception is thrown when the provided trail name is not valid. Trail
// names must meet the following requirements:
//
// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
// (_), or dashes (-)
//
// * Start with a letter or number, and end with a letter or number
//
// * Be between 3 and 128 characters
//
// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
// and my--namespace are invalid.
//
// * Not be in IP address format (for example, 192.168.5.4)
ErrCodeInvalidTrailNameException = "InvalidTrailNameException"
// ErrCodeKmsException for service response error code
// "KmsException".
//
// This exception is thrown when there is an issue with the specified KMS key
// and the trail can’t be updated.
ErrCodeKmsException = "KmsException"
// ErrCodeKmsKeyDisabledException for service response error code
// "KmsKeyDisabledException".
//
// This exception is no longer in use.
ErrCodeKmsKeyDisabledException = "KmsKeyDisabledException"
// ErrCodeKmsKeyNotFoundException for service response error code
// "KmsKeyNotFoundException".
//
// This exception is thrown when the AWS KMS key does not exist, when the S3
// bucket and the AWS KMS key are not in the same region, or when the AWS KMS
// key associated with the SNS topic either does not exist or is not in the
// same region.
ErrCodeKmsKeyNotFoundException = "KmsKeyNotFoundException"
// ErrCodeMaximumNumberOfTrailsExceededException for service response error code
// "MaximumNumberOfTrailsExceededException".
//
// This exception is thrown when the maximum number of trails is reached.
ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException"
// ErrCodeNotOrganizationMasterAccountException for service response error code
// "NotOrganizationMasterAccountException".
//
// This exception is thrown when the AWS account making the request to create
// or update an organization trail is not the master account for an organization
// in AWS Organizations. For more information, see Prepare For Creating a Trail
// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException"
// ErrCodeOperationNotPermittedException for service response error code
// "OperationNotPermittedException".
//
// This exception is thrown when the requested operation is not permitted.
ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
// ErrCodeOrganizationNotInAllFeaturesModeException for service response error code
// "OrganizationNotInAllFeaturesModeException".
//
// This exception is thrown when AWS Organizations is not configured to support
// all features. All features must be enabled in AWS Organization to support
// creating an organization trail. For more information, see Prepare For Creating
// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException"
// ErrCodeOrganizationsNotInUseException for service response error code
// "OrganizationsNotInUseException".
//
// This exception is thrown when the request is made from an AWS account that
// is not a member of an organization. To make this request, sign in using the
// credentials of an account that belongs to an organization.
ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// This exception is thrown when the specified resource is not found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeResourceTypeNotSupportedException for service response error code
// "ResourceTypeNotSupportedException".
//
// This exception is thrown when the specified resource type is not supported
// by CloudTrail.
ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException"
// ErrCodeS3BucketDoesNotExistException for service response error code
// "S3BucketDoesNotExistException".
//
// This exception is thrown when the specified S3 bucket does not exist.
ErrCodeS3BucketDoesNotExistException = "S3BucketDoesNotExistException"
// ErrCodeTagsLimitExceededException for service response error code
// "TagsLimitExceededException".
//
// The number of tags per trail has exceeded the permitted amount. Currently,
// the limit is 50.
ErrCodeTagsLimitExceededException = "TagsLimitExceededException"
// ErrCodeTrailAlreadyExistsException for service response error code
// "TrailAlreadyExistsException".
//
// This exception is thrown when the specified trail already exists.
ErrCodeTrailAlreadyExistsException = "TrailAlreadyExistsException"
// ErrCodeTrailNotFoundException for service response error code
// "TrailNotFoundException".
//
// This exception is thrown when the trail with the given name is not found.
ErrCodeTrailNotFoundException = "TrailNotFoundException"
// ErrCodeTrailNotProvidedException for service response error code
// "TrailNotProvidedException".
//
// This exception is no longer in use.
ErrCodeTrailNotProvidedException = "TrailNotProvidedException"
// ErrCodeUnsupportedOperationException for service response error code
// "UnsupportedOperationException".
//
// This exception is thrown when the requested operation is not supported.
ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CloudTrailARNInvalidException": newErrorARNInvalidException,
"CloudTrailAccessNotEnabledException": newErrorAccessNotEnabledException,
"CloudTrailInvalidClientTokenIdException": newErrorCloudTrailInvalidClientTokenIdException,
"CloudWatchLogsDeliveryUnavailableException": newErrorCloudWatchLogsDeliveryUnavailableException,
"ConflictException": newErrorConflictException,
"InsightNotEnabledException": newErrorInsightNotEnabledException,
"InsufficientDependencyServiceAccessPermissionException": newErrorInsufficientDependencyServiceAccessPermissionException,
"InsufficientEncryptionPolicyException": newErrorInsufficientEncryptionPolicyException,
"InsufficientS3BucketPolicyException": newErrorInsufficientS3BucketPolicyException,
"InsufficientSnsTopicPolicyException": newErrorInsufficientSnsTopicPolicyException,
"InvalidCloudWatchLogsLogGroupArnException": newErrorInvalidCloudWatchLogsLogGroupArnException,
"InvalidCloudWatchLogsRoleArnException": newErrorInvalidCloudWatchLogsRoleArnException,
"InvalidEventCategoryException": newErrorInvalidEventCategoryException,
"InvalidEventSelectorsException": newErrorInvalidEventSelectorsException,
"InvalidHomeRegionException": newErrorInvalidHomeRegionException,
"InvalidInsightSelectorsException": newErrorInvalidInsightSelectorsException,
"InvalidKmsKeyIdException": newErrorInvalidKmsKeyIdException,
"InvalidLookupAttributesException": newErrorInvalidLookupAttributesException,
"InvalidMaxResultsException": newErrorInvalidMaxResultsException,
"InvalidNextTokenException": newErrorInvalidNextTokenException,
"InvalidParameterCombinationException": newErrorInvalidParameterCombinationException,
"InvalidS3BucketNameException": newErrorInvalidS3BucketNameException,
"InvalidS3PrefixException": newErrorInvalidS3PrefixException,
"InvalidSnsTopicNameException": newErrorInvalidSnsTopicNameException,
"InvalidTagParameterException": newErrorInvalidTagParameterException,
"InvalidTimeRangeException": newErrorInvalidTimeRangeException,
"InvalidTokenException": newErrorInvalidTokenException,
"InvalidTrailNameException": newErrorInvalidTrailNameException,
"KmsException": newErrorKmsException,
"KmsKeyDisabledException": newErrorKmsKeyDisabledException,
"KmsKeyNotFoundException": newErrorKmsKeyNotFoundException,
"MaximumNumberOfTrailsExceededException": newErrorMaximumNumberOfTrailsExceededException,
"NotOrganizationMasterAccountException": newErrorNotOrganizationMasterAccountException,
"OperationNotPermittedException": newErrorOperationNotPermittedException,
"OrganizationNotInAllFeaturesModeException": newErrorOrganizationNotInAllFeaturesModeException,
"OrganizationsNotInUseException": newErrorOrganizationsNotInUseException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ResourceTypeNotSupportedException": newErrorResourceTypeNotSupportedException,
"S3BucketDoesNotExistException": newErrorS3BucketDoesNotExistException,
"TagsLimitExceededException": newErrorTagsLimitExceededException,
"TrailAlreadyExistsException": newErrorTrailAlreadyExistsException,
"TrailNotFoundException": newErrorTrailNotFoundException,
"TrailNotProvidedException": newErrorTrailNotProvidedException,
"UnsupportedOperationException": newErrorUnsupportedOperationException,
}
| 396 |