diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 3271a18e8..212fe25e7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -91,6 +91,6 @@ func (c *Client) AddDebugHandlers() { return } - c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest}) - c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse}) + c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler) + c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go index e223c54cc..ce9fb896d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -44,12 +44,22 @@ func (reader *teeReaderCloser) Close() error { return reader.Source.Close() } +// LogHTTPRequestHandler is a SDK request handler to log the HTTP request sent +// to a service. Will include the HTTP request body if the LogLevel of the +// request matches LogDebugWithHTTPBody. +var LogHTTPRequestHandler = request.NamedHandler{ + Name: "awssdk.client.LogRequest", + Fn: logRequest, +} + func logRequest(r *request.Request) { logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) bodySeekable := aws.IsReaderSeekable(r.Body) - dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) + + b, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) return } @@ -63,7 +73,28 @@ func logRequest(r *request.Request) { r.ResetBody() } - r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) +} + +// LogHTTPRequestHeaderHandler is a SDK request handler to log the HTTP request sent +// to a service. Will only log the HTTP request's headers. The request payload +// will not be read. +var LogHTTPRequestHeaderHandler = request.NamedHandler{ + Name: "awssdk.client.LogRequestHeader", + Fn: logRequestHeader, +} + +func logRequestHeader(r *request.Request) { + b, err := httputil.DumpRequestOut(r.HTTPRequest, false) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) } const logRespMsg = `DEBUG: Response %s/%s Details: @@ -76,27 +107,44 @@ const logRespErrMsg = `DEBUG ERROR: Response %s/%s: %s -----------------------------------------------------` +// LogHTTPResponseHandler is a SDK request handler to log the HTTP response +// received from a service. Will include the HTTP response body if the LogLevel +// of the request matches LogDebugWithHTTPBody. +var LogHTTPResponseHandler = request.NamedHandler{ + Name: "awssdk.client.LogResponse", + Fn: logResponse, +} + func logResponse(r *request.Request) { lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} - r.HTTPResponse.Body = &teeReaderCloser{ - Reader: io.TeeReader(r.HTTPResponse.Body, lw), - Source: r.HTTPResponse.Body, + + logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + if logBody { + r.HTTPResponse.Body = &teeReaderCloser{ + Reader: io.TeeReader(r.HTTPResponse.Body, lw), + Source: r.HTTPResponse.Body, + } } handlerFn := func(req *request.Request) { - body, err := httputil.DumpResponse(req.HTTPResponse, false) + b, err := httputil.DumpResponse(req.HTTPResponse, false) if err != nil { - lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, + req.ClientInfo.ServiceName, req.Operation.Name, err)) return } - b, err := ioutil.ReadAll(lw.buf) - if err != nil { - lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) - return - } - lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body))) - if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) { + lw.Logger.Log(fmt.Sprintf(logRespMsg, + req.ClientInfo.ServiceName, req.Operation.Name, string(b))) + + if logBody { + b, err := ioutil.ReadAll(lw.buf) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, + req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + lw.Logger.Log(string(b)) } } @@ -110,3 +158,27 @@ func logResponse(r *request.Request) { Name: handlerName, Fn: handlerFn, }) } + +// LogHTTPResponseHeaderHandler is a SDK request handler to log the HTTP +// response received from a service. Will only log the HTTP response's headers. +// The response payload will not be read. +var LogHTTPResponseHeaderHandler = request.NamedHandler{ + Name: "awssdk.client.LogResponseHeader", + Fn: logResponseHeader, +} + +func logResponseHeader(r *request.Request) { + if r.Config.Logger == nil { + return + } + + b, err := httputil.DumpResponse(r.HTTPResponse, false) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + r.Config.Logger.Log(fmt.Sprintf(logRespMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go index 4778056dd..920e9fddf 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go @@ -3,6 +3,7 @@ package metadata // ClientInfo wraps immutable data from the client.Client structure. type ClientInfo struct { ServiceName string + ServiceID string APIVersion string Endpoint string SigningName string diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index 42416fc2f..ed086992f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -178,7 +178,8 @@ func (e *Expiry) IsExpired() bool { type Credentials struct { creds Value forceRefresh bool - m sync.Mutex + + m sync.RWMutex provider Provider } @@ -201,6 +202,17 @@ func NewCredentials(provider Provider) *Credentials { // If Credentials.Expire() was called the credentials Value will be force // expired, and the next call to Get() will cause them to be refreshed. func (c *Credentials) Get() (Value, error) { + // Check the cached credentials first with just the read lock. + c.m.RLock() + if !c.isExpired() { + creds := c.creds + c.m.RUnlock() + return creds, nil + } + c.m.RUnlock() + + // Credentials are expired need to retrieve the credentials taking the full + // lock. c.m.Lock() defer c.m.Unlock() @@ -234,8 +246,8 @@ func (c *Credentials) Expire() { // If the Credentials were forced to be expired with Expire() this will // reflect that override. func (c *Credentials) IsExpired() bool { - c.m.Lock() - defer c.m.Unlock() + c.m.RLock() + defer c.m.RUnlock() return c.isExpired() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go index c39749524..0ed791be6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go @@ -4,7 +4,6 @@ import ( "bufio" "encoding/json" "fmt" - "path" "strings" "time" @@ -12,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/internal/sdkuri" ) // ProviderName provides a name of EC2Role provider @@ -125,7 +125,7 @@ type ec2RoleCredRespBody struct { Message string } -const iamSecurityCredsPath = "/iam/security-credentials" +const iamSecurityCredsPath = "iam/security-credentials/" // requestCredList requests a list of credentials from the EC2 service. // If there are no credentials, or there is an error making or receiving the request @@ -153,7 +153,7 @@ func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) { // If the credentials cannot be found, or there is an error reading the response // and error will be returned. func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) { - resp, err := client.GetMetadata(path.Join(iamSecurityCredsPath, credsName)) + resp, err := client.GetMetadata(sdkuri.PathJoin(iamSecurityCredsPath, credsName)) if err != nil { return ec2RoleCredRespBody{}, awserr.New("EC2RoleRequestError", diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go new file mode 100644 index 000000000..152d785b3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go @@ -0,0 +1,46 @@ +// Package csm provides Client Side Monitoring (CSM) which enables sending metrics +// via UDP connection. Using the Start function will enable the reporting of +// metrics on a given port. If Start is called, with different parameters, again, +// a panic will occur. +// +// Pause can be called to pause any metrics publishing on a given port. Sessions +// that have had their handlers modified via InjectHandlers may still be used. +// However, the handlers will act as a no-op meaning no metrics will be published. +// +// Example: +// r, err := csm.Start("clientID", ":31000") +// if err != nil { +// panic(fmt.Errorf("failed starting CSM: %v", err)) +// } +// +// sess, err := session.NewSession(&aws.Config{}) +// if err != nil { +// panic(fmt.Errorf("failed loading session: %v", err)) +// } +// +// r.InjectHandlers(&sess.Handlers) +// +// client := s3.New(sess) +// resp, err := client.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +// +// // Will pause monitoring +// r.Pause() +// resp, err = client.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +// +// // Resume monitoring +// r.Continue() +// +// Start returns a Reporter that is used to enable or disable monitoring. If +// access to the Reporter is required later, calling Get will return the Reporter +// singleton. +// +// Example: +// r := csm.Get() +// r.Continue() +package csm diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go new file mode 100644 index 000000000..2f0c6eac9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go @@ -0,0 +1,67 @@ +package csm + +import ( + "fmt" + "sync" +) + +var ( + lock sync.Mutex +) + +// Client side metric handler names +const ( + APICallMetricHandlerName = "awscsm.SendAPICallMetric" + APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric" +) + +// Start will start the a long running go routine to capture +// client side metrics. Calling start multiple time will only +// start the metric listener once and will panic if a different +// client ID or port is passed in. +// +// Example: +// r, err := csm.Start("clientID", "127.0.0.1:8094") +// if err != nil { +// panic(fmt.Errorf("expected no error, but received %v", err)) +// } +// sess := session.NewSession() +// r.InjectHandlers(sess.Handlers) +// +// svc := s3.New(sess) +// out, err := svc.GetObject(&s3.GetObjectInput{ +// Bucket: aws.String("bucket"), +// Key: aws.String("key"), +// }) +func Start(clientID string, url string) (*Reporter, error) { + lock.Lock() + defer lock.Unlock() + + if sender == nil { + sender = newReporter(clientID, url) + } else { + if sender.clientID != clientID { + panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID)) + } + + if sender.url != url { + panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url)) + } + } + + if err := connect(url); err != nil { + sender = nil + return nil, err + } + + return sender, nil +} + +// Get will return a reporter if one exists, if one does not exist, nil will +// be returned. +func Get() *Reporter { + lock.Lock() + defer lock.Unlock() + + return sender +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go new file mode 100644 index 000000000..4b0d630e4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go @@ -0,0 +1,51 @@ +package csm + +import ( + "strconv" + "time" +) + +type metricTime time.Time + +func (t metricTime) MarshalJSON() ([]byte, error) { + ns := time.Duration(time.Time(t).UnixNano()) + return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil +} + +type metric struct { + ClientID *string `json:"ClientId,omitempty"` + API *string `json:"Api,omitempty"` + Service *string `json:"Service,omitempty"` + Timestamp *metricTime `json:"Timestamp,omitempty"` + Type *string `json:"Type,omitempty"` + Version *int `json:"Version,omitempty"` + + AttemptCount *int `json:"AttemptCount,omitempty"` + Latency *int `json:"Latency,omitempty"` + + Fqdn *string `json:"Fqdn,omitempty"` + UserAgent *string `json:"UserAgent,omitempty"` + AttemptLatency *int `json:"AttemptLatency,omitempty"` + + SessionToken *string `json:"SessionToken,omitempty"` + Region *string `json:"Region,omitempty"` + AccessKey *string `json:"AccessKey,omitempty"` + HTTPStatusCode *int `json:"HttpStatusCode,omitempty"` + XAmzID2 *string `json:"XAmzId2,omitempty"` + XAmzRequestID *string `json:"XAmznRequestId,omitempty"` + + AWSException *string `json:"AwsException,omitempty"` + AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"` + SDKException *string `json:"SdkException,omitempty"` + SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"` + + DestinationIP *string `json:"DestinationIp,omitempty"` + ConnectionReused *int `json:"ConnectionReused,omitempty"` + + AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"` + ConnectLatency *int `json:"ConnectLatency,omitempty"` + RequestLatency *int `json:"RequestLatency,omitempty"` + DNSLatency *int `json:"DnsLatency,omitempty"` + TCPLatency *int `json:"TcpLatency,omitempty"` + SSLLatency *int `json:"SslLatency,omitempty"` +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go new file mode 100644 index 000000000..514fc3739 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go @@ -0,0 +1,54 @@ +package csm + +import ( + "sync/atomic" +) + +const ( + runningEnum = iota + pausedEnum +) + +var ( + // MetricsChannelSize of metrics to hold in the channel + MetricsChannelSize = 100 +) + +type metricChan struct { + ch chan metric + paused int64 +} + +func newMetricChan(size int) metricChan { + return metricChan{ + ch: make(chan metric, size), + } +} + +func (ch *metricChan) Pause() { + atomic.StoreInt64(&ch.paused, pausedEnum) +} + +func (ch *metricChan) Continue() { + atomic.StoreInt64(&ch.paused, runningEnum) +} + +func (ch *metricChan) IsPaused() bool { + v := atomic.LoadInt64(&ch.paused) + return v == pausedEnum +} + +// Push will push metrics to the metric channel if the channel +// is not paused +func (ch *metricChan) Push(m metric) bool { + if ch.IsPaused() { + return false + } + + select { + case ch.ch <- m: + return true + default: + return false + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go new file mode 100644 index 000000000..11082e5ed --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -0,0 +1,231 @@ +package csm + +import ( + "encoding/json" + "net" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +const ( + // DefaultPort is used when no port is specified + DefaultPort = "31000" +) + +// Reporter will gather metrics of API requests made and +// send those metrics to the CSM endpoint. +type Reporter struct { + clientID string + url string + conn net.Conn + metricsCh metricChan + done chan struct{} +} + +var ( + sender *Reporter +) + +func connect(url string) error { + const network = "udp" + if err := sender.connect(network, url); err != nil { + return err + } + + if sender.done == nil { + sender.done = make(chan struct{}) + go sender.start() + } + + return nil +} + +func newReporter(clientID, url string) *Reporter { + return &Reporter{ + clientID: clientID, + url: url, + metricsCh: newMetricChan(MetricsChannelSize), + } +} + +func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) { + if rep == nil { + return + } + + now := time.Now() + creds, _ := r.Config.Credentials.Get() + + m := metric{ + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), + Region: r.Config.Region, + Type: aws.String("ApiCallAttempt"), + Version: aws.Int(1), + + XAmzRequestID: aws.String(r.RequestID), + + AttemptCount: aws.Int(r.RetryCount + 1), + AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))), + AccessKey: aws.String(creds.AccessKeyID), + } + + if r.HTTPResponse != nil { + m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) + } + + if r.Error != nil { + if awserr, ok := r.Error.(awserr.Error); ok { + setError(&m, awserr) + } + } + + rep.metricsCh.Push(m) +} + +func setError(m *metric, err awserr.Error) { + msg := err.Error() + code := err.Code() + + switch code { + case "RequestError", + "SerializationError", + request.CanceledErrorCode: + m.SDKException = &code + m.SDKExceptionMessage = &msg + default: + m.AWSException = &code + m.AWSExceptionMessage = &msg + } +} + +func (rep *Reporter) sendAPICallMetric(r *request.Request) { + if rep == nil { + return + } + + now := time.Now() + m := metric{ + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + Type: aws.String("ApiCall"), + AttemptCount: aws.Int(r.RetryCount + 1), + Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), + XAmzRequestID: aws.String(r.RequestID), + } + + // TODO: Probably want to figure something out for logging dropped + // metrics + rep.metricsCh.Push(m) +} + +func (rep *Reporter) connect(network, url string) error { + if rep.conn != nil { + rep.conn.Close() + } + + conn, err := net.Dial(network, url) + if err != nil { + return awserr.New("UDPError", "Could not connect", err) + } + + rep.conn = conn + + return nil +} + +func (rep *Reporter) close() { + if rep.done != nil { + close(rep.done) + } + + rep.metricsCh.Pause() +} + +func (rep *Reporter) start() { + defer func() { + rep.metricsCh.Pause() + }() + + for { + select { + case <-rep.done: + rep.done = nil + return + case m := <-rep.metricsCh.ch: + // TODO: What to do with this error? Probably should just log + b, err := json.Marshal(m) + if err != nil { + continue + } + + rep.conn.Write(b) + } + } +} + +// Pause will pause the metric channel preventing any new metrics from +// being added. +func (rep *Reporter) Pause() { + lock.Lock() + defer lock.Unlock() + + if rep == nil { + return + } + + rep.close() +} + +// Continue will reopen the metric channel and allow for monitoring +// to be resumed. +func (rep *Reporter) Continue() { + lock.Lock() + defer lock.Unlock() + if rep == nil { + return + } + + if !rep.metricsCh.IsPaused() { + return + } + + rep.metricsCh.Continue() +} + +// InjectHandlers will will enable client side metrics and inject the proper +// handlers to handle how metrics are sent. +// +// Example: +// // Start must be called in order to inject the correct handlers +// r, err := csm.Start("clientID", "127.0.0.1:8094") +// if err != nil { +// panic(fmt.Errorf("expected no error, but received %v", err)) +// } +// +// sess := session.NewSession() +// r.InjectHandlers(&sess.Handlers) +// +// // create a new service client with our client side metric session +// svc := s3.New(sess) +func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { + if rep == nil { + return + } + + apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric} + apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} + + handlers.Complete.PushFrontNamed(apiCallHandler) + handlers.Complete.PushFrontNamed(apiCallAttemptHandler) + + handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 3cf1036b6..5040a2f64 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -92,14 +92,25 @@ func Handlers() request.Handlers { func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials { return credentials.NewCredentials(&credentials.ChainProvider{ VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), - Providers: []credentials.Provider{ - &credentials.EnvProvider{}, - &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, - RemoteCredProvider(*cfg, handlers), - }, + Providers: CredProviders(cfg, handlers), }) } +// CredProviders returns the slice of providers used in +// the default credential chain. +// +// For applications that need to use some other provider (for example use +// different environment variables for legacy reasons) but still fall back +// on the default chain of providers. This allows that default chaint to be +// automatically updated +func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider { + return []credentials.Provider{ + &credentials.EnvProvider{}, + &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, + RemoteCredProvider(*cfg, handlers), + } +} + const ( httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index 984407a58..c215cd3f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -4,12 +4,12 @@ import ( "encoding/json" "fmt" "net/http" - "path" "strings" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkuri" ) // GetMetadata uses the path provided to request information from the EC2 @@ -19,7 +19,7 @@ func (c *EC2Metadata) GetMetadata(p string) (string, error) { op := &request.Operation{ Name: "GetMetadata", HTTPMethod: "GET", - HTTPPath: path.Join("/", "meta-data", p), + HTTPPath: sdkuri.PathJoin("/meta-data", p), } output := &metadataOutput{} @@ -35,7 +35,7 @@ func (c *EC2Metadata) GetUserData() (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", - HTTPPath: path.Join("/", "user-data"), + HTTPPath: "/user-data", } output := &metadataOutput{} @@ -56,7 +56,7 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", - HTTPPath: path.Join("/", "dynamic", p), + HTTPPath: sdkuri.PathJoin("/dynamic", p), } output := &metadataOutput{} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 94934998a..8e823bec0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -47,6 +47,8 @@ const ( const ( A4bServiceID = "a4b" // A4b. AcmServiceID = "acm" // Acm. + AcmPcaServiceID = "acm-pca" // AcmPca. + ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor. ApiPricingServiceID = "api.pricing" // ApiPricing. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. @@ -99,6 +101,7 @@ const ( EsServiceID = "es" // Es. EventsServiceID = "events" // Events. FirehoseServiceID = "firehose" // Firehose. + FmsServiceID = "fms" // Fms. GameliftServiceID = "gamelift" // Gamelift. GlacierServiceID = "glacier" // Glacier. GlueServiceID = "glue" // Glue. @@ -121,12 +124,14 @@ const ( MediaconvertServiceID = "mediaconvert" // Mediaconvert. MedialiveServiceID = "medialive" // Medialive. MediapackageServiceID = "mediapackage" // Mediapackage. + MediastoreServiceID = "mediastore" // Mediastore. MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. MghServiceID = "mgh" // Mgh. MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. ModelsLexServiceID = "models.lex" // ModelsLex. MonitoringServiceID = "monitoring" // Monitoring. MturkRequesterServiceID = "mturk-requester" // MturkRequester. + NeptuneServiceID = "neptune" // Neptune. OpsworksServiceID = "opsworks" // Opsworks. OpsworksCmServiceID = "opsworks-cm" // OpsworksCm. OrganizationsServiceID = "organizations" // Organizations. @@ -143,6 +148,7 @@ const ( S3ServiceID = "s3" // S3. SagemakerServiceID = "sagemaker" // Sagemaker. SdbServiceID = "sdb" // Sdb. + SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. ServicecatalogServiceID = "servicecatalog" // Servicecatalog. ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. @@ -287,6 +293,32 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "acm-pca": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "api.mediatailor": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, "api.pricing": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -414,6 +446,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -538,6 +571,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -635,6 +669,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -804,6 +839,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1024,6 +1060,7 @@ var awsPartition = partition{ "elasticfilesystem": service{ Endpoints: endpoints{ + "ap-northeast-2": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -1157,8 +1194,10 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, @@ -1167,6 +1206,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "fms": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "gamelift": service{ Endpoints: endpoints{ @@ -1211,9 +1260,13 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1313,6 +1366,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -1405,12 +1459,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1472,9 +1529,12 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1494,6 +1554,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "mediastore": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "metering.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1539,6 +1610,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "monitoring": service{ @@ -1573,6 +1645,35 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "neptune": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{ + Hostname: "rds.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "rds.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "rds.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-2": endpoint{ + Hostname: "rds.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "opsworks": service{ Endpoints: endpoints{ @@ -1750,15 +1851,17 @@ var awsPartition = partition{ Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "runtime.sagemaker": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "s3": service{ @@ -1823,10 +1926,12 @@ var awsPartition = partition{ "sagemaker": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "sdb": service{ @@ -1847,6 +1952,25 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "serverlessrepo": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -1922,6 +2046,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1948,6 +2073,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2011,7 +2137,31 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "sqs-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "sqs-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "sqs-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "sqs-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "queue.{dnsSuffix}", }, @@ -2044,6 +2194,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -2052,6 +2203,7 @@ var awsPartition = partition{ "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2214,6 +2366,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -2240,6 +2393,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -2272,6 +2426,7 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -2334,7 +2489,8 @@ var awscnPartition = partition{ "apigateway": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "application-autoscaling": service{ @@ -2400,6 +2556,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "ds": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "dynamodb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -2432,13 +2595,15 @@ var awscnPartition = partition{ "ecr": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "ecs": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "elasticache": service{ @@ -2528,7 +2693,8 @@ var awscnPartition = partition{ "lambda": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "logs": service{ @@ -2574,7 +2740,8 @@ var awscnPartition = partition{ "sms": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "snowball": service{ @@ -2709,6 +2876,16 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "cloudhsmv2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "cloudhsm", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "cloudtrail": service{ Endpoints: endpoints{ @@ -2841,6 +3018,12 @@ var awsusgovPartition = partition{ }, }, }, + "inspector": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ @@ -2957,6 +3140,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "storagegateway": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "streams.dynamodb": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -2991,5 +3180,13 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "translate": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index d6be83c19..e29c09512 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -206,10 +206,11 @@ func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) ( // enumerating over the regions in a partition. func (p Partition) Regions() map[string]Region { rs := map[string]Region{} - for id := range p.p.Regions { + for id, r := range p.p.Regions { rs[id] = Region{ - id: id, - p: p.p, + id: id, + desc: r.Description, + p: p.p, } } @@ -240,6 +241,10 @@ type Region struct { // ID returns the region's identifier. func (r Region) ID() string { return r.id } +// Description returns the region's description. The region description +// is free text, it can be empty, and it may change between SDK releases. +func (r Region) Description() string { return r.desc } + // ResolveEndpoint resolves an endpoint from the context of the region given // a service. See Partition.EndpointFor for usage and errors that can be returned. func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) { @@ -284,10 +289,11 @@ func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (Resolve func (s Service) Regions() map[string]Region { rs := map[string]Region{} for id := range s.p.Services[s.id].Endpoints { - if _, ok := s.p.Regions[id]; ok { + if r, ok := s.p.Regions[id]; ok { rs[id] = Region{ - id: id, - p: s.p, + id: id, + desc: r.Description, + p: s.p, } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go index 3babb5abd..6ed15b2ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go @@ -71,6 +71,12 @@ const ( // LogDebugWithRequestErrors states the SDK should log when service requests fail // to build, send, validate, or unmarshal. LogDebugWithRequestErrors + + // LogDebugWithEventStreamBody states the SDK should log EventStream + // request and response bodys. This should be used to log the EventStream + // wire unmarshaled message content of requests and responses made while + // using the SDK Will also enable LogDebug. + LogDebugWithEventStreamBody ) // A Logger is a minimalistic interface for the SDK to log messages to. Should diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index 802ac88ad..605a72d3c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -14,6 +14,7 @@ type Handlers struct { Send HandlerList ValidateResponse HandlerList Unmarshal HandlerList + UnmarshalStream HandlerList UnmarshalMeta HandlerList UnmarshalError HandlerList Retry HandlerList @@ -30,6 +31,7 @@ func (h *Handlers) Copy() Handlers { Send: h.Send.copy(), ValidateResponse: h.ValidateResponse.copy(), Unmarshal: h.Unmarshal.copy(), + UnmarshalStream: h.UnmarshalStream.copy(), UnmarshalError: h.UnmarshalError.copy(), UnmarshalMeta: h.UnmarshalMeta.copy(), Retry: h.Retry.copy(), @@ -45,6 +47,7 @@ func (h *Handlers) Clear() { h.Send.Clear() h.Sign.Clear() h.Unmarshal.Clear() + h.UnmarshalStream.Clear() h.UnmarshalMeta.Clear() h.UnmarshalError.Clear() h.ValidateResponse.Clear() @@ -172,6 +175,21 @@ func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) { return swapped } +// Swap will swap out all handlers matching the name passed in. The matched +// handlers will be swapped in. True is returned if the handlers were swapped. +func (l *HandlerList) Swap(name string, replace NamedHandler) bool { + var swapped bool + + for i := 0; i < len(l.list); i++ { + if l.list[i].Name == name { + l.list[i] = replace + swapped = true + } + } + + return swapped +} + // SetBackNamed will replace the named handler if it exists in the handler list. // If the handler does not exist the handler will be added to the end of the list. func (l *HandlerList) SetBackNamed(n NamedHandler) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 69b7a01ad..75f0fe077 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -46,6 +46,7 @@ type Request struct { Handlers Handlers Retryer + AttemptTime time.Time Time time.Time Operation *Operation HTTPRequest *http.Request @@ -121,6 +122,7 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, Handlers: handlers.Copy(), Retryer: retryer, + AttemptTime: time.Now(), Time: time.Now(), ExpireTime: 0, Operation: operation, @@ -368,9 +370,9 @@ func (r *Request) Build() error { return r.Error } -// Sign will sign the request returning error if errors are encountered. +// Sign will sign the request, returning error if errors are encountered. // -// Send will build the request prior to signing. All Sign Handlers will +// Sign will build the request prior to signing. All Sign Handlers will // be executed in the order they were set. func (r *Request) Sign() error { r.Build() @@ -440,7 +442,7 @@ func (r *Request) GetBody() io.ReadSeeker { return r.safeBody } -// Send will send the request returning error if errors are encountered. +// Send will send the request, returning error if errors are encountered. // // Send will sign the request prior to sending. All Send Handlers will // be executed in the order they were set. @@ -461,6 +463,7 @@ func (r *Request) Send() error { }() for { + r.AttemptTime = time.Now() if aws.BoolValue(r.Retryable) { if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go index 869b97a1a..e36e468b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go @@ -21,7 +21,7 @@ func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } var NoBody = noBody{} // ResetBody rewinds the request body back to its starting position, and -// set's the HTTP Request body reference. When the body is read prior +// sets the HTTP Request body reference. When the body is read prior // to being sent in the HTTP request it will need to be rewound. // // ResetBody will automatically be called by the SDK's build handler, but if diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go index c32fc69bc..7c6a8000f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go @@ -11,7 +11,7 @@ import ( var NoBody = http.NoBody // ResetBody rewinds the request body back to its starting position, and -// set's the HTTP Request body reference. When the body is read prior +// sets the HTTP Request body reference. When the body is read prior // to being sent in the HTTP request it will need to be rewound. // // ResetBody will automatically be called by the SDK's build handler, but if diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go index 159518a75..a633ed5ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go @@ -35,8 +35,12 @@ type Pagination struct { // NewRequest should always be built from the same API operations. It is // undefined if different API operations are returned on subsequent calls. NewRequest func() (*Request, error) + // EndPageOnSameToken, when enabled, will allow the paginator to stop on + // token that are the same as its previous tokens. + EndPageOnSameToken bool started bool + prevTokens []interface{} nextTokens []interface{} err error @@ -49,7 +53,15 @@ type Pagination struct { // // Will always return true if Next has not been called yet. func (p *Pagination) HasNextPage() bool { - return !(p.started && len(p.nextTokens) == 0) + if !p.started { + return true + } + + hasNextPage := len(p.nextTokens) != 0 + if p.EndPageOnSameToken { + return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens) + } + return hasNextPage } // Err returns the error Pagination encountered when retrieving the next page. @@ -96,6 +108,7 @@ func (p *Pagination) Next() bool { return false } + p.prevTokens = p.nextTokens p.nextTokens = req.nextPageTokens() p.curPage = req.Data diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index f35fef213..7d5270298 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -97,7 +97,7 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool { } if t, ok := err.(temporaryError); ok { - return t.Temporary() + return t.Temporary() || isErrConnectionReset(err) } return isErrConnectionReset(err) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index ea7b886f8..98d420fd6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -128,7 +128,7 @@ read. The Session will be created from configuration values from the shared credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). Credentials are the values the SDK should use for authenticating requests with -AWS Services. They arfrom a configuration file will need to include both +AWS Services. They are from a configuration file will need to include both aws_access_key_id and aws_secret_access_key must be provided together in the same file to be considered valid. The values will be ignored if not a complete group. aws_session_token is an optional field that can be provided if both of diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index 12b452177..82e04d76c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -96,9 +96,23 @@ type envConfig struct { // // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle CustomCABundle string + + csmEnabled string + CSMEnabled bool + CSMPort string + CSMClientID string } var ( + csmEnabledEnvKey = []string{ + "AWS_CSM_ENABLED", + } + csmPortEnvKey = []string{ + "AWS_CSM_PORT", + } + csmClientIDEnvKey = []string{ + "AWS_CSM_CLIENT_ID", + } credAccessEnvKey = []string{ "AWS_ACCESS_KEY_ID", "AWS_ACCESS_KEY", @@ -157,6 +171,12 @@ func envConfigLoad(enableSharedConfig bool) envConfig { setFromEnvVal(&cfg.Creds.SecretAccessKey, credSecretEnvKey) setFromEnvVal(&cfg.Creds.SessionToken, credSessionEnvKey) + // CSM environment variables + setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey) + setFromEnvVal(&cfg.CSMPort, csmPortEnvKey) + setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey) + cfg.CSMEnabled = len(cfg.csmEnabled) > 0 + // Require logical grouping of credentials if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 { cfg.Creds = credentials.Value{} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 259b5c0fe..51f305563 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/csm" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" @@ -81,10 +82,16 @@ func New(cfgs ...*aws.Config) *Session { r.Error = err }) } + return s } - return deprecatedNewSession(cfgs...) + s := deprecatedNewSession(cfgs...) + if envCfg.CSMEnabled { + enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + } + + return s } // NewSession returns a new Session created from SDK defaults, config files, @@ -300,10 +307,22 @@ func deprecatedNewSession(cfgs ...*aws.Config) *Session { } initHandlers(s) - return s } +func enableCSM(handlers *request.Handlers, clientID string, port string, logger aws.Logger) { + logger.Log("Enabling CSM") + if len(port) == 0 { + port = csm.DefaultPort + } + + r, err := csm.Start(clientID, "127.0.0.1:"+port) + if err != nil { + return + } + r.InjectHandlers(handlers) +} + func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) { cfg := defaults.Config() handlers := defaults.Handlers() @@ -343,6 +362,9 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, } initHandlers(s) + if envCfg.CSMEnabled { + enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger) + } // Setup HTTP client with custom cert bundle if enabled if opts.CustomCABundle != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 6e4637612..8aa0681d3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -98,25 +98,25 @@ var ignoredHeaders = rules{ var requiredSignedHeaders = rules{ whitelist{ mapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, + "Cache-Control": struct{}{}, + "Content-Disposition": struct{}{}, + "Content-Encoding": struct{}{}, + "Content-Language": struct{}{}, + "Content-Md5": struct{}{}, + "Content-Type": struct{}{}, + "Expires": struct{}{}, + "If-Match": struct{}{}, + "If-Modified-Since": struct{}{}, + "If-None-Match": struct{}{}, + "If-Unmodified-Since": struct{}{}, + "Range": struct{}{}, + "X-Amz-Acl": struct{}{}, + "X-Amz-Copy-Source": struct{}{}, + "X-Amz-Copy-Source-If-Match": struct{}{}, + "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, + "X-Amz-Copy-Source-If-None-Match": struct{}{}, + "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, + "X-Amz-Copy-Source-Range": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, @@ -135,6 +135,7 @@ var requiredSignedHeaders = rules{ "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, "X-Amz-Storage-Class": struct{}{}, "X-Amz-Website-Redirect-Location": struct{}{}, + "X-Amz-Content-Sha256": struct{}{}, }, }, patterns{"X-Amz-Meta-"}, @@ -671,8 +672,15 @@ func (ctx *signingCtx) buildSignature() { func (ctx *signingCtx) buildBodyDigest() error { hash := ctx.Request.Header.Get("X-Amz-Content-Sha256") if hash == "" { - if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") { + includeSHA256Header := ctx.unsignedPayload || + ctx.ServiceName == "s3" || + ctx.ServiceName == "glacier" + + s3Presign := ctx.isPresign && ctx.ServiceName == "s3" + + if ctx.unsignedPayload || s3Presign { hash = "UNSIGNED-PAYLOAD" + includeSHA256Header = !s3Presign } else if ctx.Body == nil { hash = emptyStringSHA256 } else { @@ -681,7 +689,8 @@ func (ctx *signingCtx) buildBodyDigest() error { } hash = hex.EncodeToString(makeSha256Reader(ctx.Body)) } - if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" { + + if includeSHA256Header { ctx.Request.Header.Set("X-Amz-Content-Sha256", hash) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 8cfc7e37e..c4d155c8e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.28" +const SDKVersion = "1.14.31" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go new file mode 100644 index 000000000..38ea61afe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go @@ -0,0 +1,23 @@ +package sdkuri + +import ( + "path" + "strings" +) + +// PathJoin will join the elements of the path delimited by the "/" +// character. Similar to path.Join with the exception the trailing "/" +// character is preserved if present. +func PathJoin(elems ...string) string { + if len(elems) == 0 { + return "" + } + + hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/") + str := path.Join(elems...) + if hasTrailing && str != "/" { + str += "/" + } + + return str +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go new file mode 100644 index 000000000..ecc7bf82f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go @@ -0,0 +1,144 @@ +package eventstream + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "strconv" +) + +type decodedMessage struct { + rawMessage + Headers decodedHeaders `json:"headers"` +} +type jsonMessage struct { + Length json.Number `json:"total_length"` + HeadersLen json.Number `json:"headers_length"` + PreludeCRC json.Number `json:"prelude_crc"` + Headers decodedHeaders `json:"headers"` + Payload []byte `json:"payload"` + CRC json.Number `json:"message_crc"` +} + +func (d *decodedMessage) UnmarshalJSON(b []byte) (err error) { + var jsonMsg jsonMessage + if err = json.Unmarshal(b, &jsonMsg); err != nil { + return err + } + + d.Length, err = numAsUint32(jsonMsg.Length) + if err != nil { + return err + } + d.HeadersLen, err = numAsUint32(jsonMsg.HeadersLen) + if err != nil { + return err + } + d.PreludeCRC, err = numAsUint32(jsonMsg.PreludeCRC) + if err != nil { + return err + } + d.Headers = jsonMsg.Headers + d.Payload = jsonMsg.Payload + d.CRC, err = numAsUint32(jsonMsg.CRC) + if err != nil { + return err + } + + return nil +} + +func (d *decodedMessage) MarshalJSON() ([]byte, error) { + jsonMsg := jsonMessage{ + Length: json.Number(strconv.Itoa(int(d.Length))), + HeadersLen: json.Number(strconv.Itoa(int(d.HeadersLen))), + PreludeCRC: json.Number(strconv.Itoa(int(d.PreludeCRC))), + Headers: d.Headers, + Payload: d.Payload, + CRC: json.Number(strconv.Itoa(int(d.CRC))), + } + + return json.Marshal(jsonMsg) +} + +func numAsUint32(n json.Number) (uint32, error) { + v, err := n.Int64() + if err != nil { + return 0, fmt.Errorf("failed to get int64 json number, %v", err) + } + + return uint32(v), nil +} + +func (d decodedMessage) Message() Message { + return Message{ + Headers: Headers(d.Headers), + Payload: d.Payload, + } +} + +type decodedHeaders Headers + +func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { + var jsonHeaders []struct { + Name string `json:"name"` + Type valueType `json:"type"` + Value interface{} `json:"value"` + } + + decoder := json.NewDecoder(bytes.NewReader(b)) + decoder.UseNumber() + if err := decoder.Decode(&jsonHeaders); err != nil { + return err + } + + var headers Headers + for _, h := range jsonHeaders { + value, err := valueFromType(h.Type, h.Value) + if err != nil { + return err + } + headers.Set(h.Name, value) + } + (*hs) = decodedHeaders(headers) + + return nil +} + +func valueFromType(typ valueType, val interface{}) (Value, error) { + switch typ { + case trueValueType: + return BoolValue(true), nil + case falseValueType: + return BoolValue(false), nil + case int8ValueType: + v, err := val.(json.Number).Int64() + return Int8Value(int8(v)), err + case int16ValueType: + v, err := val.(json.Number).Int64() + return Int16Value(int16(v)), err + case int32ValueType: + v, err := val.(json.Number).Int64() + return Int32Value(int32(v)), err + case int64ValueType: + v, err := val.(json.Number).Int64() + return Int64Value(v), err + case bytesValueType: + v, err := base64.StdEncoding.DecodeString(val.(string)) + return BytesValue(v), err + case stringValueType: + v, err := base64.StdEncoding.DecodeString(val.(string)) + return StringValue(string(v)), err + case timestampValueType: + v, err := val.(json.Number).Int64() + return TimestampValue(timeFromEpochMilli(v)), err + case uuidValueType: + v, err := base64.StdEncoding.DecodeString(val.(string)) + var tv UUIDValue + copy(tv[:], v) + return tv, err + default: + panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val)) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go new file mode 100644 index 000000000..4b972b2d6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go @@ -0,0 +1,199 @@ +package eventstream + +import ( + "bytes" + "encoding/binary" + "encoding/hex" + "encoding/json" + "fmt" + "hash" + "hash/crc32" + "io" + + "github.com/aws/aws-sdk-go/aws" +) + +// Decoder provides decoding of an Event Stream messages. +type Decoder struct { + r io.Reader + logger aws.Logger +} + +// NewDecoder initializes and returns a Decoder for decoding event +// stream messages from the reader provided. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{ + r: r, + } +} + +// Decode attempts to decode a single message from the event stream reader. +// Will return the event stream message, or error if Decode fails to read +// the message from the stream. +func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) { + reader := d.r + if d.logger != nil { + debugMsgBuf := bytes.NewBuffer(nil) + reader = io.TeeReader(reader, debugMsgBuf) + defer func() { + logMessageDecode(d.logger, debugMsgBuf, m, err) + }() + } + + crc := crc32.New(crc32IEEETable) + hashReader := io.TeeReader(reader, crc) + + prelude, err := decodePrelude(hashReader, crc) + if err != nil { + return Message{}, err + } + + if prelude.HeadersLen > 0 { + lr := io.LimitReader(hashReader, int64(prelude.HeadersLen)) + m.Headers, err = decodeHeaders(lr) + if err != nil { + return Message{}, err + } + } + + if payloadLen := prelude.PayloadLen(); payloadLen > 0 { + buf, err := decodePayload(payloadBuf, io.LimitReader(hashReader, int64(payloadLen))) + if err != nil { + return Message{}, err + } + m.Payload = buf + } + + msgCRC := crc.Sum32() + if err := validateCRC(reader, msgCRC); err != nil { + return Message{}, err + } + + return m, nil +} + +// UseLogger specifies the Logger that that the decoder should use to log the +// message decode to. +func (d *Decoder) UseLogger(logger aws.Logger) { + d.logger = logger +} + +func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) { + w := bytes.NewBuffer(nil) + defer func() { logger.Log(w.String()) }() + + fmt.Fprintf(w, "Raw message:\n%s\n", + hex.Dump(msgBuf.Bytes())) + + if decodeErr != nil { + fmt.Fprintf(w, "Decode error: %v\n", decodeErr) + return + } + + rawMsg, err := msg.rawMessage() + if err != nil { + fmt.Fprintf(w, "failed to create raw message, %v\n", err) + return + } + + decodedMsg := decodedMessage{ + rawMessage: rawMsg, + Headers: decodedHeaders(msg.Headers), + } + + fmt.Fprintf(w, "Decoded message:\n") + encoder := json.NewEncoder(w) + if err := encoder.Encode(decodedMsg); err != nil { + fmt.Fprintf(w, "failed to generate decoded message, %v\n", err) + } +} + +func decodePrelude(r io.Reader, crc hash.Hash32) (messagePrelude, error) { + var p messagePrelude + + var err error + p.Length, err = decodeUint32(r) + if err != nil { + return messagePrelude{}, err + } + + p.HeadersLen, err = decodeUint32(r) + if err != nil { + return messagePrelude{}, err + } + + if err := p.ValidateLens(); err != nil { + return messagePrelude{}, err + } + + preludeCRC := crc.Sum32() + if err := validateCRC(r, preludeCRC); err != nil { + return messagePrelude{}, err + } + + p.PreludeCRC = preludeCRC + + return p, nil +} + +func decodePayload(buf []byte, r io.Reader) ([]byte, error) { + w := bytes.NewBuffer(buf[0:0]) + + _, err := io.Copy(w, r) + return w.Bytes(), err +} + +func decodeUint8(r io.Reader) (uint8, error) { + type byteReader interface { + ReadByte() (byte, error) + } + + if br, ok := r.(byteReader); ok { + v, err := br.ReadByte() + return uint8(v), err + } + + var b [1]byte + _, err := io.ReadFull(r, b[:]) + return uint8(b[0]), err +} +func decodeUint16(r io.Reader) (uint16, error) { + var b [2]byte + bs := b[:] + _, err := io.ReadFull(r, bs) + if err != nil { + return 0, err + } + return binary.BigEndian.Uint16(bs), nil +} +func decodeUint32(r io.Reader) (uint32, error) { + var b [4]byte + bs := b[:] + _, err := io.ReadFull(r, bs) + if err != nil { + return 0, err + } + return binary.BigEndian.Uint32(bs), nil +} +func decodeUint64(r io.Reader) (uint64, error) { + var b [8]byte + bs := b[:] + _, err := io.ReadFull(r, bs) + if err != nil { + return 0, err + } + return binary.BigEndian.Uint64(bs), nil +} + +func validateCRC(r io.Reader, expect uint32) error { + msgCRC, err := decodeUint32(r) + if err != nil { + return err + } + + if msgCRC != expect { + return ChecksumError{} + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go new file mode 100644 index 000000000..150a60981 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go @@ -0,0 +1,114 @@ +package eventstream + +import ( + "bytes" + "encoding/binary" + "hash" + "hash/crc32" + "io" +) + +// Encoder provides EventStream message encoding. +type Encoder struct { + w io.Writer + + headersBuf *bytes.Buffer +} + +// NewEncoder initializes and returns an Encoder to encode Event Stream +// messages to an io.Writer. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + w: w, + headersBuf: bytes.NewBuffer(nil), + } +} + +// Encode encodes a single EventStream message to the io.Writer the Encoder +// was created with. An error is returned if writing the message fails. +func (e *Encoder) Encode(msg Message) error { + e.headersBuf.Reset() + + err := encodeHeaders(e.headersBuf, msg.Headers) + if err != nil { + return err + } + + crc := crc32.New(crc32IEEETable) + hashWriter := io.MultiWriter(e.w, crc) + + headersLen := uint32(e.headersBuf.Len()) + payloadLen := uint32(len(msg.Payload)) + + if err := encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil { + return err + } + + if headersLen > 0 { + if _, err := io.Copy(hashWriter, e.headersBuf); err != nil { + return err + } + } + + if payloadLen > 0 { + if _, err := hashWriter.Write(msg.Payload); err != nil { + return err + } + } + + msgCRC := crc.Sum32() + return binary.Write(e.w, binary.BigEndian, msgCRC) +} + +func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error { + p := messagePrelude{ + Length: minMsgLen + headersLen + payloadLen, + HeadersLen: headersLen, + } + if err := p.ValidateLens(); err != nil { + return err + } + + err := binaryWriteFields(w, binary.BigEndian, + p.Length, + p.HeadersLen, + ) + if err != nil { + return err + } + + p.PreludeCRC = crc.Sum32() + err = binary.Write(w, binary.BigEndian, p.PreludeCRC) + if err != nil { + return err + } + + return nil +} + +func encodeHeaders(w io.Writer, headers Headers) error { + for _, h := range headers { + hn := headerName{ + Len: uint8(len(h.Name)), + } + copy(hn.Name[:hn.Len], h.Name) + if err := hn.encode(w); err != nil { + return err + } + + if err := h.Value.encode(w); err != nil { + return err + } + } + + return nil +} + +func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...interface{}) error { + for _, v := range vs { + if err := binary.Write(w, order, v); err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go new file mode 100644 index 000000000..5481ef307 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go @@ -0,0 +1,23 @@ +package eventstream + +import "fmt" + +// LengthError provides the error for items being larger than a maximum length. +type LengthError struct { + Part string + Want int + Have int + Value interface{} +} + +func (e LengthError) Error() string { + return fmt.Sprintf("%s length invalid, %d/%d, %v", + e.Part, e.Want, e.Have, e.Value) +} + +// ChecksumError provides the error for message checksum invalidation errors. +type ChecksumError struct{} + +func (e ChecksumError) Error() string { + return "message checksum mismatch" +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go new file mode 100644 index 000000000..97937c8e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go @@ -0,0 +1,196 @@ +package eventstreamapi + +import ( + "fmt" + "io" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" +) + +// Unmarshaler provides the interface for unmarshaling a EventStream +// message into a SDK type. +type Unmarshaler interface { + UnmarshalEvent(protocol.PayloadUnmarshaler, eventstream.Message) error +} + +// EventStream headers with specific meaning to async API functionality. +const ( + MessageTypeHeader = `:message-type` // Identifies type of message. + EventMessageType = `event` + ErrorMessageType = `error` + ExceptionMessageType = `exception` + + // Message Events + EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats". + + // Message Error + ErrorCodeHeader = `:error-code` + ErrorMessageHeader = `:error-message` + + // Message Exception + ExceptionTypeHeader = `:exception-type` +) + +// EventReader provides reading from the EventStream of an reader. +type EventReader struct { + reader io.ReadCloser + decoder *eventstream.Decoder + + unmarshalerForEventType func(string) (Unmarshaler, error) + payloadUnmarshaler protocol.PayloadUnmarshaler + + payloadBuf []byte +} + +// NewEventReader returns a EventReader built from the reader and unmarshaler +// provided. Use ReadStream method to start reading from the EventStream. +func NewEventReader( + reader io.ReadCloser, + payloadUnmarshaler protocol.PayloadUnmarshaler, + unmarshalerForEventType func(string) (Unmarshaler, error), +) *EventReader { + return &EventReader{ + reader: reader, + decoder: eventstream.NewDecoder(reader), + payloadUnmarshaler: payloadUnmarshaler, + unmarshalerForEventType: unmarshalerForEventType, + payloadBuf: make([]byte, 10*1024), + } +} + +// UseLogger instructs the EventReader to use the logger and log level +// specified. +func (r *EventReader) UseLogger(logger aws.Logger, logLevel aws.LogLevelType) { + if logger != nil && logLevel.Matches(aws.LogDebugWithEventStreamBody) { + r.decoder.UseLogger(logger) + } +} + +// ReadEvent attempts to read a message from the EventStream and return the +// unmarshaled event value that the message is for. +// +// For EventStream API errors check if the returned error satisfies the +// awserr.Error interface to get the error's Code and Message components. +// +// EventUnmarshalers called with EventStream messages must take copies of the +// message's Payload. The payload will is reused between events read. +func (r *EventReader) ReadEvent() (event interface{}, err error) { + msg, err := r.decoder.Decode(r.payloadBuf) + if err != nil { + return nil, err + } + defer func() { + // Reclaim payload buffer for next message read. + r.payloadBuf = msg.Payload[0:0] + }() + + typ, err := GetHeaderString(msg, MessageTypeHeader) + if err != nil { + return nil, err + } + + switch typ { + case EventMessageType: + return r.unmarshalEventMessage(msg) + case ExceptionMessageType: + err = r.unmarshalEventException(msg) + return nil, err + case ErrorMessageType: + return nil, r.unmarshalErrorMessage(msg) + default: + return nil, fmt.Errorf("unknown eventstream message type, %v", typ) + } +} + +func (r *EventReader) unmarshalEventMessage( + msg eventstream.Message, +) (event interface{}, err error) { + eventType, err := GetHeaderString(msg, EventTypeHeader) + if err != nil { + return nil, err + } + + ev, err := r.unmarshalerForEventType(eventType) + if err != nil { + return nil, err + } + + err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg) + if err != nil { + return nil, err + } + + return ev, nil +} + +func (r *EventReader) unmarshalEventException( + msg eventstream.Message, +) (err error) { + eventType, err := GetHeaderString(msg, ExceptionTypeHeader) + if err != nil { + return err + } + + ev, err := r.unmarshalerForEventType(eventType) + if err != nil { + return err + } + + err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg) + if err != nil { + return err + } + + var ok bool + err, ok = ev.(error) + if !ok { + err = messageError{ + code: "SerializationError", + msg: fmt.Sprintf( + "event stream exception %s mapped to non-error %T, %v", + eventType, ev, ev, + ), + } + } + + return err +} + +func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) { + var msgErr messageError + + msgErr.code, err = GetHeaderString(msg, ErrorCodeHeader) + if err != nil { + return err + } + + msgErr.msg, err = GetHeaderString(msg, ErrorMessageHeader) + if err != nil { + return err + } + + return msgErr +} + +// Close closes the EventReader's EventStream reader. +func (r *EventReader) Close() error { + return r.reader.Close() +} + +// GetHeaderString returns the value of the header as a string. If the header +// is not set or the value is not a string an error will be returned. +func GetHeaderString(msg eventstream.Message, headerName string) (string, error) { + headerVal := msg.Headers.Get(headerName) + if headerVal == nil { + return "", fmt.Errorf("error header %s not present", headerName) + } + + v, ok := headerVal.Get().(string) + if !ok { + return "", fmt.Errorf("error header value is not a string, %T", headerVal) + } + + return v, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go new file mode 100644 index 000000000..5ea5a988b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go @@ -0,0 +1,24 @@ +package eventstreamapi + +import "fmt" + +type messageError struct { + code string + msg string +} + +func (e messageError) Code() string { + return e.code +} + +func (e messageError) Message() string { + return e.msg +} + +func (e messageError) Error() string { + return fmt.Sprintf("%s: %s", e.code, e.msg) +} + +func (e messageError) OrigErr() error { + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go new file mode 100644 index 000000000..3b44dde2f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go @@ -0,0 +1,166 @@ +package eventstream + +import ( + "encoding/binary" + "fmt" + "io" +) + +// Headers are a collection of EventStream header values. +type Headers []Header + +// Header is a single EventStream Key Value header pair. +type Header struct { + Name string + Value Value +} + +// Set associates the name with a value. If the header name already exists in +// the Headers the value will be replaced with the new one. +func (hs *Headers) Set(name string, value Value) { + var i int + for ; i < len(*hs); i++ { + if (*hs)[i].Name == name { + (*hs)[i].Value = value + return + } + } + + *hs = append(*hs, Header{ + Name: name, Value: value, + }) +} + +// Get returns the Value associated with the header. Nil is returned if the +// value does not exist. +func (hs Headers) Get(name string) Value { + for i := 0; i < len(hs); i++ { + if h := hs[i]; h.Name == name { + return h.Value + } + } + return nil +} + +// Del deletes the value in the Headers if it exists. +func (hs *Headers) Del(name string) { + for i := 0; i < len(*hs); i++ { + if (*hs)[i].Name == name { + copy((*hs)[i:], (*hs)[i+1:]) + (*hs) = (*hs)[:len(*hs)-1] + } + } +} + +func decodeHeaders(r io.Reader) (Headers, error) { + hs := Headers{} + + for { + name, err := decodeHeaderName(r) + if err != nil { + if err == io.EOF { + // EOF while getting header name means no more headers + break + } + return nil, err + } + + value, err := decodeHeaderValue(r) + if err != nil { + return nil, err + } + + hs.Set(name, value) + } + + return hs, nil +} + +func decodeHeaderName(r io.Reader) (string, error) { + var n headerName + + var err error + n.Len, err = decodeUint8(r) + if err != nil { + return "", err + } + + name := n.Name[:n.Len] + if _, err := io.ReadFull(r, name); err != nil { + return "", err + } + + return string(name), nil +} + +func decodeHeaderValue(r io.Reader) (Value, error) { + var raw rawValue + + typ, err := decodeUint8(r) + if err != nil { + return nil, err + } + raw.Type = valueType(typ) + + var v Value + + switch raw.Type { + case trueValueType: + v = BoolValue(true) + case falseValueType: + v = BoolValue(false) + case int8ValueType: + var tv Int8Value + err = tv.decode(r) + v = tv + case int16ValueType: + var tv Int16Value + err = tv.decode(r) + v = tv + case int32ValueType: + var tv Int32Value + err = tv.decode(r) + v = tv + case int64ValueType: + var tv Int64Value + err = tv.decode(r) + v = tv + case bytesValueType: + var tv BytesValue + err = tv.decode(r) + v = tv + case stringValueType: + var tv StringValue + err = tv.decode(r) + v = tv + case timestampValueType: + var tv TimestampValue + err = tv.decode(r) + v = tv + case uuidValueType: + var tv UUIDValue + err = tv.decode(r) + v = tv + default: + panic(fmt.Sprintf("unknown value type %d", raw.Type)) + } + + // Error could be EOF, let caller deal with it + return v, err +} + +const maxHeaderNameLen = 255 + +type headerName struct { + Len uint8 + Name [maxHeaderNameLen]byte +} + +func (v headerName) encode(w io.Writer) error { + if err := binary.Write(w, binary.BigEndian, v.Len); err != nil { + return err + } + + _, err := w.Write(v.Name[:v.Len]) + return err +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go new file mode 100644 index 000000000..e3fc0766a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go @@ -0,0 +1,501 @@ +package eventstream + +import ( + "encoding/base64" + "encoding/binary" + "fmt" + "io" + "strconv" + "time" +) + +const maxHeaderValueLen = 1<<15 - 1 // 2^15-1 or 32KB - 1 + +// valueType is the EventStream header value type. +type valueType uint8 + +// Header value types +const ( + trueValueType valueType = iota + falseValueType + int8ValueType // Byte + int16ValueType // Short + int32ValueType // Integer + int64ValueType // Long + bytesValueType + stringValueType + timestampValueType + uuidValueType +) + +func (t valueType) String() string { + switch t { + case trueValueType: + return "bool" + case falseValueType: + return "bool" + case int8ValueType: + return "int8" + case int16ValueType: + return "int16" + case int32ValueType: + return "int32" + case int64ValueType: + return "int64" + case bytesValueType: + return "byte_array" + case stringValueType: + return "string" + case timestampValueType: + return "timestamp" + case uuidValueType: + return "uuid" + default: + return fmt.Sprintf("unknown value type %d", uint8(t)) + } +} + +type rawValue struct { + Type valueType + Len uint16 // Only set for variable length slices + Value []byte // byte representation of value, BigEndian encoding. +} + +func (r rawValue) encodeScalar(w io.Writer, v interface{}) error { + return binaryWriteFields(w, binary.BigEndian, + r.Type, + v, + ) +} + +func (r rawValue) encodeFixedSlice(w io.Writer, v []byte) error { + binary.Write(w, binary.BigEndian, r.Type) + + _, err := w.Write(v) + return err +} + +func (r rawValue) encodeBytes(w io.Writer, v []byte) error { + if len(v) > maxHeaderValueLen { + return LengthError{ + Part: "header value", + Want: maxHeaderValueLen, Have: len(v), + Value: v, + } + } + r.Len = uint16(len(v)) + + err := binaryWriteFields(w, binary.BigEndian, + r.Type, + r.Len, + ) + if err != nil { + return err + } + + _, err = w.Write(v) + return err +} + +func (r rawValue) encodeString(w io.Writer, v string) error { + if len(v) > maxHeaderValueLen { + return LengthError{ + Part: "header value", + Want: maxHeaderValueLen, Have: len(v), + Value: v, + } + } + r.Len = uint16(len(v)) + + type stringWriter interface { + WriteString(string) (int, error) + } + + err := binaryWriteFields(w, binary.BigEndian, + r.Type, + r.Len, + ) + if err != nil { + return err + } + + if sw, ok := w.(stringWriter); ok { + _, err = sw.WriteString(v) + } else { + _, err = w.Write([]byte(v)) + } + + return err +} + +func decodeFixedBytesValue(r io.Reader, buf []byte) error { + _, err := io.ReadFull(r, buf) + return err +} + +func decodeBytesValue(r io.Reader) ([]byte, error) { + var raw rawValue + var err error + raw.Len, err = decodeUint16(r) + if err != nil { + return nil, err + } + + buf := make([]byte, raw.Len) + _, err = io.ReadFull(r, buf) + if err != nil { + return nil, err + } + + return buf, nil +} + +func decodeStringValue(r io.Reader) (string, error) { + v, err := decodeBytesValue(r) + return string(v), err +} + +// Value represents the abstract header value. +type Value interface { + Get() interface{} + String() string + valueType() valueType + encode(io.Writer) error +} + +// An BoolValue provides eventstream encoding, and representation +// of a Go bool value. +type BoolValue bool + +// Get returns the underlying type +func (v BoolValue) Get() interface{} { + return bool(v) +} + +// valueType returns the EventStream header value type value. +func (v BoolValue) valueType() valueType { + if v { + return trueValueType + } + return falseValueType +} + +func (v BoolValue) String() string { + return strconv.FormatBool(bool(v)) +} + +// encode encodes the BoolValue into an eventstream binary value +// representation. +func (v BoolValue) encode(w io.Writer) error { + return binary.Write(w, binary.BigEndian, v.valueType()) +} + +// An Int8Value provides eventstream encoding, and representation of a Go +// int8 value. +type Int8Value int8 + +// Get returns the underlying value. +func (v Int8Value) Get() interface{} { + return int8(v) +} + +// valueType returns the EventStream header value type value. +func (Int8Value) valueType() valueType { + return int8ValueType +} + +func (v Int8Value) String() string { + return fmt.Sprintf("0x%02x", int8(v)) +} + +// encode encodes the Int8Value into an eventstream binary value +// representation. +func (v Int8Value) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + + return raw.encodeScalar(w, v) +} + +func (v *Int8Value) decode(r io.Reader) error { + n, err := decodeUint8(r) + if err != nil { + return err + } + + *v = Int8Value(n) + return nil +} + +// An Int16Value provides eventstream encoding, and representation of a Go +// int16 value. +type Int16Value int16 + +// Get returns the underlying value. +func (v Int16Value) Get() interface{} { + return int16(v) +} + +// valueType returns the EventStream header value type value. +func (Int16Value) valueType() valueType { + return int16ValueType +} + +func (v Int16Value) String() string { + return fmt.Sprintf("0x%04x", int16(v)) +} + +// encode encodes the Int16Value into an eventstream binary value +// representation. +func (v Int16Value) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + return raw.encodeScalar(w, v) +} + +func (v *Int16Value) decode(r io.Reader) error { + n, err := decodeUint16(r) + if err != nil { + return err + } + + *v = Int16Value(n) + return nil +} + +// An Int32Value provides eventstream encoding, and representation of a Go +// int32 value. +type Int32Value int32 + +// Get returns the underlying value. +func (v Int32Value) Get() interface{} { + return int32(v) +} + +// valueType returns the EventStream header value type value. +func (Int32Value) valueType() valueType { + return int32ValueType +} + +func (v Int32Value) String() string { + return fmt.Sprintf("0x%08x", int32(v)) +} + +// encode encodes the Int32Value into an eventstream binary value +// representation. +func (v Int32Value) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + return raw.encodeScalar(w, v) +} + +func (v *Int32Value) decode(r io.Reader) error { + n, err := decodeUint32(r) + if err != nil { + return err + } + + *v = Int32Value(n) + return nil +} + +// An Int64Value provides eventstream encoding, and representation of a Go +// int64 value. +type Int64Value int64 + +// Get returns the underlying value. +func (v Int64Value) Get() interface{} { + return int64(v) +} + +// valueType returns the EventStream header value type value. +func (Int64Value) valueType() valueType { + return int64ValueType +} + +func (v Int64Value) String() string { + return fmt.Sprintf("0x%016x", int64(v)) +} + +// encode encodes the Int64Value into an eventstream binary value +// representation. +func (v Int64Value) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + return raw.encodeScalar(w, v) +} + +func (v *Int64Value) decode(r io.Reader) error { + n, err := decodeUint64(r) + if err != nil { + return err + } + + *v = Int64Value(n) + return nil +} + +// An BytesValue provides eventstream encoding, and representation of a Go +// byte slice. +type BytesValue []byte + +// Get returns the underlying value. +func (v BytesValue) Get() interface{} { + return []byte(v) +} + +// valueType returns the EventStream header value type value. +func (BytesValue) valueType() valueType { + return bytesValueType +} + +func (v BytesValue) String() string { + return base64.StdEncoding.EncodeToString([]byte(v)) +} + +// encode encodes the BytesValue into an eventstream binary value +// representation. +func (v BytesValue) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + + return raw.encodeBytes(w, []byte(v)) +} + +func (v *BytesValue) decode(r io.Reader) error { + buf, err := decodeBytesValue(r) + if err != nil { + return err + } + + *v = BytesValue(buf) + return nil +} + +// An StringValue provides eventstream encoding, and representation of a Go +// string. +type StringValue string + +// Get returns the underlying value. +func (v StringValue) Get() interface{} { + return string(v) +} + +// valueType returns the EventStream header value type value. +func (StringValue) valueType() valueType { + return stringValueType +} + +func (v StringValue) String() string { + return string(v) +} + +// encode encodes the StringValue into an eventstream binary value +// representation. +func (v StringValue) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + + return raw.encodeString(w, string(v)) +} + +func (v *StringValue) decode(r io.Reader) error { + s, err := decodeStringValue(r) + if err != nil { + return err + } + + *v = StringValue(s) + return nil +} + +// An TimestampValue provides eventstream encoding, and representation of a Go +// timestamp. +type TimestampValue time.Time + +// Get returns the underlying value. +func (v TimestampValue) Get() interface{} { + return time.Time(v) +} + +// valueType returns the EventStream header value type value. +func (TimestampValue) valueType() valueType { + return timestampValueType +} + +func (v TimestampValue) epochMilli() int64 { + nano := time.Time(v).UnixNano() + msec := nano / int64(time.Millisecond) + return msec +} + +func (v TimestampValue) String() string { + msec := v.epochMilli() + return strconv.FormatInt(msec, 10) +} + +// encode encodes the TimestampValue into an eventstream binary value +// representation. +func (v TimestampValue) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + + msec := v.epochMilli() + return raw.encodeScalar(w, msec) +} + +func (v *TimestampValue) decode(r io.Reader) error { + n, err := decodeUint64(r) + if err != nil { + return err + } + + *v = TimestampValue(timeFromEpochMilli(int64(n))) + return nil +} + +func timeFromEpochMilli(t int64) time.Time { + secs := t / 1e3 + msec := t % 1e3 + return time.Unix(secs, msec*int64(time.Millisecond)).UTC() +} + +// An UUIDValue provides eventstream encoding, and representation of a UUID +// value. +type UUIDValue [16]byte + +// Get returns the underlying value. +func (v UUIDValue) Get() interface{} { + return v[:] +} + +// valueType returns the EventStream header value type value. +func (UUIDValue) valueType() valueType { + return uuidValueType +} + +func (v UUIDValue) String() string { + return fmt.Sprintf(`%X-%X-%X-%X-%X`, v[0:4], v[4:6], v[6:8], v[8:10], v[10:]) +} + +// encode encodes the UUIDValue into an eventstream binary value +// representation. +func (v UUIDValue) encode(w io.Writer) error { + raw := rawValue{ + Type: v.valueType(), + } + + return raw.encodeFixedSlice(w, v[:]) +} + +func (v *UUIDValue) decode(r io.Reader) error { + tv := (*v)[:] + return decodeFixedBytesValue(r, tv) +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go new file mode 100644 index 000000000..2dc012a66 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go @@ -0,0 +1,103 @@ +package eventstream + +import ( + "bytes" + "encoding/binary" + "hash/crc32" +) + +const preludeLen = 8 +const preludeCRCLen = 4 +const msgCRCLen = 4 +const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen +const maxPayloadLen = 1024 * 1024 * 16 // 16MB +const maxHeadersLen = 1024 * 128 // 128KB +const maxMsgLen = minMsgLen + maxHeadersLen + maxPayloadLen + +var crc32IEEETable = crc32.MakeTable(crc32.IEEE) + +// A Message provides the eventstream message representation. +type Message struct { + Headers Headers + Payload []byte +} + +func (m *Message) rawMessage() (rawMessage, error) { + var raw rawMessage + + if len(m.Headers) > 0 { + var headers bytes.Buffer + if err := encodeHeaders(&headers, m.Headers); err != nil { + return rawMessage{}, err + } + raw.Headers = headers.Bytes() + raw.HeadersLen = uint32(len(raw.Headers)) + } + + raw.Length = raw.HeadersLen + uint32(len(m.Payload)) + minMsgLen + + hash := crc32.New(crc32IEEETable) + binaryWriteFields(hash, binary.BigEndian, raw.Length, raw.HeadersLen) + raw.PreludeCRC = hash.Sum32() + + binaryWriteFields(hash, binary.BigEndian, raw.PreludeCRC) + + if raw.HeadersLen > 0 { + hash.Write(raw.Headers) + } + + // Read payload bytes and update hash for it as well. + if len(m.Payload) > 0 { + raw.Payload = m.Payload + hash.Write(raw.Payload) + } + + raw.CRC = hash.Sum32() + + return raw, nil +} + +type messagePrelude struct { + Length uint32 + HeadersLen uint32 + PreludeCRC uint32 +} + +func (p messagePrelude) PayloadLen() uint32 { + return p.Length - p.HeadersLen - minMsgLen +} + +func (p messagePrelude) ValidateLens() error { + if p.Length == 0 || p.Length > maxMsgLen { + return LengthError{ + Part: "message prelude", + Want: maxMsgLen, + Have: int(p.Length), + } + } + if p.HeadersLen > maxHeadersLen { + return LengthError{ + Part: "message headers", + Want: maxHeadersLen, + Have: int(p.HeadersLen), + } + } + if payloadLen := p.PayloadLen(); payloadLen > maxPayloadLen { + return LengthError{ + Part: "message payload", + Want: maxPayloadLen, + Have: int(payloadLen), + } + } + + return nil +} + +type rawMessage struct { + messagePrelude + + Headers []byte + Payload []byte + + CRC uint32 +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go index ec765ba25..864fb6704 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go @@ -216,7 +216,17 @@ func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) erro default: switch converted := value.Interface().(type) { case time.Time: - buf.Write(strconv.AppendInt(scratch[:0], converted.UTC().Unix(), 10)) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.UnixTimeFormatName + } + + ts := protocol.FormatTime(format, converted) + if format != protocol.UnixTimeFormatName { + ts = `"` + ts + `"` + } + + buf.WriteString(ts) case []byte: if !value.IsNil() { buf.WriteByte('"') diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go index 037e1e7be..2f6628d43 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go @@ -172,9 +172,6 @@ func unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) } func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error { - errf := func() error { - return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) - } switch d := data.(type) { case nil: @@ -189,6 +186,17 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa return err } value.Set(reflect.ValueOf(b)) + case *time.Time: + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + t, err := protocol.ParseTime(format, d) + if err != nil { + return err + } + value.Set(reflect.ValueOf(&t)) case aws.JSONValue: // No need to use escaping as the value is a non-quoted string. v, err := protocol.DecodeJSONValue(d, protocol.NoEscape) @@ -197,7 +205,7 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa } value.Set(reflect.ValueOf(v)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case float64: switch value.Interface().(type) { @@ -207,17 +215,18 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa case *float64: value.Set(reflect.ValueOf(&d)) case *time.Time: + // Time unmarshaled from a float64 can only be epoch seconds t := time.Unix(int64(d), 0).UTC() value.Set(reflect.ValueOf(&t)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case bool: switch value.Interface().(type) { case *bool: value.Set(reflect.ValueOf(&d)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } default: return fmt.Errorf("unsupported JSON value (%v)", data) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go new file mode 100644 index 000000000..e21614a12 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go @@ -0,0 +1,81 @@ +package protocol + +import ( + "io" + "io/ioutil" + "net/http" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" +) + +// PayloadUnmarshaler provides the interface for unmarshaling a payload's +// reader into a SDK shape. +type PayloadUnmarshaler interface { + UnmarshalPayload(io.Reader, interface{}) error +} + +// HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a +// HandlerList. This provides the support for unmarshaling a payload reader to +// a shape without needing a SDK request first. +type HandlerPayloadUnmarshal struct { + Unmarshalers request.HandlerList +} + +// UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using +// the Unmarshalers HandlerList provided. Returns an error if unable +// unmarshaling fails. +func (h HandlerPayloadUnmarshal) UnmarshalPayload(r io.Reader, v interface{}) error { + req := &request.Request{ + HTTPRequest: &http.Request{}, + HTTPResponse: &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(r), + }, + Data: v, + } + + h.Unmarshalers.Run(req) + + return req.Error +} + +// PayloadMarshaler provides the interface for marshaling a SDK shape into and +// io.Writer. +type PayloadMarshaler interface { + MarshalPayload(io.Writer, interface{}) error +} + +// HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList. +// This provides support for marshaling a SDK shape into an io.Writer without +// needing a SDK request first. +type HandlerPayloadMarshal struct { + Marshalers request.HandlerList +} + +// MarshalPayload marshals the SDK shape into the io.Writer using the +// Marshalers HandlerList provided. Returns an error if unable if marshal +// fails. +func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error { + req := request.New( + aws.Config{}, + metadata.ClientInfo{}, + request.Handlers{}, + nil, + &request.Operation{HTTPMethod: "GET"}, + v, + nil, + ) + + h.Marshalers.Run(req) + + if req.Error != nil { + return req.Error + } + + io.Copy(w, req.GetBody()) + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go index 5ce9cba32..75866d012 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go @@ -233,7 +233,12 @@ func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, ta v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32)) case time.Time: const ISO8601UTC = "2006-01-02T15:04:05Z" - v.Set(name, value.UTC().Format(ISO8601UTC)) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + v.Set(name, protocol.FormatTime(format, value)) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name()) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index c405288d7..b34f5258a 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -20,9 +20,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol" ) -// RFC822 returns an RFC822 formatted timestamp for AWS protocols -const RFC822 = "Mon, 2 Jan 2006 15:04:05 GMT" - // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool @@ -270,7 +267,14 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) case float64: str = strconv.FormatFloat(value, 'f', -1, 64) case time.Time: - str = value.UTC().Format(RFC822) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.RFC822TimeFormatName + if tag.Get("location") == "querystring" { + format = protocol.ISO8601TimeFormatName + } + } + str = protocol.FormatTime(format, value) case aws.JSONValue: if len(value) == 0 { return "", errValueNotSet diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go index 823f045ee..33fd53b12 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go @@ -198,7 +198,11 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro } v.Set(reflect.ValueOf(&f)) case *time.Time: - t, err := time.Parse(RFC822, header) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.RFC822TimeFormatName + } + t, err := protocol.ParseTime(format, header) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go new file mode 100644 index 000000000..b7ed6c6f8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go @@ -0,0 +1,72 @@ +package protocol + +import ( + "strconv" + "time" +) + +// Names of time formats supported by the SDK +const ( + RFC822TimeFormatName = "rfc822" + ISO8601TimeFormatName = "iso8601" + UnixTimeFormatName = "unixTimestamp" +) + +// Time formats supported by the SDK +const ( + // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT + RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" + + // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z + ISO8601TimeFormat = "2006-01-02T15:04:05Z" +) + +// IsKnownTimestampFormat returns if the timestamp format name +// is know to the SDK's protocols. +func IsKnownTimestampFormat(name string) bool { + switch name { + case RFC822TimeFormatName: + fallthrough + case ISO8601TimeFormatName: + fallthrough + case UnixTimeFormatName: + return true + default: + return false + } +} + +// FormatTime returns a string value of the time. +func FormatTime(name string, t time.Time) string { + t = t.UTC() + + switch name { + case RFC822TimeFormatName: + return t.Format(RFC822TimeFormat) + case ISO8601TimeFormatName: + return t.Format(ISO8601TimeFormat) + case UnixTimeFormatName: + return strconv.FormatInt(t.Unix(), 10) + default: + panic("unknown timestamp format name, " + name) + } +} + +// ParseTime attempts to parse the time given the format. Returns +// the time if it was able to be parsed, and fails otherwise. +func ParseTime(formatName, value string) (time.Time, error) { + switch formatName { + case RFC822TimeFormatName: + return time.Parse(RFC822TimeFormat, value) + case ISO8601TimeFormatName: + return time.Parse(ISO8601TimeFormat, value) + case UnixTimeFormatName: + v, err := strconv.ParseFloat(value, 64) + if err != nil { + return time.Time{}, err + } + return time.Unix(int64(v), 0), nil + default: + panic("unknown timestamp format name, " + formatName) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index 7091b456d..07764c862 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -13,9 +13,13 @@ import ( "github.com/aws/aws-sdk-go/private/protocol" ) -// BuildXML will serialize params into an xml.Encoder. -// Error will be returned if the serialization of any of the params or nested values fails. +// BuildXML will serialize params into an xml.Encoder. Error will be returned +// if the serialization of any of the params or nested values fails. func BuildXML(params interface{}, e *xml.Encoder) error { + return buildXML(params, e, false) +} + +func buildXML(params interface{}, e *xml.Encoder, sorted bool) error { b := xmlBuilder{encoder: e, namespaces: map[string]string{}} root := NewXMLElement(xml.Name{}) if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil { @@ -23,7 +27,7 @@ func BuildXML(params interface{}, e *xml.Encoder) error { } for _, c := range root.Children { for _, v := range c { - return StructToXML(e, v, false) + return StructToXML(e, v, sorted) } } return nil @@ -278,8 +282,12 @@ func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag refl case float32: str = strconv.FormatFloat(float64(converted), 'f', -1, 32) case time.Time: - const ISO8601UTC = "2006-01-02T15:04:05Z" - str = converted.UTC().Format(ISO8601UTC) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + str = protocol.FormatTime(format, converted) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", tag.Get("locationName"), value.Interface(), value.Type().Name()) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go index 87584628a..ff1ef6830 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go @@ -9,6 +9,8 @@ import ( "strconv" "strings" "time" + + "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalXML deserializes an xml.Decoder into the container v. V @@ -52,9 +54,15 @@ func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { if t == "" { switch rtype.Kind() { case reflect.Struct: - t = "structure" + // also it can't be a time object + if _, ok := r.Interface().(*time.Time); !ok { + t = "structure" + } case reflect.Slice: - t = "list" + // also it can't be a byte slice + if _, ok := r.Interface().([]byte); !ok { + t = "list" + } case reflect.Map: t = "map" } @@ -247,8 +255,12 @@ func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { } r.Set(reflect.ValueOf(&v)) case *time.Time: - const ISO8601UTC = "2006-01-02T15:04:05Z" - t, err := time.Parse(ISO8601UTC, node.Text) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + t, err := protocol.ParseTime(format, node.Text) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go index 3e970b629..515ce1521 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go @@ -29,6 +29,7 @@ func NewXMLElement(name xml.Name) *XMLNode { // AddChild adds child to the XMLNode. func (n *XMLNode) AddChild(child *XMLNode) { + child.parent = n if _, ok := n.Children[child.Name.Local]; !ok { n.Children[child.Name.Local] = []*XMLNode{} } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index 71e240316..07fa10c94 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -71,7 +71,7 @@ func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req // if you want to specify a relationship among those resources. For example, // you can add the same tag to an ACM certificate and an Elastic Load Balancing // load balancer to indicate that they are both used by the same website. For -// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/tags.html). +// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/acm/latest/userguide/tags.html). // // To remove one or more tags, use the RemoveTagsFromCertificate action. To // view all of the tags that have been applied to the certificate, use the ListTagsForCertificate @@ -345,12 +345,13 @@ func (c *ACM) ExportCertificateRequest(input *ExportCertificateInput) (req *requ // ExportCertificate API operation for AWS Certificate Manager. // -// Exports a certificate for use anywhere. You can export the certificate, the -// certificate chain, and the encrypted private key associated with the public -// key embedded in the certificate. You must store the private key securely. -// The private key is a 2048 bit RSA key. You must provide a passphrase for -// the private key when exporting it. You can use the following OpenSSL command -// to decrypt it later. Provide the passphrase when prompted. +// Exports a private certificate issued by a private certificate authority (CA) +// for use anywhere. You can export the certificate, the certificate chain, +// and the encrypted private key associated with the public key embedded in +// the certificate. You must store the private key securely. The private key +// is a 2048 bit RSA key. You must provide a passphrase for the private key +// when exporting it. You can use the following OpenSSL command to decrypt it +// later. Provide the passphrase when prompted. // // openssl rsa -in encrypted_key.pem -out decrypted_key.pem // @@ -532,15 +533,15 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // ImportCertificate API operation for AWS Certificate Manager. // // Imports a certificate into AWS Certificate Manager (ACM) to use with services -// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-services.html) +// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/acm/latest/userguide/acm-services.html) // allow only certificate types and keys they support to be associated with // their resources. Further, their support differs depending on whether the // certificate is imported into IAM or into ACM. For more information, see the // documentation for each service. For more information about importing certificates -// into ACM, see Importing Certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) +// into ACM, see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. // -// ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) +// ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for certificates that you import. // // Note the following guidelines when importing third party certificates: @@ -569,13 +570,17 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // * To import a new certificate, omit the CertificateArn argument. Include // this argument only when you want to replace a previously imported certificate. // -// * When you import a certificate by using the CLI or one of the SDKs, you -// must specify the certificate, the certificate chain, and the private key -// by their file names preceded by file://. For example, you can specify -// a certificate saved in the C:\temp folder as file://C:\temp\certificate_to_import.pem. +// * When you import a certificate by using the CLI, you must specify the +// certificate, the certificate chain, and the private key by their file +// names preceded by file://. For example, you can specify a certificate +// saved in the C:\temp folder as file://C:\temp\certificate_to_import.pem. // If you are making an HTTP or HTTPS Query request, include these arguments // as BLOBs. // +// * When you import a certificate by using an SDK, you must specify the +// certificate, the certificate chain, and the private key files in the manner +// required by the programming language you're using. +// // This operation returns the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the imported certificate. // @@ -975,22 +980,17 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // RequestCertificate API operation for AWS Certificate Manager. // // Requests an ACM certificate for use with other AWS services. To request an -// ACM certificate, you must specify the fully qualified domain name (FQDN) -// for your site in the DomainName parameter. You can also specify additional -// FQDNs in the SubjectAlternativeNames parameter. +// ACM certificate, you must specify a fully qualified domain name (FQDN) in +// the DomainName parameter. You can also specify additional FQDNs in the SubjectAlternativeNames +// parameter. // -// Each domain name that you specify must be validated to verify that you own -// or control the domain. You can use DNS validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) -// or email validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). -// We recommend that you use DNS validation. -// -// If you choose email validation, email is sent to the domain owner to request -// approval to issue the certificate. Email is sent to three registered contact -// addresses in the WHOIS database and to five common system administration -// addresses formed from the DomainName you enter or the optional ValidationDomain -// parameter. For more information, see Validate with Email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). -// -// After receiving approval from the domain owner, the ACM certificate is issued. +// If you are requesting a private certificate, domain validation is not required. +// If you are requesting a public certificate, each domain name that you specify +// must be validated to verify that you own or control the domain. You can use +// DNS validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) +// or email validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). +// We recommend that you use DNS validation. ACM issues public certificates +// after receiving approval from the domain owner. // // 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 @@ -1087,7 +1087,7 @@ func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (r // more than 72 hours have elapsed since your original request or since your // last attempt to resend validation mail, you must request a new certificate. // For more information about setting up your contact email addresses, see Configure -// Email for your Domain (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/setup-email.html). +// Email for your Domain (http://docs.aws.amazon.com/acm/latest/userguide/setup-email.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 @@ -1181,7 +1181,7 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp // Updates a certificate. Currently, you can use this function to specify whether // to opt in to or out of recording your certificate in a certificate transparency // log. For more information, see Opting Out of Certificate Transparency Logging -// (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). +// (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). // // 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 @@ -1332,7 +1332,7 @@ type CertificateDetail struct { // The time at which the certificate was requested. This value exists only when // the certificate type is AMAZON_ISSUED. - CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `type:"timestamp"` // The fully qualified domain name for the certificate, such as www.example.com // or example.com. @@ -1350,13 +1350,13 @@ type CertificateDetail struct { // The reason the certificate request failed. This value exists only when the // certificate status is FAILED. For more information, see Certificate Request - // Failed (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/troubleshooting.html#troubleshooting-failed) + // Failed (http://docs.aws.amazon.com/acm/latest/userguide/troubleshooting.html#troubleshooting-failed) // in the AWS Certificate Manager User Guide. FailureReason *string `type:"string" enum:"FailureReason"` // The date and time at which the certificate was imported. This value exists // only when the certificate type is IMPORTED. - ImportedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + ImportedAt *time.Time `type:"timestamp"` // A list of ARNs for the AWS resources that are using the certificate. A certificate // can be used by multiple AWS resources. @@ -1364,7 +1364,7 @@ type CertificateDetail struct { // The time at which the certificate was issued. This value exists only when // the certificate type is AMAZON_ISSUED. - IssuedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + IssuedAt *time.Time `type:"timestamp"` // The name of the certificate authority that issued and signed the certificate. Issuer *string `type:"string"` @@ -1379,10 +1379,10 @@ type CertificateDetail struct { KeyUsages []*KeyUsage `type:"list"` // The time after which the certificate is not valid. - NotAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + NotAfter *time.Time `type:"timestamp"` // The time before which the certificate is not valid. - NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + NotBefore *time.Time `type:"timestamp"` // Value that specifies whether to add the certificate to a transparency log. // Certificate transparency makes it possible to detect SSL certificates that @@ -1394,7 +1394,7 @@ type CertificateDetail struct { // Specifies whether the certificate is eligible for renewal. RenewalEligibility *string `type:"string" enum:"RenewalEligibility"` - // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for the certificate. This field exists only when the certificate type is // AMAZON_ISSUED. RenewalSummary *RenewalSummary `type:"structure"` @@ -1405,7 +1405,7 @@ type CertificateDetail struct { // The time at which the certificate was revoked. This value exists only when // the certificate status is REVOKED. - RevokedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + RevokedAt *time.Time `type:"timestamp"` // The serial number of the certificate. Serial *string `type:"string"` @@ -1429,10 +1429,10 @@ type CertificateDetail struct { // The source of the certificate. For certificates provided by ACM, this value // is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, - // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for imported certificates. For more information about the differences between // certificates that you import and those that ACM provides, see Importing Certificates - // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) + // (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. Type *string `type:"string" enum:"CertificateType"` } @@ -1609,7 +1609,7 @@ func (s *CertificateDetail) SetType(v string) *CertificateDetail { // be recorded in a log. Certificates that are not logged typically generate // a browser error. Transparency makes it possible for you to detect SSL/TLS // certificates that have been mistakenly or maliciously issued for your domain. -// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-concepts.html#concept-transparency). +// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency). type CertificateOptions struct { _ struct{} `type:"structure"` @@ -1815,7 +1815,7 @@ type DomainValidation struct { DomainName *string `min:"1" type:"string" required:"true"` // Contains the CNAME record that you add to your DNS database for domain validation. - // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html). + // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html). ResourceRecord *ResourceRecord `type:"structure"` // The domain name that ACM used to send domain validation emails. @@ -2647,14 +2647,14 @@ func (s RemoveTagsFromCertificateOutput) GoString() string { return s.String() } -// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) +// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for the certificate. This structure exists only when the certificate type // is AMAZON_ISSUED. type RenewalSummary struct { _ struct{} `type:"structure"` // Contains information about the validation of each domain name in the certificate, - // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html). + // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html). // This is different from the initial validation that occurs as a result of // the RequestCertificate request. This field exists only when the certificate // type is AMAZON_ISSUED. @@ -2662,7 +2662,7 @@ type RenewalSummary struct { // DomainValidationOptions is a required field DomainValidationOptions []*DomainValidation `min:"1" type:"list" required:"true"` - // The status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // The status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // of the certificate. // // RenewalStatus is a required field @@ -2695,18 +2695,19 @@ type RequestCertificateInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the private certificate authority (CA) - // that will be used to issue the certificate. For more information about private - // CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) - // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm-pca/latest/userguide/PcaWelcome.html) + // that will be used to issue the certificate. If you do not provide an ARN + // and you are trying to request a private certificate, ACM will attempt to + // issue a public certificate. For more information about private CAs, see the + // AWS Certificate Manager Private Certificate Authority (PCA) (http://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html) // user guide. The ARN must have the following form: // // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 CertificateAuthorityArn *string `min:"20" type:"string"` - // Fully qualified domain name (FQDN), such as www.example.com, of the site - // that you want to secure with an ACM Certificate. Use an asterisk (*) to create - // a wildcard certificate that protects several sites in the same domain. For - // example, *.example.com protects www.example.com, site.example.com, and images.example.com. + // Fully qualified domain name (FQDN), such as www.example.com, that you want + // to secure with an ACM certificate. Use an asterisk (*) to create a wildcard + // certificate that protects several sites in the same domain. For example, + // *.example.com protects www.example.com, site.example.com, and images.example.com. // // The first domain name you enter cannot exceed 63 octets, including periods. // Each subsequent Subject Alternative Name (SAN), however, can be up to 253 @@ -2732,7 +2733,7 @@ type RequestCertificateInput struct { // to detect SSL/TLS certificates that have been mistakenly or maliciously issued. // Certificates that have not been logged typically produce an error message // in a browser. For more information, see Opting Out of Certificate Transparency - // Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). + // Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). Options *CertificateOptions `type:"structure"` // Additional FQDNs to be included in the Subject Alternative Name extension @@ -2741,7 +2742,7 @@ type RequestCertificateInput struct { // site by using either name. The maximum number of domain names that you can // add to an ACM certificate is 100. However, the initial limit is 10 domain // names. If you need more than 10 names, you must request a limit increase. - // For more information, see Limits (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-limits.html). + // For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). // // The maximum length of a SAN DNS name is 253 octets. The name is made up of // multiple labels separated by periods. No label can be longer than 63 octets. @@ -2759,9 +2760,9 @@ type RequestCertificateInput struct { // the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets. SubjectAlternativeNames []*string `min:"1" type:"list"` - // The method you want to use to validate that you own or control domain. You - // can validate with DNS (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) - // or validate with email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). + // The method you want to use if you are requesting a public certificate to + // validate that you own or control domain. You can validate with DNS (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) + // or validate with email (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). // We recommend that you use DNS validation. ValidationMethod *string `type:"string" enum:"ValidationMethod"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go index a8e67c424..8a183a969 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go @@ -7,7 +7,7 @@ // // You can use ACM to manage SSL/TLS certificates for your AWS-based websites // and applications. For general information about using ACM, see the AWS Certificate -// Manager User Guide (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/). +// Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). // // See https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go b/vendor/github.com/aws/aws-sdk-go/service/acm/service.go index b083c37d6..9817d0c0a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "acm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "acm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ACM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ACM client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go new file mode 100644 index 000000000..6d63b88bc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go @@ -0,0 +1,71 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acm + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilCertificateValidated uses the ACM API operation +// DescribeCertificate 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 *ACM) WaitUntilCertificateValidated(input *DescribeCertificateInput) error { + return c.WaitUntilCertificateValidatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateValidatedWithContext is an extended version of WaitUntilCertificateValidated. +// 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 *ACM) WaitUntilCertificateValidatedWithContext(ctx aws.Context, input *DescribeCertificateInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateValidated", + MaxAttempts: 40, + Delay: request.ConstantWaiterDelay(60 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", + Expected: "SUCCESS", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", + Expected: "PENDING_VALIDATION", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "Certificate.Status", + Expected: "FAILED", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeCertificateInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCertificateRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go new file mode 100644 index 000000000..113c0a3ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -0,0 +1,4053 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +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 opCreateCertificateAuthority = "CreateCertificateAuthority" + +// CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the CreateCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateCertificateAuthority for more information on using the CreateCertificateAuthority +// 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 CreateCertificateAuthorityRequest method. +// req, resp := client.CreateCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority +func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAuthorityInput) (req *request.Request, output *CreateCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opCreateCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCertificateAuthorityInput{} + } + + output = &CreateCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Creates a private subordinate certificate authority (CA). You must specify +// the CA configuration, the revocation configuration, the CA type, and an optional +// idempotency token. The CA configuration specifies the name of the algorithm +// and key size to be used to create the CA private key, the type of signing +// algorithm that the CA uses to sign, and X.500 subject information. The CRL +// (certificate revocation list) configuration specifies the CRL expiration +// period in days (the validity period of the CRL), the Amazon S3 bucket that +// will contain the CRL, and a CNAME alias for the S3 bucket that is included +// in certificates issued by the CA. If successful, this operation returns the +// Amazon Resource Name (ARN) of the CA. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation CreateCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidPolicyException "InvalidPolicyException" +// The S3 bucket policy is not valid. The policy must give ACM PCA rights to +// read from and write to the bucket and find the bucket location. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// An ACM PCA limit has been exceeded. See the exception message returned to +// determine the limit that was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority +func (c *ACMPCA) CreateCertificateAuthority(input *CreateCertificateAuthorityInput) (*CreateCertificateAuthorityOutput, error) { + req, out := c.CreateCertificateAuthorityRequest(input) + return out, req.Send() +} + +// CreateCertificateAuthorityWithContext is the same as CreateCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCertificateAuthority 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 *ACMPCA) CreateCertificateAuthorityWithContext(ctx aws.Context, input *CreateCertificateAuthorityInput, opts ...request.Option) (*CreateCertificateAuthorityOutput, error) { + req, out := c.CreateCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAuditReport" + +// CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the +// client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateCertificateAuthorityAuditReport for more information on using the CreateCertificateAuthorityAuditReport +// 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 CreateCertificateAuthorityAuditReportRequest method. +// req, resp := client.CreateCertificateAuthorityAuditReportRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport +func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCertificateAuthorityAuditReportInput) (req *request.Request, output *CreateCertificateAuthorityAuditReportOutput) { + op := &request.Operation{ + Name: opCreateCertificateAuthorityAuditReport, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCertificateAuthorityAuditReportInput{} + } + + output = &CreateCertificateAuthorityAuditReportOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. +// +// Creates an audit report that lists every time that the your CA private key +// is used. The report is saved in the Amazon S3 bucket that you specify on +// input. The IssueCertificate and RevokeCertificate operations use the private +// key. You can generate a new report every 30 minutes. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation CreateCertificateAuthorityAuditReport for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport +func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) { + req, out := c.CreateCertificateAuthorityAuditReportRequest(input) + return out, req.Send() +} + +// CreateCertificateAuthorityAuditReportWithContext is the same as CreateCertificateAuthorityAuditReport with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCertificateAuthorityAuditReport 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 *ACMPCA) CreateCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *CreateCertificateAuthorityAuditReportInput, opts ...request.Option) (*CreateCertificateAuthorityAuditReportOutput, error) { + req, out := c.CreateCertificateAuthorityAuditReportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCertificateAuthority = "DeleteCertificateAuthority" + +// DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteCertificateAuthority for more information on using the DeleteCertificateAuthority +// 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 DeleteCertificateAuthorityRequest method. +// req, resp := client.DeleteCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority +func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAuthorityInput) (req *request.Request, output *DeleteCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDeleteCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteCertificateAuthorityInput{} + } + + output = &DeleteCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Deletes a private certificate authority (CA). You must provide the ARN (Amazon +// Resource Name) of the private CA that you want to delete. You can find the +// ARN by calling the ListCertificateAuthorities operation. Before you can delete +// a CA, you must disable it. Call the UpdateCertificateAuthority operation +// and set the CertificateAuthorityStatus parameter to DISABLED. +// +// Additionally, you can delete a CA if you are waiting for it to be created +// (the Status field of the CertificateAuthority is CREATING). You can also +// delete it if the CA has been created but you haven't yet imported the signed +// certificate (the Status is PENDING_CERTIFICATE) into ACM PCA. +// +// If the CA is in one of the aforementioned states and you call DeleteCertificateAuthority, +// the CA's status changes to DELETED. However, the CA won't be permentantly +// deleted until the restoration period has passed. By default, if you do not +// set the PermanentDeletionTimeInDays parameter, the CA remains restorable +// for 30 days. You can set the parameter from 7 to 30 days. The DescribeCertificateAuthority +// operation returns the time remaining in the restoration window of a Private +// CA in the DELETED state. To restore an eligable CA, call the RestoreCertificateAuthority +// operation. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation DeleteCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority +func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) { + req, out := c.DeleteCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DeleteCertificateAuthorityWithContext is the same as DeleteCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCertificateAuthority 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 *ACMPCA) DeleteCertificateAuthorityWithContext(ctx aws.Context, input *DeleteCertificateAuthorityInput, opts ...request.Option) (*DeleteCertificateAuthorityOutput, error) { + req, out := c.DeleteCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCertificateAuthority = "DescribeCertificateAuthority" + +// DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeCertificateAuthority for more information on using the DescribeCertificateAuthority +// 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 DescribeCertificateAuthorityRequest method. +// req, resp := client.DescribeCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority +func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateAuthorityInput) (req *request.Request, output *DescribeCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDescribeCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCertificateAuthorityInput{} + } + + output = &DescribeCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists information about your private certificate authority (CA). You specify +// the private CA on input by its ARN (Amazon Resource Name). The output contains +// the status of your CA. This can be any of the following: +// +// * CREATING - ACM PCA is creating your private certificate authority. +// +// * PENDING_CERTIFICATE - The certificate is pending. You must use your +// on-premises root or subordinate CA to sign your private CA CSR and then +// import it into PCA. +// +// * ACTIVE - Your private CA is active. +// +// * DISABLED - Your private CA has been disabled. +// +// * EXPIRED - Your private CA certificate has expired. +// +// * FAILED - Your private CA has failed. Your CA can fail because of problems +// such a network outage or backend AWS failure or other errors. A failed +// CA can never return to the pending state. You must create a new CA. +// +// * DELETED - Your private CA is within the restoration period, after which +// it will be permanently deleted. The length of time remaining in the CA's +// restoration period will also be included in this operation's output. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation DescribeCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority +func (c *ACMPCA) DescribeCertificateAuthority(input *DescribeCertificateAuthorityInput) (*DescribeCertificateAuthorityOutput, error) { + req, out := c.DescribeCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DescribeCertificateAuthorityWithContext is the same as DescribeCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCertificateAuthority 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 *ACMPCA) DescribeCertificateAuthorityWithContext(ctx aws.Context, input *DescribeCertificateAuthorityInput, opts ...request.Option) (*DescribeCertificateAuthorityOutput, error) { + req, out := c.DescribeCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityAuditReport" + +// DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeCertificateAuthorityAuditReport for more information on using the DescribeCertificateAuthorityAuditReport +// 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 DescribeCertificateAuthorityAuditReportRequest method. +// req, resp := client.DescribeCertificateAuthorityAuditReportRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport +func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeCertificateAuthorityAuditReportInput) (req *request.Request, output *DescribeCertificateAuthorityAuditReportOutput) { + op := &request.Operation{ + Name: opDescribeCertificateAuthorityAuditReport, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCertificateAuthorityAuditReportInput{} + } + + output = &DescribeCertificateAuthorityAuditReportOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport +// operation. Audit information is created every time the certificate authority +// (CA) private key is used. The private key is used when you call the IssueCertificate +// operation or the RevokeCertificate operation. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation DescribeCertificateAuthorityAuditReport for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport +func (c *ACMPCA) DescribeCertificateAuthorityAuditReport(input *DescribeCertificateAuthorityAuditReportInput) (*DescribeCertificateAuthorityAuditReportOutput, error) { + req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) + return out, req.Send() +} + +// DescribeCertificateAuthorityAuditReportWithContext is the same as DescribeCertificateAuthorityAuditReport with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCertificateAuthorityAuditReport 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 *ACMPCA) DescribeCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.Option) (*DescribeCertificateAuthorityAuditReportOutput, error) { + req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificate = "GetCertificate" + +// GetCertificateRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetCertificate for more information on using the GetCertificate +// 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 GetCertificateRequest method. +// req, resp := client.GetCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate +func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) { + op := &request.Operation{ + Name: opGetCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateInput{} + } + + output = &GetCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves a certificate from your private CA. The ARN of the certificate +// is returned when you call the IssueCertificate operation. You must specify +// both the ARN of your private CA and the ARN of the issued certificate when +// calling the GetCertificate operation. You can retrieve the certificate if +// it is in the ISSUED state. You can call the CreateCertificateAuthorityAuditReport +// operation to create a report that contains information about all of the certificates +// issued and revoked by your private CA. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation GetCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate +func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { + req, out := c.GetCertificateRequest(input) + return out, req.Send() +} + +// GetCertificateWithContext is the same as GetCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificate 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 *ACMPCA) GetCertificateWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.Option) (*GetCertificateOutput, error) { + req, out := c.GetCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate" + +// GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificateAuthorityCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetCertificateAuthorityCertificate for more information on using the GetCertificateAuthorityCertificate +// 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 GetCertificateAuthorityCertificateRequest method. +// req, resp := client.GetCertificateAuthorityCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate +func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificateAuthorityCertificateInput) (req *request.Request, output *GetCertificateAuthorityCertificateOutput) { + op := &request.Operation{ + Name: opGetCertificateAuthorityCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateAuthorityCertificateInput{} + } + + output = &GetCertificateAuthorityCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves the certificate and certificate chain for your private certificate +// authority (CA). Both the certificate and the chain are base64 PEM-encoded. +// The chain does not include the CA certificate. Each certificate in the chain +// signs the one before it. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation GetCertificateAuthorityCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate +func (c *ACMPCA) GetCertificateAuthorityCertificate(input *GetCertificateAuthorityCertificateInput) (*GetCertificateAuthorityCertificateOutput, error) { + req, out := c.GetCertificateAuthorityCertificateRequest(input) + return out, req.Send() +} + +// GetCertificateAuthorityCertificateWithContext is the same as GetCertificateAuthorityCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificateAuthorityCertificate 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 *ACMPCA) GetCertificateAuthorityCertificateWithContext(ctx aws.Context, input *GetCertificateAuthorityCertificateInput, opts ...request.Option) (*GetCertificateAuthorityCertificateOutput, error) { + req, out := c.GetCertificateAuthorityCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr" + +// GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificateAuthorityCsr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetCertificateAuthorityCsr for more information on using the GetCertificateAuthorityCsr +// 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 GetCertificateAuthorityCsrRequest method. +// req, resp := client.GetCertificateAuthorityCsrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr +func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorityCsrInput) (req *request.Request, output *GetCertificateAuthorityCsrOutput) { + op := &request.Operation{ + Name: opGetCertificateAuthorityCsr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateAuthorityCsrInput{} + } + + output = &GetCertificateAuthorityCsrOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificateAuthorityCsr API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves the certificate signing request (CSR) for your private certificate +// authority (CA). The CSR is created when you call the CreateCertificateAuthority +// operation. Take the CSR to your on-premises X.509 infrastructure and sign +// it by using your root or a subordinate CA. Then import the signed certificate +// back into ACM PCA by calling the ImportCertificateAuthorityCertificate operation. +// The CSR is returned as a base64 PEM-encoded string. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation GetCertificateAuthorityCsr for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr +func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { + req, out := c.GetCertificateAuthorityCsrRequest(input) + return out, req.Send() +} + +// GetCertificateAuthorityCsrWithContext is the same as GetCertificateAuthorityCsr with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificateAuthorityCsr 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 *ACMPCA) GetCertificateAuthorityCsrWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.Option) (*GetCertificateAuthorityCsrOutput, error) { + req, out := c.GetCertificateAuthorityCsrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCertificate" + +// ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the +// client's request for the ImportCertificateAuthorityCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ImportCertificateAuthorityCertificate for more information on using the ImportCertificateAuthorityCertificate +// 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 ImportCertificateAuthorityCertificateRequest method. +// req, resp := client.ImportCertificateAuthorityCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate +func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCertificateAuthorityCertificateInput) (req *request.Request, output *ImportCertificateAuthorityCertificateOutput) { + op := &request.Operation{ + Name: opImportCertificateAuthorityCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportCertificateAuthorityCertificateInput{} + } + + output = &ImportCertificateAuthorityCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// ImportCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Imports your signed private CA certificate into ACM PCA. Before you can call +// this operation, you must create the private certificate authority by calling +// the CreateCertificateAuthority operation. You must then generate a certificate +// signing request (CSR) by calling the GetCertificateAuthorityCsr operation. +// Take the CSR to your on-premises CA and use the root certificate or a subordinate +// certificate to sign it. Create a certificate chain and copy the signed certificate +// and the certificate chain to your working directory. +// +// Your certificate chain must not include the private CA certificate that you +// are importing. +// +// Your on-premises CA certificate must be the last certificate in your chain. +// The subordinate certificate, if any, that your root CA signed must be next +// to last. The subordinate certificate signed by the preceding subordinate +// CA must come next, and so on until your chain is built. +// +// The chain must be PEM-encoded. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation ImportCertificateAuthorityCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeMalformedCertificateException "MalformedCertificateException" +// One or more fields in the certificate are invalid. +// +// * ErrCodeCertificateMismatchException "CertificateMismatchException" +// The certificate authority certificate you are importing does not comply with +// conditions specified in the certificate that signed it. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate +func (c *ACMPCA) ImportCertificateAuthorityCertificate(input *ImportCertificateAuthorityCertificateInput) (*ImportCertificateAuthorityCertificateOutput, error) { + req, out := c.ImportCertificateAuthorityCertificateRequest(input) + return out, req.Send() +} + +// ImportCertificateAuthorityCertificateWithContext is the same as ImportCertificateAuthorityCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See ImportCertificateAuthorityCertificate 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 *ACMPCA) ImportCertificateAuthorityCertificateWithContext(ctx aws.Context, input *ImportCertificateAuthorityCertificateInput, opts ...request.Option) (*ImportCertificateAuthorityCertificateOutput, error) { + req, out := c.ImportCertificateAuthorityCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIssueCertificate = "IssueCertificate" + +// IssueCertificateRequest generates a "aws/request.Request" representing the +// client's request for the IssueCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 IssueCertificate for more information on using the IssueCertificate +// 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 IssueCertificateRequest method. +// req, resp := client.IssueCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate +func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *request.Request, output *IssueCertificateOutput) { + op := &request.Operation{ + Name: opIssueCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IssueCertificateInput{} + } + + output = &IssueCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// IssueCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Uses your private certificate authority (CA) to issue a client certificate. +// This operation returns the Amazon Resource Name (ARN) of the certificate. +// You can retrieve the certificate by calling the GetCertificate operation +// and specifying the ARN. +// +// You cannot use the ACM ListCertificateAuthorities operation to retrieve the +// ARNs of the certificates that you issue by using ACM PCA. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation IssueCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// An ACM PCA limit has been exceeded. See the exception message returned to +// determine the limit that was exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeMalformedCSRException "MalformedCSRException" +// The certificate signing request is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate +func (c *ACMPCA) IssueCertificate(input *IssueCertificateInput) (*IssueCertificateOutput, error) { + req, out := c.IssueCertificateRequest(input) + return out, req.Send() +} + +// IssueCertificateWithContext is the same as IssueCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See IssueCertificate 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 *ACMPCA) IssueCertificateWithContext(ctx aws.Context, input *IssueCertificateInput, opts ...request.Option) (*IssueCertificateOutput, error) { + req, out := c.IssueCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCertificateAuthorities = "ListCertificateAuthorities" + +// ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the +// client's request for the ListCertificateAuthorities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListCertificateAuthorities for more information on using the ListCertificateAuthorities +// 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 ListCertificateAuthoritiesRequest method. +// req, resp := client.ListCertificateAuthoritiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities +func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthoritiesInput) (req *request.Request, output *ListCertificateAuthoritiesOutput) { + op := &request.Operation{ + Name: opListCertificateAuthorities, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListCertificateAuthoritiesInput{} + } + + output = &ListCertificateAuthoritiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCertificateAuthorities API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists the private certificate authorities that you created by using the CreateCertificateAuthority +// operation. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation ListCertificateAuthorities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The token specified in the NextToken argument is not valid. Use the token +// returned from your previous call to ListCertificateAuthorities. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities +func (c *ACMPCA) ListCertificateAuthorities(input *ListCertificateAuthoritiesInput) (*ListCertificateAuthoritiesOutput, error) { + req, out := c.ListCertificateAuthoritiesRequest(input) + return out, req.Send() +} + +// ListCertificateAuthoritiesWithContext is the same as ListCertificateAuthorities with the addition of +// the ability to pass a context and additional request options. +// +// See ListCertificateAuthorities 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 *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, opts ...request.Option) (*ListCertificateAuthoritiesOutput, error) { + req, out := c.ListCertificateAuthoritiesRequest(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 +// successfuly. +// +// 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/acm-pca-2017-08-22/ListTags +func (c *ACMPCA) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists the tags, if any, that are associated with your private CA. Tags are +// labels that you can use to identify and organize your CAs. Each tag consists +// of a key and an optional value. Call the TagCertificateAuthority operation +// to add one or more tags to your CA. Call the UntagCertificateAuthority operation +// to remove tags. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags +func (c *ACMPCA) 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 *ACMPCA) 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() +} + +const opRestoreCertificateAuthority = "RestoreCertificateAuthority" + +// RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the RestoreCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RestoreCertificateAuthority for more information on using the RestoreCertificateAuthority +// 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 RestoreCertificateAuthorityRequest method. +// req, resp := client.RestoreCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority +func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAuthorityInput) (req *request.Request, output *RestoreCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opRestoreCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreCertificateAuthorityInput{} + } + + output = &RestoreCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RestoreCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Restores a certificate authority (CA) that is in the DELETED state. You can +// restore a CA during the period that you defined in the PermanentDeletionTimeInDays +// parameter of the DeleteCertificateAuthority operation. Currently, you can +// specify 7 to 30 days. If you did not specify a PermanentDeletionTimeInDays +// value, by default you can restore the CA at any time in a 30 day period. +// You can check the time remaining in the restoration period of a private CA +// in the DELETED state by calling the DescribeCertificateAuthority or ListCertificateAuthorities +// operations. The status of a restored CA is set to its pre-deletion status +// when the RestoreCertificateAuthority operation returns. To change its status +// to ACTIVE, call the UpdateCertificateAuthority operation. If the private +// CA was in the PENDING_CERTIFICATE state at deletion, you must use the ImportCertificateAuthorityCertificate +// operation to import a certificate authority into the private CA before it +// can be activated. You cannot restore a CA after the restoration period has +// ended. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation RestoreCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority +func (c *ACMPCA) RestoreCertificateAuthority(input *RestoreCertificateAuthorityInput) (*RestoreCertificateAuthorityOutput, error) { + req, out := c.RestoreCertificateAuthorityRequest(input) + return out, req.Send() +} + +// RestoreCertificateAuthorityWithContext is the same as RestoreCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreCertificateAuthority 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 *ACMPCA) RestoreCertificateAuthorityWithContext(ctx aws.Context, input *RestoreCertificateAuthorityInput, opts ...request.Option) (*RestoreCertificateAuthorityOutput, error) { + req, out := c.RestoreCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRevokeCertificate = "RevokeCertificate" + +// RevokeCertificateRequest generates a "aws/request.Request" representing the +// client's request for the RevokeCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RevokeCertificate for more information on using the RevokeCertificate +// 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 RevokeCertificateRequest method. +// req, resp := client.RevokeCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate +func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *request.Request, output *RevokeCertificateOutput) { + op := &request.Operation{ + Name: opRevokeCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeCertificateInput{} + } + + output = &RevokeCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RevokeCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Revokes a certificate that you issued by calling the IssueCertificate operation. +// If you enable a certificate revocation list (CRL) when you create or update +// your private CA, information about the revoked certificates will be included +// in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For +// more information about revocation, see the CrlConfiguration structure. ACM +// PCA also writes revocation information to the audit report. For more information, +// see CreateCertificateAuthorityAuditReport. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation RevokeCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeRequestAlreadyProcessedException "RequestAlreadyProcessedException" +// Your request has already been completed. +// +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate +func (c *ACMPCA) RevokeCertificate(input *RevokeCertificateInput) (*RevokeCertificateOutput, error) { + req, out := c.RevokeCertificateRequest(input) + return out, req.Send() +} + +// RevokeCertificateWithContext is the same as RevokeCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeCertificate 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 *ACMPCA) RevokeCertificateWithContext(ctx aws.Context, input *RevokeCertificateInput, opts ...request.Option) (*RevokeCertificateOutput, error) { + req, out := c.RevokeCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagCertificateAuthority = "TagCertificateAuthority" + +// TagCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the TagCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 TagCertificateAuthority for more information on using the TagCertificateAuthority +// 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 TagCertificateAuthorityRequest method. +// req, resp := client.TagCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority +func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityInput) (req *request.Request, output *TagCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opTagCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagCertificateAuthorityInput{} + } + + output = &TagCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Adds one or more tags to your private CA. Tags are labels that you can use +// to identify and organize your AWS resources. Each tag consists of a key and +// an optional value. You specify the private CA on input by its Amazon Resource +// Name (ARN). You specify the tag by using a key-value pair. You can apply +// a tag to just one private CA if you want to identify a specific characteristic +// of that CA, or you can apply the same tag to multiple private CAs if you +// want to filter for a common relationship among those CAs. To remove one or +// more tags, use the UntagCertificateAuthority operation. Call the ListTags +// operation to see what tags are associated with your CA. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation TagCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidTagException "InvalidTagException" +// The tag associated with the CA is not valid. The invalid argument is contained +// in the message field. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// You can associate up to 50 tags with a private CA. Exception information +// is contained in the exception message field. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority +func (c *ACMPCA) TagCertificateAuthority(input *TagCertificateAuthorityInput) (*TagCertificateAuthorityOutput, error) { + req, out := c.TagCertificateAuthorityRequest(input) + return out, req.Send() +} + +// TagCertificateAuthorityWithContext is the same as TagCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See TagCertificateAuthority 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 *ACMPCA) TagCertificateAuthorityWithContext(ctx aws.Context, input *TagCertificateAuthorityInput, opts ...request.Option) (*TagCertificateAuthorityOutput, error) { + req, out := c.TagCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagCertificateAuthority = "UntagCertificateAuthority" + +// UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the UntagCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UntagCertificateAuthority for more information on using the UntagCertificateAuthority +// 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 UntagCertificateAuthorityRequest method. +// req, resp := client.UntagCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority +func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthorityInput) (req *request.Request, output *UntagCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opUntagCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagCertificateAuthorityInput{} + } + + output = &UntagCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Remove one or more tags from your private CA. A tag consists of a key-value +// pair. If you do not specify the value portion of the tag when calling this +// operation, the tag will be removed regardless of value. If you specify a +// value, the tag is removed only if it is associated with the specified value. +// To add tags to a private CA, use the TagCertificateAuthority. Call the ListTags +// operation to see what tags are associated with your CA. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation UntagCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidTagException "InvalidTagException" +// The tag associated with the CA is not valid. The invalid argument is contained +// in the message field. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority +func (c *ACMPCA) UntagCertificateAuthority(input *UntagCertificateAuthorityInput) (*UntagCertificateAuthorityOutput, error) { + req, out := c.UntagCertificateAuthorityRequest(input) + return out, req.Send() +} + +// UntagCertificateAuthorityWithContext is the same as UntagCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See UntagCertificateAuthority 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 *ACMPCA) UntagCertificateAuthorityWithContext(ctx aws.Context, input *UntagCertificateAuthorityInput, opts ...request.Option) (*UntagCertificateAuthorityOutput, error) { + req, out := c.UntagCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCertificateAuthority = "UpdateCertificateAuthority" + +// UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateCertificateAuthority for more information on using the UpdateCertificateAuthority +// 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 UpdateCertificateAuthorityRequest method. +// req, resp := client.UpdateCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority +func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAuthorityInput) (req *request.Request, output *UpdateCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opUpdateCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateCertificateAuthorityInput{} + } + + output = &UpdateCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Updates the status or configuration of a private certificate authority (CA). +// Your private CA must be in the ACTIVE or DISABLED state before you can update +// it. You can disable a private CA that is in the ACTIVE state or make a CA +// that is in the DISABLED state active again. +// +// 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 Certificate Manager Private Certificate Authority's +// API operation UpdateCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidPolicyException "InvalidPolicyException" +// The S3 bucket policy is not valid. The policy must give ACM PCA rights to +// read from and write to the bucket and find the bucket location. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority +func (c *ACMPCA) UpdateCertificateAuthority(input *UpdateCertificateAuthorityInput) (*UpdateCertificateAuthorityOutput, error) { + req, out := c.UpdateCertificateAuthorityRequest(input) + return out, req.Send() +} + +// UpdateCertificateAuthorityWithContext is the same as UpdateCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCertificateAuthority 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 *ACMPCA) UpdateCertificateAuthorityWithContext(ctx aws.Context, input *UpdateCertificateAuthorityInput, opts ...request.Option) (*UpdateCertificateAuthorityOutput, error) { + req, out := c.UpdateCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains information about the certificate subject. The certificate can be +// one issued by your private certificate authority (CA) or it can be your private +// CA certificate. The Subject field in the certificate identifies the entity +// that owns or controls the public key in the certificate. The entity can be +// a user, computer, device, or service. The Subject must contain an X.500 distinguished +// name (DN). A DN is a sequence of relative distinguished names (RDNs). The +// RDNs are separated by commas in the certificate. The DN must be unique for +// each entity, but your private CA can issue more than one certificate with +// the same DN to the same entity. +type ASN1Subject struct { + _ struct{} `type:"structure"` + + // Fully qualified domain name (FQDN) associated with the certificate subject. + CommonName *string `type:"string"` + + // Two-digit code that specifies the country in which the certificate subject + // located. + Country *string `type:"string"` + + // Disambiguating information for the certificate subject. + DistinguishedNameQualifier *string `type:"string"` + + // Typically a qualifier appended to the name of an individual. Examples include + // Jr. for junior, Sr. for senior, and III for third. + GenerationQualifier *string `type:"string"` + + // First name. + GivenName *string `type:"string"` + + // Concatenation that typically contains the first letter of the GivenName, + // the first letter of the middle name if one exists, and the first letter of + // the SurName. + Initials *string `type:"string"` + + // The locality (such as a city or town) in which the certificate subject is + // located. + Locality *string `type:"string"` + + // Legal name of the organization with which the certificate subject is affiliated. + Organization *string `type:"string"` + + // A subdivision or unit of the organization (such as sales or finance) with + // which the certificate subject is affiliated. + OrganizationalUnit *string `type:"string"` + + // Typically a shortened version of a longer GivenName. For example, Jonathan + // is often shortened to John. Elizabeth is often shortened to Beth, Liz, or + // Eliza. + Pseudonym *string `type:"string"` + + // The certificate serial number. + SerialNumber *string `type:"string"` + + // State in which the subject of the certificate is located. + State *string `type:"string"` + + // Family name. In the US and the UK, for example, the surname of an individual + // is ordered last. In Asian cultures the surname is typically ordered first. + Surname *string `type:"string"` + + // A title such as Mr. or Ms., which is pre-pended to the name to refer formally + // to the certificate subject. + Title *string `type:"string"` +} + +// String returns the string representation +func (s ASN1Subject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ASN1Subject) GoString() string { + return s.String() +} + +// SetCommonName sets the CommonName field's value. +func (s *ASN1Subject) SetCommonName(v string) *ASN1Subject { + s.CommonName = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *ASN1Subject) SetCountry(v string) *ASN1Subject { + s.Country = &v + return s +} + +// SetDistinguishedNameQualifier sets the DistinguishedNameQualifier field's value. +func (s *ASN1Subject) SetDistinguishedNameQualifier(v string) *ASN1Subject { + s.DistinguishedNameQualifier = &v + return s +} + +// SetGenerationQualifier sets the GenerationQualifier field's value. +func (s *ASN1Subject) SetGenerationQualifier(v string) *ASN1Subject { + s.GenerationQualifier = &v + return s +} + +// SetGivenName sets the GivenName field's value. +func (s *ASN1Subject) SetGivenName(v string) *ASN1Subject { + s.GivenName = &v + return s +} + +// SetInitials sets the Initials field's value. +func (s *ASN1Subject) SetInitials(v string) *ASN1Subject { + s.Initials = &v + return s +} + +// SetLocality sets the Locality field's value. +func (s *ASN1Subject) SetLocality(v string) *ASN1Subject { + s.Locality = &v + return s +} + +// SetOrganization sets the Organization field's value. +func (s *ASN1Subject) SetOrganization(v string) *ASN1Subject { + s.Organization = &v + return s +} + +// SetOrganizationalUnit sets the OrganizationalUnit field's value. +func (s *ASN1Subject) SetOrganizationalUnit(v string) *ASN1Subject { + s.OrganizationalUnit = &v + return s +} + +// SetPseudonym sets the Pseudonym field's value. +func (s *ASN1Subject) SetPseudonym(v string) *ASN1Subject { + s.Pseudonym = &v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *ASN1Subject) SetSerialNumber(v string) *ASN1Subject { + s.SerialNumber = &v + return s +} + +// SetState sets the State field's value. +func (s *ASN1Subject) SetState(v string) *ASN1Subject { + s.State = &v + return s +} + +// SetSurname sets the Surname field's value. +func (s *ASN1Subject) SetSurname(v string) *ASN1Subject { + s.Surname = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *ASN1Subject) SetTitle(v string) *ASN1Subject { + s.Title = &v + return s +} + +// Contains information about your private certificate authority (CA). Your +// private CA can issue and revoke X.509 digital certificates. Digital certificates +// verify that the entity named in the certificate Subject field owns or controls +// the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority +// operation to create your private CA. You must then call the GetCertificateAuthorityCertificate +// operation to retrieve a private CA certificate signing request (CSR). Take +// the CSR to your on-premises CA and sign it with the root CA certificate or +// a subordinate certificate. Call the ImportCertificateAuthorityCertificate +// operation to import the signed certificate into AWS Certificate Manager (ACM). +type CertificateAuthority struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) for your private certificate authority (CA). The + // format is 12345678-1234-1234-1234-123456789012. + Arn *string `min:"5" type:"string"` + + // Your private CA configuration. + CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure"` + + // Date and time at which your private CA was created. + CreatedAt *time.Time `type:"timestamp"` + + // Reason the request to create your private CA failed. + FailureReason *string `type:"string" enum:"FailureReason"` + + // Date and time at which your private CA was last updated. + LastStateChangeAt *time.Time `type:"timestamp"` + + // Date and time after which your private CA certificate is not valid. + NotAfter *time.Time `type:"timestamp"` + + // Date and time before which your private CA certificate is not valid. + NotBefore *time.Time `type:"timestamp"` + + // The period during which a deleted CA can be restored. For more information, + // see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest + // operation. + RestorableUntil *time.Time `type:"timestamp"` + + // Information about the certificate revocation list (CRL) created and maintained + // by your private CA. + RevocationConfiguration *RevocationConfiguration `type:"structure"` + + // Serial number of your private CA. + Serial *string `type:"string"` + + // Status of your private CA. + Status *string `type:"string" enum:"CertificateAuthorityStatus"` + + // Type of your private CA. + Type *string `type:"string" enum:"CertificateAuthorityType"` +} + +// String returns the string representation +func (s CertificateAuthority) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthority) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CertificateAuthority) SetArn(v string) *CertificateAuthority { + s.Arn = &v + return s +} + +// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. +func (s *CertificateAuthority) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CertificateAuthority { + s.CertificateAuthorityConfiguration = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *CertificateAuthority) SetCreatedAt(v time.Time) *CertificateAuthority { + s.CreatedAt = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *CertificateAuthority) SetFailureReason(v string) *CertificateAuthority { + s.FailureReason = &v + return s +} + +// SetLastStateChangeAt sets the LastStateChangeAt field's value. +func (s *CertificateAuthority) SetLastStateChangeAt(v time.Time) *CertificateAuthority { + s.LastStateChangeAt = &v + return s +} + +// SetNotAfter sets the NotAfter field's value. +func (s *CertificateAuthority) SetNotAfter(v time.Time) *CertificateAuthority { + s.NotAfter = &v + return s +} + +// SetNotBefore sets the NotBefore field's value. +func (s *CertificateAuthority) SetNotBefore(v time.Time) *CertificateAuthority { + s.NotBefore = &v + return s +} + +// SetRestorableUntil sets the RestorableUntil field's value. +func (s *CertificateAuthority) SetRestorableUntil(v time.Time) *CertificateAuthority { + s.RestorableUntil = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *CertificateAuthority) SetRevocationConfiguration(v *RevocationConfiguration) *CertificateAuthority { + s.RevocationConfiguration = v + return s +} + +// SetSerial sets the Serial field's value. +func (s *CertificateAuthority) SetSerial(v string) *CertificateAuthority { + s.Serial = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CertificateAuthority) SetStatus(v string) *CertificateAuthority { + s.Status = &v + return s +} + +// SetType sets the Type field's value. +func (s *CertificateAuthority) SetType(v string) *CertificateAuthority { + s.Type = &v + return s +} + +// Contains configuration information for your private certificate authority +// (CA). This includes information about the class of public key algorithm and +// the key pair that your private CA creates when it issues a certificate, the +// signature algorithm it uses used when issuing certificates, and its X.500 +// distinguished name. You must specify this information when you call the CreateCertificateAuthority +// operation. +type CertificateAuthorityConfiguration struct { + _ struct{} `type:"structure"` + + // Type of the public key algorithm and size, in bits, of the key pair that + // your key pair creates when it issues a certificate. + // + // KeyAlgorithm is a required field + KeyAlgorithm *string `type:"string" required:"true" enum:"KeyAlgorithm"` + + // Name of the algorithm your private CA uses to sign certificate requests. + // + // SigningAlgorithm is a required field + SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` + + // Structure that contains X.500 distinguished name information for your private + // CA. + // + // Subject is a required field + Subject *ASN1Subject `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CertificateAuthorityConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthorityConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CertificateAuthorityConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CertificateAuthorityConfiguration"} + if s.KeyAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("KeyAlgorithm")) + } + if s.SigningAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) + } + if s.Subject == nil { + invalidParams.Add(request.NewErrParamRequired("Subject")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyAlgorithm sets the KeyAlgorithm field's value. +func (s *CertificateAuthorityConfiguration) SetKeyAlgorithm(v string) *CertificateAuthorityConfiguration { + s.KeyAlgorithm = &v + return s +} + +// SetSigningAlgorithm sets the SigningAlgorithm field's value. +func (s *CertificateAuthorityConfiguration) SetSigningAlgorithm(v string) *CertificateAuthorityConfiguration { + s.SigningAlgorithm = &v + return s +} + +// SetSubject sets the Subject field's value. +func (s *CertificateAuthorityConfiguration) SetSubject(v *ASN1Subject) *CertificateAuthorityConfiguration { + s.Subject = v + return s +} + +type CreateCertificateAuthorityAuditReportInput struct { + _ struct{} `type:"structure"` + + // Format in which to create the report. This can be either JSON or CSV. + // + // AuditReportResponseFormat is a required field + AuditReportResponseFormat *string `type:"string" required:"true" enum:"AuditReportResponseFormat"` + + // Amazon Resource Name (ARN) of the CA to be audited. This is of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Name of the S3 bucket that will contain the audit report. + // + // S3BucketName is a required field + S3BucketName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityAuditReportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityAuditReportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCertificateAuthorityAuditReportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityAuditReportInput"} + if s.AuditReportResponseFormat == nil { + invalidParams.Add(request.NewErrParamRequired("AuditReportResponseFormat")) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.S3BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditReportResponseFormat sets the AuditReportResponseFormat field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetAuditReportResponseFormat(v string) *CreateCertificateAuthorityAuditReportInput { + s.AuditReportResponseFormat = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityAuditReportInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetS3BucketName(v string) *CreateCertificateAuthorityAuditReportInput { + s.S3BucketName = &v + return s +} + +type CreateCertificateAuthorityAuditReportOutput struct { + _ struct{} `type:"structure"` + + // An alphanumeric string that contains a report identifier. + AuditReportId *string `min:"36" type:"string"` + + // The key that uniquely identifies the report file in your S3 bucket. + S3Key *string `type:"string"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityAuditReportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityAuditReportOutput) GoString() string { + return s.String() +} + +// SetAuditReportId sets the AuditReportId field's value. +func (s *CreateCertificateAuthorityAuditReportOutput) SetAuditReportId(v string) *CreateCertificateAuthorityAuditReportOutput { + s.AuditReportId = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *CreateCertificateAuthorityAuditReportOutput) SetS3Key(v string) *CreateCertificateAuthorityAuditReportOutput { + s.S3Key = &v + return s +} + +type CreateCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // Name and bit size of the private key algorithm, the name of the signing algorithm, + // and X.500 certificate subject information. + // + // CertificateAuthorityConfiguration is a required field + CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure" required:"true"` + + // The type of the certificate authority. Currently, this must be SUBORDINATE. + // + // CertificateAuthorityType is a required field + CertificateAuthorityType *string `type:"string" required:"true" enum:"CertificateAuthorityType"` + + // Alphanumeric string that can be used to distinguish between calls to CreateCertificateAuthority. + // Idempotency tokens time out after five minutes. Therefore, if you call CreateCertificateAuthority + // multiple times with the same idempotency token within a five minute period, + // ACM PCA recognizes that you are requesting only one certificate. As a result, + // ACM PCA issues only one. If you change the idempotency token for each call, + // however, ACM PCA recognizes that you are requesting multiple certificates. + IdempotencyToken *string `min:"1" type:"string"` + + // Contains a Boolean value that you can use to enable a certification revocation + // list (CRL) for the CA, the name of the S3 bucket to which ACM PCA will write + // the CRL, and an optional CNAME alias that you can use to hide the name of + // your bucket in the CRL Distribution Points extension of your CA certificate. + // For more information, see the CrlConfiguration structure. + RevocationConfiguration *RevocationConfiguration `type:"structure"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityInput"} + if s.CertificateAuthorityConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityConfiguration")) + } + if s.CertificateAuthorityType == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityType")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.CertificateAuthorityConfiguration != nil { + if err := s.CertificateAuthorityConfiguration.Validate(); err != nil { + invalidParams.AddNested("CertificateAuthorityConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.RevocationConfiguration != nil { + if err := s.RevocationConfiguration.Validate(); err != nil { + invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. +func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CreateCertificateAuthorityInput { + s.CertificateAuthorityConfiguration = v + return s +} + +// SetCertificateAuthorityType sets the CertificateAuthorityType field's value. +func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityType(v string) *CreateCertificateAuthorityInput { + s.CertificateAuthorityType = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateCertificateAuthorityInput) SetIdempotencyToken(v string) *CreateCertificateAuthorityInput { + s.IdempotencyToken = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *CreateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *CreateCertificateAuthorityInput { + s.RevocationConfiguration = v + return s +} + +type CreateCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // If successful, the Amazon Resource Name (ARN) of the certificate authority + // (CA). This is of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + CertificateAuthorityArn *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *CreateCertificateAuthorityOutput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityOutput { + s.CertificateAuthorityArn = &v + return s +} + +// Contains configuration information for a certificate revocation list (CRL). +// Your private certificate authority (CA) creates base CRLs. Delta CRLs are +// not supported. You can enable CRLs for your new or an existing private CA +// by setting the Enabled parameter to true. Your private CA writes CRLs to +// an S3 bucket that you specify in the S3BucketName parameter. You can hide +// the name of your bucket by specifying a value for the CustomCname parameter. +// Your private CA copies the CNAME or the S3 bucket name to the CRL Distribution +// Points extension of each certificate it issues. Your S3 bucket policy must +// give write permission to ACM PCA. +// +// Your private CA uses the value in the ExpirationInDays parameter to calculate +// the nextUpdate field in the CRL. The CRL is refreshed at 1/2 the age of next +// update or when a certificate is revoked. When a certificate is revoked, it +// is recorded in the next CRL that is generated and in the next audit report. +// Only time valid certificates are listed in the CRL. Expired certificates +// are not included. +// +// CRLs contain the following fields: +// +// * Version: The current version number defined in RFC 5280 is V2. The integer +// value is 0x1. +// +// * Signature Algorithm: The name of the algorithm used to sign the CRL. +// +// * Issuer: The X.500 distinguished name of your private CA that issued +// the CRL. +// +// * Last Update: The issue date and time of this CRL. +// +// * Next Update: The day and time by which the next CRL will be issued. +// +// * Revoked Certificates: List of revoked certificates. Each list item contains +// the following information. +// +// Serial Number: The serial number, in hexadecimal format, of the revoked certificate. +// +// Revocation Date: Date and time the certificate was revoked. +// +// CRL Entry Extensions: Optional extensions for the CRL entry. +// +// X509v3 CRL Reason Code: Reason the certificate was revoked. +// +// * CRL Extensions: Optional extensions for the CRL. +// +// X509v3 Authority Key Identifier: Identifies the public key associated with +// the private key used to sign the certificate. +// +// X509v3 CRL Number:: Decimal sequence number for the CRL. +// +// * Signature Algorithm: Algorithm used by your private CA to sign the CRL. +// +// * Signature Value: Signature computed over the CRL. +// +// Certificate revocation lists created by ACM PCA are DER-encoded. You can +// use the following OpenSSL command to list a CRL. +// +// openssl crl -inform DER -text -in crl_path -noout +type CrlConfiguration struct { + _ struct{} `type:"structure"` + + // Name inserted into the certificate CRL Distribution Points extension that + // enables the use of an alias for the CRL distribution point. Use this value + // if you don't want the name of your S3 bucket to be public. + CustomCname *string `type:"string"` + + // Boolean value that specifies whether certificate revocation lists (CRLs) + // are enabled. You can use this value to enable certificate revocation for + // a new CA when you call the CreateCertificateAuthority operation or for an + // existing CA when you call the UpdateCertificateAuthority operation. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` + + // Number of days until a certificate expires. + ExpirationInDays *int64 `min:"1" type:"integer"` + + // Name of the S3 bucket that contains the CRL. If you do not provide a value + // for the CustomCname argument, the name of your S3 bucket is placed into the + // CRL Distribution Points extension of the issued certificate. You can change + // the name of your bucket by calling the UpdateCertificateAuthority operation. + // You must specify a bucket policy that allows ACM PCA to write the CRL to + // your bucket. + S3BucketName *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s CrlConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CrlConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CrlConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CrlConfiguration"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.ExpirationInDays != nil && *s.ExpirationInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("ExpirationInDays", 1)) + } + if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomCname sets the CustomCname field's value. +func (s *CrlConfiguration) SetCustomCname(v string) *CrlConfiguration { + s.CustomCname = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *CrlConfiguration) SetEnabled(v bool) *CrlConfiguration { + s.Enabled = &v + return s +} + +// SetExpirationInDays sets the ExpirationInDays field's value. +func (s *CrlConfiguration) SetExpirationInDays(v int64) *CrlConfiguration { + s.ExpirationInDays = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *CrlConfiguration) SetS3BucketName(v string) *CrlConfiguration { + s.S3BucketName = &v + return s +} + +type DeleteCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must have the following form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // The number of days to make a CA restorable after it has been deleted. This + // can be anywhere from 7 to 30 days, with 30 being the default. + PermanentDeletionTimeInDays *int64 `min:"7" type:"integer"` +} + +// String returns the string representation +func (s DeleteCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.PermanentDeletionTimeInDays != nil && *s.PermanentDeletionTimeInDays < 7 { + invalidParams.Add(request.NewErrParamMinValue("PermanentDeletionTimeInDays", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DeleteCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DeleteCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetPermanentDeletionTimeInDays sets the PermanentDeletionTimeInDays field's value. +func (s *DeleteCertificateAuthorityInput) SetPermanentDeletionTimeInDays(v int64) *DeleteCertificateAuthorityInput { + s.PermanentDeletionTimeInDays = &v + return s +} + +type DeleteCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type DescribeCertificateAuthorityAuditReportInput struct { + _ struct{} `type:"structure"` + + // The report ID returned by calling the CreateCertificateAuthorityAuditReport + // operation. + // + // AuditReportId is a required field + AuditReportId *string `min:"36" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the private CA. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityAuditReportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityAuditReportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCertificateAuthorityAuditReportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityAuditReportInput"} + if s.AuditReportId == nil { + invalidParams.Add(request.NewErrParamRequired("AuditReportId")) + } + if s.AuditReportId != nil && len(*s.AuditReportId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("AuditReportId", 36)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditReportId sets the AuditReportId field's value. +func (s *DescribeCertificateAuthorityAuditReportInput) SetAuditReportId(v string) *DescribeCertificateAuthorityAuditReportInput { + s.AuditReportId = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DescribeCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityAuditReportInput { + s.CertificateAuthorityArn = &v + return s +} + +type DescribeCertificateAuthorityAuditReportOutput struct { + _ struct{} `type:"structure"` + + // Specifies whether report creation is in progress, has succeeded, or has failed. + AuditReportStatus *string `type:"string" enum:"AuditReportStatus"` + + // The date and time at which the report was created. + CreatedAt *time.Time `type:"timestamp"` + + // Name of the S3 bucket that contains the report. + S3BucketName *string `type:"string"` + + // S3 key that uniquely identifies the report file in your S3 bucket. + S3Key *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityAuditReportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityAuditReportOutput) GoString() string { + return s.String() +} + +// SetAuditReportStatus sets the AuditReportStatus field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetAuditReportStatus(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.AuditReportStatus = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetCreatedAt(v time.Time) *DescribeCertificateAuthorityAuditReportOutput { + s.CreatedAt = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3BucketName(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.S3BucketName = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3Key(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.S3Key = &v + return s +} + +type DescribeCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DescribeCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +type DescribeCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // A CertificateAuthority structure that contains information about your private + // CA. + CertificateAuthority *CertificateAuthority `type:"structure"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthority sets the CertificateAuthority field's value. +func (s *DescribeCertificateAuthorityOutput) SetCertificateAuthority(v *CertificateAuthority) *DescribeCertificateAuthorityOutput { + s.CertificateAuthority = v + return s +} + +type GetCertificateAuthorityCertificateInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of your private CA. This is of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateAuthorityCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateAuthorityCertificateOutput struct { + _ struct{} `type:"structure"` + + // Base64-encoded certificate authority (CA) certificate. + Certificate *string `type:"string"` + + // Base64-encoded certificate chain that includes any intermediate certificates + // and chains up to root on-premises certificate that you used to sign your + // private CA certificate. The chain does not include your private CA certificate. + CertificateChain *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *GetCertificateAuthorityCertificateOutput) SetCertificate(v string) *GetCertificateAuthorityCertificateOutput { + s.Certificate = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *GetCertificateAuthorityCertificateOutput) SetCertificateChain(v string) *GetCertificateAuthorityCertificateOutput { + s.CertificateChain = &v + return s +} + +type GetCertificateAuthorityCsrInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // operation. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCsrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCsrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateAuthorityCsrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCsrInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateAuthorityCsrInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCsrInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateAuthorityCsrOutput struct { + _ struct{} `type:"structure"` + + // The base64 PEM-encoded certificate signing request (CSR) for your private + // CA certificate. + Csr *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCsrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCsrOutput) GoString() string { + return s.String() +} + +// SetCsr sets the Csr field's value. +func (s *GetCertificateAuthorityCsrOutput) SetCsr(v string) *GetCertificateAuthorityCsrOutput { + s.Csr = &v + return s +} + +type GetCertificateInput struct { + _ struct{} `type:"structure"` + + // The ARN of the issued certificate. The ARN contains the certificate serial + // number and must be in the following form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + // + // CertificateArn is a required field + CertificateArn *string `min:"5" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.CertificateArn != nil && len(*s.CertificateArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 5)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput { + s.CertificateArn = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateOutput struct { + _ struct{} `type:"structure"` + + // The base64 PEM-encoded certificate specified by the CertificateArn parameter. + Certificate *string `type:"string"` + + // The base64 PEM-encoded certificate chain that chains up to the on-premises + // root CA certificate that you used to sign your private CA certificate. + CertificateChain *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *GetCertificateOutput) SetCertificate(v string) *GetCertificateOutput { + s.Certificate = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *GetCertificateOutput) SetCertificateChain(v string) *GetCertificateOutput { + s.CertificateChain = &v + return s +} + +type ImportCertificateAuthorityCertificateInput struct { + _ struct{} `type:"structure"` + + // The PEM-encoded certificate for your private CA. This must be signed by using + // your on-premises CA. + // + // Certificate is automatically base64 encoded/decoded by the SDK. + // + // Certificate is a required field + Certificate []byte `min:"1" type:"blob" required:"true"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // A PEM-encoded file that contains all of your certificates, other than the + // certificate you're importing, chaining up to your root CA. Your on-premises + // root certificate is the last in the chain, and each certificate in the chain + // signs the one preceding. + // + // CertificateChain is automatically base64 encoded/decoded by the SDK. + // + // CertificateChain is a required field + CertificateChain []byte `type:"blob" required:"true"` +} + +// String returns the string representation +func (s ImportCertificateAuthorityCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportCertificateAuthorityCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportCertificateAuthorityCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportCertificateAuthorityCertificateInput"} + if s.Certificate == nil { + invalidParams.Add(request.NewErrParamRequired("Certificate")) + } + if s.Certificate != nil && len(s.Certificate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.CertificateChain == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateChain")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificate sets the Certificate field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificate(v []byte) *ImportCertificateAuthorityCertificateInput { + s.Certificate = v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *ImportCertificateAuthorityCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificateChain(v []byte) *ImportCertificateAuthorityCertificateInput { + s.CertificateChain = v + return s +} + +type ImportCertificateAuthorityCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ImportCertificateAuthorityCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportCertificateAuthorityCertificateOutput) GoString() string { + return s.String() +} + +type IssueCertificateInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // The certificate signing request (CSR) for the certificate you want to issue. + // You can use the following OpenSSL command to create the CSR and a 2048 bit + // RSA private key. + // + // openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem + // -out csr/test_cert_.csr + // + // If you have a configuration file, you can use the following OpenSSL command. + // The usr_cert block in the configuration file contains your X509 version 3 + // extensions. + // + // openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048 + // -days -365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr + // + // Csr is automatically base64 encoded/decoded by the SDK. + // + // Csr is a required field + Csr []byte `min:"1" type:"blob" required:"true"` + + // Custom string that can be used to distinguish between calls to the IssueCertificate + // operation. Idempotency tokens time out after one hour. Therefore, if you + // call IssueCertificate multiple times with the same idempotency token within + // 5 minutes, ACM PCA recognizes that you are requesting only one certificate + // and will issue only one. If you change the idempotency token for each call, + // PCA recognizes that you are requesting multiple certificates. + IdempotencyToken *string `min:"1" type:"string"` + + // The name of the algorithm that will be used to sign the certificate to be + // issued. + // + // SigningAlgorithm is a required field + SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` + + // The type of the validity period. + // + // Validity is a required field + Validity *Validity `type:"structure" required:"true"` +} + +// String returns the string representation +func (s IssueCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IssueCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IssueCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IssueCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Csr == nil { + invalidParams.Add(request.NewErrParamRequired("Csr")) + } + if s.Csr != nil && len(s.Csr) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Csr", 1)) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.SigningAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) + } + if s.Validity == nil { + invalidParams.Add(request.NewErrParamRequired("Validity")) + } + if s.Validity != nil { + if err := s.Validity.Validate(); err != nil { + invalidParams.AddNested("Validity", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *IssueCertificateInput) SetCertificateAuthorityArn(v string) *IssueCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCsr sets the Csr field's value. +func (s *IssueCertificateInput) SetCsr(v []byte) *IssueCertificateInput { + s.Csr = v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *IssueCertificateInput) SetIdempotencyToken(v string) *IssueCertificateInput { + s.IdempotencyToken = &v + return s +} + +// SetSigningAlgorithm sets the SigningAlgorithm field's value. +func (s *IssueCertificateInput) SetSigningAlgorithm(v string) *IssueCertificateInput { + s.SigningAlgorithm = &v + return s +} + +// SetValidity sets the Validity field's value. +func (s *IssueCertificateInput) SetValidity(v *Validity) *IssueCertificateInput { + s.Validity = v + return s +} + +type IssueCertificateOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the issued certificate and the certificate + // serial number. This is of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + CertificateArn *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s IssueCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IssueCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *IssueCertificateOutput) SetCertificateArn(v string) *IssueCertificateOutput { + s.CertificateArn = &v + return s +} + +type ListCertificateAuthoritiesInput struct { + _ struct{} `type:"structure"` + + // Use this parameter when paginating results to specify the maximum number + // of items to return in the response on each page. If additional items exist + // beyond the number you specify, the NextToken element is sent in the response. + // Use this NextToken value in a subsequent request to retrieve additional items. + MaxResults *int64 `min:"1" type:"integer"` + + // Use this parameter when paginating results in a subsequent request after + // you receive a response with truncated results. Set it to the value of the + // NextToken parameter from the response you just received. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListCertificateAuthoritiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCertificateAuthoritiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCertificateAuthoritiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCertificateAuthoritiesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCertificateAuthoritiesInput) SetMaxResults(v int64) *ListCertificateAuthoritiesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCertificateAuthoritiesInput) SetNextToken(v string) *ListCertificateAuthoritiesInput { + s.NextToken = &v + return s +} + +type ListCertificateAuthoritiesOutput struct { + _ struct{} `type:"structure"` + + // Summary information about each certificate authority you have created. + CertificateAuthorities []*CertificateAuthority `type:"list"` + + // When the list is truncated, this value is present and should be used for + // the NextToken parameter in a subsequent pagination request. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListCertificateAuthoritiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCertificateAuthoritiesOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorities sets the CertificateAuthorities field's value. +func (s *ListCertificateAuthoritiesOutput) SetCertificateAuthorities(v []*CertificateAuthority) *ListCertificateAuthoritiesOutput { + s.CertificateAuthorities = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCertificateAuthoritiesOutput) SetNextToken(v string) *ListCertificateAuthoritiesOutput { + s.NextToken = &v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // operation. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Use this parameter when paginating results to specify the maximum number + // of items to return in the response. If additional items exist beyond the + // number you specify, the NextToken element is sent in the response. Use this + // NextToken value in a subsequent request to retrieve additional items. + MaxResults *int64 `min:"1" type:"integer"` + + // Use this parameter when paginating results in a subsequent request after + // you receive a response with truncated results. Set it to the value of NextToken + // from the response you just received. + NextToken *string `min:"1" type:"string"` +} + +// 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.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *ListTagsInput) SetCertificateAuthorityArn(v string) *ListTagsInput { + s.CertificateAuthorityArn = &v + return s +} + +// 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 +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // When the list is truncated, this value is present and should be used for + // the NextToken parameter in a subsequent pagination request. + NextToken *string `min:"1" type:"string"` + + // The tags associated with your private CA. + Tags []*Tag `min:"1" type:"list"` +} + +// 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 +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { + s.Tags = v + return s +} + +type RestoreCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // operation. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s RestoreCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *RestoreCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *RestoreCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +type RestoreCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RestoreCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// Certificate revocation information used by the CreateCertificateAuthority +// and UpdateCertificateAuthority operations. Your private certificate authority +// (CA) can create and maintain a certificate revocation list (CRL). A CRL contains +// information about certificates revoked by your CA. For more information, +// see RevokeCertificate. +type RevocationConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration of the certificate revocation list (CRL), if any, maintained + // by your private CA. + CrlConfiguration *CrlConfiguration `type:"structure"` +} + +// String returns the string representation +func (s RevocationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevocationConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevocationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevocationConfiguration"} + if s.CrlConfiguration != nil { + if err := s.CrlConfiguration.Validate(); err != nil { + invalidParams.AddNested("CrlConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCrlConfiguration sets the CrlConfiguration field's value. +func (s *RevocationConfiguration) SetCrlConfiguration(v *CrlConfiguration) *RevocationConfiguration { + s.CrlConfiguration = v + return s +} + +type RevokeCertificateInput struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the private CA that issued the certificate + // to be revoked. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Serial number of the certificate to be revoked. This must be in hexadecimal + // format. You can retrieve the serial number by calling GetCertificate with + // the Amazon Resource Name (ARN) of the certificate you want and the ARN of + // your private CA. The GetCertificate operation retrieves the certificate in + // the PEM format. You can use the following OpenSSL command to list the certificate + // in text format and copy the hexadecimal serial number. + // + // openssl x509 -in file_path -text -noout + // + // You can also copy the serial number from the console or use the DescribeCertificate + // (https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html) + // operation in the AWS Certificate Manager API Reference. + // + // CertificateSerial is a required field + CertificateSerial *string `type:"string" required:"true"` + + // Specifies why you revoked the certificate. + // + // RevocationReason is a required field + RevocationReason *string `type:"string" required:"true" enum:"RevocationReason"` +} + +// String returns the string representation +func (s RevokeCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.CertificateSerial == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateSerial")) + } + if s.RevocationReason == nil { + invalidParams.Add(request.NewErrParamRequired("RevocationReason")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *RevokeCertificateInput) SetCertificateAuthorityArn(v string) *RevokeCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCertificateSerial sets the CertificateSerial field's value. +func (s *RevokeCertificateInput) SetCertificateSerial(v string) *RevokeCertificateInput { + s.CertificateSerial = &v + return s +} + +// SetRevocationReason sets the RevocationReason field's value. +func (s *RevokeCertificateInput) SetRevocationReason(v string) *RevokeCertificateInput { + s.RevocationReason = &v + return s +} + +type RevokeCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RevokeCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeCertificateOutput) GoString() string { + return s.String() +} + +// Tags are labels that you can use to identify and organize your private CAs. +// Each tag consists of a key and an optional value. You can associate up to +// 50 tags with a private CA. To add one or more tags to a private CA, call +// the TagCertificateAuthority operation. To remove a tag, call the UntagCertificateAuthority +// operation. +type Tag struct { + _ struct{} `type:"structure"` + + // Key (name) of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // Value of the tag. + Value *string `type:"string"` +} + +// 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 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 TagCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // List of tags to be associated with the CA. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *TagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *TagCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagCertificateAuthorityInput) SetTags(v []*Tag) *TagCertificateAuthorityInput { + s.Tags = v + return s +} + +type TagCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type UntagCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // List of tags to be removed from the CA. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *UntagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UntagCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *UntagCertificateAuthorityInput) SetTags(v []*Tag) *UntagCertificateAuthorityInput { + s.Tags = v + return s +} + +type UntagCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type UpdateCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the private CA that issued the certificate + // to be revoked. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Revocation information for your private CA. + RevocationConfiguration *RevocationConfiguration `type:"structure"` + + // Status of your private CA. + Status *string `type:"string" enum:"CertificateAuthorityStatus"` +} + +// String returns the string representation +func (s UpdateCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.RevocationConfiguration != nil { + if err := s.RevocationConfiguration.Validate(); err != nil { + invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *UpdateCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UpdateCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *UpdateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *UpdateCertificateAuthorityInput { + s.RevocationConfiguration = v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateCertificateAuthorityInput) SetStatus(v string) *UpdateCertificateAuthorityInput { + s.Status = &v + return s +} + +type UpdateCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// Length of time for which the certificate issued by your private certificate +// authority (CA), or by the private CA itself, is valid in days, months, or +// years. You can issue a certificate by calling the IssueCertificate operation. +type Validity struct { + _ struct{} `type:"structure"` + + // Specifies whether the Value parameter represents days, months, or years. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"ValidityPeriodType"` + + // Time period. + // + // Value is a required field + Value *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s Validity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Validity) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Validity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Validity"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && *s.Value < 1 { + invalidParams.Add(request.NewErrParamMinValue("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *Validity) SetType(v string) *Validity { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Validity) SetValue(v int64) *Validity { + s.Value = &v + return s +} + +const ( + // AuditReportResponseFormatJson is a AuditReportResponseFormat enum value + AuditReportResponseFormatJson = "JSON" + + // AuditReportResponseFormatCsv is a AuditReportResponseFormat enum value + AuditReportResponseFormatCsv = "CSV" +) + +const ( + // AuditReportStatusCreating is a AuditReportStatus enum value + AuditReportStatusCreating = "CREATING" + + // AuditReportStatusSuccess is a AuditReportStatus enum value + AuditReportStatusSuccess = "SUCCESS" + + // AuditReportStatusFailed is a AuditReportStatus enum value + AuditReportStatusFailed = "FAILED" +) + +const ( + // CertificateAuthorityStatusCreating is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusCreating = "CREATING" + + // CertificateAuthorityStatusPendingCertificate is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusPendingCertificate = "PENDING_CERTIFICATE" + + // CertificateAuthorityStatusActive is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusActive = "ACTIVE" + + // CertificateAuthorityStatusDeleted is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusDeleted = "DELETED" + + // CertificateAuthorityStatusDisabled is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusDisabled = "DISABLED" + + // CertificateAuthorityStatusExpired is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusExpired = "EXPIRED" + + // CertificateAuthorityStatusFailed is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusFailed = "FAILED" +) + +const ( + // CertificateAuthorityTypeSubordinate is a CertificateAuthorityType enum value + CertificateAuthorityTypeSubordinate = "SUBORDINATE" +) + +const ( + // FailureReasonRequestTimedOut is a FailureReason enum value + FailureReasonRequestTimedOut = "REQUEST_TIMED_OUT" + + // FailureReasonUnsupportedAlgorithm is a FailureReason enum value + FailureReasonUnsupportedAlgorithm = "UNSUPPORTED_ALGORITHM" + + // FailureReasonOther is a FailureReason enum value + FailureReasonOther = "OTHER" +) + +const ( + // KeyAlgorithmRsa2048 is a KeyAlgorithm enum value + KeyAlgorithmRsa2048 = "RSA_2048" + + // KeyAlgorithmRsa4096 is a KeyAlgorithm enum value + KeyAlgorithmRsa4096 = "RSA_4096" + + // KeyAlgorithmEcPrime256v1 is a KeyAlgorithm enum value + KeyAlgorithmEcPrime256v1 = "EC_prime256v1" + + // KeyAlgorithmEcSecp384r1 is a KeyAlgorithm enum value + KeyAlgorithmEcSecp384r1 = "EC_secp384r1" +) + +const ( + // RevocationReasonUnspecified is a RevocationReason enum value + RevocationReasonUnspecified = "UNSPECIFIED" + + // RevocationReasonKeyCompromise is a RevocationReason enum value + RevocationReasonKeyCompromise = "KEY_COMPROMISE" + + // RevocationReasonCertificateAuthorityCompromise is a RevocationReason enum value + RevocationReasonCertificateAuthorityCompromise = "CERTIFICATE_AUTHORITY_COMPROMISE" + + // RevocationReasonAffiliationChanged is a RevocationReason enum value + RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED" + + // RevocationReasonSuperseded is a RevocationReason enum value + RevocationReasonSuperseded = "SUPERSEDED" + + // RevocationReasonCessationOfOperation is a RevocationReason enum value + RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION" + + // RevocationReasonPrivilegeWithdrawn is a RevocationReason enum value + RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN" + + // RevocationReasonAACompromise is a RevocationReason enum value + RevocationReasonAACompromise = "A_A_COMPROMISE" +) + +const ( + // SigningAlgorithmSha256withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha256withecdsa = "SHA256WITHECDSA" + + // SigningAlgorithmSha384withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha384withecdsa = "SHA384WITHECDSA" + + // SigningAlgorithmSha512withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha512withecdsa = "SHA512WITHECDSA" + + // SigningAlgorithmSha256withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha256withrsa = "SHA256WITHRSA" + + // SigningAlgorithmSha384withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha384withrsa = "SHA384WITHRSA" + + // SigningAlgorithmSha512withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha512withrsa = "SHA512WITHRSA" +) + +const ( + // ValidityPeriodTypeEndDate is a ValidityPeriodType enum value + ValidityPeriodTypeEndDate = "END_DATE" + + // ValidityPeriodTypeAbsolute is a ValidityPeriodType enum value + ValidityPeriodTypeAbsolute = "ABSOLUTE" + + // ValidityPeriodTypeDays is a ValidityPeriodType enum value + ValidityPeriodTypeDays = "DAYS" + + // ValidityPeriodTypeMonths is a ValidityPeriodType enum value + ValidityPeriodTypeMonths = "MONTHS" + + // ValidityPeriodTypeYears is a ValidityPeriodType enum value + ValidityPeriodTypeYears = "YEARS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go new file mode 100644 index 000000000..3ca437764 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go @@ -0,0 +1,55 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package acmpca provides the client and types for making API +// requests to AWS Certificate Manager Private Certificate Authority. +// +// You can use the ACM PCA API to create a private certificate authority (CA). +// You must first call the CreateCertificateAuthority operation. If successful, +// the operation returns an Amazon Resource Name (ARN) for your private CA. +// Use this ARN as input to the GetCertificateAuthorityCsr operation to retrieve +// the certificate signing request (CSR) for your private CA certificate. Sign +// the CSR using the root or an intermediate CA in your on-premises PKI hierarchy, +// and call the ImportCertificateAuthorityCertificate to import your signed +// private CA certificate into ACM PCA. +// +// Use your private CA to issue and revoke certificates. These are private certificates +// that identify and secure client computers, servers, applications, services, +// devices, and users over SSLS/TLS connections within your organization. Call +// the IssueCertificate operation to issue a certificate. Call the RevokeCertificate +// operation to revoke a certificate. +// +// Certificates issued by your private CA can be trusted only within your organization, +// not publicly. +// +// Your private CA can optionally create a certificate revocation list (CRL) +// to track the certificates you revoke. To create a CRL, you must specify a +// RevocationConfiguration object when you call the CreateCertificateAuthority +// operation. ACM PCA writes the CRL to an S3 bucket that you specify. You must +// specify a bucket policy that grants ACM PCA write permission. +// +// You can also call the CreateCertificateAuthorityAuditReport to create an +// optional audit report that lists every time the CA private key is used. The +// private key is used for signing when the IssueCertificate or RevokeCertificate +// operation is called. +// +// See https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22 for more information on this service. +// +// See acmpca package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/ +// +// Using the Client +// +// To contact AWS Certificate Manager Private Certificate Authority 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 Certificate Manager Private Certificate Authority client ACMPCA for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/#New +package acmpca diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go new file mode 100644 index 000000000..2614b5a42 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go @@ -0,0 +1,109 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +const ( + + // ErrCodeCertificateMismatchException for service response error code + // "CertificateMismatchException". + // + // The certificate authority certificate you are importing does not comply with + // conditions specified in the certificate that signed it. + ErrCodeCertificateMismatchException = "CertificateMismatchException" + + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // A previous update to your private CA is still ongoing. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + + // ErrCodeInvalidArgsException for service response error code + // "InvalidArgsException". + // + // One or more of the specified arguments was not valid. + ErrCodeInvalidArgsException = "InvalidArgsException" + + // ErrCodeInvalidArnException for service response error code + // "InvalidArnException". + // + // The requested Amazon Resource Name (ARN) does not refer to an existing resource. + ErrCodeInvalidArnException = "InvalidArnException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The token specified in the NextToken argument is not valid. Use the token + // returned from your previous call to ListCertificateAuthorities. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidPolicyException for service response error code + // "InvalidPolicyException". + // + // The S3 bucket policy is not valid. The policy must give ACM PCA rights to + // read from and write to the bucket and find the bucket location. + ErrCodeInvalidPolicyException = "InvalidPolicyException" + + // ErrCodeInvalidStateException for service response error code + // "InvalidStateException". + // + // The private CA is in a state during which a report cannot be generated. + ErrCodeInvalidStateException = "InvalidStateException" + + // ErrCodeInvalidTagException for service response error code + // "InvalidTagException". + // + // The tag associated with the CA is not valid. The invalid argument is contained + // in the message field. + ErrCodeInvalidTagException = "InvalidTagException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // An ACM PCA limit has been exceeded. See the exception message returned to + // determine the limit that was exceeded. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeMalformedCSRException for service response error code + // "MalformedCSRException". + // + // The certificate signing request is invalid. + ErrCodeMalformedCSRException = "MalformedCSRException" + + // ErrCodeMalformedCertificateException for service response error code + // "MalformedCertificateException". + // + // One or more fields in the certificate are invalid. + ErrCodeMalformedCertificateException = "MalformedCertificateException" + + // ErrCodeRequestAlreadyProcessedException for service response error code + // "RequestAlreadyProcessedException". + // + // Your request has already been completed. + ErrCodeRequestAlreadyProcessedException = "RequestAlreadyProcessedException" + + // ErrCodeRequestFailedException for service response error code + // "RequestFailedException". + // + // The request has failed for an unspecified reason. + ErrCodeRequestFailedException = "RequestFailedException" + + // ErrCodeRequestInProgressException for service response error code + // "RequestInProgressException". + // + // Your request is already in progress. + ErrCodeRequestInProgressException = "RequestInProgressException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // A resource such as a private CA, S3 bucket, certificate, or audit report + // cannot be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // You can associate up to 50 tags with a private CA. Exception information + // is contained in the exception message field. + ErrCodeTooManyTagsException = "TooManyTagsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go new file mode 100644 index 000000000..6c231c1d7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +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/jsonrpc" +) + +// ACMPCA provides the API operation methods for making requests to +// AWS Certificate Manager Private Certificate Authority. See this package's package overview docs +// for details on the service. +// +// ACMPCA methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ACMPCA 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 = "acm-pca" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ACM PCA" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the ACMPCA client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a ACMPCA client from just a session. +// svc := acmpca.New(mySession) +// +// // Create a ACMPCA client with additional configuration +// svc := acmpca.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ACMPCA { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ACMPCA { + svc := &ACMPCA{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-08-22", + JSONVersion: "1.1", + TargetPrefix: "ACMPrivateCA", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a ACMPCA operation and runs any +// custom request initialization. +func (c *ACMPCA) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 95cf464ad..4d6ae02d3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -11462,7 +11462,7 @@ type ApiKey struct { _ struct{} `type:"structure"` // The timestamp when the API Key was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // An AWS Marketplace customer identifier , when integrating with the AWS SaaS // Marketplace. @@ -11478,7 +11478,7 @@ type ApiKey struct { Id *string `locationName:"id" type:"string"` // The timestamp when the API Key was last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the API Key. Name *string `locationName:"name" type:"string"` @@ -11563,6 +11563,10 @@ type ApiStage struct { // API stage name of the associated API stage in a usage plan. Stage *string `locationName:"stage" type:"string"` + + // Map containing method level throttling information for API stage in a usage + // plan. + Throttle map[string]*ThrottleSettings `locationName:"throttle" type:"map"` } // String returns the string representation @@ -11587,6 +11591,12 @@ func (s *ApiStage) SetStage(v string) *ApiStage { return s } +// SetThrottle sets the Throttle field's value. +func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { + s.Throttle = v + return s +} + // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // @@ -11851,13 +11861,13 @@ type ClientCertificate struct { ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` // The timestamp when the client certificate was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description of the client certificate. Description *string `locationName:"description" type:"string"` // The timestamp when the client certificate will expire. - ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp"` // The PEM-encoded public key of the client certificate, which can be used to // configure certificate authentication in the integration endpoint . @@ -14747,7 +14757,7 @@ type Deployment struct { ApiSummary map[string]map[string]*MethodSnapshot `locationName:"apiSummary" type:"map"` // The date and time that the deployment resource was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description for the deployment resource. Description *string `locationName:"description" type:"string"` @@ -15014,7 +15024,7 @@ type DocumentationVersion struct { _ struct{} `type:"structure"` // The date when the API documentation snapshot is created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description of the API documentation snapshot. Description *string `locationName:"description" type:"string"` @@ -15077,7 +15087,7 @@ type DomainName struct { // The timestamp when the certificate that was used by edge-optimized endpoint // for this domain name was uploaded. - CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"` + CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp"` // The domain name of the Amazon CloudFront distribution associated with this // custom domain name for an edge-optimized endpoint. You set up this association @@ -15203,7 +15213,7 @@ type EndpointConfiguration struct { // A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). // For an edge-optimized API and its custom domain name, the endpoint type is // "EDGE". For a regional API and its custom domain name, the endpoint type - // is REGIONAL. + // is REGIONAL. For a private API, the endpoint type is PRIVATE. Types []*string `locationName:"types" type:"list"` } @@ -16577,11 +16587,11 @@ type GetExportInput struct { // A key-value map of query string parameters that specify properties of the // export, depending on the requested exportType. For exportTypeswagger, any - // combination of the following parameters are supported: integrations will - // export the API with x-amazon-apigateway-integration extensions. authorizers - // will export the API with x-amazon-apigateway-authorizer extensions. postman - // will export the API with Postman extensions, allowing for import to the Postman - // tool + // combination of the following parameters are supported: extensions='integrations' + // or extensions='apigateway' will export the API with x-amazon-apigateway-integration + // extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer + // extensions. postman will export the API with Postman extensions, allowing + // for import to the Postman tool Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` // [Required] The string identifier of the associated RestApi. @@ -19141,8 +19151,9 @@ type ImportRestApiInput struct { // // To exclude DocumentationParts from the import, set parameters as ignore=documentation. // - // To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE - // orendpointConfigurationTypes=REGIONAL. The default endpoint type is EDGE. + // To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE, + // endpointConfigurationTypes=REGIONAL, or endpointConfigurationTypes=PRIVATE. + // The default endpoint type is EDGE. // // To handle imported basePath, set parameters as basePath=ignore, basePath=prepend // or basePath=split. @@ -19151,11 +19162,11 @@ type ImportRestApiInput struct { // API is: // // aws apigateway import-rest-api --parameters ignore=documentation --body - // 'file:///path/to/imported-api-body.json + // 'file:///path/to/imported-api-body.json' // The AWS CLI command to set the regional endpoint on the imported API is: // // aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL - // --body 'file:///path/to/imported-api-body.json + // --body 'file:///path/to/imported-api-body.json' Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` } @@ -20996,7 +21007,7 @@ type PutRestApiInput struct { // Custom header parameters as part of the request. For example, to exclude // DocumentationParts from an imported API, set ignore=documentation as a parameters // value, as in the AWS CLI command of aws apigateway import-rest-api --parameters - // ignore=documentation --body 'file:///path/to/imported-api-body.json. + // ignore=documentation --body 'file:///path/to/imported-api-body.json'. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` // [Required] The string identifier of the associated RestApi. @@ -21241,7 +21252,7 @@ type RestApi struct { BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` // The timestamp when the API was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The API's description. Description *string `locationName:"description" type:"string"` @@ -21490,7 +21501,7 @@ type Stage struct { ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` // The timestamp when the stage was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The identifier of the Deployment that the stage points to. DeploymentId *string `locationName:"deploymentId" type:"string"` @@ -21502,7 +21513,7 @@ type Stage struct { DocumentationVersion *string `locationName:"documentationVersion" type:"string"` // The timestamp when the stage last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // A map that defines the method settings for a Stage resource. Keys (designated // as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} @@ -24162,15 +24173,19 @@ const ( DocumentationPartTypeResponseBody = "RESPONSE_BODY" ) -// The endpoint type. The valid value is EDGE for edge-optimized API setup, -// most suitable for mobile applications, REGIONAL for regional API endpoint -// setup, most suitable for calling from AWS Region +// The endpoint type. The valid values are EDGE for edge-optimized API setup, +// most suitable for mobile applications; REGIONAL for regional API endpoint +// setup, most suitable for calling from AWS Region; and PRIVATE for private +// APIs. const ( // EndpointTypeRegional is a EndpointType enum value EndpointTypeRegional = "REGIONAL" // EndpointTypeEdge is a EndpointType enum value EndpointTypeEdge = "EDGE" + + // EndpointTypePrivate is a EndpointType enum value + EndpointTypePrivate = "PRIVATE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go index 690b6b2f3..8064d24fc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "apigateway" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "apigateway" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "API Gateway" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the APIGateway client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index 1586778ca..e2cbccd4b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -1362,6 +1362,11 @@ type DeleteScalingPolicyInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1397,11 +1402,15 @@ type DeleteScalingPolicyInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1514,6 +1523,11 @@ type DeleteScheduledActionInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1548,6 +1562,9 @@ type DeleteScheduledActionInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The name of the scheduled action. @@ -1555,8 +1572,9 @@ type DeleteScheduledActionInput struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1666,6 +1684,11 @@ type DeregisterScalableTargetInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1701,11 +1724,15 @@ type DeregisterScalableTargetInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1818,6 +1845,11 @@ type DescribeScalableTargetsInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceIds []*string `type:"list"` // The scalable dimension associated with the scalable target. This string consists @@ -1852,10 +1884,14 @@ type DescribeScalableTargetsInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1990,6 +2026,11 @@ type DescribeScalingActivitiesInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2024,10 +2065,14 @@ type DescribeScalingActivitiesInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2168,6 +2213,11 @@ type DescribeScalingPoliciesInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2202,10 +2252,14 @@ type DescribeScalingPoliciesInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2349,6 +2403,11 @@ type DescribeScheduledActionsInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2383,13 +2442,17 @@ type DescribeScheduledActionsInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The names of the scheduled actions to describe. ScheduledActionNames []*string `type:"list"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2649,6 +2712,11 @@ type PutScalingPolicyInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2684,11 +2752,15 @@ type PutScalingPolicyInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2835,7 +2907,7 @@ type PutScheduledActionInput struct { _ struct{} `type:"structure"` // The date and time for the scheduled action to end. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scheduled action. This // string consists of the resource type and unique identifier. @@ -2864,6 +2936,11 @@ type PutScheduledActionInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2899,6 +2976,9 @@ type PutScheduledActionInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. @@ -2921,7 +3001,8 @@ type PutScheduledActionInput struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) + // in the Amazon CloudWatch Events User Guide. Schedule *string `min:"1" type:"string"` // The name of the scheduled action. @@ -2929,15 +3010,16 @@ type PutScheduledActionInput struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` // The date and time for the scheduled action to start. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3078,12 +3160,17 @@ type RegisterScalableTargetInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // Application Auto Scaling creates a service-linked role that grants it permissions // to modify the scalable target on your behalf. For more information, see Service-Linked - // Roles for Application Auto Scaling (http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/application-autoscaling-service-linked-roles.html). + // Roles for Application Auto Scaling (http://docs.aws.amazon.com/autoscaling/application/userguide/application-autoscaling-service-linked-roles.html). // // For resources that are not supported using a service-linked role, this parameter // is required and must specify the ARN of an IAM role that allows Application @@ -3122,11 +3209,15 @@ type RegisterScalableTargetInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3225,7 +3316,7 @@ type ScalableTarget struct { // The Unix timestamp for when the scalable target was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The maximum value to scale to in response to a scale out event. // @@ -3264,6 +3355,11 @@ type ScalableTarget struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3305,11 +3401,15 @@ type ScalableTarget struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3424,7 +3524,7 @@ type ScalingActivity struct { Details *string `type:"string"` // The Unix timestamp for when the scaling activity ended. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scaling activity. This // string consists of the resource type and unique identifier. @@ -3453,6 +3553,11 @@ type ScalingActivity struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3488,11 +3593,15 @@ type ScalingActivity struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3501,7 +3610,7 @@ type ScalingActivity struct { // The Unix timestamp for when the scaling activity began. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // Indicates the status of the scaling activity. // @@ -3598,7 +3707,7 @@ type ScalingPolicy struct { // The Unix timestamp for when the scaling policy was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the scaling policy. // @@ -3642,6 +3751,11 @@ type ScalingPolicy struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3677,11 +3791,15 @@ type ScalingPolicy struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3771,10 +3889,10 @@ type ScheduledAction struct { // The date and time that the scheduled action was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The date and time that the action is scheduled to end. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scaling policy. This string // consists of the resource type and unique identifier. @@ -3803,6 +3921,11 @@ type ScheduledAction struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3837,6 +3960,9 @@ type ScheduledAction struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. @@ -3859,7 +3985,8 @@ type ScheduledAction struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) + // in the Amazon CloudWatch Events User Guide. // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` @@ -3874,15 +4001,16 @@ type ScheduledAction struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` // The date and time that the action is scheduled to begin. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4381,6 +4509,9 @@ const ( // ScalableDimensionSagemakerVariantDesiredInstanceCount is a ScalableDimension enum value ScalableDimensionSagemakerVariantDesiredInstanceCount = "sagemaker:variant:DesiredInstanceCount" + + // ScalableDimensionCustomResourceResourceTypeProperty is a ScalableDimension enum value + ScalableDimensionCustomResourceResourceTypeProperty = "custom-resource:ResourceType:Property" ) const ( @@ -4424,4 +4555,7 @@ const ( // ServiceNamespaceSagemaker is a ServiceNamespace enum value ServiceNamespaceSagemaker = "sagemaker" + + // ServiceNamespaceCustomResource is a ServiceNamespace enum value + ServiceNamespaceCustomResource = "custom-resource" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go index 674300381..9d1c051a2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go @@ -4,10 +4,10 @@ // requests to Application Auto Scaling. // // With Application Auto Scaling, you can configure automatic scaling for your -// scalable AWS resources. You can use Application Auto Scaling to accomplish -// the following tasks: +// scalable resources. You can use Application Auto Scaling to accomplish the +// following tasks: // -// * Define scaling policies to automatically scale your AWS resources +// * Define scaling policies to automatically scale your AWS or custom resources // // * Scale your resources in response to CloudWatch alarms // @@ -15,7 +15,7 @@ // // * View the history of your scaling events // -// Application Auto Scaling can scale the following AWS resources: +// Application Auto Scaling can scale the following resources: // // * Amazon ECS services. For more information, see Service Auto Scaling // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html) @@ -41,16 +41,19 @@ // * Amazon Aurora Replicas. For more information, see Using Amazon Aurora // Auto Scaling with Aurora Replicas (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Integrating.AutoScaling.html). // -// * Amazon SageMaker endpoints. For more information, see Automatically +// * Amazon SageMaker endpoint variants. For more information, see Automatically // Scaling Amazon SageMaker Models (http://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html). // +// * Custom resources provided by your own applications or services. More +// information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource). +// +// +// To learn more about Application Auto Scaling, see the Application Auto Scaling +// User Guide (http://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html). +// // To configure automatic scaling for multiple resources across multiple services, // use AWS Auto Scaling to create a scaling plan for your application. For more -// information, see AWS Auto Scaling (http://aws.amazon.com/autoscaling). -// -// For a list of supported regions, see AWS Regions and Endpoints: Application -// Auto Scaling (http://docs.aws.amazon.com/general/latest/gr/rande.html#as-app_region) -// in the AWS General Reference. +// information, see the AWS Auto Scaling User Guide (http://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html). // // See https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go index 909c1b80e..902d81d42 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "autoscaling" // Service endpoint prefix API calls made to. - EndpointsID = "application-autoscaling" // Service ID for Regions and Endpoints metadata. + ServiceName = "autoscaling" // Name of service. + EndpointsID = "application-autoscaling" // ID to lookup a service endpoint with. + ServiceID = "Application Auto Scaling" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ApplicationAutoScaling client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index 5ed7f6e2a..bd42011dd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -87,7 +87,8 @@ func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Re // The API key exceeded a limit. Try your request again. // // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days. +// The API key expiration must be set to a value between 1 and 365 days from +// creation (for CreateApiKey) or from update (for UpdateApiKey). // // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey func (c *AppSync) CreateApiKey(input *CreateApiKeyInput) (*CreateApiKeyOutput, error) { @@ -276,9 +277,6 @@ func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *re // * ErrCodeInternalFailureException "InternalFailureException" // An internal AWS AppSync error occurred. Try your request again. // -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// // * ErrCodeApiLimitExceededException "ApiLimitExceededException" // The GraphQL API exceeded a limit. Try your request again. // @@ -1543,6 +1541,11 @@ func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Requ // // Lists the API keys for a given API. // +// API keys are deleted automatically sometime after they expire. However, they +// may still be included in the response until they have actually been deleted. +// You can safely call DeleteApiKey to manually delete a key before it's automatically +// deleted. +// // 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. @@ -2115,7 +2118,8 @@ func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Re // An internal AWS AppSync error occurred. Try your request again. // // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days. +// The API key expiration must be set to a value between 1 and 365 days from +// creation (for CreateApiKey) or from update (for UpdateApiKey). // // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey func (c *AppSync) UpdateApiKey(input *UpdateApiKeyInput) (*UpdateApiKeyOutput, error) { @@ -2512,6 +2516,43 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, } // Describes an API key. +// +// Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. +// There are two key versions: +// +// da1: This version was introduced at launch in November 2017. These keys always +// expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys +// will cease to be valid after Feb 21, 2018 and should not be used after that +// date. +// +// * ListApiKeys returns the expiration time in milliseconds. +// +// * CreateApiKey returns the expiration time in milliseconds. +// +// * UpdateApiKey is not available for this key version. +// +// * DeleteApiKey deletes the item from the table. +// +// * Expiration is stored in DynamoDB as milliseconds. This results in a +// bug where keys are not automatically deleted because DynamoDB expects +// the TTL to be stored in seconds. As a one-time action, we will delete +// these keys from the table after Feb 21, 2018. +// +// da2: This version was introduced in February 2018 when AppSync added support +// to extend key expiration. +// +// * ListApiKeys returns the expiration time in seconds. +// +// * CreateApiKey returns the expiration time in seconds and accepts a user-provided +// expiration time in seconds. +// +// * UpdateApiKey returns the expiration time in seconds and accepts a user-provided +// expiration time in seconds. Key expiration can only be updated while the +// key has not expired. +// +// * DeleteApiKey deletes the item from the table. +// +// * Expiration is stored in DynamoDB as seconds. type ApiKey struct { _ struct{} `type:"structure"` @@ -2565,9 +2606,10 @@ type CreateApiKeyInput struct { // A description of the purpose of the API key. Description *string `locationName:"description" type:"string"` - // The time after which the API key expires. The date is represented as seconds - // since the epoch, rounded down to the nearest hour. The default value for - // this parameter is 7 days from creation time. + // The time from creation time after which the API key expires. The date is + // represented as seconds since the epoch, rounded down to the nearest hour. + // The default value for this parameter is 7 days from creation time. For more + // information, see . Expires *int64 `locationName:"expires" type:"long"` } @@ -2652,6 +2694,9 @@ type CreateDataSourceInput struct { // Amazon Elasticsearch settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // Http endpoint settings. + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // AWS Lambda settings. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -2738,6 +2783,12 @@ func (s *CreateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourc return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *CreateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *CreateDataSourceInput { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *CreateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *CreateDataSourceInput { s.LambdaConfig = v @@ -2793,11 +2844,17 @@ type CreateGraphqlApiInput struct { // AuthenticationType is a required field AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` + // The Amazon CloudWatch logs configuration. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // A user-supplied name for the GraphqlApi. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // The Open Id Connect configuration configuration. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The Amazon Cognito User Pool configuration. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -2821,6 +2878,16 @@ func (s *CreateGraphqlApiInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.LogConfig != nil { + if err := s.LogConfig.Validate(); err != nil { + invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) + } + } + if s.OpenIDConnectConfig != nil { + if err := s.OpenIDConnectConfig.Validate(); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) + } + } if s.UserPoolConfig != nil { if err := s.UserPoolConfig.Validate(); err != nil { invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) @@ -2839,12 +2906,24 @@ func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlAp return s } +// SetLogConfig sets the LogConfig field's value. +func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput { + s.OpenIDConnectConfig = v + return s +} + // SetUserPoolConfig sets the UserPoolConfig field's value. func (s *CreateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *CreateGraphqlApiInput { s.UserPoolConfig = v @@ -2899,10 +2978,10 @@ type CreateResolverInput struct { // in Apache Velocity Template Language (VTL). // // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` // The mapping template to be used for responses from the data source. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The name of the Type. // @@ -2935,6 +3014,12 @@ func (s *CreateResolverInput) Validate() error { if s.RequestMappingTemplate == nil { invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) + } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } @@ -3111,6 +3196,9 @@ type DataSource struct { // Amazon Elasticsearch settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // Http endpoint settings. + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // Lambda settings. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -3130,8 +3218,12 @@ type DataSource struct { // // * AWS_LAMBDA: The data source is an AWS Lambda function. // - // * NONE: There is no data source. This type is used when the required information - // can be computed on the fly without connecting to a back-end data source. + // * NONE: There is no data source. This type is used when when you wish + // to invoke a GraphQL operation without connecting to a data source, such + // as performing data transformation with resolvers or triggering a subscription + // to be invoked from a mutation. + // + // * HTTP: The data source is an HTTP endpoint. Type *string `locationName:"type" type:"string" enum:"DataSourceType"` } @@ -3169,6 +3261,12 @@ func (s *DataSource) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *D return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *DataSource) SetHttpConfig(v *HttpDataSourceConfig) *DataSource { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *DataSource) SetLambdaConfig(v *LambdaDataSourceConfig) *DataSource { s.LambdaConfig = v @@ -4113,9 +4211,15 @@ type GraphqlApi struct { // The authentication type. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + // The Amazon CloudWatch Logs configuration. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // The API name. Name *string `locationName:"name" type:"string"` + // The Open Id Connect configuration. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The URIs. Uris map[string]*string `locationName:"uris" type:"map"` @@ -4151,12 +4255,24 @@ func (s *GraphqlApi) SetAuthenticationType(v string) *GraphqlApi { return s } +// SetLogConfig sets the LogConfig field's value. +func (s *GraphqlApi) SetLogConfig(v *LogConfig) *GraphqlApi { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *GraphqlApi) SetName(v string) *GraphqlApi { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *GraphqlApi) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *GraphqlApi { + s.OpenIDConnectConfig = v + return s +} + // SetUris sets the Uris field's value. func (s *GraphqlApi) SetUris(v map[string]*string) *GraphqlApi { s.Uris = v @@ -4169,6 +4285,33 @@ func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi { return s } +// Describes a Http data source configuration. +type HttpDataSourceConfig struct { + _ struct{} `type:"structure"` + + // The Http url endpoint. You can either specify the domain name or ip and port + // combination and the url scheme must be http(s). If the port is not specified, + // AWS AppSync will use the default port 80 for http endpoint and port 443 for + // https endpoints. + Endpoint *string `locationName:"endpoint" type:"string"` +} + +// String returns the string representation +func (s HttpDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpDataSourceConfig) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig { + s.Endpoint = &v + return s +} + // Describes a Lambda data source configuration. type LambdaDataSourceConfig struct { _ struct{} `type:"structure"` @@ -4662,6 +4805,147 @@ func (s *ListTypesOutput) SetTypes(v []*Type) *ListTypesOutput { return s } +// The CloudWatch Logs configuration. +type LogConfig struct { + _ struct{} `type:"structure"` + + // The service role that AWS AppSync will assume to publish to Amazon CloudWatch + // logs in your account. + // + // CloudWatchLogsRoleArn is a required field + CloudWatchLogsRoleArn *string `locationName:"cloudWatchLogsRoleArn" type:"string" required:"true"` + + // The field logging level. Values can be NONE, ERROR, ALL. + // + // * NONE: No field-level logs are captured. + // + // * ERROR: Logs the following information only for the fields that are in + // error: + // + // The error section in the server response. + // + // Field-level errors. + // + // The generated request/response functions that got resolved for error fields. + // + // * ALL: The following information is logged for all fields in the query: + // + // Field-level tracing information. + // + // The generated request/response functions that got resolved for each field. + // + // FieldLogLevel is a required field + FieldLogLevel *string `locationName:"fieldLogLevel" type:"string" required:"true" enum:"FieldLogLevel"` +} + +// String returns the string representation +func (s LogConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogConfig"} + if s.CloudWatchLogsRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsRoleArn")) + } + if s.FieldLogLevel == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLogLevel")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. +func (s *LogConfig) SetCloudWatchLogsRoleArn(v string) *LogConfig { + s.CloudWatchLogsRoleArn = &v + return s +} + +// SetFieldLogLevel sets the FieldLogLevel field's value. +func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig { + s.FieldLogLevel = &v + return s +} + +// Describes an Open Id Connect configuration. +type OpenIDConnectConfig struct { + _ struct{} `type:"structure"` + + // The number of milliseconds a token is valid after being authenticated. + AuthTTL *int64 `locationName:"authTTL" type:"long"` + + // The client identifier of the Relying party at the OpenID Provider. This identifier + // is typically obtained when the Relying party is registered with the OpenID + // Provider. You can specify a regular expression so the AWS AppSync can validate + // against multiple client identifiers at a time + ClientId *string `locationName:"clientId" type:"string"` + + // The number of milliseconds a token is valid after being issued to a user. + IatTTL *int64 `locationName:"iatTTL" type:"long"` + + // The issuer for the open id connect configuration. The issuer returned by + // discovery MUST exactly match the value of iss in the ID Token. + // + // Issuer is a required field + Issuer *string `locationName:"issuer" type:"string" required:"true"` +} + +// String returns the string representation +func (s OpenIDConnectConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpenIDConnectConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpenIDConnectConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpenIDConnectConfig"} + if s.Issuer == nil { + invalidParams.Add(request.NewErrParamRequired("Issuer")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthTTL sets the AuthTTL field's value. +func (s *OpenIDConnectConfig) SetAuthTTL(v int64) *OpenIDConnectConfig { + s.AuthTTL = &v + return s +} + +// SetClientId sets the ClientId field's value. +func (s *OpenIDConnectConfig) SetClientId(v string) *OpenIDConnectConfig { + s.ClientId = &v + return s +} + +// SetIatTTL sets the IatTTL field's value. +func (s *OpenIDConnectConfig) SetIatTTL(v int64) *OpenIDConnectConfig { + s.IatTTL = &v + return s +} + +// SetIssuer sets the Issuer field's value. +func (s *OpenIDConnectConfig) SetIssuer(v string) *OpenIDConnectConfig { + s.Issuer = &v + return s +} + // Describes a resolver. type Resolver struct { _ struct{} `type:"structure"` @@ -4673,13 +4957,13 @@ type Resolver struct { FieldName *string `locationName:"fieldName" type:"string"` // The request mapping template. - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` // The resolver ARN. ResolverArn *string `locationName:"resolverArn" type:"string"` // The response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The resolver type name. TypeName *string `locationName:"typeName" type:"string"` @@ -4880,8 +5164,8 @@ type UpdateApiKeyInput struct { // A description of the purpose of the API key. Description *string `locationName:"description" type:"string"` - // The time after which the API key expires. The date is represented as seconds - // since the epoch. + // The time from update time after which the API key expires. The date is represented + // as seconds since the epoch. For more information, see . Expires *int64 `locationName:"expires" type:"long"` // The API key ID. @@ -4980,6 +5264,9 @@ type UpdateDataSourceInput struct { // The new Elasticsearch configuration. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // The new http endpoint configuration + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // The new Lambda configuration. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -5065,6 +5352,12 @@ func (s *UpdateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourc return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *UpdateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *UpdateDataSourceInput { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *UpdateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *UpdateDataSourceInput { s.LambdaConfig = v @@ -5123,11 +5416,17 @@ type UpdateGraphqlApiInput struct { // The new authentication type for the GraphqlApi object. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + // The Amazon CloudWatch logs configuration for the GraphqlApi object. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // The new name for the GraphqlApi object. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // The Open Id Connect configuration configuration for the GraphqlApi object. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The new Amazon Cognito User Pool configuration for the GraphqlApi object. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -5151,6 +5450,16 @@ func (s *UpdateGraphqlApiInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.LogConfig != nil { + if err := s.LogConfig.Validate(); err != nil { + invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) + } + } + if s.OpenIDConnectConfig != nil { + if err := s.OpenIDConnectConfig.Validate(); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) + } + } if s.UserPoolConfig != nil { if err := s.UserPoolConfig.Validate(); err != nil { invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) @@ -5175,12 +5484,24 @@ func (s *UpdateGraphqlApiInput) SetAuthenticationType(v string) *UpdateGraphqlAp return s } +// SetLogConfig sets the LogConfig field's value. +func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *UpdateGraphqlApiInput) SetName(v string) *UpdateGraphqlApiInput { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *UpdateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *UpdateGraphqlApiInput { + s.OpenIDConnectConfig = v + return s +} + // SetUserPoolConfig sets the UserPoolConfig field's value. func (s *UpdateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *UpdateGraphqlApiInput { s.UserPoolConfig = v @@ -5231,10 +5552,10 @@ type UpdateResolverInput struct { // The new request mapping template. // // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` // The new response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The new type name. // @@ -5267,6 +5588,12 @@ func (s *UpdateResolverInput) Validate() error { if s.RequestMappingTemplate == nil { invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) + } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } @@ -5522,6 +5849,9 @@ const ( // AuthenticationTypeAmazonCognitoUserPools is a AuthenticationType enum value AuthenticationTypeAmazonCognitoUserPools = "AMAZON_COGNITO_USER_POOLS" + + // AuthenticationTypeOpenidConnect is a AuthenticationType enum value + AuthenticationTypeOpenidConnect = "OPENID_CONNECT" ) const ( @@ -5536,6 +5866,9 @@ const ( // DataSourceTypeNone is a DataSourceType enum value DataSourceTypeNone = "NONE" + + // DataSourceTypeHttp is a DataSourceType enum value + DataSourceTypeHttp = "HTTP" ) const ( @@ -5546,6 +5879,17 @@ const ( DefaultActionDeny = "DENY" ) +const ( + // FieldLogLevelNone is a FieldLogLevel enum value + FieldLogLevelNone = "NONE" + + // FieldLogLevelError is a FieldLogLevel enum value + FieldLogLevelError = "ERROR" + + // FieldLogLevelAll is a FieldLogLevel enum value + FieldLogLevelAll = "ALL" +) + const ( // OutputTypeSdl is a OutputType enum value OutputTypeSdl = "SDL" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go index a2a7a0a0c..5c109eaba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go @@ -13,7 +13,8 @@ const ( // ErrCodeApiKeyValidityOutOfBoundsException for service response error code // "ApiKeyValidityOutOfBoundsException". // - // The API key expiration must be set to a value between 1 and 365 days. + // The API key expiration must be set to a value between 1 and 365 days from + // creation (for CreateApiKey) or from update (for UpdateApiKey). ErrCodeApiKeyValidityOutOfBoundsException = "ApiKeyValidityOutOfBoundsException" // ErrCodeApiLimitExceededException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go index 6af2be6d9..e53f6e71b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "appsync" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "appsync" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "AppSync" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the AppSync client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index 535a99055..d79704d29 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -2212,7 +2212,7 @@ type QueryExecutionStatus struct { _ struct{} `type:"structure"` // The date and time that the query completed. - CompletionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletionDateTime *time.Time `type:"timestamp"` // The state of query execution. SUBMITTED indicates that the query is queued // for execution. RUNNING indicates that the query is scanning data and returning @@ -2225,7 +2225,7 @@ type QueryExecutionStatus struct { StateChangeReason *string `type:"string"` // The date and time that the query was submitted. - SubmissionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + SubmissionDateTime *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go index c1fd29b0f..6806a62ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "athena" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "athena" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Athena" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Athena client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 1f1826493..4a973fa4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -5112,7 +5112,7 @@ type Activity struct { Details *string `type:"string"` // The end time of the activity. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // A value between 0 and 100 that indicates the progress of the activity. Progress *int64 `type:"integer"` @@ -5120,7 +5120,7 @@ type Activity struct { // The start time of the activity. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // The current status of the activity. // @@ -8018,7 +8018,7 @@ type DescribeScheduledActionsInput struct { // The latest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum number of items to return with this call. The default value is // 50 and the maximum value is 100. @@ -8039,7 +8039,7 @@ type DescribeScheduledActionsInput struct { // The earliest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -9143,7 +9143,7 @@ type Group struct { // The date and time the group was created. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. @@ -9625,7 +9625,7 @@ type LaunchConfiguration struct { // The creation date and time for the launch configuration. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // Controls whether the instance is optimized for EBS I/O (true) or not (false). EbsOptimized *bool `type:"boolean"` @@ -11007,7 +11007,7 @@ type PutScheduledUpdateGroupActionInput struct { // The time for the recurring schedule to end. Auto Scaling does not perform // the action after this time. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum size for the Auto Scaling group. MaxSize *int64 `type:"integer"` @@ -11032,10 +11032,10 @@ type PutScheduledUpdateGroupActionInput struct { // // If you try to schedule your action in the past, Auto Scaling returns an error // message. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. - Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Time *time.Time `type:"timestamp"` } // String returns the string representation @@ -11483,7 +11483,7 @@ type ScheduledUpdateGroupAction struct { // The date and time that the action is scheduled to end. This date and time // can be up to one month in the future. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum size of the group. MaxSize *int64 `type:"integer"` @@ -11505,10 +11505,10 @@ type ScheduledUpdateGroupAction struct { // // When StartTime and EndTime are specified with Recurrence, they form the boundaries // of when the recurring action will start and stop. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. - Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Time *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go index 5e63d1c03..e1da9fd75 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "autoscaling" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "autoscaling" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Auto Scaling" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the AutoScaling client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go index 3ba37aab6..194cbe82e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -1581,16 +1581,18 @@ type AttemptDetail struct { // Details about the container in this job attempt. Container *AttemptContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp for when the attempt was started (when the attempt transitioned - // from the STARTING state to the RUNNING state). + // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // started (when the attempt transitioned from the STARTING state to the RUNNING + // state). StartedAt *int64 `locationName:"startedAt" type:"long"` // A short, human-readable string to provide additional details about the current // status of the job attempt. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp for when the attempt was stopped (when the attempt transitioned - // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). + // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // stopped (when the attempt transitioned from the RUNNING state to a terminal + // state, such as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` } @@ -2393,6 +2395,11 @@ type ContainerProperties struct { // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). // You must specify at least 4 MiB of memory for a job. // + // If you are trying to maximize your resource utilization by providing your + // jobs as much memory as possible for a particular instance type, see Memory + // Management (http://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) + // in the AWS Batch User Guide. + // // Memory is a required field Memory *int64 `locationName:"memory" type:"integer" required:"true"` @@ -3429,6 +3436,11 @@ type JobDefinition struct { // The status of the job definition. Status *string `locationName:"status" type:"string"` + // The timeout configuration for jobs that are submitted with this job definition. + // You can specify a timeout duration after which AWS Batch terminates your + // jobs if they have not finished. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` + // The type of job definition. // // Type is a required field @@ -3487,6 +3499,12 @@ func (s *JobDefinition) SetStatus(v string) *JobDefinition { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobDefinition) SetTimeout(v *JobTimeout) *JobDefinition { + s.Timeout = v + return s +} + // SetType sets the Type field's value. func (s *JobDefinition) SetType(v string) *JobDefinition { s.Type = &v @@ -3540,10 +3558,11 @@ type JobDetail struct { // the job. Container *ContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp for when the job was created. For non-array jobs and - // parent array jobs, this is when the job entered the SUBMITTED state (at the - // time SubmitJob was called). For array child jobs, this is when the child - // job was spawned by its parent and entered the PENDING state. + // The Unix time stamp (in seconds and milliseconds) for when the job was created. + // For non-array jobs and parent array jobs, this is when the job entered the + // SUBMITTED state (at the time SubmitJob was called). For array child jobs, + // this is when the child job was spawned by its parent and entered the PENDING + // state. CreatedAt *int64 `locationName:"createdAt" type:"long"` // A list of job names or IDs on which this job depends. @@ -3577,8 +3596,8 @@ type JobDetail struct { // The retry strategy to use for this job if an attempt fails. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - // The Unix time stamp for when the job was started (when the job transitioned - // from the STARTING state to the RUNNING state). + // The Unix time stamp (in seconds and milliseconds) for when the job was started + // (when the job transitioned from the STARTING state to the RUNNING state). // // StartedAt is a required field StartedAt *int64 `locationName:"startedAt" type:"long" required:"true"` @@ -3592,9 +3611,13 @@ type JobDetail struct { // status of the job. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp for when the job was stopped (when the job transitioned - // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). + // The Unix time stamp (in seconds and milliseconds) for when the job was stopped + // (when the job transitioned from the RUNNING state to a terminal state, such + // as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` + + // The timeout configuration for the job. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` } // String returns the string representation @@ -3697,6 +3720,12 @@ func (s *JobDetail) SetStoppedAt(v int64) *JobDetail { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobDetail) SetTimeout(v *JobTimeout) *JobDetail { + s.Timeout = v + return s +} + // An object representing the details of an AWS Batch job queue. type JobQueueDetail struct { _ struct{} `type:"structure"` @@ -3895,6 +3924,31 @@ func (s *JobSummary) SetStoppedAt(v int64) *JobSummary { return s } +// An object representing a job timeout configuration. +type JobTimeout struct { + _ struct{} `type:"structure"` + + // The time duration in seconds (measured from the job attempt's startedAt timestamp) + // after which AWS Batch terminates your jobs if they have not finished. + AttemptDurationSeconds *int64 `locationName:"attemptDurationSeconds" type:"integer"` +} + +// String returns the string representation +func (s JobTimeout) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobTimeout) GoString() string { + return s.String() +} + +// SetAttemptDurationSeconds sets the AttemptDurationSeconds field's value. +func (s *JobTimeout) SetAttemptDurationSeconds(v int64) *JobTimeout { + s.AttemptDurationSeconds = &v + return s +} + // A key-value pair object. type KeyValuePair struct { _ struct{} `type:"structure"` @@ -4105,9 +4159,19 @@ type RegisterJobDefinitionInput struct { // The retry strategy to use for failed jobs that are submitted with this job // definition. Any retry strategy that is specified during a SubmitJob operation - // overrides the retry strategy defined here. + // overrides the retry strategy defined here. If a job is terminated due to + // a timeout, it is not retried. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + // The timeout configuration for jobs that are submitted with this job definition, + // after which AWS Batch terminates your jobs if they have not finished. If + // a job is terminated due to a timeout, it is not retried. The minimum value + // for the timeout is 60 seconds. Any timeout configuration that is specified + // during a SubmitJob operation overrides the timeout configuration defined + // here. For more information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) + // in the Amazon Elastic Container Service Developer Guide. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` + // The type of job definition. // // Type is a required field @@ -4169,6 +4233,12 @@ func (s *RegisterJobDefinitionInput) SetRetryStrategy(v *RetryStrategy) *Registe return s } +// SetTimeout sets the Timeout field's value. +func (s *RegisterJobDefinitionInput) SetTimeout(v *JobTimeout) *RegisterJobDefinitionInput { + s.Timeout = v + return s +} + // SetType sets the Type field's value. func (s *RegisterJobDefinitionInput) SetType(v string) *RegisterJobDefinitionInput { s.Type = &v @@ -4304,6 +4374,16 @@ type SubmitJobInput struct { // When a retry strategy is specified here, it overrides the retry strategy // defined in the job definition. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + + // The timeout configuration for this SubmitJob operation. You can specify a + // timeout duration after which AWS Batch terminates your jobs if they have + // not finished. If a job is terminated due to a timeout, it is not retried. + // The minimum value for the timeout is 60 seconds. This configuration overrides + // any timeout configuration specified in the job definition. For array jobs, + // child jobs have the same timeout configuration as the parent job. For more + // information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) + // in the Amazon Elastic Container Service Developer Guide. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` } // String returns the string representation @@ -4383,6 +4463,12 @@ func (s *SubmitJobInput) SetRetryStrategy(v *RetryStrategy) *SubmitJobInput { return s } +// SetTimeout sets the Timeout field's value. +func (s *SubmitJobInput) SetTimeout(v *JobTimeout) *SubmitJobInput { + s.Timeout = v + return s +} + type SubmitJobOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go index 11539325a..0d04e7497 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "batch" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "batch" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Batch" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Batch client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go new file mode 100644 index 000000000..cfa8f0a62 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -0,0 +1,3254 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package budgets + +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" +) + +const opCreateBudget = "CreateBudget" + +// CreateBudgetRequest generates a "aws/request.Request" representing the +// client's request for the CreateBudget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateBudget for more information on using the CreateBudget +// 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 CreateBudgetRequest method. +// req, resp := client.CreateBudgetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) CreateBudgetRequest(input *CreateBudgetInput) (req *request.Request, output *CreateBudgetOutput) { + op := &request.Operation{ + Name: opCreateBudget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateBudgetInput{} + } + + output = &CreateBudgetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBudget API operation for AWS Budgets. +// +// Creates a budget and, if included, notifications and subscribers. +// +// 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 Budgets's +// API operation CreateBudget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" +// You've exceeded the notification or subscriber limit. +// +// * ErrCodeDuplicateRecordException "DuplicateRecordException" +// The budget name already exists. Budget names must be unique within an account. +// +func (c *Budgets) CreateBudget(input *CreateBudgetInput) (*CreateBudgetOutput, error) { + req, out := c.CreateBudgetRequest(input) + return out, req.Send() +} + +// CreateBudgetWithContext is the same as CreateBudget with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBudget 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 *Budgets) CreateBudgetWithContext(ctx aws.Context, input *CreateBudgetInput, opts ...request.Option) (*CreateBudgetOutput, error) { + req, out := c.CreateBudgetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNotification = "CreateNotification" + +// CreateNotificationRequest generates a "aws/request.Request" representing the +// client's request for the CreateNotification operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateNotification for more information on using the CreateNotification +// 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 CreateNotificationRequest method. +// req, resp := client.CreateNotificationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) CreateNotificationRequest(input *CreateNotificationInput) (req *request.Request, output *CreateNotificationOutput) { + op := &request.Operation{ + Name: opCreateNotification, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNotificationInput{} + } + + output = &CreateNotificationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNotification API operation for AWS Budgets. +// +// Creates a notification. You must create the budget before you create the +// associated notification. +// +// 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 Budgets's +// API operation CreateNotification for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" +// You've exceeded the notification or subscriber limit. +// +// * ErrCodeDuplicateRecordException "DuplicateRecordException" +// The budget name already exists. Budget names must be unique within an account. +// +func (c *Budgets) CreateNotification(input *CreateNotificationInput) (*CreateNotificationOutput, error) { + req, out := c.CreateNotificationRequest(input) + return out, req.Send() +} + +// CreateNotificationWithContext is the same as CreateNotification with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNotification 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 *Budgets) CreateNotificationWithContext(ctx aws.Context, input *CreateNotificationInput, opts ...request.Option) (*CreateNotificationOutput, error) { + req, out := c.CreateNotificationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSubscriber = "CreateSubscriber" + +// CreateSubscriberRequest generates a "aws/request.Request" representing the +// client's request for the CreateSubscriber operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateSubscriber for more information on using the CreateSubscriber +// 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 CreateSubscriberRequest method. +// req, resp := client.CreateSubscriberRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) CreateSubscriberRequest(input *CreateSubscriberInput) (req *request.Request, output *CreateSubscriberOutput) { + op := &request.Operation{ + Name: opCreateSubscriber, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSubscriberInput{} + } + + output = &CreateSubscriberOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSubscriber API operation for AWS Budgets. +// +// Creates a subscriber. You must create the associated budget and notification +// before you create the subscriber. +// +// 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 Budgets's +// API operation CreateSubscriber for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeCreationLimitExceededException "CreationLimitExceededException" +// You've exceeded the notification or subscriber limit. +// +// * ErrCodeDuplicateRecordException "DuplicateRecordException" +// The budget name already exists. Budget names must be unique within an account. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) CreateSubscriber(input *CreateSubscriberInput) (*CreateSubscriberOutput, error) { + req, out := c.CreateSubscriberRequest(input) + return out, req.Send() +} + +// CreateSubscriberWithContext is the same as CreateSubscriber with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSubscriber 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 *Budgets) CreateSubscriberWithContext(ctx aws.Context, input *CreateSubscriberInput, opts ...request.Option) (*CreateSubscriberOutput, error) { + req, out := c.CreateSubscriberRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBudget = "DeleteBudget" + +// DeleteBudgetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBudget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteBudget for more information on using the DeleteBudget +// 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 DeleteBudgetRequest method. +// req, resp := client.DeleteBudgetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) (req *request.Request, output *DeleteBudgetOutput) { + op := &request.Operation{ + Name: opDeleteBudget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBudgetInput{} + } + + output = &DeleteBudgetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBudget API operation for AWS Budgets. +// +// Deletes a budget. You can delete your budget at any time. +// +// Deleting a budget also deletes the notifications and subscribers associated +// with that budget. +// +// 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 Budgets's +// API operation DeleteBudget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) DeleteBudget(input *DeleteBudgetInput) (*DeleteBudgetOutput, error) { + req, out := c.DeleteBudgetRequest(input) + return out, req.Send() +} + +// DeleteBudgetWithContext is the same as DeleteBudget with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBudget 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 *Budgets) DeleteBudgetWithContext(ctx aws.Context, input *DeleteBudgetInput, opts ...request.Option) (*DeleteBudgetOutput, error) { + req, out := c.DeleteBudgetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNotification = "DeleteNotification" + +// DeleteNotificationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNotification operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteNotification for more information on using the DeleteNotification +// 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 DeleteNotificationRequest method. +// req, resp := client.DeleteNotificationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) (req *request.Request, output *DeleteNotificationOutput) { + op := &request.Operation{ + Name: opDeleteNotification, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNotificationInput{} + } + + output = &DeleteNotificationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteNotification API operation for AWS Budgets. +// +// Deletes a notification. +// +// Deleting a notification also deletes the subscribers associated with the +// notification. +// +// 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 Budgets's +// API operation DeleteNotification for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) DeleteNotification(input *DeleteNotificationInput) (*DeleteNotificationOutput, error) { + req, out := c.DeleteNotificationRequest(input) + return out, req.Send() +} + +// DeleteNotificationWithContext is the same as DeleteNotification with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNotification 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 *Budgets) DeleteNotificationWithContext(ctx aws.Context, input *DeleteNotificationInput, opts ...request.Option) (*DeleteNotificationOutput, error) { + req, out := c.DeleteNotificationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSubscriber = "DeleteSubscriber" + +// DeleteSubscriberRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSubscriber operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteSubscriber for more information on using the DeleteSubscriber +// 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 DeleteSubscriberRequest method. +// req, resp := client.DeleteSubscriberRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DeleteSubscriberRequest(input *DeleteSubscriberInput) (req *request.Request, output *DeleteSubscriberOutput) { + op := &request.Operation{ + Name: opDeleteSubscriber, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSubscriberInput{} + } + + output = &DeleteSubscriberOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSubscriber API operation for AWS Budgets. +// +// Deletes a subscriber. +// +// Deleting the last subscriber to a notification also deletes the notification. +// +// 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 Budgets's +// API operation DeleteSubscriber for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) DeleteSubscriber(input *DeleteSubscriberInput) (*DeleteSubscriberOutput, error) { + req, out := c.DeleteSubscriberRequest(input) + return out, req.Send() +} + +// DeleteSubscriberWithContext is the same as DeleteSubscriber with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSubscriber 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 *Budgets) DeleteSubscriberWithContext(ctx aws.Context, input *DeleteSubscriberInput, opts ...request.Option) (*DeleteSubscriberOutput, error) { + req, out := c.DeleteSubscriberRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBudget = "DescribeBudget" + +// DescribeBudgetRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBudget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeBudget for more information on using the DescribeBudget +// 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 DescribeBudgetRequest method. +// req, resp := client.DescribeBudgetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DescribeBudgetRequest(input *DescribeBudgetInput) (req *request.Request, output *DescribeBudgetOutput) { + op := &request.Operation{ + Name: opDescribeBudget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBudgetInput{} + } + + output = &DescribeBudgetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBudget API operation for AWS Budgets. +// +// Describes a budget. +// +// 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 Budgets's +// API operation DescribeBudget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) DescribeBudget(input *DescribeBudgetInput) (*DescribeBudgetOutput, error) { + req, out := c.DescribeBudgetRequest(input) + return out, req.Send() +} + +// DescribeBudgetWithContext is the same as DescribeBudget with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBudget 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 *Budgets) DescribeBudgetWithContext(ctx aws.Context, input *DescribeBudgetInput, opts ...request.Option) (*DescribeBudgetOutput, error) { + req, out := c.DescribeBudgetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBudgets = "DescribeBudgets" + +// DescribeBudgetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBudgets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeBudgets for more information on using the DescribeBudgets +// 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 DescribeBudgetsRequest method. +// req, resp := client.DescribeBudgetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DescribeBudgetsRequest(input *DescribeBudgetsInput) (req *request.Request, output *DescribeBudgetsOutput) { + op := &request.Operation{ + Name: opDescribeBudgets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBudgetsInput{} + } + + output = &DescribeBudgetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBudgets API operation for AWS Budgets. +// +// Lists the budgets associated with 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 AWS Budgets's +// API operation DescribeBudgets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. +// +func (c *Budgets) DescribeBudgets(input *DescribeBudgetsInput) (*DescribeBudgetsOutput, error) { + req, out := c.DescribeBudgetsRequest(input) + return out, req.Send() +} + +// DescribeBudgetsWithContext is the same as DescribeBudgets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBudgets 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 *Budgets) DescribeBudgetsWithContext(ctx aws.Context, input *DescribeBudgetsInput, opts ...request.Option) (*DescribeBudgetsOutput, error) { + req, out := c.DescribeBudgetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget" + +// DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNotificationsForBudget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeNotificationsForBudget for more information on using the DescribeNotificationsForBudget +// 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 DescribeNotificationsForBudgetRequest method. +// req, resp := client.DescribeNotificationsForBudgetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DescribeNotificationsForBudgetRequest(input *DescribeNotificationsForBudgetInput) (req *request.Request, output *DescribeNotificationsForBudgetOutput) { + op := &request.Operation{ + Name: opDescribeNotificationsForBudget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeNotificationsForBudgetInput{} + } + + output = &DescribeNotificationsForBudgetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNotificationsForBudget API operation for AWS Budgets. +// +// Lists the notifications associated with a budget. +// +// 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 Budgets's +// API operation DescribeNotificationsForBudget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. +// +func (c *Budgets) DescribeNotificationsForBudget(input *DescribeNotificationsForBudgetInput) (*DescribeNotificationsForBudgetOutput, error) { + req, out := c.DescribeNotificationsForBudgetRequest(input) + return out, req.Send() +} + +// DescribeNotificationsForBudgetWithContext is the same as DescribeNotificationsForBudget with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNotificationsForBudget 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 *Budgets) DescribeNotificationsForBudgetWithContext(ctx aws.Context, input *DescribeNotificationsForBudgetInput, opts ...request.Option) (*DescribeNotificationsForBudgetOutput, error) { + req, out := c.DescribeNotificationsForBudgetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification" + +// DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSubscribersForNotification operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeSubscribersForNotification for more information on using the DescribeSubscribersForNotification +// 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 DescribeSubscribersForNotificationRequest method. +// req, resp := client.DescribeSubscribersForNotificationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DescribeSubscribersForNotificationRequest(input *DescribeSubscribersForNotificationInput) (req *request.Request, output *DescribeSubscribersForNotificationOutput) { + op := &request.Operation{ + Name: opDescribeSubscribersForNotification, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSubscribersForNotificationInput{} + } + + output = &DescribeSubscribersForNotificationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSubscribersForNotification API operation for AWS Budgets. +// +// Lists the subscribers associated with a notification. +// +// 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 Budgets's +// API operation DescribeSubscribersForNotification for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. +// +func (c *Budgets) DescribeSubscribersForNotification(input *DescribeSubscribersForNotificationInput) (*DescribeSubscribersForNotificationOutput, error) { + req, out := c.DescribeSubscribersForNotificationRequest(input) + return out, req.Send() +} + +// DescribeSubscribersForNotificationWithContext is the same as DescribeSubscribersForNotification with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSubscribersForNotification 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 *Budgets) DescribeSubscribersForNotificationWithContext(ctx aws.Context, input *DescribeSubscribersForNotificationInput, opts ...request.Option) (*DescribeSubscribersForNotificationOutput, error) { + req, out := c.DescribeSubscribersForNotificationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBudget = "UpdateBudget" + +// UpdateBudgetRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBudget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateBudget for more information on using the UpdateBudget +// 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 UpdateBudgetRequest method. +// req, resp := client.UpdateBudgetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) UpdateBudgetRequest(input *UpdateBudgetInput) (req *request.Request, output *UpdateBudgetOutput) { + op := &request.Operation{ + Name: opUpdateBudget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateBudgetInput{} + } + + output = &UpdateBudgetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBudget API operation for AWS Budgets. +// +// Updates a budget. You can change every part of a budget except for the budgetName +// and the calculatedSpend. When a budget is modified, the calculatedSpend drops +// to zero until AWS has new usage data to use for forecasting. +// +// 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 Budgets's +// API operation UpdateBudget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +func (c *Budgets) UpdateBudget(input *UpdateBudgetInput) (*UpdateBudgetOutput, error) { + req, out := c.UpdateBudgetRequest(input) + return out, req.Send() +} + +// UpdateBudgetWithContext is the same as UpdateBudget with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBudget 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 *Budgets) UpdateBudgetWithContext(ctx aws.Context, input *UpdateBudgetInput, opts ...request.Option) (*UpdateBudgetOutput, error) { + req, out := c.UpdateBudgetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNotification = "UpdateNotification" + +// UpdateNotificationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNotification operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateNotification for more information on using the UpdateNotification +// 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 UpdateNotificationRequest method. +// req, resp := client.UpdateNotificationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) (req *request.Request, output *UpdateNotificationOutput) { + op := &request.Operation{ + Name: opUpdateNotification, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNotificationInput{} + } + + output = &UpdateNotificationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateNotification API operation for AWS Budgets. +// +// Updates a notification. +// +// 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 Budgets's +// API operation UpdateNotification for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeDuplicateRecordException "DuplicateRecordException" +// The budget name already exists. Budget names must be unique within an account. +// +func (c *Budgets) UpdateNotification(input *UpdateNotificationInput) (*UpdateNotificationOutput, error) { + req, out := c.UpdateNotificationRequest(input) + return out, req.Send() +} + +// UpdateNotificationWithContext is the same as UpdateNotification with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNotification 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 *Budgets) UpdateNotificationWithContext(ctx aws.Context, input *UpdateNotificationInput, opts ...request.Option) (*UpdateNotificationOutput, error) { + req, out := c.UpdateNotificationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSubscriber = "UpdateSubscriber" + +// UpdateSubscriberRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSubscriber operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateSubscriber for more information on using the UpdateSubscriber +// 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 UpdateSubscriberRequest method. +// req, resp := client.UpdateSubscriberRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) (req *request.Request, output *UpdateSubscriberOutput) { + op := &request.Operation{ + Name: opUpdateSubscriber, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSubscriberInput{} + } + + output = &UpdateSubscriberOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSubscriber API operation for AWS Budgets. +// +// Updates a subscriber. +// +// 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 Budgets's +// API operation UpdateSubscriber for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeDuplicateRecordException "DuplicateRecordException" +// The budget name already exists. Budget names must be unique within an account. +// +func (c *Budgets) UpdateSubscriber(input *UpdateSubscriberInput) (*UpdateSubscriberOutput, error) { + req, out := c.UpdateSubscriberRequest(input) + return out, req.Send() +} + +// UpdateSubscriberWithContext is the same as UpdateSubscriber with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSubscriber 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 *Budgets) UpdateSubscriberWithContext(ctx aws.Context, input *UpdateSubscriberInput, opts ...request.Option) (*UpdateSubscriberOutput, error) { + req, out := c.UpdateSubscriberRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Represents the output of the CreateBudget operation. The content consists +// of the detailed metadata and data file information, and the current status +// of the budget. +// +// The ARN pattern for a budget is: arn:aws:budgetservice::AccountId:budget/budgetName +type Budget struct { + _ struct{} `type:"structure"` + + // The total amount of cost, usage, or RI utilization that you want to track + // with your budget. + // + // BudgetLimit is required for cost or usage budgets, but optional for RI utilization + // budgets. RI utilization budgets default to the only valid value for RI utilization + // budgets, which is 100. + BudgetLimit *Spend `type:"structure"` + + // The name of a budget. Unique within accounts. : and \ characters are not + // allowed in the BudgetName. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // Whether this budget tracks monetary costs, usage, or RI utilization. + // + // BudgetType is a required field + BudgetType *string `type:"string" required:"true" enum:"BudgetType"` + + // The actual and forecasted cost or usage being tracked by a budget. + CalculatedSpend *CalculatedSpend `type:"structure"` + + // The cost filters applied to a budget, such as service or region. + CostFilters map[string][]*string `type:"map"` + + // The types of costs included in this budget. + CostTypes *CostTypes `type:"structure"` + + // The period of time covered by a budget. Has a start date and an end date. + // The start date must come before the end date. There are no restrictions on + // the end date. + // + // If you created your budget and didn't specify a start date, AWS defaults + // to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, + // ANNUALLY). For example, if you created your budget on January 24th 2018, + // chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 + // 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 + // UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 + // 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management + // console and the API. + // + // You can change either date with the UpdateBudget operation. + // + // After the end date, AWS deletes the budget and all associated notifications + // and subscribers. + TimePeriod *TimePeriod `type:"structure"` + + // The length of time until a budget resets the actual and forecasted spend. + // + // TimeUnit is a required field + TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` +} + +// String returns the string representation +func (s Budget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Budget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Budget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Budget"} + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.BudgetType == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetType")) + } + if s.TimeUnit == nil { + invalidParams.Add(request.NewErrParamRequired("TimeUnit")) + } + if s.BudgetLimit != nil { + if err := s.BudgetLimit.Validate(); err != nil { + invalidParams.AddNested("BudgetLimit", err.(request.ErrInvalidParams)) + } + } + if s.CalculatedSpend != nil { + if err := s.CalculatedSpend.Validate(); err != nil { + invalidParams.AddNested("CalculatedSpend", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBudgetLimit sets the BudgetLimit field's value. +func (s *Budget) SetBudgetLimit(v *Spend) *Budget { + s.BudgetLimit = v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *Budget) SetBudgetName(v string) *Budget { + s.BudgetName = &v + return s +} + +// SetBudgetType sets the BudgetType field's value. +func (s *Budget) SetBudgetType(v string) *Budget { + s.BudgetType = &v + return s +} + +// SetCalculatedSpend sets the CalculatedSpend field's value. +func (s *Budget) SetCalculatedSpend(v *CalculatedSpend) *Budget { + s.CalculatedSpend = v + return s +} + +// SetCostFilters sets the CostFilters field's value. +func (s *Budget) SetCostFilters(v map[string][]*string) *Budget { + s.CostFilters = v + return s +} + +// SetCostTypes sets the CostTypes field's value. +func (s *Budget) SetCostTypes(v *CostTypes) *Budget { + s.CostTypes = v + return s +} + +// SetTimePeriod sets the TimePeriod field's value. +func (s *Budget) SetTimePeriod(v *TimePeriod) *Budget { + s.TimePeriod = v + return s +} + +// SetTimeUnit sets the TimeUnit field's value. +func (s *Budget) SetTimeUnit(v string) *Budget { + s.TimeUnit = &v + return s +} + +// The spend objects associated with this budget. The actualSpend tracks how +// much you've used, cost, usage, or RI units, and the forecastedSpend tracks +// how much you are predicted to spend if your current usage remains steady. +// +// For example, if it is the 20th of the month and you have spent 50 dollars +// on Amazon EC2, your actualSpend is 50 USD, and your forecastedSpend is 75 +// USD. +type CalculatedSpend struct { + _ struct{} `type:"structure"` + + // The amount of cost, usage, or RI units that you have used. + // + // ActualSpend is a required field + ActualSpend *Spend `type:"structure" required:"true"` + + // The amount of cost, usage, or RI units that you are forecasted to use. + ForecastedSpend *Spend `type:"structure"` +} + +// String returns the string representation +func (s CalculatedSpend) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CalculatedSpend) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CalculatedSpend) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CalculatedSpend"} + if s.ActualSpend == nil { + invalidParams.Add(request.NewErrParamRequired("ActualSpend")) + } + if s.ActualSpend != nil { + if err := s.ActualSpend.Validate(); err != nil { + invalidParams.AddNested("ActualSpend", err.(request.ErrInvalidParams)) + } + } + if s.ForecastedSpend != nil { + if err := s.ForecastedSpend.Validate(); err != nil { + invalidParams.AddNested("ForecastedSpend", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActualSpend sets the ActualSpend field's value. +func (s *CalculatedSpend) SetActualSpend(v *Spend) *CalculatedSpend { + s.ActualSpend = v + return s +} + +// SetForecastedSpend sets the ForecastedSpend field's value. +func (s *CalculatedSpend) SetForecastedSpend(v *Spend) *CalculatedSpend { + s.ForecastedSpend = v + return s +} + +// The types of cost included in a budget, such as tax and subscriptions. +type CostTypes struct { + _ struct{} `type:"structure"` + + // Specifies whether a budget includes credits. + // + // The default value is true. + IncludeCredit *bool `type:"boolean"` + + // Specifies whether a budget includes discounts. + // + // The default value is true. + IncludeDiscount *bool `type:"boolean"` + + // Specifies whether a budget includes non-RI subscription costs. + // + // The default value is true. + IncludeOtherSubscription *bool `type:"boolean"` + + // Specifies whether a budget includes recurring fees such as monthly RI fees. + // + // The default value is true. + IncludeRecurring *bool `type:"boolean"` + + // Specifies whether a budget includes refunds. + // + // The default value is true. + IncludeRefund *bool `type:"boolean"` + + // Specifies whether a budget includes subscriptions. + // + // The default value is true. + IncludeSubscription *bool `type:"boolean"` + + // Specifies whether a budget includes support subscription fees. + // + // The default value is true. + IncludeSupport *bool `type:"boolean"` + + // Specifies whether a budget includes taxes. + // + // The default value is true. + IncludeTax *bool `type:"boolean"` + + // Specifies whether a budget includes upfront RI costs. + // + // The default value is true. + IncludeUpfront *bool `type:"boolean"` + + // Specifies whether a budget uses the amortized rate. + // + // The default value is false. + UseAmortized *bool `type:"boolean"` + + // Specifies whether a budget uses blended rate. + // + // The default value is false. + UseBlended *bool `type:"boolean"` +} + +// String returns the string representation +func (s CostTypes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CostTypes) GoString() string { + return s.String() +} + +// SetIncludeCredit sets the IncludeCredit field's value. +func (s *CostTypes) SetIncludeCredit(v bool) *CostTypes { + s.IncludeCredit = &v + return s +} + +// SetIncludeDiscount sets the IncludeDiscount field's value. +func (s *CostTypes) SetIncludeDiscount(v bool) *CostTypes { + s.IncludeDiscount = &v + return s +} + +// SetIncludeOtherSubscription sets the IncludeOtherSubscription field's value. +func (s *CostTypes) SetIncludeOtherSubscription(v bool) *CostTypes { + s.IncludeOtherSubscription = &v + return s +} + +// SetIncludeRecurring sets the IncludeRecurring field's value. +func (s *CostTypes) SetIncludeRecurring(v bool) *CostTypes { + s.IncludeRecurring = &v + return s +} + +// SetIncludeRefund sets the IncludeRefund field's value. +func (s *CostTypes) SetIncludeRefund(v bool) *CostTypes { + s.IncludeRefund = &v + return s +} + +// SetIncludeSubscription sets the IncludeSubscription field's value. +func (s *CostTypes) SetIncludeSubscription(v bool) *CostTypes { + s.IncludeSubscription = &v + return s +} + +// SetIncludeSupport sets the IncludeSupport field's value. +func (s *CostTypes) SetIncludeSupport(v bool) *CostTypes { + s.IncludeSupport = &v + return s +} + +// SetIncludeTax sets the IncludeTax field's value. +func (s *CostTypes) SetIncludeTax(v bool) *CostTypes { + s.IncludeTax = &v + return s +} + +// SetIncludeUpfront sets the IncludeUpfront field's value. +func (s *CostTypes) SetIncludeUpfront(v bool) *CostTypes { + s.IncludeUpfront = &v + return s +} + +// SetUseAmortized sets the UseAmortized field's value. +func (s *CostTypes) SetUseAmortized(v bool) *CostTypes { + s.UseAmortized = &v + return s +} + +// SetUseBlended sets the UseBlended field's value. +func (s *CostTypes) SetUseBlended(v bool) *CostTypes { + s.UseBlended = &v + return s +} + +// Request of CreateBudget +type CreateBudgetInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The budget object that you want to create. + // + // Budget is a required field + Budget *Budget `type:"structure" required:"true"` + + // A notification that you want to associate with a budget. A budget can have + // up to five notifications, and each notification can have one SNS subscriber + // and up to ten email subscribers. If you include notifications and subscribers + // in your CreateBudget call, AWS creates the notifications and subscribers + // for you. + NotificationsWithSubscribers []*NotificationWithSubscribers `type:"list"` +} + +// String returns the string representation +func (s CreateBudgetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBudgetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBudgetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBudgetInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.Budget == nil { + invalidParams.Add(request.NewErrParamRequired("Budget")) + } + if s.Budget != nil { + if err := s.Budget.Validate(); err != nil { + invalidParams.AddNested("Budget", err.(request.ErrInvalidParams)) + } + } + if s.NotificationsWithSubscribers != nil { + for i, v := range s.NotificationsWithSubscribers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NotificationsWithSubscribers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *CreateBudgetInput) SetAccountId(v string) *CreateBudgetInput { + s.AccountId = &v + return s +} + +// SetBudget sets the Budget field's value. +func (s *CreateBudgetInput) SetBudget(v *Budget) *CreateBudgetInput { + s.Budget = v + return s +} + +// SetNotificationsWithSubscribers sets the NotificationsWithSubscribers field's value. +func (s *CreateBudgetInput) SetNotificationsWithSubscribers(v []*NotificationWithSubscribers) *CreateBudgetInput { + s.NotificationsWithSubscribers = v + return s +} + +// Response of CreateBudget +type CreateBudgetOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateBudgetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBudgetOutput) GoString() string { + return s.String() +} + +// Request of CreateNotification +type CreateNotificationInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget that you want to create + // a notification for. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget that you want AWS to notified you about. Budget names + // must be unique within an account. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The notification that you want to create. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` + + // A list of subscribers that you want to associate with the notification. Each + // notification can have one SNS subscriber and up to ten email subscribers. + // + // Subscribers is a required field + Subscribers []*Subscriber `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateNotificationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotificationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNotificationInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Subscribers == nil { + invalidParams.Add(request.NewErrParamRequired("Subscribers")) + } + if s.Subscribers != nil && len(s.Subscribers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1)) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + if s.Subscribers != nil { + for i, v := range s.Subscribers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *CreateNotificationInput) SetAccountId(v string) *CreateNotificationInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *CreateNotificationInput) SetBudgetName(v string) *CreateNotificationInput { + s.BudgetName = &v + return s +} + +// SetNotification sets the Notification field's value. +func (s *CreateNotificationInput) SetNotification(v *Notification) *CreateNotificationInput { + s.Notification = v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *CreateNotificationInput) SetSubscribers(v []*Subscriber) *CreateNotificationInput { + s.Subscribers = v + return s +} + +// Response of CreateNotification +type CreateNotificationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateNotificationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotificationOutput) GoString() string { + return s.String() +} + +// Request of CreateSubscriber +type CreateSubscriberInput struct { + _ struct{} `type:"structure"` + + // The accountId associated with the budget that you want to create a subscriber + // for. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget that you want to subscribe to. Budget names must be + // unique within an account. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The notification that you want to create a subscriber for. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` + + // The subscriber that you want to associate with a budget notification. + // + // Subscriber is a required field + Subscriber *Subscriber `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateSubscriberInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriberInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSubscriberInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubscriberInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Subscriber == nil { + invalidParams.Add(request.NewErrParamRequired("Subscriber")) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + if s.Subscriber != nil { + if err := s.Subscriber.Validate(); err != nil { + invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *CreateSubscriberInput) SetAccountId(v string) *CreateSubscriberInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *CreateSubscriberInput) SetBudgetName(v string) *CreateSubscriberInput { + s.BudgetName = &v + return s +} + +// SetNotification sets the Notification field's value. +func (s *CreateSubscriberInput) SetNotification(v *Notification) *CreateSubscriberInput { + s.Notification = v + return s +} + +// SetSubscriber sets the Subscriber field's value. +func (s *CreateSubscriberInput) SetSubscriber(v *Subscriber) *CreateSubscriberInput { + s.Subscriber = v + return s +} + +// Response of CreateSubscriber +type CreateSubscriberOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateSubscriberOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubscriberOutput) GoString() string { + return s.String() +} + +// Request of DeleteBudget +type DeleteBudgetInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget that you want to delete. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget that you want to delete. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBudgetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBudgetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBudgetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBudgetInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DeleteBudgetInput) SetAccountId(v string) *DeleteBudgetInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DeleteBudgetInput) SetBudgetName(v string) *DeleteBudgetInput { + s.BudgetName = &v + return s +} + +// Response of DeleteBudget +type DeleteBudgetOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBudgetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBudgetOutput) GoString() string { + return s.String() +} + +// Request of DeleteNotification +type DeleteNotificationInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose notification you want + // to delete. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose notification you want to delete. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The notification that you want to delete. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteNotificationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DeleteNotificationInput) SetAccountId(v string) *DeleteNotificationInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DeleteNotificationInput) SetBudgetName(v string) *DeleteNotificationInput { + s.BudgetName = &v + return s +} + +// SetNotification sets the Notification field's value. +func (s *DeleteNotificationInput) SetNotification(v *Notification) *DeleteNotificationInput { + s.Notification = v + return s +} + +// Response of DeleteNotification +type DeleteNotificationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotificationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationOutput) GoString() string { + return s.String() +} + +// Request of DeleteSubscriber +type DeleteSubscriberInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose subscriber you want + // to delete. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose subscriber you want to delete. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The notification whose subscriber you want to delete. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` + + // The subscriber that you want to delete. + // + // Subscriber is a required field + Subscriber *Subscriber `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSubscriberInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubscriberInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubscriberInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriberInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Subscriber == nil { + invalidParams.Add(request.NewErrParamRequired("Subscriber")) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + if s.Subscriber != nil { + if err := s.Subscriber.Validate(); err != nil { + invalidParams.AddNested("Subscriber", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DeleteSubscriberInput) SetAccountId(v string) *DeleteSubscriberInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DeleteSubscriberInput) SetBudgetName(v string) *DeleteSubscriberInput { + s.BudgetName = &v + return s +} + +// SetNotification sets the Notification field's value. +func (s *DeleteSubscriberInput) SetNotification(v *Notification) *DeleteSubscriberInput { + s.Notification = v + return s +} + +// SetSubscriber sets the Subscriber field's value. +func (s *DeleteSubscriberInput) SetSubscriber(v *Subscriber) *DeleteSubscriberInput { + s.Subscriber = v + return s +} + +// Response of DeleteSubscriber +type DeleteSubscriberOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSubscriberOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubscriberOutput) GoString() string { + return s.String() +} + +// Request of DescribeBudget +type DescribeBudgetInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget that you want a description + // of. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget that you want a description of. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBudgetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBudgetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DescribeBudgetInput) SetAccountId(v string) *DescribeBudgetInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DescribeBudgetInput) SetBudgetName(v string) *DescribeBudgetInput { + s.BudgetName = &v + return s +} + +// Response of DescribeBudget +type DescribeBudgetOutput struct { + _ struct{} `type:"structure"` + + // The description of the budget. + Budget *Budget `type:"structure"` +} + +// String returns the string representation +func (s DescribeBudgetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetOutput) GoString() string { + return s.String() +} + +// SetBudget sets the Budget field's value. +func (s *DescribeBudgetOutput) SetBudget(v *Budget) *DescribeBudgetOutput { + s.Budget = v + return s +} + +// Request of DescribeBudgets +type DescribeBudgetsInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budgets that you want descriptions + // of. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // Optional integer. Specifies the maximum number of results to return in response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBudgetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBudgetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetsInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DescribeBudgetsInput) SetAccountId(v string) *DescribeBudgetsInput { + s.AccountId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeBudgetsInput) SetMaxResults(v int64) *DescribeBudgetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBudgetsInput) SetNextToken(v string) *DescribeBudgetsInput { + s.NextToken = &v + return s +} + +// Response of DescribeBudgets +type DescribeBudgetsOutput struct { + _ struct{} `type:"structure"` + + // A list of budgets. + Budgets []*Budget `type:"list"` + + // The pagination token that indicates the next set of results that you can + // retrieve. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBudgetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetsOutput) GoString() string { + return s.String() +} + +// SetBudgets sets the Budgets field's value. +func (s *DescribeBudgetsOutput) SetBudgets(v []*Budget) *DescribeBudgetsOutput { + s.Budgets = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBudgetsOutput) SetNextToken(v string) *DescribeBudgetsOutput { + s.NextToken = &v + return s +} + +// Request of DescribeNotificationsForBudget +type DescribeNotificationsForBudgetInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose notifications you + // want descriptions of. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose notifications you want descriptions of. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // Optional integer. Specifies the maximum number of results to return in response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNotificationsForBudgetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotificationsForBudgetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNotificationsForBudgetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationsForBudgetInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DescribeNotificationsForBudgetInput) SetAccountId(v string) *DescribeNotificationsForBudgetInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DescribeNotificationsForBudgetInput) SetBudgetName(v string) *DescribeNotificationsForBudgetInput { + s.BudgetName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNotificationsForBudgetInput) SetMaxResults(v int64) *DescribeNotificationsForBudgetInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNotificationsForBudgetInput) SetNextToken(v string) *DescribeNotificationsForBudgetInput { + s.NextToken = &v + return s +} + +// Response of GetNotificationsForBudget +type DescribeNotificationsForBudgetOutput struct { + _ struct{} `type:"structure"` + + // The pagination token that indicates the next set of results that you can + // retrieve. + NextToken *string `type:"string"` + + // A list of notifications associated with a budget. + Notifications []*Notification `type:"list"` +} + +// String returns the string representation +func (s DescribeNotificationsForBudgetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotificationsForBudgetOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNotificationsForBudgetOutput) SetNextToken(v string) *DescribeNotificationsForBudgetOutput { + s.NextToken = &v + return s +} + +// SetNotifications sets the Notifications field's value. +func (s *DescribeNotificationsForBudgetOutput) SetNotifications(v []*Notification) *DescribeNotificationsForBudgetOutput { + s.Notifications = v + return s +} + +// Request of DescribeSubscribersForNotification +type DescribeSubscribersForNotificationInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose subscribers you want + // descriptions of. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose subscribers you want descriptions of. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // Optional integer. Specifies the maximum number of results to return in response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` + + // The notification whose subscribers you want to list. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeSubscribersForNotificationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubscribersForNotificationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSubscribersForNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSubscribersForNotificationInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DescribeSubscribersForNotificationInput) SetAccountId(v string) *DescribeSubscribersForNotificationInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DescribeSubscribersForNotificationInput) SetBudgetName(v string) *DescribeSubscribersForNotificationInput { + s.BudgetName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSubscribersForNotificationInput) SetMaxResults(v int64) *DescribeSubscribersForNotificationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSubscribersForNotificationInput) SetNextToken(v string) *DescribeSubscribersForNotificationInput { + s.NextToken = &v + return s +} + +// SetNotification sets the Notification field's value. +func (s *DescribeSubscribersForNotificationInput) SetNotification(v *Notification) *DescribeSubscribersForNotificationInput { + s.Notification = v + return s +} + +// Response of DescribeSubscribersForNotification +type DescribeSubscribersForNotificationOutput struct { + _ struct{} `type:"structure"` + + // The pagination token that indicates the next set of results that you can + // retrieve. + NextToken *string `type:"string"` + + // A list of subscribers associated with a notification. + Subscribers []*Subscriber `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeSubscribersForNotificationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubscribersForNotificationOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSubscribersForNotificationOutput) SetNextToken(v string) *DescribeSubscribersForNotificationOutput { + s.NextToken = &v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *DescribeSubscribersForNotificationOutput) SetSubscribers(v []*Subscriber) *DescribeSubscribersForNotificationOutput { + s.Subscribers = v + return s +} + +// A notification associated with a budget. A budget can have up to five notifications. +// +// Each notification must have at least one subscriber. A notification can have +// one SNS subscriber and up to ten email subscribers, for a total of 11 subscribers. +// +// For example, if you have a budget for 200 dollars and you want to be notified +// when you go over 160 dollars, create a notification with the following parameters: +// +// * A notificationType of ACTUAL +// +// * A comparisonOperator of GREATER_THAN +// +// * A notification threshold of 80 +type Notification struct { + _ struct{} `type:"structure"` + + // The comparison used for this notification. + // + // ComparisonOperator is a required field + ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` + + // Whether the notification is for how much you have spent (ACTUAL) or for how + // much you are forecasted to spend (FORECASTED). + // + // NotificationType is a required field + NotificationType *string `type:"string" required:"true" enum:"NotificationType"` + + // The threshold associated with a notification. Thresholds are always a percentage. + // + // Threshold is a required field + Threshold *float64 `min:"0.1" type:"double" required:"true"` + + // The type of threshold for a notification. For ACTUAL thresholds, AWS notifies + // you when you go over the threshold, and for FORECASTED thresholds AWS notifies + // you when you are forecasted to go over the threshold. + ThresholdType *string `type:"string" enum:"ThresholdType"` +} + +// String returns the string representation +func (s Notification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Notification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Notification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Notification"} + if s.ComparisonOperator == nil { + invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) + } + if s.NotificationType == nil { + invalidParams.Add(request.NewErrParamRequired("NotificationType")) + } + if s.Threshold == nil { + invalidParams.Add(request.NewErrParamRequired("Threshold")) + } + if s.Threshold != nil && *s.Threshold < 0.1 { + invalidParams.Add(request.NewErrParamMinValue("Threshold", 0.1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComparisonOperator sets the ComparisonOperator field's value. +func (s *Notification) SetComparisonOperator(v string) *Notification { + s.ComparisonOperator = &v + return s +} + +// SetNotificationType sets the NotificationType field's value. +func (s *Notification) SetNotificationType(v string) *Notification { + s.NotificationType = &v + return s +} + +// SetThreshold sets the Threshold field's value. +func (s *Notification) SetThreshold(v float64) *Notification { + s.Threshold = &v + return s +} + +// SetThresholdType sets the ThresholdType field's value. +func (s *Notification) SetThresholdType(v string) *Notification { + s.ThresholdType = &v + return s +} + +// A notification with subscribers. A notification can have one SNS subscriber +// and up to ten email subscribers, for a total of 11 subscribers. +type NotificationWithSubscribers struct { + _ struct{} `type:"structure"` + + // The notification associated with a budget. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` + + // A list of subscribers who are subscribed to this notification. + // + // Subscribers is a required field + Subscribers []*Subscriber `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s NotificationWithSubscribers) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotificationWithSubscribers) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotificationWithSubscribers) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotificationWithSubscribers"} + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.Subscribers == nil { + invalidParams.Add(request.NewErrParamRequired("Subscribers")) + } + if s.Subscribers != nil && len(s.Subscribers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Subscribers", 1)) + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + if s.Subscribers != nil { + for i, v := range s.Subscribers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Subscribers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotification sets the Notification field's value. +func (s *NotificationWithSubscribers) SetNotification(v *Notification) *NotificationWithSubscribers { + s.Notification = v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *NotificationWithSubscribers) SetSubscribers(v []*Subscriber) *NotificationWithSubscribers { + s.Subscribers = v + return s +} + +// The amount of cost or usage being measured for a budget. +// +// For example, a Spend for 3 GB of S3 usage would have the following parameters: +// +// * An Amount of 3 +// +// * A unit of GB +type Spend struct { + _ struct{} `type:"structure"` + + // The cost or usage amount associated with a budget forecast, actual spend, + // or budget threshold. + // + // Amount is a required field + Amount *string `type:"string" required:"true"` + + // The unit of measurement used for the budget forecast, actual spend, or budget + // threshold, such as dollars or GB. + // + // Unit is a required field + Unit *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Spend) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Spend) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Spend) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Spend"} + if s.Amount == nil { + invalidParams.Add(request.NewErrParamRequired("Amount")) + } + if s.Unit == nil { + invalidParams.Add(request.NewErrParamRequired("Unit")) + } + if s.Unit != nil && len(*s.Unit) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Unit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmount sets the Amount field's value. +func (s *Spend) SetAmount(v string) *Spend { + s.Amount = &v + return s +} + +// SetUnit sets the Unit field's value. +func (s *Spend) SetUnit(v string) *Spend { + s.Unit = &v + return s +} + +// The subscriber to a budget notification. The subscriber consists of a subscription +// type and either an Amazon Simple Notification Service topic or an email address. +// +// For example, an email subscriber would have the following parameters: +// +// * A subscriptionType of EMAIL +// +// * An address of example@example.com +type Subscriber struct { + _ struct{} `type:"structure"` + + // The address that AWS sends budget notifications to, either an SNS topic or + // an email. + // + // Address is a required field + Address *string `min:"1" type:"string" required:"true"` + + // The type of notification that AWS sends to a subscriber. + // + // SubscriptionType is a required field + SubscriptionType *string `type:"string" required:"true" enum:"SubscriptionType"` +} + +// String returns the string representation +func (s Subscriber) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subscriber) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Subscriber) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Subscriber"} + if s.Address == nil { + invalidParams.Add(request.NewErrParamRequired("Address")) + } + if s.Address != nil && len(*s.Address) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Address", 1)) + } + if s.SubscriptionType == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddress sets the Address field's value. +func (s *Subscriber) SetAddress(v string) *Subscriber { + s.Address = &v + return s +} + +// SetSubscriptionType sets the SubscriptionType field's value. +func (s *Subscriber) SetSubscriptionType(v string) *Subscriber { + s.SubscriptionType = &v + return s +} + +// The period of time covered by a budget. Has a start date and an end date. +// The start date must come before the end date. There are no restrictions on +// the end date. +type TimePeriod struct { + _ struct{} `type:"structure"` + + // The end date for a budget. If you didn't specify an end date, AWS set your + // end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing + // and Cost Management console and the API. + // + // After the end date, AWS deletes the budget and all associated notifications + // and subscribers. You can change your end date with the UpdateBudget operation. + End *time.Time `type:"timestamp"` + + // The start date for a budget. If you created your budget and didn't specify + // a start date, AWS defaults to the start of your chosen time period (i.e. + // DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget + // on January 24th 2018, chose DAILY, and didn't set a start date, AWS set your + // start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start + // date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing + // and Cost Management console and the API. + // + // You can change your start date with the UpdateBudget operation. + Start *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s TimePeriod) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimePeriod) GoString() string { + return s.String() +} + +// SetEnd sets the End field's value. +func (s *TimePeriod) SetEnd(v time.Time) *TimePeriod { + s.End = &v + return s +} + +// SetStart sets the Start field's value. +func (s *TimePeriod) SetStart(v time.Time) *TimePeriod { + s.Start = &v + return s +} + +// Request of UpdateBudget +type UpdateBudgetInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget that you want to update. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The budget that you want to update your budget to. + // + // NewBudget is a required field + NewBudget *Budget `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateBudgetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBudgetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBudgetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBudgetInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.NewBudget == nil { + invalidParams.Add(request.NewErrParamRequired("NewBudget")) + } + if s.NewBudget != nil { + if err := s.NewBudget.Validate(); err != nil { + invalidParams.AddNested("NewBudget", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *UpdateBudgetInput) SetAccountId(v string) *UpdateBudgetInput { + s.AccountId = &v + return s +} + +// SetNewBudget sets the NewBudget field's value. +func (s *UpdateBudgetInput) SetNewBudget(v *Budget) *UpdateBudgetInput { + s.NewBudget = v + return s +} + +// Response of UpdateBudget +type UpdateBudgetOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateBudgetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBudgetOutput) GoString() string { + return s.String() +} + +// Request of UpdateNotification +type UpdateNotificationInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose notification you want + // to update. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose notification you want to update. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The updated notification to be associated with a budget. + // + // NewNotification is a required field + NewNotification *Notification `type:"structure" required:"true"` + + // The previous notification associated with a budget. + // + // OldNotification is a required field + OldNotification *Notification `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateNotificationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotificationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNotificationInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.NewNotification == nil { + invalidParams.Add(request.NewErrParamRequired("NewNotification")) + } + if s.OldNotification == nil { + invalidParams.Add(request.NewErrParamRequired("OldNotification")) + } + if s.NewNotification != nil { + if err := s.NewNotification.Validate(); err != nil { + invalidParams.AddNested("NewNotification", err.(request.ErrInvalidParams)) + } + } + if s.OldNotification != nil { + if err := s.OldNotification.Validate(); err != nil { + invalidParams.AddNested("OldNotification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *UpdateNotificationInput) SetAccountId(v string) *UpdateNotificationInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *UpdateNotificationInput) SetBudgetName(v string) *UpdateNotificationInput { + s.BudgetName = &v + return s +} + +// SetNewNotification sets the NewNotification field's value. +func (s *UpdateNotificationInput) SetNewNotification(v *Notification) *UpdateNotificationInput { + s.NewNotification = v + return s +} + +// SetOldNotification sets the OldNotification field's value. +func (s *UpdateNotificationInput) SetOldNotification(v *Notification) *UpdateNotificationInput { + s.OldNotification = v + return s +} + +// Response of UpdateNotification +type UpdateNotificationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateNotificationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotificationOutput) GoString() string { + return s.String() +} + +// Request of UpdateSubscriber +type UpdateSubscriberInput struct { + _ struct{} `type:"structure"` + + // The accountId that is associated with the budget whose subscriber you want + // to update. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // The name of the budget whose subscriber you want to update. + // + // BudgetName is a required field + BudgetName *string `type:"string" required:"true"` + + // The updated subscriber associated with a budget notification. + // + // NewSubscriber is a required field + NewSubscriber *Subscriber `type:"structure" required:"true"` + + // The notification whose subscriber you want to update. + // + // Notification is a required field + Notification *Notification `type:"structure" required:"true"` + + // The previous subscriber associated with a budget notification. + // + // OldSubscriber is a required field + OldSubscriber *Subscriber `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSubscriberInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubscriberInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSubscriberInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSubscriberInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.NewSubscriber == nil { + invalidParams.Add(request.NewErrParamRequired("NewSubscriber")) + } + if s.Notification == nil { + invalidParams.Add(request.NewErrParamRequired("Notification")) + } + if s.OldSubscriber == nil { + invalidParams.Add(request.NewErrParamRequired("OldSubscriber")) + } + if s.NewSubscriber != nil { + if err := s.NewSubscriber.Validate(); err != nil { + invalidParams.AddNested("NewSubscriber", err.(request.ErrInvalidParams)) + } + } + if s.Notification != nil { + if err := s.Notification.Validate(); err != nil { + invalidParams.AddNested("Notification", err.(request.ErrInvalidParams)) + } + } + if s.OldSubscriber != nil { + if err := s.OldSubscriber.Validate(); err != nil { + invalidParams.AddNested("OldSubscriber", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *UpdateSubscriberInput) SetAccountId(v string) *UpdateSubscriberInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *UpdateSubscriberInput) SetBudgetName(v string) *UpdateSubscriberInput { + s.BudgetName = &v + return s +} + +// SetNewSubscriber sets the NewSubscriber field's value. +func (s *UpdateSubscriberInput) SetNewSubscriber(v *Subscriber) *UpdateSubscriberInput { + s.NewSubscriber = v + return s +} + +// SetNotification sets the Notification field's value. +func (s *UpdateSubscriberInput) SetNotification(v *Notification) *UpdateSubscriberInput { + s.Notification = v + return s +} + +// SetOldSubscriber sets the OldSubscriber field's value. +func (s *UpdateSubscriberInput) SetOldSubscriber(v *Subscriber) *UpdateSubscriberInput { + s.OldSubscriber = v + return s +} + +// Response of UpdateSubscriber +type UpdateSubscriberOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateSubscriberOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSubscriberOutput) GoString() string { + return s.String() +} + +// The type of a budget. It should be COST, USAGE, or RI_UTILIZATION. +const ( + // BudgetTypeUsage is a BudgetType enum value + BudgetTypeUsage = "USAGE" + + // BudgetTypeCost is a BudgetType enum value + BudgetTypeCost = "COST" + + // BudgetTypeRiUtilization is a BudgetType enum value + BudgetTypeRiUtilization = "RI_UTILIZATION" + + // BudgetTypeRiCoverage is a BudgetType enum value + BudgetTypeRiCoverage = "RI_COVERAGE" +) + +// The comparison operator of a notification. Currently we support less than, +// equal to and greater than. +const ( + // ComparisonOperatorGreaterThan is a ComparisonOperator enum value + ComparisonOperatorGreaterThan = "GREATER_THAN" + + // ComparisonOperatorLessThan is a ComparisonOperator enum value + ComparisonOperatorLessThan = "LESS_THAN" + + // ComparisonOperatorEqualTo is a ComparisonOperator enum value + ComparisonOperatorEqualTo = "EQUAL_TO" +) + +// The type of a notification. It should be ACTUAL or FORECASTED. +const ( + // NotificationTypeActual is a NotificationType enum value + NotificationTypeActual = "ACTUAL" + + // NotificationTypeForecasted is a NotificationType enum value + NotificationTypeForecasted = "FORECASTED" +) + +// The subscription type of the subscriber. It can be SMS or EMAIL. +const ( + // SubscriptionTypeSns is a SubscriptionType enum value + SubscriptionTypeSns = "SNS" + + // SubscriptionTypeEmail is a SubscriptionType enum value + SubscriptionTypeEmail = "EMAIL" +) + +// The type of threshold for a notification. It can be PERCENTAGE or ABSOLUTE_VALUE. +const ( + // ThresholdTypePercentage is a ThresholdType enum value + ThresholdTypePercentage = "PERCENTAGE" + + // ThresholdTypeAbsoluteValue is a ThresholdType enum value + ThresholdTypeAbsoluteValue = "ABSOLUTE_VALUE" +) + +// The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc. +const ( + // TimeUnitDaily is a TimeUnit enum value + TimeUnitDaily = "DAILY" + + // TimeUnitMonthly is a TimeUnit enum value + TimeUnitMonthly = "MONTHLY" + + // TimeUnitQuarterly is a TimeUnit enum value + TimeUnitQuarterly = "QUARTERLY" + + // TimeUnitAnnually is a TimeUnit enum value + TimeUnitAnnually = "ANNUALLY" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go new file mode 100644 index 000000000..a4c64c2cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go @@ -0,0 +1,61 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package budgets provides the client and types for making API +// requests to AWS Budgets. +// +// Budgets enable you to plan your service usage, service costs, and your RI +// utilization. You can also track how close your plan is to your budgeted amount +// or to the free tier limits. Budgets provide you with a quick way to see your +// usage-to-date and current estimated charges from AWS and to see how much +// your predicted usage accrues in charges by the end of the month. Budgets +// also compare current estimates and charges to the amount that you indicated +// you want to use or spend and lets you see how much of your budget has been +// used. AWS updates your budget status several times a day. Budgets track your +// unblended costs, subscriptions, and refunds. You can create the following +// types of budgets: +// +// * Cost budgets allow you to say how much you want to spend on a service. +// +// * Usage budgets allow you to say how many hours you want to use for one +// or more services. +// +// * RI utilization budgets allow you to define a utilization threshold and +// receive alerts when RIs are tracking below that threshold. +// +// You can create up to 20,000 budgets per AWS master account. Your first two +// budgets are free of charge. Each additional budget costs $0.02 per day. You +// can set up optional notifications that warn you if you exceed, or are forecasted +// to exceed, your budgeted amount. You can have notifications sent to an Amazon +// SNS topic, to an email address, or to both. For more information, see Creating +// an Amazon SNS Topic for Budget Notifications (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-sns-policy.html). +// AWS Free Tier usage alerts via AWS Budgets are provided for you, and do not +// count toward your budget limits. +// +// Service Endpoint +// +// The AWS Budgets API provides the following endpoint: +// +// * https://budgets.amazonaws.com +// +// For information about costs associated with the AWS Budgets API, see AWS +// Cost Management Pricing (https://aws.amazon.com/aws-cost-management/pricing/). +// +// See budgets package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/ +// +// Using the Client +// +// To contact AWS Budgets 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 Budgets client Budgets for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/#New +package budgets diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go new file mode 100644 index 000000000..8737c2daa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go @@ -0,0 +1,50 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package budgets + +const ( + + // ErrCodeCreationLimitExceededException for service response error code + // "CreationLimitExceededException". + // + // You've exceeded the notification or subscriber limit. + ErrCodeCreationLimitExceededException = "CreationLimitExceededException" + + // ErrCodeDuplicateRecordException for service response error code + // "DuplicateRecordException". + // + // The budget name already exists. Budget names must be unique within an account. + ErrCodeDuplicateRecordException = "DuplicateRecordException" + + // ErrCodeExpiredNextTokenException for service response error code + // "ExpiredNextTokenException". + // + // The pagination token expired. + ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // An error on the server occurred during the processing of your request. Try + // again later. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The pagination token is invalid. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // An error on the client occurred. Typically, the cause is an invalid input + // value. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // We can’t locate the resource that you specified. + ErrCodeNotFoundException = "NotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go new file mode 100644 index 000000000..dc10c2aaa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package budgets + +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/jsonrpc" +) + +// Budgets provides the API operation methods for making requests to +// AWS Budgets. See this package's package overview docs +// for details on the service. +// +// Budgets methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Budgets 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 = "budgets" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Budgets" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Budgets client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Budgets client from just a session. +// svc := budgets.New(mySession) +// +// // Create a Budgets client with additional configuration +// svc := budgets.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Budgets { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Budgets { + svc := &Budgets{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2016-10-20", + JSONVersion: "1.1", + TargetPrefix: "AWSBudgetServiceGateway", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Budgets operation and runs any +// custom request initialization. +func (c *Budgets) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go index 1494b5c02..581b2f0b9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go @@ -1791,7 +1791,7 @@ type EnvironmentMember struct { // The time, expressed in epoch time format, when the environment member last // opened the environment. - LastAccess *time.Time `locationName:"lastAccess" type:"timestamp" timestampFormat:"unix"` + LastAccess *time.Time `locationName:"lastAccess" type:"timestamp"` // The type of environment member permissions associated with this environment // member. Available values include: diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go index 1a01d2d92..8b9d30d54 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloud9" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cloud9" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cloud9" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Cloud9 client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 673b3636c..9d55afb7b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -3618,7 +3618,8 @@ func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req // UpdateStackSet API operation for AWS CloudFormation. // -// Updates the stack set and all associated stack instances. +// Updates the stack set, and associated stack instances in the specified accounts +// and regions. // // Even if the stack set operation created by updating the stack set fails (completely // or partially, below or above a specified failure tolerance), the stack set @@ -3650,6 +3651,9 @@ func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req // * ErrCodeInvalidOperationException "InvalidOperationException" // The specified operation isn't valid. // +// * ErrCodeStackInstanceNotFoundException "StackInstanceNotFoundException" +// The specified stack instance doesn't exist. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateStackSet func (c *CloudFormation) UpdateStackSet(input *UpdateStackSetInput) (*UpdateStackSetOutput, error) { req, out := c.UpdateStackSetRequest(input) @@ -4052,7 +4056,7 @@ type ChangeSetSummary struct { ChangeSetName *string `min:"1" type:"string"` // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `type:"timestamp"` // Descriptive information about the change set. Description *string `min:"1" type:"string"` @@ -5130,8 +5134,8 @@ type CreateStackSetInput struct { // // Specify an IAM role only if you are using customized administrator roles // to control which users or groups can manage specific stack sets within the - // same administrator account. For more information, see Define Permissions - // for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // same administrator account. For more information, see Prerequisites: Granting + // Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) // in the AWS CloudFormation User Guide. AdministrationRoleARN *string `min:"20" type:"string"` @@ -5184,6 +5188,14 @@ type CreateStackSetInput struct { // stack set's purpose or other important information. Description *string `min:"1" type:"string"` + // The name of the IAM execution role to use to create the stack set. If you + // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole + // role for the stack set operation. + // + // Specify an IAM role only if you are using customized execution roles to control + // which stack resources users and groups can include in their stack sets. + ExecutionRoleName *string `min:"1" type:"string"` + // The input parameters for the stack set template. Parameters []*Parameter `type:"list"` @@ -5248,6 +5260,9 @@ func (s *CreateStackSetInput) Validate() error { if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } + if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) + } if s.StackSetName == nil { invalidParams.Add(request.NewErrParamRequired("StackSetName")) } @@ -5298,6 +5313,12 @@ func (s *CreateStackSetInput) SetDescription(v string) *CreateStackSetInput { return s } +// SetExecutionRoleName sets the ExecutionRoleName field's value. +func (s *CreateStackSetInput) SetExecutionRoleName(v string) *CreateStackSetInput { + s.ExecutionRoleName = &v + return s +} + // SetParameters sets the Parameters field's value. func (s *CreateStackSetInput) SetParameters(v []*Parameter) *CreateStackSetInput { s.Parameters = v @@ -5890,7 +5911,7 @@ type DescribeChangeSetOutput struct { Changes []*Change `type:"list"` // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `type:"timestamp"` // Information about the change set. Description *string `min:"1" type:"string"` @@ -8901,10 +8922,10 @@ type Stack struct { // The time at which the stack was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeletionTime *time.Time `type:"timestamp"` // A user-defined description associated with the stack. Description *string `min:"1" type:"string"` @@ -8927,7 +8948,7 @@ type Stack struct { // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastUpdatedTime *time.Time `type:"timestamp"` // SNS topic ARNs to which stack related events are published. NotificationARNs []*string `type:"list"` @@ -9178,7 +9199,7 @@ type StackEvent struct { // Time the status was updated. // // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9488,7 +9509,7 @@ type StackResource struct { // Time the status was updated. // // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9565,7 +9586,7 @@ type StackResourceDetail struct { // Time the status was updated. // // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` // The logical name of the resource specified in the template. // @@ -9680,7 +9701,7 @@ type StackResourceSummary struct { // Time the status was updated. // // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` // The logical name of the resource specified in the template. // @@ -9765,7 +9786,7 @@ type StackSet struct { // // Use customized administrator roles to control which users or groups can manage // specific stack sets within the same administrator account. For more information, - // see Define Permissions for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // see Prerequisites: Granting Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) // in the AWS CloudFormation User Guide. AdministrationRoleARN *string `min:"20" type:"string"` @@ -9780,6 +9801,12 @@ type StackSet struct { // or updated. Description *string `min:"1" type:"string"` + // The name of the IAM execution role used to create or update the stack set. + // + // Use customized execution roles to control which stack resources users and + // groups can include in their stack sets. + ExecutionRoleName *string `min:"1" type:"string"` + // A list of input parameters for a stack set. Parameters []*Parameter `type:"list"` @@ -9832,6 +9859,12 @@ func (s *StackSet) SetDescription(v string) *StackSet { return s } +// SetExecutionRoleName sets the ExecutionRoleName field's value. +func (s *StackSet) SetExecutionRoleName(v string) *StackSet { + s.ExecutionRoleName = &v + return s +} + // SetParameters sets the Parameters field's value. func (s *StackSet) SetParameters(v []*Parameter) *StackSet { s.Parameters = v @@ -9898,12 +9931,18 @@ type StackSetOperation struct { // stacks themselves. This is because AWS CloudFormation needs to perform preparatory // work for the operation, such as dispatching the work to the requested regions, // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `type:"timestamp"` // The time at which the stack set operation ended, across all accounts and // regions specified. Note that this doesn't necessarily mean that the stack // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTimestamp *time.Time `type:"timestamp"` + + // The name of the IAM execution role used to create or update the stack set. + // + // Use customized execution roles to control which stack resources users and + // groups can include in their stack sets. + ExecutionRoleName *string `min:"1" type:"string"` // The unique ID of a stack set operation. OperationId *string `min:"1" type:"string"` @@ -9976,6 +10015,12 @@ func (s *StackSetOperation) SetEndTimestamp(v time.Time) *StackSetOperation { return s } +// SetExecutionRoleName sets the ExecutionRoleName field's value. +func (s *StackSetOperation) SetExecutionRoleName(v string) *StackSetOperation { + s.ExecutionRoleName = &v + return s +} + // SetOperationId sets the OperationId field's value. func (s *StackSetOperation) SetOperationId(v string) *StackSetOperation { s.OperationId = &v @@ -10220,12 +10265,12 @@ type StackSetOperationSummary struct { // stacks themselves. This is because AWS CloudFormation needs to perform preparatory // work for the operation, such as dispatching the work to the requested regions, // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `type:"timestamp"` // The time at which the stack set operation ended, across all accounts and // regions specified. Note that this doesn't necessarily mean that the stack // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTimestamp *time.Time `type:"timestamp"` // The unique ID of the stack set operation. OperationId *string `min:"1" type:"string"` @@ -10352,14 +10397,14 @@ type StackSummary struct { // The time the stack was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeletionTime *time.Time `type:"timestamp"` // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastUpdatedTime *time.Time `type:"timestamp"` // For nested stacks--stacks created as resources for another stack--the stack // ID of the direct parent of this stack. For the first level of nested stacks, @@ -11168,6 +11213,23 @@ func (s *UpdateStackOutput) SetStackId(v string) *UpdateStackOutput { type UpdateStackSetInput struct { _ struct{} `type:"structure"` + // The accounts in which to update associated stack instances. If you specify + // accounts, you must also specify the regions in which to update stack set + // instances. + // + // To update all the stack instances associated with this stack set, do not + // specify the Accounts or Regions properties. + // + // If the stack set update includes changes to the template (that is, if the + // TemplateBody or TemplateURL properties are specified), or the Parameters + // property, AWS CloudFormation marks all stack instances with a status of OUTDATED + // prior to updating the stack instances in the specified accounts and regions. + // If the stack set update does not include changes to the template or parameters, + // AWS CloudFormation updates the stack instances in the specified accounts + // and regions, while leaving all other stack instances with their existing + // stack instance status. + Accounts []*string `type:"list"` + // The Amazon Resource Number (ARN) of the IAM role to use to update this stack // set. // @@ -11223,6 +11285,20 @@ type UpdateStackSetInput struct { // A brief description of updates that you are making. Description *string `min:"1" type:"string"` + // The name of the IAM execution role to use to update the stack set. If you + // do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole + // role for the stack set operation. + // + // Specify an IAM role only if you are using customized execution roles to control + // which stack resources users and groups can include in their stack sets. + // + // If you specify a customized execution role, AWS CloudFormation uses that + // role to update the stack. If you do not specify a customized execution role, + // AWS CloudFormation performs the update using the role previously associated + // with the stack set, so long as you have permissions to perform operations + // on the stack set. + ExecutionRoleName *string `min:"1" type:"string"` + // The unique ID for this stack set operation. // // The operation ID also functions as an idempotency token, to ensure that AWS @@ -11242,6 +11318,22 @@ type UpdateStackSetInput struct { // A list of input parameters for the stack set template. Parameters []*Parameter `type:"list"` + // The regions in which to update associated stack instances. If you specify + // regions, you must also specify accounts in which to update stack set instances. + // + // To update all the stack instances associated with this stack set, do not + // specify the Accounts or Regions properties. + // + // If the stack set update includes changes to the template (that is, if the + // TemplateBody or TemplateURL properties are specified), or the Parameters + // property, AWS CloudFormation marks all stack instances with a status of OUTDATED + // prior to updating the stack instances in the specified accounts and regions. + // If the stack set update does not include changes to the template or parameters, + // AWS CloudFormation updates the stack instances in the specified accounts + // and regions, while leaving all other stack instances with their existing + // stack instance status. + Regions []*string `type:"list"` + // The name or unique ID of the stack set that you want to update. // // StackSetName is a required field @@ -11321,6 +11413,9 @@ func (s *UpdateStackSetInput) Validate() error { if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } + if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) + } if s.OperationId != nil && len(*s.OperationId) < 1 { invalidParams.Add(request.NewErrParamMinLen("OperationId", 1)) } @@ -11355,6 +11450,12 @@ func (s *UpdateStackSetInput) Validate() error { return nil } +// SetAccounts sets the Accounts field's value. +func (s *UpdateStackSetInput) SetAccounts(v []*string) *UpdateStackSetInput { + s.Accounts = v + return s +} + // SetAdministrationRoleARN sets the AdministrationRoleARN field's value. func (s *UpdateStackSetInput) SetAdministrationRoleARN(v string) *UpdateStackSetInput { s.AdministrationRoleARN = &v @@ -11373,6 +11474,12 @@ func (s *UpdateStackSetInput) SetDescription(v string) *UpdateStackSetInput { return s } +// SetExecutionRoleName sets the ExecutionRoleName field's value. +func (s *UpdateStackSetInput) SetExecutionRoleName(v string) *UpdateStackSetInput { + s.ExecutionRoleName = &v + return s +} + // SetOperationId sets the OperationId field's value. func (s *UpdateStackSetInput) SetOperationId(v string) *UpdateStackSetInput { s.OperationId = &v @@ -11391,6 +11498,12 @@ func (s *UpdateStackSetInput) SetParameters(v []*Parameter) *UpdateStackSetInput return s } +// SetRegions sets the Regions field's value. +func (s *UpdateStackSetInput) SetRegions(v []*string) *UpdateStackSetInput { + s.Regions = v + return s +} + // SetStackSetName sets the StackSetName field's value. func (s *UpdateStackSetInput) SetStackSetName(v string) *UpdateStackSetInput { s.StackSetName = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go index 0115c5bb0..65df49a0c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudformation" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cloudformation" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudFormation" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudFormation client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index afc3cf2ea..5109b4485 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -72,7 +72,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCl // API operation CreateCloudFrontOriginAccessIdentity for usage and error information. // // Returned Error Codes: -// * ErrCodeOriginAccessIdentityAlreadyExists "OriginAccessIdentityAlreadyExists" +// * ErrCodeOriginAccessIdentityAlreadyExists "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 @@ -1239,7 +1239,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCl // The precondition given in one or more of the request-header fields evaluated // to false. // -// * ErrCodeOriginAccessIdentityInUse "OriginAccessIdentityInUse" +// * ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse" // // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { @@ -1638,92 +1638,6 @@ func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePu return out, req.Send() } -const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole2017_10_30" - -// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfuly. -// -// 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 DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole -// 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 DeleteServiceLinkedRoleRequest method. -// req, resp := client.DeleteServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opDeleteServiceLinkedRole, - HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/service-linked-role/{RoleName}", - } - - if input == nil { - input = &DeleteServiceLinkedRoleInput{} - } - - output = &DeleteServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServiceLinkedRole API operation for Amazon CloudFront. -// -// 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 CloudFront's -// API operation DeleteServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeResourceInUse "ResourceInUse" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceLinkedRole 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 *CloudFront) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_10_30" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the @@ -7551,56 +7465,6 @@ func (s DeletePublicKeyOutput) GoString() string { return s.String() } -type DeleteServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // RoleName is a required field - RoleName *string `location:"uri" locationName:"RoleName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { - s.RoleName = &v - return s -} - -type DeleteServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceLinkedRoleOutput) GoString() string { - return s.String() -} - // The request to delete a streaming distribution. type DeleteStreamingDistributionInput struct { _ struct{} `type:"structure"` @@ -7710,7 +7574,7 @@ type Distribution struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // This response element indicates the current status of the distribution. When // the status is Deployed, the distribution's information is fully propagated @@ -8432,7 +8296,7 @@ type DistributionSummary struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // A complex type that contains information about origins for this distribution. // @@ -8830,7 +8694,7 @@ type FieldLevelEncryption struct { // The last time the field-level encryption configuration was changed. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9018,7 +8882,7 @@ type FieldLevelEncryptionProfile struct { // The last time the field-level encryption profile was updated. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9212,7 +9076,7 @@ type FieldLevelEncryptionProfileSummary struct { // The time when the the field-level encryption profile summary was last updated. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // Name for the field-level encryption profile summary. // @@ -9278,7 +9142,7 @@ type FieldLevelEncryptionSummary struct { // The last time that the summary of field-level encryption items was modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // A summary of a query argument-profile mapping. QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` @@ -10603,7 +10467,7 @@ type Invalidation struct { // The date and time the invalidation request was first made. // // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `type:"timestamp" required:"true"` // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. // @@ -10822,7 +10686,7 @@ type InvalidationSummary struct { _ struct{} `type:"structure"` // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `type:"timestamp" required:"true"` // The unique ID for an invalidation request. // @@ -12404,7 +12268,7 @@ type PublicKey struct { // A time you added a public key to CloudFront. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // A unique ID assigned to a public key you've added to CloudFront. // @@ -12595,7 +12459,7 @@ type PublicKeySummary struct { // Creation time for public key information summary. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // Encoded key for public key information summary. // @@ -13121,7 +12985,7 @@ type StreamingDistribution struct { Id *string `type:"string" required:"true"` // The date and time that the distribution was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModifiedTime *time.Time `type:"timestamp"` // The current status of the RTMP distribution. When the status is Deployed, // the distribution's information is propagated to all CloudFront edge locations. @@ -13536,7 +13400,7 @@ type StreamingDistributionSummary struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // PriceClass is a required field PriceClass *string `type:"string" required:"true" enum:"PriceClass"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go index 1f5ce88f1..ede41494f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go @@ -264,17 +264,17 @@ const ( ErrCodeNoSuchStreamingDistribution = "NoSuchStreamingDistribution" // ErrCodeOriginAccessIdentityAlreadyExists for service response error code - // "OriginAccessIdentityAlreadyExists". + // "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 = "OriginAccessIdentityAlreadyExists" + ErrCodeOriginAccessIdentityAlreadyExists = "CloudFrontOriginAccessIdentityAlreadyExists" // ErrCodeOriginAccessIdentityInUse for service response error code - // "OriginAccessIdentityInUse". - ErrCodeOriginAccessIdentityInUse = "OriginAccessIdentityInUse" + // "CloudFrontOriginAccessIdentityInUse". + ErrCodeOriginAccessIdentityInUse = "CloudFrontOriginAccessIdentityInUse" // ErrCodePreconditionFailed for service response error code // "PreconditionFailed". @@ -301,10 +301,6 @@ const ( // No profile specified for the field-level encryption query argument. ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty" - // ErrCodeResourceInUse for service response error code - // "ResourceInUse". - ErrCodeResourceInUse = "ResourceInUse" - // ErrCodeStreamingDistributionAlreadyExists for service response error code // "StreamingDistributionAlreadyExists". ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go index a07f02113..103bab6a2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudfront" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cloudfront" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudFront" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudFront client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index c6ad246ec..270720907 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -73,7 +73,7 @@ func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // This exception is thrown when the specified resource is not found. // -// * ErrCodeARNInvalidException "ARNInvalidException" +// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // @@ -842,7 +842,7 @@ func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // This exception is thrown when the specified resource is not found. // -// * ErrCodeARNInvalidException "ARNInvalidException" +// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // @@ -1271,7 +1271,7 @@ func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Req // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // This exception is thrown when the specified resource is not found. // -// * ErrCodeARNInvalidException "ARNInvalidException" +// * ErrCodeARNInvalidException "CloudTrailARNInvalidException" // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // @@ -2296,7 +2296,7 @@ type Event struct { EventSource *string `type:"string"` // The date and time of the event returned. - EventTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EventTime *time.Time `type:"timestamp"` // A list of resources referenced by the event returned. Resources []*Resource `type:"list"` @@ -2564,7 +2564,7 @@ type GetTrailStatusOutput struct { // Displays the most recent date and time when CloudTrail delivered logs to // CloudWatch Logs. - LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"` // This field is deprecated. LatestDeliveryAttemptSucceeded *string `type:"string"` @@ -2585,7 +2585,7 @@ type GetTrailStatusOutput struct { // Specifies the date and time that CloudTrail last delivered log files to an // account's Amazon S3 bucket. - LatestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestDeliveryTime *time.Time `type:"timestamp"` // Displays any Amazon S3 error that CloudTrail encountered when attempting // to deliver a digest file to the designated bucket. For more information see @@ -2600,7 +2600,7 @@ type GetTrailStatusOutput struct { // Specifies the date and time that CloudTrail last delivered a digest file // to an account's Amazon S3 bucket. - LatestDigestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestDigestDeliveryTime *time.Time `type:"timestamp"` // This field is deprecated. LatestNotificationAttemptSucceeded *string `type:"string"` @@ -2615,15 +2615,15 @@ type GetTrailStatusOutput struct { // Specifies the date and time of the most recent Amazon SNS notification that // CloudTrail has written a new log file to an account's Amazon S3 bucket. - LatestNotificationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestNotificationTime *time.Time `type:"timestamp"` // Specifies the most recent date and time when CloudTrail started recording // API calls for an AWS account. - StartLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartLoggingTime *time.Time `type:"timestamp"` // Specifies the most recent date and time when CloudTrail stopped recording // API calls for an AWS account. - StopLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StopLoggingTime *time.Time `type:"timestamp"` // This field is deprecated. TimeLoggingStarted *string `type:"string"` @@ -2750,7 +2750,7 @@ type ListPublicKeysInput struct { // Optionally specifies, in UTC, the end of the time range to look up public // keys for CloudTrail digest files. If not specified, the current time is used. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Reserved for future use. NextToken *string `type:"string"` @@ -2758,7 +2758,7 @@ type ListPublicKeysInput struct { // Optionally specifies, in UTC, the start of the time range to look up public // keys for CloudTrail digest files. If not specified, the current time is used, // and the current public key is returned. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -2970,7 +2970,7 @@ type LookupEventsInput struct { // Specifies that only events that occur before or at the specified time are // returned. If the specified end time is before the specified start time, an // error is returned. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Contains a list of lookup attributes. Currently the list can contain only // one item. @@ -2990,7 +2990,7 @@ type LookupEventsInput struct { // Specifies that only events that occur after or at the specified time are // returned. If the specified start time is after the specified end time, an // error is returned. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3103,10 +3103,10 @@ type PublicKey struct { Fingerprint *string `type:"string"` // The ending time of validity of the public key. - ValidityEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidityEndTime *time.Time `type:"timestamp"` // The starting time of validity of the public key. - ValidityStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidityStartTime *time.Time `type:"timestamp"` // The DER encoded public key value in PKCS#1 format. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go index 0da999b33..0ee616cbe 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go @@ -5,13 +5,13 @@ package cloudtrail const ( // ErrCodeARNInvalidException for service response error code - // "ARNInvalidException". + // "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-1:123456789012:trail/MyTrail - ErrCodeARNInvalidException = "ARNInvalidException" + ErrCodeARNInvalidException = "CloudTrailARNInvalidException" // ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code // "CloudWatchLogsDeliveryUnavailableException". diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go index 49198fc63..5f1d4ddc4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudtrail" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cloudtrail" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudTrail" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudTrail client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 38519a2ac..135c56d89 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -1679,7 +1679,7 @@ type AlarmHistoryItem struct { HistorySummary *string `min:"1" type:"string"` // The time stamp for the alarm history item. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -1735,7 +1735,7 @@ type DashboardEntry struct { // The time stamp of when the dashboard was last modified, either by an API // call or through the console. This number is expressed as the number of milliseconds // since Jan 1, 1970 00:00:00 UTC. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` // The size of the dashboard, in bytes. Size *int64 `type:"long"` @@ -1832,7 +1832,7 @@ type Datapoint struct { Sum *float64 `type:"double"` // The time stamp used for the data point. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` // The standard unit for the data point. Unit *string `type:"string" enum:"StandardUnit"` @@ -2007,7 +2007,7 @@ type DescribeAlarmHistoryInput struct { AlarmName *string `min:"1" type:"string"` // The ending date to retrieve alarm history. - EndDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndDate *time.Time `type:"timestamp"` // The type of alarm histories to retrieve. HistoryItemType *string `type:"string" enum:"HistoryItemType"` @@ -2020,7 +2020,7 @@ type DescribeAlarmHistoryInput struct { NextToken *string `type:"string"` // The starting date to retrieve alarm history. - StartDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -2684,7 +2684,7 @@ type GetMetricDataInput struct { // The time stamp indicating the latest data to be returned. // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The maximum number of data points the request should return before paginating. // If you omit this, the default of 100,800 is used. @@ -2711,7 +2711,7 @@ type GetMetricDataInput struct { // The time stamp indicating the earliest data to be returned. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -2842,7 +2842,7 @@ type GetMetricStatisticsInput struct { // time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-10T23:00:00Z). // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The percentile statistics. Specify values between p0.0 and p100. When calling // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, @@ -2908,7 +2908,7 @@ type GetMetricStatisticsInput struct { // you receive data timestamped between 15:02:15 and 15:07:15. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // The metric statistics, other than percentile. For percentile statistics, // use ExtendedStatistics. When calling GetMetricStatistics, you must specify @@ -3360,7 +3360,7 @@ type MetricAlarm struct { AlarmArn *string `min:"1" type:"string"` // The time stamp of the last update to the alarm configuration. - AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` // The description of the alarm. AlarmDescription *string `type:"string"` @@ -3416,7 +3416,7 @@ type MetricAlarm struct { StateReasonData *string `type:"string"` // The time stamp of the last update to the alarm state. - StateUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StateUpdatedTimestamp *time.Time `type:"timestamp"` // The state value for the alarm. StateValue *string `type:"string" enum:"StateValue"` @@ -3816,7 +3816,7 @@ type MetricDatum struct { // The time the metric data was received, expressed as the number of milliseconds // since Jan 1, 1970 00:00:00 UTC. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` // The unit of the metric. Unit *string `type:"string" enum:"StandardUnit"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go index 4b0aa76ed..0d4786622 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "monitoring" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "monitoring" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatch client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 3fe033736..77a27140f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -2447,7 +2447,7 @@ type PutEventsRequestEntry struct { // The timestamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). // If no timestamp is provided, the timestamp of the PutEvents call is used. - Time *time.Time `type:"timestamp" timestampFormat:"unix"` + Time *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go index 1fb24f16b..2a7f6969c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "events" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "events" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch Events" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatchEvents client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index 43a77742f..7d05f0826 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -1281,6 +1281,7 @@ func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsIn // for more information on using Contexts. func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *DescribeDestinationsInput if input != nil { @@ -1503,6 +1504,7 @@ func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, f // for more information on using Contexts. func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *DescribeLogGroupsInput if input != nil { @@ -1649,6 +1651,7 @@ func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, // for more information on using Contexts. func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *DescribeLogStreamsInput if input != nil { @@ -1792,6 +1795,7 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFilters // for more information on using Contexts. func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *DescribeMetricFiltersInput if input != nil { @@ -2017,6 +2021,7 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscri // for more information on using Contexts. func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *DescribeSubscriptionFiltersInput if input != nil { @@ -2264,6 +2269,7 @@ func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn fu // for more information on using Contexts. func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *FilterLogEventsInput if input != nil { @@ -2410,6 +2416,7 @@ func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*Ge // for more information on using Contexts. func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ + EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { var inCpy *GetLogEventsInput if input != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go index 8e6094d58..8d5f929df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "logs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "logs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch Logs" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatchLogs client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index a8f83ca0f..8337312ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -388,7 +388,7 @@ func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *reques // AWS CodePipeline. Because billing is on a per-build basis, you will be billed // for both builds. Therefore, if you are using AWS CodePipeline, we recommend // that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear -// the Webhook box. For more information, see step 9 in Change a Build Project's +// the Webhook box. For more information, see step 5 in Change a Build Project's // Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1586,7 +1586,7 @@ type Build struct { CurrentPhase *string `locationName:"currentPhase" type:"string"` // When the build process ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // Information about the build environment for this build. Environment *ProjectEnvironment `locationName:"environment" type:"structure"` @@ -1619,6 +1619,9 @@ type Build struct { // The name of the AWS CodeBuild project. ProjectName *string `locationName:"projectName" min:"1" type:"string"` + // The name of a service role used for this build. + ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` + // Information about the source code to be built. Source *ProjectSource `locationName:"source" type:"structure"` @@ -1626,7 +1629,7 @@ type Build struct { SourceVersion *string `locationName:"sourceVersion" min:"1" type:"string"` // When the build process started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // How long, in minutes, for AWS CodeBuild to wait before timing out this build // if it does not get marked as completed. @@ -1733,6 +1736,12 @@ func (s *Build) SetProjectName(v string) *Build { return s } +// SetServiceRole sets the ServiceRole field's value. +func (s *Build) SetServiceRole(v string) *Build { + s.ServiceRole = &v + return s +} + // SetSource sets the Source field's value. func (s *Build) SetSource(v *ProjectSource) *Build { s.Source = v @@ -1863,7 +1872,7 @@ type BuildPhase struct { DurationInSeconds *int64 `locationName:"durationInSeconds" type:"long"` // When the build phase ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The current status of the build phase. Valid values include: // @@ -1905,7 +1914,7 @@ type BuildPhase struct { PhaseType *string `locationName:"phaseType" type:"string" enum:"BuildPhaseType"` // When the build phase started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -1993,7 +2002,9 @@ type CreateProjectInput struct { // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` + // + // ServiceRole is a required field + ServiceRole *string `locationName:"serviceRole" min:"1" type:"string" required:"true"` // Information about the build input source code for the build project. // @@ -2043,6 +2054,9 @@ func (s *CreateProjectInput) Validate() error { if s.Name != nil && len(*s.Name) < 2 { invalidParams.Add(request.NewErrParamMinLen("Name", 2)) } + if s.ServiceRole == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRole")) + } if s.ServiceRole != nil && len(*s.ServiceRole) < 1 { invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1)) } @@ -3074,7 +3088,7 @@ type Project struct { Cache *ProjectCache `locationName:"cache" type:"structure"` // When the build project was created, expressed in Unix time format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // A description that makes the build project easy to identify. Description *string `locationName:"description" type:"string"` @@ -3091,7 +3105,7 @@ type Project struct { // When the build project's settings were last modified, expressed in Unix time // format. - LastModified *time.Time `locationName:"lastModified" type:"timestamp" timestampFormat:"unix"` + LastModified *time.Time `locationName:"lastModified" type:"timestamp"` // The name of the build project. Name *string `locationName:"name" min:"2" type:"string"` @@ -3256,10 +3270,21 @@ type ProjectArtifacts struct { // because no build output will be produced. // // * If type is set to S3, this is the name of the output artifact object. + // If you set the name to be a forward slash ("/"), then the artifact is + // stored in the root of the output bucket. // - // For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, - // and name is set to MyArtifact.zip, then the output artifact would be stored - // in MyArtifacts/build-ID/MyArtifact.zip. + // For example: + // + // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and + // name is set to MyArtifact.zip, then the output artifact would be stored + // in MyArtifacts/build-ID/MyArtifact.zip. + // + // * If path is empty, namespaceType is set to NONE, and name is set to + // "/", then the output artifact would be stored in the root of the output + // bucket. + // + // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and + // name is set to "/", then the output artifact would be stored in MyArtifacts/build-ID. Name *string `locationName:"name" type:"string"` // Along with path and name, the pattern that AWS CodeBuild will use to determine @@ -3522,8 +3547,17 @@ type ProjectEnvironment struct { // build commands. (Do not run the following build commands if the specified // build environment image is provided by AWS CodeBuild with Docker support.) // + // If the operating system's base image is Ubuntu Linux: + // // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 - // --storage-driver=overlay& - timeout -t 15 sh -c "until docker info; do echo + // --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo + // .; sleep 1; done" + // + // If the operating system's base image is Alpine Linux, add the -t argument + // to timeout: + // + // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 + // --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo // .; sleep 1; done" PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"` @@ -3677,6 +3711,12 @@ type ProjectSource struct { // source object, set the auth object's type value to OAUTH. Location *string `locationName:"location" type:"string"` + // Set to true to report the status of a build's start and finish to your source + // provider. This option is only valid when your source provider is GitHub. + // If this is set and you use a different source provider, an invalidInputException + // is thrown. + ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` + // The type of repository that contains the source code to be built. Valid values // include: // @@ -3754,6 +3794,12 @@ func (s *ProjectSource) SetLocation(v string) *ProjectSource { return s } +// SetReportBuildStatus sets the ReportBuildStatus field's value. +func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource { + s.ReportBuildStatus = &v + return s +} + // SetType sets the Type field's value. func (s *ProjectSource) SetType(v string) *ProjectSource { s.Type = &v @@ -3825,6 +3871,22 @@ type StartBuildInput struct { // one already defined in the build project. BuildspecOverride *string `locationName:"buildspecOverride" type:"string"` + // A ProjectCache object specified for this build that overrides the one defined + // in the build project. + CacheOverride *ProjectCache `locationName:"cacheOverride" type:"structure"` + + // The name of a certificate for this build that overrides the one specified + // in the build project. + CertificateOverride *string `locationName:"certificateOverride" type:"string"` + + // The name of a compute type for this build that overrides the one specified + // in the build project. + ComputeTypeOverride *string `locationName:"computeTypeOverride" type:"string" enum:"ComputeType"` + + // A container type for this build that overrides the one specified in the build + // project. + EnvironmentTypeOverride *string `locationName:"environmentTypeOverride" type:"string" enum:"EnvironmentType"` + // A set of environment variables that overrides, for this build only, the latest // ones already defined in the build project. EnvironmentVariablesOverride []*EnvironmentVariable `locationName:"environmentVariablesOverride" type:"list"` @@ -3833,11 +3895,53 @@ type StartBuildInput struct { // for this build only, any previous depth of history defined in the build project. GitCloneDepthOverride *int64 `locationName:"gitCloneDepthOverride" type:"integer"` + // A unique, case sensitive identifier you provide to ensure the idempotency + // of the StartBuild request. The token is included in the StartBuild request + // and is valid for 12 hours. If you repeat the StartBuild request with the + // same token, but change a parameter, AWS CodeBuild returns a parameter mismatch + // error. + IdempotencyToken *string `locationName:"idempotencyToken" type:"string"` + + // The name of an image for this build that overrides the one specified in the + // build project. + ImageOverride *string `locationName:"imageOverride" min:"1" type:"string"` + + // Enable this flag to override the insecure SSL setting that is specified in + // the build project. The insecure SSL setting determines whether to ignore + // SSL warnings while connecting to the project source code. This override applies + // only if the build's source is GitHub Enterprise. + InsecureSslOverride *bool `locationName:"insecureSslOverride" type:"boolean"` + + // Enable this flag to override privileged mode in the build project. + PrivilegedModeOverride *bool `locationName:"privilegedModeOverride" type:"boolean"` + // The name of the AWS CodeBuild build project to start running a build. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` + // Set to true to report to your source provider the status of a build's start + // and completion. If you use this option with a source provider other than + // GitHub, an invalidInputException is thrown. + ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` + + // The name of a service role for this build that overrides the one specified + // in the build project. + ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"` + + // An authorization type for this build that overrides the one defined in the + // build project. This override applies only if the build project's source is + // BitBucket or GitHub. + SourceAuthOverride *SourceAuth `locationName:"sourceAuthOverride" type:"structure"` + + // A location that overrides for this build the source location for the one + // defined in the build project. + SourceLocationOverride *string `locationName:"sourceLocationOverride" type:"string"` + + // A source input type for this build that overrides the source input defined + // in the build project + SourceTypeOverride *string `locationName:"sourceTypeOverride" type:"string" enum:"SourceType"` + // A version of the build input to be built, for this build only. If not specified, // the latest version will be used. If specified, must be one of: // @@ -3877,12 +3981,18 @@ func (s StartBuildInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StartBuildInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartBuildInput"} + if s.ImageOverride != nil && len(*s.ImageOverride) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageOverride", 1)) + } if s.ProjectName == nil { invalidParams.Add(request.NewErrParamRequired("ProjectName")) } if s.ProjectName != nil && len(*s.ProjectName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) } + if s.ServiceRoleOverride != nil && len(*s.ServiceRoleOverride) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceRoleOverride", 1)) + } if s.TimeoutInMinutesOverride != nil && *s.TimeoutInMinutesOverride < 5 { invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutesOverride", 5)) } @@ -3891,6 +4001,11 @@ func (s *StartBuildInput) Validate() error { invalidParams.AddNested("ArtifactsOverride", err.(request.ErrInvalidParams)) } } + if s.CacheOverride != nil { + if err := s.CacheOverride.Validate(); err != nil { + invalidParams.AddNested("CacheOverride", err.(request.ErrInvalidParams)) + } + } if s.EnvironmentVariablesOverride != nil { for i, v := range s.EnvironmentVariablesOverride { if v == nil { @@ -3901,6 +4016,11 @@ func (s *StartBuildInput) Validate() error { } } } + if s.SourceAuthOverride != nil { + if err := s.SourceAuthOverride.Validate(); err != nil { + invalidParams.AddNested("SourceAuthOverride", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3920,6 +4040,30 @@ func (s *StartBuildInput) SetBuildspecOverride(v string) *StartBuildInput { return s } +// SetCacheOverride sets the CacheOverride field's value. +func (s *StartBuildInput) SetCacheOverride(v *ProjectCache) *StartBuildInput { + s.CacheOverride = v + return s +} + +// SetCertificateOverride sets the CertificateOverride field's value. +func (s *StartBuildInput) SetCertificateOverride(v string) *StartBuildInput { + s.CertificateOverride = &v + return s +} + +// SetComputeTypeOverride sets the ComputeTypeOverride field's value. +func (s *StartBuildInput) SetComputeTypeOverride(v string) *StartBuildInput { + s.ComputeTypeOverride = &v + return s +} + +// SetEnvironmentTypeOverride sets the EnvironmentTypeOverride field's value. +func (s *StartBuildInput) SetEnvironmentTypeOverride(v string) *StartBuildInput { + s.EnvironmentTypeOverride = &v + return s +} + // SetEnvironmentVariablesOverride sets the EnvironmentVariablesOverride field's value. func (s *StartBuildInput) SetEnvironmentVariablesOverride(v []*EnvironmentVariable) *StartBuildInput { s.EnvironmentVariablesOverride = v @@ -3932,12 +4076,66 @@ func (s *StartBuildInput) SetGitCloneDepthOverride(v int64) *StartBuildInput { return s } +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *StartBuildInput) SetIdempotencyToken(v string) *StartBuildInput { + s.IdempotencyToken = &v + return s +} + +// SetImageOverride sets the ImageOverride field's value. +func (s *StartBuildInput) SetImageOverride(v string) *StartBuildInput { + s.ImageOverride = &v + return s +} + +// SetInsecureSslOverride sets the InsecureSslOverride field's value. +func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput { + s.InsecureSslOverride = &v + return s +} + +// SetPrivilegedModeOverride sets the PrivilegedModeOverride field's value. +func (s *StartBuildInput) SetPrivilegedModeOverride(v bool) *StartBuildInput { + s.PrivilegedModeOverride = &v + return s +} + // SetProjectName sets the ProjectName field's value. func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput { s.ProjectName = &v return s } +// SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value. +func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput { + s.ReportBuildStatusOverride = &v + return s +} + +// SetServiceRoleOverride sets the ServiceRoleOverride field's value. +func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput { + s.ServiceRoleOverride = &v + return s +} + +// SetSourceAuthOverride sets the SourceAuthOverride field's value. +func (s *StartBuildInput) SetSourceAuthOverride(v *SourceAuth) *StartBuildInput { + s.SourceAuthOverride = v + return s +} + +// SetSourceLocationOverride sets the SourceLocationOverride field's value. +func (s *StartBuildInput) SetSourceLocationOverride(v string) *StartBuildInput { + s.SourceLocationOverride = &v + return s +} + +// SetSourceTypeOverride sets the SourceTypeOverride field's value. +func (s *StartBuildInput) SetSourceTypeOverride(v string) *StartBuildInput { + s.SourceTypeOverride = &v + return s +} + // SetSourceVersion sets the SourceVersion field's value. func (s *StartBuildInput) SetSourceVersion(v string) *StartBuildInput { s.SourceVersion = &v @@ -4465,7 +4663,7 @@ type Webhook struct { BranchFilter *string `locationName:"branchFilter" type:"string"` // A timestamp indicating the last time a repository's secret token was modified. - LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp" timestampFormat:"unix"` + LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp"` // The CodeBuild endpoint where webhook events are sent. PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"` @@ -4596,6 +4794,9 @@ const ( ) const ( + // EnvironmentTypeWindowsContainer is a EnvironmentType enum value + EnvironmentTypeWindowsContainer = "WINDOWS_CONTAINER" + // EnvironmentTypeLinuxContainer is a EnvironmentType enum value EnvironmentTypeLinuxContainer = "LINUX_CONTAINER" ) @@ -4646,6 +4847,9 @@ const ( // PlatformTypeUbuntu is a PlatformType enum value PlatformTypeUbuntu = "UBUNTU" + + // PlatformTypeWindowsServer is a PlatformType enum value + PlatformTypeWindowsServer = "WINDOWS_SERVER" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go index d45aed633..b9ff2b6f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codebuild" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "codebuild" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeBuild" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeBuild client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 7a4f4df26..b52c07732 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -4944,7 +4944,7 @@ type Comment struct { Content *string `locationName:"content" type:"string"` // The date and time the comment was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // A Boolean value indicating whether the comment has been deleted. Deleted *bool `locationName:"deleted" type:"boolean"` @@ -4953,7 +4953,7 @@ type Comment struct { InReplyTo *string `locationName:"inReplyTo" type:"string"` // The date and time the comment was most recently modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` } // String returns the string representation @@ -7912,7 +7912,7 @@ type PullRequest struct { ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` // The date and time the pull request was originally created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The user-defined description of the pull request. This description can be // used to clarify what should be reviewed and other details of the request. @@ -7920,7 +7920,7 @@ type PullRequest struct { // The day and time of the last user or system activity on the pull request, // in timestamp format. - LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp" timestampFormat:"unix"` + LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp"` // The system-generated ID of the pull request. PullRequestId *string `locationName:"pullRequestId" type:"string"` @@ -8012,7 +8012,7 @@ type PullRequestEvent struct { ActorArn *string `locationName:"actorArn" type:"string"` // The day and time of the pull request event, in timestamp format. - EventDate *time.Time `locationName:"eventDate" type:"timestamp" timestampFormat:"unix"` + EventDate *time.Time `locationName:"eventDate" type:"timestamp"` // The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) // or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED). @@ -8569,13 +8569,13 @@ type RepositoryMetadata struct { CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"` // The date and time the repository was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The repository's default branch name. DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"` // The date and time the repository was last modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // A comment or description about the repository. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go index cb25eaba7..c8cad394a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codecommit" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "codecommit" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeCommit" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeCommit client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index efec20fcf..bc68dcfd7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -986,6 +986,9 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, // false is expected. For EC2/On-premises deployments, true or false is expected. // +// * ErrCodeInvalidGitHubAccountTokenException "InvalidGitHubAccountTokenException" +// The GitHub token is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeployment func (c *CodeDeploy) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { req, out := c.CreateDeploymentRequest(input) @@ -4455,7 +4458,7 @@ type ApplicationInfo struct { ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // The time at which the application was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The name for a connection to a GitHub account. GitHubAccountName *string `locationName:"gitHubAccountName" type:"string"` @@ -5102,7 +5105,8 @@ type BlueInstanceTerminationOption struct { Action *string `locationName:"action" type:"string" enum:"InstanceAction"` // The number of minutes to wait after a successful blue/green deployment before - // terminating instances from the original environment. + // terminating instances from the original environment. The maximum setting + // is 2880 minutes (2 days). TerminationWaitTimeInMinutes *int64 `locationName:"terminationWaitTimeInMinutes" type:"integer"` } @@ -6029,7 +6033,7 @@ type DeploymentConfigInfo struct { ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // The time at which the deployment configuration was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The deployment configuration ID. DeploymentConfigId *string `locationName:"deploymentConfigId" type:"string"` @@ -6316,13 +6320,13 @@ type DeploymentInfo struct { BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` // A timestamp indicating when the deployment was complete. - CompleteTime *time.Time `locationName:"completeTime" type:"timestamp" timestampFormat:"unix"` + CompleteTime *time.Time `locationName:"completeTime" type:"timestamp"` // The destination platform type for the deployment (Lambda or Server). ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // A timestamp indicating when the deployment was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The means by which the deployment was created: // @@ -6409,7 +6413,7 @@ type DeploymentInfo struct { // In some cases, the reported value of the start time may be later than the // complete time. This is due to differences in the clock settings of back-end // servers that participate in the deployment process. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The current state of the deployment as a whole. Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` @@ -6678,10 +6682,10 @@ type DeploymentReadyOption struct { // after the new application revision is installed on the instances in the // replacement environment. // - // * STOP_DEPLOYMENT: Do not register new instances with load balancer unless - // traffic is rerouted manually. If traffic is not rerouted manually before - // the end of the specified wait period, the deployment status is changed - // to Stopped. + // * STOP_DEPLOYMENT: Do not register new instances with a load balancer + // unless traffic rerouting is started using ContinueDeployment. If traffic + // rerouting is not started before the end of the specified wait period, + // the deployment status is changed to Stopped. ActionOnTimeout *string `locationName:"actionOnTimeout" type:"string" enum:"DeploymentReadyAction"` // The number of minutes to wait before the status of a blue/green deployment @@ -7055,13 +7059,13 @@ type GenericRevisionInfo struct { Description *string `locationName:"description" type:"string"` // When the revision was first used by AWS CodeDeploy. - FirstUsedTime *time.Time `locationName:"firstUsedTime" type:"timestamp" timestampFormat:"unix"` + FirstUsedTime *time.Time `locationName:"firstUsedTime" type:"timestamp"` // When the revision was last used by AWS CodeDeploy. - LastUsedTime *time.Time `locationName:"lastUsedTime" type:"timestamp" timestampFormat:"unix"` + LastUsedTime *time.Time `locationName:"lastUsedTime" type:"timestamp"` // When the revision was registered with AWS CodeDeploy. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp" timestampFormat:"unix"` + RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` } // String returns the string representation @@ -7697,7 +7701,7 @@ type InstanceInfo struct { // If the on-premises instance was deregistered, the time at which the on-premises // instance was deregistered. - DeregisterTime *time.Time `locationName:"deregisterTime" type:"timestamp" timestampFormat:"unix"` + DeregisterTime *time.Time `locationName:"deregisterTime" type:"timestamp"` // The ARN of the IAM session associated with the on-premises instance. IamSessionArn *string `locationName:"iamSessionArn" type:"string"` @@ -7712,7 +7716,7 @@ type InstanceInfo struct { InstanceName *string `locationName:"instanceName" type:"string"` // The time at which the on-premises instance was registered. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp" timestampFormat:"unix"` + RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` // The tags currently associated with the on-premises instance. Tags []*Tag `locationName:"tags" type:"list"` @@ -7789,7 +7793,7 @@ type InstanceSummary struct { InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // A timestamp indicating when the instance information was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // A list of lifecycle events for this instance. LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` @@ -7863,14 +7867,14 @@ type LastDeploymentInfo struct { // A timestamp indicating when the most recent deployment to the deployment // group started. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The deployment ID. DeploymentId *string `locationName:"deploymentId" type:"string"` // A timestamp indicating when the most recent deployment to the deployment // group completed. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The status of the most recent deployment. Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` @@ -7918,14 +7922,14 @@ type LifecycleEvent struct { Diagnostics *Diagnostics `locationName:"diagnostics" type:"structure"` // A timestamp indicating when the deployment lifecycle event ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, // AfterInstall, ApplicationStart, or ValidateService. LifecycleEventName *string `locationName:"lifecycleEventName" type:"string"` // A timestamp indicating when the deployment lifecycle event started. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The deployment lifecycle event status: // @@ -8757,11 +8761,15 @@ type LoadBalancerInfo struct { // An array containing information about the load balancer to use for load balancing // in a deployment. In Elastic Load Balancing, load balancers are used with // Classic Load Balancers. + // + // Adding more than one load balancer to the array is not supported. ElbInfoList []*ELBInfo `locationName:"elbInfoList" type:"list"` // An array containing information about the target group to use for load balancing // in a deployment. In Elastic Load Balancing, target groups are used with Application // Load Balancers. + // + // Adding more than one target group to the array is not supported. TargetGroupInfoList []*TargetGroupInfo `locationName:"targetGroupInfoList" type:"list"` } @@ -9775,12 +9783,12 @@ type TimeRange struct { // The end time of the time range. // // Specify null to leave the end time open-ended. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"unix"` + End *time.Time `locationName:"end" type:"timestamp"` // The start time of the time range. // // Specify null to leave the start time open-ended. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"unix"` + Start *time.Time `locationName:"start" type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index 963a57a53..c3af4b0dd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go @@ -345,6 +345,12 @@ const ( // "DISALLOW", "OVERWRITE", and "RETAIN". ErrCodeInvalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException" + // ErrCodeInvalidGitHubAccountTokenException for service response error code + // "InvalidGitHubAccountTokenException". + // + // The GitHub token is not valid. + ErrCodeInvalidGitHubAccountTokenException = "InvalidGitHubAccountTokenException" + // ErrCodeInvalidGitHubAccountTokenNameException for service response error code // "InvalidGitHubAccountTokenNameException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go index e6524d04d..dd1eaf413 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codedeploy" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "codedeploy" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeDeploy" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeDeploy client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 9e895f1e1..95f1724f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -419,8 +419,11 @@ func (c *CodePipeline) DeleteCustomActionTypeRequest(input *DeleteCustomActionTy // Marks a custom action as deleted. PollForJobs for the custom action will // fail after the action is marked for deletion. Only used for custom actions. // -// You cannot recreate a custom action after it has been deleted unless you -// increase the version number of the action. +// To re-create a custom action after it has been deleted you must use a string +// in the version field that has never been used before. This string can be +// an incremented version number, for example. To restore a deleted custom action, +// use a JSON file that is identical to the deleted action, including the original +// string in the version field. // // 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 @@ -536,6 +539,173 @@ func (c *CodePipeline) DeletePipelineWithContext(ctx aws.Context, input *DeleteP return out, req.Send() } +const opDeleteWebhook = "DeleteWebhook" + +// DeleteWebhookRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWebhook operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteWebhook for more information on using the DeleteWebhook +// 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 DeleteWebhookRequest method. +// req, resp := client.DeleteWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook +func (c *CodePipeline) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) { + op := &request.Operation{ + Name: opDeleteWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWebhookInput{} + } + + output = &DeleteWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteWebhook API operation for AWS CodePipeline. +// +// Deletes a previously created webhook by name. Deleting the webhook stops +// AWS CodePipeline from starting a pipeline every time an external event occurs. +// The API will return successfully when trying to delete a webhook that is +// already deleted. If a deleted webhook is re-created by calling PutWebhook +// with the same name, it will have a different URL. +// +// 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 CodePipeline's +// API operation DeleteWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook +func (c *CodePipeline) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + return out, req.Send() +} + +// DeleteWebhookWithContext is the same as DeleteWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWebhook 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 *CodePipeline) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeregisterWebhookWithThirdParty = "DeregisterWebhookWithThirdParty" + +// DeregisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterWebhookWithThirdParty operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeregisterWebhookWithThirdParty for more information on using the DeregisterWebhookWithThirdParty +// 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 DeregisterWebhookWithThirdPartyRequest method. +// req, resp := client.DeregisterWebhookWithThirdPartyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty +func (c *CodePipeline) DeregisterWebhookWithThirdPartyRequest(input *DeregisterWebhookWithThirdPartyInput) (req *request.Request, output *DeregisterWebhookWithThirdPartyOutput) { + op := &request.Operation{ + Name: opDeregisterWebhookWithThirdParty, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeregisterWebhookWithThirdPartyInput{} + } + + output = &DeregisterWebhookWithThirdPartyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterWebhookWithThirdParty API operation for AWS CodePipeline. +// +// Removes the connection between the webhook that was created by CodePipeline +// and the external tool with events to be detected. Currently only supported +// for webhooks that target an action type of GitHub. +// +// 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 CodePipeline's +// API operation DeregisterWebhookWithThirdParty for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" +// The specified webhook was entered in an invalid format or cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty +func (c *CodePipeline) DeregisterWebhookWithThirdParty(input *DeregisterWebhookWithThirdPartyInput) (*DeregisterWebhookWithThirdPartyOutput, error) { + req, out := c.DeregisterWebhookWithThirdPartyRequest(input) + return out, req.Send() +} + +// DeregisterWebhookWithThirdPartyWithContext is the same as DeregisterWebhookWithThirdParty with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterWebhookWithThirdParty 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 *CodePipeline) DeregisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *DeregisterWebhookWithThirdPartyInput, opts ...request.Option) (*DeregisterWebhookWithThirdPartyOutput, error) { + req, out := c.DeregisterWebhookWithThirdPartyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableStageTransition = "DisableStageTransition" // DisableStageTransitionRequest generates a "aws/request.Request" representing the @@ -1375,6 +1545,9 @@ func (c *CodePipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *req // API operation ListPipelines for usage and error information. // // Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. Make sure that the next // token you provided is the token returned by a previous call. @@ -1401,6 +1574,91 @@ func (c *CodePipeline) ListPipelinesWithContext(ctx aws.Context, input *ListPipe return out, req.Send() } +const opListWebhooks = "ListWebhooks" + +// ListWebhooksRequest generates a "aws/request.Request" representing the +// client's request for the ListWebhooks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListWebhooks for more information on using the ListWebhooks +// 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 ListWebhooksRequest method. +// req, resp := client.ListWebhooksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks +func (c *CodePipeline) ListWebhooksRequest(input *ListWebhooksInput) (req *request.Request, output *ListWebhooksOutput) { + op := &request.Operation{ + Name: opListWebhooks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListWebhooksInput{} + } + + output = &ListWebhooksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListWebhooks API operation for AWS CodePipeline. +// +// Gets a listing of all the webhooks in this region for this account. The output +// lists all webhooks and includes the webhook URL and ARN, as well the configuration +// for each webhook. +// +// 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 CodePipeline's +// API operation ListWebhooks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token was specified in an invalid format. Make sure that the next +// token you provided is the token returned by a previous call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks +func (c *CodePipeline) ListWebhooks(input *ListWebhooksInput) (*ListWebhooksOutput, error) { + req, out := c.ListWebhooksRequest(input) + return out, req.Send() +} + +// ListWebhooksWithContext is the same as ListWebhooks with the addition of +// the ability to pass a context and additional request options. +// +// See ListWebhooks 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 *CodePipeline) ListWebhooksWithContext(ctx aws.Context, input *ListWebhooksInput, opts ...request.Option) (*ListWebhooksOutput, error) { + req, out := c.ListWebhooksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPollForJobs = "PollForJobs" // PollForJobsRequest generates a "aws/request.Request" representing the @@ -1445,7 +1703,10 @@ func (c *CodePipeline) PollForJobsRequest(input *PollForJobsInput) (req *request // PollForJobs API operation for AWS CodePipeline. // -// Returns information about any jobs for AWS CodePipeline to act upon. +// Returns information about any jobs for AWS CodePipeline to act upon. PollForJobs +// is only valid for action types with "Custom" in the owner field. If the action +// type contains "AWS" or "ThirdParty" in the owner field, the PollForJobs action +// returns an error. // // When this API is called, AWS CodePipeline returns temporary credentials for // the Amazon S3 bucket used to store artifacts for the pipeline, if the action @@ -2116,6 +2377,188 @@ func (c *CodePipeline) PutThirdPartyJobSuccessResultWithContext(ctx aws.Context, return out, req.Send() } +const opPutWebhook = "PutWebhook" + +// PutWebhookRequest generates a "aws/request.Request" representing the +// client's request for the PutWebhook operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutWebhook for more information on using the PutWebhook +// 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 PutWebhookRequest method. +// req, resp := client.PutWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook +func (c *CodePipeline) PutWebhookRequest(input *PutWebhookInput) (req *request.Request, output *PutWebhookOutput) { + op := &request.Operation{ + Name: opPutWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutWebhookInput{} + } + + output = &PutWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutWebhook API operation for AWS CodePipeline. +// +// Defines a webhook and returns a unique webhook URL generated by CodePipeline. +// This URL can be supplied to third party source hosting providers to call +// every time there's a code change. When CodePipeline receives a POST request +// on this URL, the pipeline defined in the webhook is started as long as the +// POST request satisfied the authentication and filtering requirements supplied +// when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty +// APIs can be used to automatically configure supported third parties to call +// the generated webhook URL. +// +// 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 CodePipeline's +// API operation PutWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The number of pipelines associated with the AWS account has exceeded the +// limit allowed for the account. +// +// * ErrCodeInvalidWebhookFilterPatternException "InvalidWebhookFilterPatternException" +// The specified event filter rule is in an invalid format. +// +// * ErrCodeInvalidWebhookAuthenticationParametersException "InvalidWebhookAuthenticationParametersException" +// The specified authentication type is in an invalid format. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was specified in an invalid format or cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook +func (c *CodePipeline) PutWebhook(input *PutWebhookInput) (*PutWebhookOutput, error) { + req, out := c.PutWebhookRequest(input) + return out, req.Send() +} + +// PutWebhookWithContext is the same as PutWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See PutWebhook 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 *CodePipeline) PutWebhookWithContext(ctx aws.Context, input *PutWebhookInput, opts ...request.Option) (*PutWebhookOutput, error) { + req, out := c.PutWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterWebhookWithThirdParty = "RegisterWebhookWithThirdParty" + +// RegisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the +// client's request for the RegisterWebhookWithThirdParty operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RegisterWebhookWithThirdParty for more information on using the RegisterWebhookWithThirdParty +// 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 RegisterWebhookWithThirdPartyRequest method. +// req, resp := client.RegisterWebhookWithThirdPartyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty +func (c *CodePipeline) RegisterWebhookWithThirdPartyRequest(input *RegisterWebhookWithThirdPartyInput) (req *request.Request, output *RegisterWebhookWithThirdPartyOutput) { + op := &request.Operation{ + Name: opRegisterWebhookWithThirdParty, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterWebhookWithThirdPartyInput{} + } + + output = &RegisterWebhookWithThirdPartyOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterWebhookWithThirdParty API operation for AWS CodePipeline. +// +// Configures a connection between the webhook that was created and the external +// tool with events to be detected. +// +// 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 CodePipeline's +// API operation RegisterWebhookWithThirdParty for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" +// The specified webhook was entered in an invalid format or cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty +func (c *CodePipeline) RegisterWebhookWithThirdParty(input *RegisterWebhookWithThirdPartyInput) (*RegisterWebhookWithThirdPartyOutput, error) { + req, out := c.RegisterWebhookWithThirdPartyRequest(input) + return out, req.Send() +} + +// RegisterWebhookWithThirdPartyWithContext is the same as RegisterWebhookWithThirdParty with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterWebhookWithThirdParty 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 *CodePipeline) RegisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *RegisterWebhookWithThirdPartyInput, opts ...request.Option) (*RegisterWebhookWithThirdPartyOutput, error) { + req, out := c.RegisterWebhookWithThirdPartyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRetryStageExecution = "RetryStageExecution" // RetryStageExecutionRequest generates a "aws/request.Request" representing the @@ -2366,6 +2809,10 @@ func (c *CodePipeline) UpdatePipelineRequest(input *UpdatePipelineInput) (req *r // * ErrCodeInvalidStructureException "InvalidStructureException" // The specified structure was specified in an invalid format. // +// * ErrCodeLimitExceededException "LimitExceededException" +// The number of pipelines associated with the AWS account has exceeded the +// limit allowed for the account. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipeline func (c *CodePipeline) UpdatePipeline(input *UpdatePipelineInput) (*UpdatePipelineOutput, error) { req, out := c.UpdatePipelineRequest(input) @@ -2453,7 +2900,7 @@ type AcknowledgeJobInput struct { // response of the PollForJobs request that returned this job. // // Nonce is a required field - Nonce *string `locationName:"nonce" type:"string" required:"true"` + Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` } // String returns the string representation @@ -2475,6 +2922,9 @@ func (s *AcknowledgeJobInput) Validate() error { if s.Nonce == nil { invalidParams.Add(request.NewErrParamRequired("Nonce")) } + if s.Nonce != nil && len(*s.Nonce) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2538,7 +2988,7 @@ type AcknowledgeThirdPartyJobInput struct { // response to a GetThirdPartyJobDetails request. // // Nonce is a required field - Nonce *string `locationName:"nonce" type:"string" required:"true"` + Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` } // String returns the string representation @@ -2569,6 +3019,9 @@ func (s *AcknowledgeThirdPartyJobInput) Validate() error { if s.Nonce == nil { invalidParams.Add(request.NewErrParamRequired("Nonce")) } + if s.Nonce != nil && len(*s.Nonce) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2942,7 +3395,7 @@ type ActionExecution struct { ExternalExecutionUrl *string `locationName:"externalExecutionUrl" min:"1" type:"string"` // The last status change of the action. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"unix"` + LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` // The ARN of the user who last changed the pipeline. LastUpdatedBy *string `locationName:"lastUpdatedBy" type:"string"` @@ -2955,7 +3408,7 @@ type ActionExecution struct { Status *string `locationName:"status" type:"string" enum:"ActionExecutionStatus"` // A summary of the run of the action. - Summary *string `locationName:"summary" type:"string"` + Summary *string `locationName:"summary" min:"1" type:"string"` // The system-generated token used to identify a unique approval request. The // token for each open approval request can be obtained using the GetPipelineState @@ -3036,7 +3489,7 @@ type ActionRevision struct { // in timestamp format. // // Created is a required field - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix" required:"true"` + Created *time.Time `locationName:"created" type:"timestamp" required:"true"` // The unique identifier of the change that set the state to this revision, // for example a deployment ID or timestamp. @@ -3256,7 +3709,7 @@ type ActionTypeId struct { // Provider is a required field Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` - // A string that identifies the action type. + // A string that describes the action version. // // Version is a required field Version *string `locationName:"version" min:"1" type:"string" required:"true"` @@ -3596,7 +4049,7 @@ type ArtifactRevision struct { // The date and time when the most recent revision of the artifact was created, // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of an artifact. This name might be system-generated, such as "MyApp", // or might be defined by the user when an action is created. @@ -4056,7 +4509,7 @@ type CurrentRevision struct { // The date and time when the most recent revision of the artifact was created, // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The revision ID of the current version of an artifact. // @@ -4271,6 +4724,111 @@ func (s DeletePipelineOutput) GoString() string { return s.String() } +type DeleteWebhookInput struct { + _ struct{} `type:"structure"` + + // The name of the webhook you want to delete. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"} + 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 +} + +// SetName sets the Name field's value. +func (s *DeleteWebhookInput) SetName(v string) *DeleteWebhookInput { + s.Name = &v + return s +} + +type DeleteWebhookOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWebhookOutput) GoString() string { + return s.String() +} + +type DeregisterWebhookWithThirdPartyInput struct { + _ struct{} `type:"structure"` + + // The name of the webhook you want to deregister. + WebhookName *string `locationName:"webhookName" min:"1" type:"string"` +} + +// String returns the string representation +func (s DeregisterWebhookWithThirdPartyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterWebhookWithThirdPartyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterWebhookWithThirdPartyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterWebhookWithThirdPartyInput"} + if s.WebhookName != nil && len(*s.WebhookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhookName sets the WebhookName field's value. +func (s *DeregisterWebhookWithThirdPartyInput) SetWebhookName(v string) *DeregisterWebhookWithThirdPartyInput { + s.WebhookName = &v + return s +} + +type DeregisterWebhookWithThirdPartyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeregisterWebhookWithThirdPartyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterWebhookWithThirdPartyOutput) GoString() string { + return s.String() +} + // Represents the input of a DisableStageTransition action. type DisableStageTransitionInput struct { _ struct{} `type:"structure"` @@ -4540,7 +5098,7 @@ type ErrorDetails struct { Code *string `locationName:"code" type:"string"` // The text of the error message. - Message *string `locationName:"message" type:"string"` + Message *string `locationName:"message" min:"1" type:"string"` } // String returns the string representation @@ -4579,7 +5137,7 @@ type ExecutionDetails struct { PercentComplete *int64 `locationName:"percentComplete" type:"integer"` // The summary of the current status of the actions. - Summary *string `locationName:"summary" type:"string"` + Summary *string `locationName:"summary" min:"1" type:"string"` } // String returns the string representation @@ -4598,6 +5156,9 @@ func (s *ExecutionDetails) Validate() error { if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) } + if s.Summary != nil && len(*s.Summary) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Summary", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4633,7 +5194,7 @@ type FailureDetails struct { // The message about the failure. // // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" min:"1" type:"string" required:"true"` // The type of the failure. // @@ -4660,6 +5221,9 @@ func (s *FailureDetails) Validate() error { if s.Message == nil { invalidParams.Add(request.NewErrParamRequired("Message")) } + if s.Message != nil && len(*s.Message) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Message", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -4971,7 +5535,7 @@ type GetPipelineStateOutput struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of the pipeline for which you want to get the state. PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` @@ -4986,7 +5550,7 @@ type GetPipelineStateOutput struct { StageStates []*StageState `locationName:"stageStates" type:"list"` // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` } // String returns the string representation @@ -5178,7 +5742,7 @@ type Job struct { // A system-generated random number that AWS CodePipeline uses to ensure that // the job is being worked on by only one job worker. Use this number in an // AcknowledgeJob request. - Nonce *string `locationName:"nonce" type:"string"` + Nonce *string `locationName:"nonce" min:"1" type:"string"` } // String returns the string representation @@ -5234,7 +5798,7 @@ type JobData struct { // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // Represents information about the key used to encrypt data in the artifact // store, such as an AWS Key Management Service (AWS KMS) key. @@ -5613,6 +6177,170 @@ func (s *ListPipelinesOutput) SetPipelines(v []*PipelineSummary) *ListPipelinesO return s } +// The detail returned for each webhook after listing webhooks, such as the +// webhook URL, the webhook name, and the webhook ARN. +type ListWebhookItem struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the webhook. + Arn *string `locationName:"arn" type:"string"` + + // The detail returned for each webhook, such as the webhook authentication + // type and filter rules. + // + // Definition is a required field + Definition *WebhookDefinition `locationName:"definition" type:"structure" required:"true"` + + // The number code of the error. + ErrorCode *string `locationName:"errorCode" type:"string"` + + // The text of the error message about the webhook. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The date and time a webhook was last successfully triggered, in timestamp + // format. + LastTriggered *time.Time `locationName:"lastTriggered" type:"timestamp"` + + // A unique URL generated by CodePipeline. When a POST request is made to this + // URL, the defined pipeline is started as long as the body of the post request + // satisfies the defined authentication and filtering conditions. Deleting and + // re-creating a webhook will make the old URL invalid and generate a new URL. + // + // Url is a required field + Url *string `locationName:"url" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListWebhookItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhookItem) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ListWebhookItem) SetArn(v string) *ListWebhookItem { + s.Arn = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ListWebhookItem) SetDefinition(v *WebhookDefinition) *ListWebhookItem { + s.Definition = v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *ListWebhookItem) SetErrorCode(v string) *ListWebhookItem { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ListWebhookItem) SetErrorMessage(v string) *ListWebhookItem { + s.ErrorMessage = &v + return s +} + +// SetLastTriggered sets the LastTriggered field's value. +func (s *ListWebhookItem) SetLastTriggered(v time.Time) *ListWebhookItem { + s.LastTriggered = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *ListWebhookItem) SetUrl(v string) *ListWebhookItem { + s.Url = &v + return s +} + +type ListWebhooksInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token that was returned from the previous ListWebhooks call, which can + // be used to return the next set of webhooks in the list. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListWebhooksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhooksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListWebhooksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListWebhooksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListWebhooksInput) SetMaxResults(v int64) *ListWebhooksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebhooksInput) SetNextToken(v string) *ListWebhooksInput { + s.NextToken = &v + return s +} + +type ListWebhooksOutput struct { + _ struct{} `type:"structure"` + + // If the amount of returned information is significantly large, an identifier + // is also returned and can be used in a subsequent ListWebhooks call to return + // the next set of webhooks in the list. + NextToken *string `min:"1" type:"string"` + + // The JSON detail returned for each webhook in the list output for the ListWebhooks + // call. + Webhooks []*ListWebhookItem `locationName:"webhooks" type:"list"` +} + +// String returns the string representation +func (s ListWebhooksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhooksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebhooksOutput) SetNextToken(v string) *ListWebhooksOutput { + s.NextToken = &v + return s +} + +// SetWebhooks sets the Webhooks field's value. +func (s *ListWebhooksOutput) SetWebhooks(v []*ListWebhookItem) *ListWebhooksOutput { + s.Webhooks = v + return s +} + // Represents information about the output of an action. type OutputArtifact struct { _ struct{} `type:"structure"` @@ -5897,13 +6625,15 @@ type PipelineExecutionSummary struct { // The date and time of the last change to the pipeline execution, in timestamp // format. - LastUpdateTime *time.Time `locationName:"lastUpdateTime" type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `locationName:"lastUpdateTime" type:"timestamp"` // The ID of the pipeline execution. PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` + SourceRevisions []*SourceRevision `locationName:"sourceRevisions" type:"list"` + // The date and time when the pipeline execution began, in timestamp format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The status of the pipeline execution. // @@ -5941,6 +6671,12 @@ func (s *PipelineExecutionSummary) SetPipelineExecutionId(v string) *PipelineExe return s } +// SetSourceRevisions sets the SourceRevisions field's value. +func (s *PipelineExecutionSummary) SetSourceRevisions(v []*SourceRevision) *PipelineExecutionSummary { + s.SourceRevisions = v + return s +} + // SetStartTime sets the StartTime field's value. func (s *PipelineExecutionSummary) SetStartTime(v time.Time) *PipelineExecutionSummary { s.StartTime = &v @@ -5958,13 +6694,13 @@ type PipelineMetadata struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The Amazon Resource Name (ARN) of the pipeline. PipelineArn *string `locationName:"pipelineArn" type:"string"` // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` } // String returns the string representation @@ -6000,13 +6736,13 @@ type PipelineSummary struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of the pipeline. Name *string `locationName:"name" min:"1" type:"string"` // The date and time of the last update to the pipeline, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` // The version number of the pipeline. Version *int64 `locationName:"version" min:"1" type:"integer"` @@ -6464,7 +7200,7 @@ type PutApprovalResultOutput struct { _ struct{} `type:"structure"` // The timestamp showing when the approval or rejection was submitted. - ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp" timestampFormat:"unix"` + ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp"` } // String returns the string representation @@ -6566,7 +7302,7 @@ type PutJobSuccessResultInput struct { // action. It can be reused to return additional information about the progress // of the custom action. When the action is complete, no continuation token // should be supplied. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // The ID of the current revision of the artifact successfully worked upon by // the job. @@ -6596,6 +7332,9 @@ func (s PutJobSuccessResultInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutJobSuccessResultInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutJobSuccessResultInput"} + if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -6763,7 +7502,7 @@ type PutThirdPartyJobSuccessResultInput struct { // of the action. It can be reused to return additional information about the // progress of the partner action. When the action is complete, no continuation // token should be supplied. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // Represents information about a current revision. CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` @@ -6798,6 +7537,9 @@ func (s *PutThirdPartyJobSuccessResultInput) Validate() error { if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } + if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -6865,6 +7607,128 @@ func (s PutThirdPartyJobSuccessResultOutput) GoString() string { return s.String() } +type PutWebhookInput struct { + _ struct{} `type:"structure"` + + // The detail provided in an input file to create the webhook, such as the webhook + // name, the pipeline name, and the action name. Give the webhook a unique name + // which identifies the webhook being defined. You may choose to name the webhook + // after the pipeline and action it targets so that you can easily recognize + // what it's used for later. + // + // Webhook is a required field + Webhook *WebhookDefinition `locationName:"webhook" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutWebhookInput"} + if s.Webhook == nil { + invalidParams.Add(request.NewErrParamRequired("Webhook")) + } + if s.Webhook != nil { + if err := s.Webhook.Validate(); err != nil { + invalidParams.AddNested("Webhook", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhook sets the Webhook field's value. +func (s *PutWebhookInput) SetWebhook(v *WebhookDefinition) *PutWebhookInput { + s.Webhook = v + return s +} + +type PutWebhookOutput struct { + _ struct{} `type:"structure"` + + // The detail returned from creating the webhook, such as the webhook name, + // webhook URL, and webhook ARN. + Webhook *ListWebhookItem `locationName:"webhook" type:"structure"` +} + +// String returns the string representation +func (s PutWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWebhookOutput) GoString() string { + return s.String() +} + +// SetWebhook sets the Webhook field's value. +func (s *PutWebhookOutput) SetWebhook(v *ListWebhookItem) *PutWebhookOutput { + s.Webhook = v + return s +} + +type RegisterWebhookWithThirdPartyInput struct { + _ struct{} `type:"structure"` + + // The name of an existing webhook created with PutWebhook to register with + // a supported third party. + WebhookName *string `locationName:"webhookName" min:"1" type:"string"` +} + +// String returns the string representation +func (s RegisterWebhookWithThirdPartyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWebhookWithThirdPartyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterWebhookWithThirdPartyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterWebhookWithThirdPartyInput"} + if s.WebhookName != nil && len(*s.WebhookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhookName sets the WebhookName field's value. +func (s *RegisterWebhookWithThirdPartyInput) SetWebhookName(v string) *RegisterWebhookWithThirdPartyInput { + s.WebhookName = &v + return s +} + +type RegisterWebhookWithThirdPartyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterWebhookWithThirdPartyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWebhookWithThirdPartyOutput) GoString() string { + return s.String() +} + // Represents the input of a RetryStageExecution action. type RetryStageExecutionInput struct { _ struct{} `type:"structure"` @@ -7016,6 +7880,53 @@ func (s *S3ArtifactLocation) SetObjectKey(v string) *S3ArtifactLocation { return s } +type SourceRevision struct { + _ struct{} `type:"structure"` + + // ActionName is a required field + ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` + + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` + + RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` + + RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` +} + +// String returns the string representation +func (s SourceRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceRevision) GoString() string { + return s.String() +} + +// SetActionName sets the ActionName field's value. +func (s *SourceRevision) SetActionName(v string) *SourceRevision { + s.ActionName = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *SourceRevision) SetRevisionId(v string) *SourceRevision { + s.RevisionId = &v + return s +} + +// SetRevisionSummary sets the RevisionSummary field's value. +func (s *SourceRevision) SetRevisionSummary(v string) *SourceRevision { + s.RevisionSummary = &v + return s +} + +// SetRevisionUrl sets the RevisionUrl field's value. +func (s *SourceRevision) SetRevisionUrl(v string) *SourceRevision { + s.RevisionUrl = &v + return s +} + // Represents information about a stage to a job worker. type StageContext struct { _ struct{} `type:"structure"` @@ -7334,7 +8245,7 @@ type ThirdPartyJobData struct { // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // The encryption key used to encrypt and decrypt data in the artifact store // for the pipeline, such as an AWS Key Management Service (AWS KMS) key. This @@ -7428,7 +8339,7 @@ type ThirdPartyJobDetails struct { // A system-generated random number that AWS CodePipeline uses to ensure that // the job is being worked on by only one job worker. Use this number in an // AcknowledgeThirdPartyJob request. - Nonce *string `locationName:"nonce" type:"string"` + Nonce *string `locationName:"nonce" min:"1" type:"string"` } // String returns the string representation @@ -7472,7 +8383,7 @@ type TransitionState struct { Enabled *bool `locationName:"enabled" type:"boolean"` // The timestamp when the transition state was last changed. - LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp" timestampFormat:"unix"` + LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp"` // The ID of the user who last changed the transition state. LastChangedBy *string `locationName:"lastChangedBy" type:"string"` @@ -7580,6 +8491,266 @@ func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipeli return s } +type WebhookAuthConfiguration struct { + _ struct{} `type:"structure"` + + AllowedIPRange *string `min:"1" type:"string"` + + SecretToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s WebhookAuthConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookAuthConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookAuthConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookAuthConfiguration"} + if s.AllowedIPRange != nil && len(*s.AllowedIPRange) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AllowedIPRange", 1)) + } + if s.SecretToken != nil && len(*s.SecretToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowedIPRange sets the AllowedIPRange field's value. +func (s *WebhookAuthConfiguration) SetAllowedIPRange(v string) *WebhookAuthConfiguration { + s.AllowedIPRange = &v + return s +} + +// SetSecretToken sets the SecretToken field's value. +func (s *WebhookAuthConfiguration) SetSecretToken(v string) *WebhookAuthConfiguration { + s.SecretToken = &v + return s +} + +// Represents information about a webhook and its definition. +type WebhookDefinition struct { + _ struct{} `type:"structure"` + + // Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED. + // + // * GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/ + // + // * IP will reject webhooks trigger requests unless they originate from + // an IP within the IP range whitelisted in the authentication configuration. + // + // * UNAUTHENTICATED will accept all webhook trigger requests regardless + // of origin. + // + // Authentication is a required field + Authentication *string `locationName:"authentication" type:"string" required:"true" enum:"WebhookAuthenticationType"` + + // Properties that configure the authentication applied to incoming webhook + // trigger requests. The required properties depend on the authentication type. + // For GITHUB_HMAC, only the SecretToken property must be set. For IP, only + // the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, + // no properties can be set. + // + // AuthenticationConfiguration is a required field + AuthenticationConfiguration *WebhookAuthConfiguration `locationName:"authenticationConfiguration" type:"structure" required:"true"` + + // A list of rules applied to the body/payload sent in the POST request to a + // webhook URL. All defined rules must pass for the request to be accepted and + // the pipeline started. + // + // Filters is a required field + Filters []*WebhookFilterRule `locationName:"filters" type:"list" required:"true"` + + // The name of the webhook. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The name of the action in a pipeline you want to connect to the webhook. + // The action must be from the source (first) stage of the pipeline. + // + // TargetAction is a required field + TargetAction *string `locationName:"targetAction" min:"1" type:"string" required:"true"` + + // The name of the pipeline you want to connect to the webhook. + // + // TargetPipeline is a required field + TargetPipeline *string `locationName:"targetPipeline" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WebhookDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookDefinition"} + if s.Authentication == nil { + invalidParams.Add(request.NewErrParamRequired("Authentication")) + } + if s.AuthenticationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationConfiguration")) + } + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + 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.TargetAction == nil { + invalidParams.Add(request.NewErrParamRequired("TargetAction")) + } + if s.TargetAction != nil && len(*s.TargetAction) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetAction", 1)) + } + if s.TargetPipeline == nil { + invalidParams.Add(request.NewErrParamRequired("TargetPipeline")) + } + if s.TargetPipeline != nil && len(*s.TargetPipeline) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetPipeline", 1)) + } + if s.AuthenticationConfiguration != nil { + if err := s.AuthenticationConfiguration.Validate(); err != nil { + invalidParams.AddNested("AuthenticationConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthentication sets the Authentication field's value. +func (s *WebhookDefinition) SetAuthentication(v string) *WebhookDefinition { + s.Authentication = &v + return s +} + +// SetAuthenticationConfiguration sets the AuthenticationConfiguration field's value. +func (s *WebhookDefinition) SetAuthenticationConfiguration(v *WebhookAuthConfiguration) *WebhookDefinition { + s.AuthenticationConfiguration = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *WebhookDefinition) SetFilters(v []*WebhookFilterRule) *WebhookDefinition { + s.Filters = v + return s +} + +// SetName sets the Name field's value. +func (s *WebhookDefinition) SetName(v string) *WebhookDefinition { + s.Name = &v + return s +} + +// SetTargetAction sets the TargetAction field's value. +func (s *WebhookDefinition) SetTargetAction(v string) *WebhookDefinition { + s.TargetAction = &v + return s +} + +// SetTargetPipeline sets the TargetPipeline field's value. +func (s *WebhookDefinition) SetTargetPipeline(v string) *WebhookDefinition { + s.TargetPipeline = &v + return s +} + +// The event criteria that specify when a webhook notification is sent to your +// URL. +type WebhookFilterRule struct { + _ struct{} `type:"structure"` + + // A JsonPath expression that will be applied to the body/payload of the webhook. + // The value selected by JsonPath expression must match the value specified + // in the matchEquals field, otherwise the request will be ignored. More information + // on JsonPath expressions can be found here: https://github.com/json-path/JsonPath. + // + // JsonPath is a required field + JsonPath *string `locationName:"jsonPath" min:"1" type:"string" required:"true"` + + // The value selected by the JsonPath expression must match what is supplied + // in the MatchEquals field, otherwise the request will be ignored. Properties + // from the target action configuration can be included as placeholders in this + // value by surrounding the action configuration key with curly braces. For + // example, if the value supplied here is "refs/heads/{Branch}" and the target + // action has an action configuration property called "Branch" with a value + // of "master", the MatchEquals value will be evaluated as "refs/heads/master". + // A list of action configuration properties for built-in action types can be + // found here: Pipeline Structure Reference Action Requirements (http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements). + MatchEquals *string `locationName:"matchEquals" min:"1" type:"string"` +} + +// String returns the string representation +func (s WebhookFilterRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookFilterRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookFilterRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookFilterRule"} + if s.JsonPath == nil { + invalidParams.Add(request.NewErrParamRequired("JsonPath")) + } + if s.JsonPath != nil && len(*s.JsonPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JsonPath", 1)) + } + if s.MatchEquals != nil && len(*s.MatchEquals) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MatchEquals", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJsonPath sets the JsonPath field's value. +func (s *WebhookFilterRule) SetJsonPath(v string) *WebhookFilterRule { + s.JsonPath = &v + return s +} + +// SetMatchEquals sets the MatchEquals field's value. +func (s *WebhookFilterRule) SetMatchEquals(v string) *WebhookFilterRule { + s.MatchEquals = &v + return s +} + const ( // ActionCategorySource is a ActionCategory enum value ActionCategorySource = "Source" @@ -7741,3 +8912,14 @@ const ( // StageTransitionTypeOutbound is a StageTransitionType enum value StageTransitionTypeOutbound = "Outbound" ) + +const ( + // WebhookAuthenticationTypeGithubHmac is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeGithubHmac = "GITHUB_HMAC" + + // WebhookAuthenticationTypeIp is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeIp = "IP" + + // WebhookAuthenticationTypeUnauthenticated is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeUnauthenticated = "UNAUTHENTICATED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go index bebd4b1bb..ecb1cd862 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go @@ -11,10 +11,10 @@ // see the AWS CodePipeline User Guide (http://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html). // // You can use the AWS CodePipeline API to work with pipelines, stages, actions, -// gates, and transitions, as described below. +// and transitions, as described below. // // Pipelines are models of automated release processes. Each pipeline is uniquely -// named, and consists of actions, gates, and stages. +// named, and consists of stages, actions, and transitions. // // You can work with pipelines by calling: // @@ -43,24 +43,37 @@ // * UpdatePipeline, which updates a pipeline with edits or changes to the // structure of the pipeline. // -// Pipelines include stages, which are logical groupings of gates and actions. -// Each stage contains one or more actions that must complete before the next -// stage begins. A stage will result in success or failure. If a stage fails, -// then the pipeline stops at that stage and will remain stopped until either -// a new version of an artifact appears in the source location, or a user takes -// action to re-run the most recent artifact through the pipeline. You can call -// GetPipelineState, which displays the status of a pipeline, including the -// status of stages in the pipeline, or GetPipeline, which returns the entire -// structure of the pipeline, including the stages of that pipeline. For more -// information about the structure of stages and actions, also refer to the -// AWS CodePipeline Pipeline Structure Reference (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). +// Pipelines include stages. Each stage contains one or more actions that must +// complete before the next stage begins. A stage will result in success or +// failure. If a stage fails, then the pipeline stops at that stage and will +// remain stopped until either a new version of an artifact appears in the source +// location, or a user takes action to re-run the most recent artifact through +// the pipeline. You can call GetPipelineState, which displays the status of +// a pipeline, including the status of stages in the pipeline, or GetPipeline, +// which returns the entire structure of the pipeline, including the stages +// of that pipeline. For more information about the structure of stages and +// actions, also refer to the AWS CodePipeline Pipeline Structure Reference +// (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). // // Pipeline stages include actions, which are categorized into categories such // as source or build actions performed within a stage of a pipeline. For example, // you can use a source action to import artifacts into a pipeline from a source // such as Amazon S3. Like stages, you do not work with actions directly in // most cases, but you do define and interact with actions when working with -// pipeline operations such as CreatePipeline and GetPipelineState. +// pipeline operations such as CreatePipeline and GetPipelineState. Valid action +// categories are: +// +// * Source +// +// * Build +// +// * Test +// +// * Deploy +// +// * Approval +// +// * Invoke // // Pipelines also include transitions, which allow the transition of artifacts // from one stage to the next in a pipeline after the actions in one stage complete. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go index ca160b26a..dfdffa34c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go @@ -83,6 +83,18 @@ const ( // The specified structure was specified in an invalid format. ErrCodeInvalidStructureException = "InvalidStructureException" + // ErrCodeInvalidWebhookAuthenticationParametersException for service response error code + // "InvalidWebhookAuthenticationParametersException". + // + // The specified authentication type is in an invalid format. + ErrCodeInvalidWebhookAuthenticationParametersException = "InvalidWebhookAuthenticationParametersException" + + // ErrCodeInvalidWebhookFilterPatternException for service response error code + // "InvalidWebhookFilterPatternException". + // + // The specified event filter rule is in an invalid format. + ErrCodeInvalidWebhookFilterPatternException = "InvalidWebhookFilterPatternException" + // ErrCodeJobNotFoundException for service response error code // "JobNotFoundException". // @@ -149,4 +161,10 @@ const ( // // The validation was specified in an invalid format. ErrCodeValidationException = "ValidationException" + + // ErrCodeWebhookNotFoundException for service response error code + // "WebhookNotFoundException". + // + // The specified webhook was entered in an invalid format or cannot be found. + ErrCodeWebhookNotFoundException = "WebhookNotFoundException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go index 8b7737abb..397a00f9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codepipeline" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "codepipeline" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodePipeline" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodePipeline client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go index 022ada85f..e666f7328 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go @@ -1970,7 +1970,7 @@ type Credentials struct { AccessKeyId *string `type:"string"` // The date at which these credentials will expire. - Expiration *time.Time `type:"timestamp" timestampFormat:"unix"` + Expiration *time.Time `type:"timestamp"` // The Secret Access Key portion of the credentials SecretKey *string `type:"string"` @@ -2728,13 +2728,13 @@ type IdentityDescription struct { _ struct{} `type:"structure"` // Date on which the identity was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A unique identifier in the format REGION:GUID. IdentityId *string `min:"1" type:"string"` // Date on which the identity was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A set of optional name-value pairs that map provider names to provider tokens. Logins []*string `type:"list"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go index ee82b18ce..9ebae103f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cognito-identity" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cognito-identity" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cognito Identity" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CognitoIdentity client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 739f5f15a..a8f24acbe 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -9911,7 +9911,8 @@ func (c *CognitoIdentityProvider) VerifySoftwareTokenRequest(input *VerifySoftwa // VerifySoftwareToken API operation for Amazon Cognito Identity Provider. // // Use this API to register a user's entered TOTP code and mark the user's software -// token MFA status as "verified" if successful, +// token MFA status as "verified" if successful. The request takes an access +// token or a session string, but not both. // // 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 @@ -11485,10 +11486,10 @@ type AdminGetUserOutput struct { UserAttributes []*AttributeType `type:"list"` // The date the user was created. - UserCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserCreateDate *time.Time `type:"timestamp"` // The date the user was last modified. - UserLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserLastModifiedDate *time.Time `type:"timestamp"` // The list of the user's MFA settings. UserMFASettingList []*string `type:"list"` @@ -11751,6 +11752,13 @@ type AdminInitiateAuthOutput struct { // is returned to you in the AdminInitiateAuth response if you need to pass // another challenge. // + // * MFA_SETUP: If MFA is required, users who do not have at least one of + // the MFA methods set up are presented with an MFA_SETUP challenge. The + // user must set up at least one MFA type to continue to authenticate. + // + // * SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA + // for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA. + // // * SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via // SMS. // @@ -13467,7 +13475,7 @@ type AuthEventType struct { ChallengeResponses []*ChallengeResponseType `type:"list"` // The creation date - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The user context data captured at the time of an event request. It provides // additional information about the client from which event the request is received. @@ -13555,7 +13563,7 @@ type AuthenticationResultType struct { // The access token. AccessToken *string `type:"string"` - // The expiration period of the authentication result. + // The expiration period of the authentication result in seconds. ExpiresIn *int64 `type:"integer"` // The ID token. @@ -14851,7 +14859,19 @@ type CreateUserPoolClientInput struct { // user pool. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - // A list of allowed callback URLs for the identity providers. + // A list of allowed redirect (callback) URLs for the identity providers. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). CallbackURLs []*string `type:"list"` // The client name for the user pool client you would like to create. @@ -14860,6 +14880,18 @@ type CreateUserPoolClientInput struct { ClientName *string `min:"1" type:"string" required:"true"` // The default redirect URI. Must be in the CallbackURLs list. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). DefaultRedirectURI *string `min:"1" type:"string"` // The explicit authentication flows. @@ -16580,16 +16612,16 @@ type DeviceType struct { DeviceAttributes []*AttributeType `type:"list"` // The creation date of the device. - DeviceCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceCreateDate *time.Time `type:"timestamp"` // The device key. DeviceKey *string `min:"1" type:"string"` // The date in which the device was last authenticated. - DeviceLastAuthenticatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceLastAuthenticatedDate *time.Time `type:"timestamp"` // The last modified date of the device. - DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceLastModifiedDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -16821,7 +16853,7 @@ type EventFeedbackType struct { _ struct{} `type:"structure"` // The event feedback date. - FeedbackDate *time.Time `type:"timestamp" timestampFormat:"unix"` + FeedbackDate *time.Time `type:"timestamp"` // The event feedback value. // @@ -17875,7 +17907,7 @@ type GroupType struct { _ struct{} `type:"structure"` // The date the group was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A string containing the description of the group. Description *string `type:"string"` @@ -17884,7 +17916,7 @@ type GroupType struct { GroupName *string `min:"1" type:"string"` // The date the group was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A nonnegative integer value that specifies the precedence of this group relative // to the other groups that a user can belong to in the user pool. If a user @@ -18003,13 +18035,13 @@ type IdentityProviderType struct { AttributeMapping map[string]*string `type:"map"` // The date the identity provider was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A list of identity provider identifiers. IdpIdentifiers []*string `type:"list"` // The date the identity provider was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The identity provider details, such as MetadataURL and MetadataFile. ProviderDetails map[string]*string `type:"map"` @@ -19837,10 +19869,10 @@ type ProviderDescription struct { _ struct{} `type:"structure"` // The date the provider was added to the user pool. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The date the provider was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The identity provider name. ProviderName *string `min:"1" type:"string"` @@ -20354,7 +20386,7 @@ type RiskConfigurationType struct { CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType `type:"structure"` // The last modified date. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The configuration to override the risk decision. RiskExceptionConfiguration *RiskExceptionConfigurationType `type:"structure"` @@ -20488,7 +20520,7 @@ type SchemaAttributeType struct { // Specifies whether the attribute type is developer only. DeveloperOnlyAttribute *bool `type:"boolean"` - // Specifies whether the attribute can be changed once it has been created. + // Specifies whether the value of the attribute can be changed. Mutable *bool `type:"boolean"` // A schema attribute of the name type. @@ -21626,13 +21658,13 @@ type UICustomizationType struct { ClientId *string `min:"1" type:"string"` // The creation date for the UI customization. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The logo image for the UI customization. ImageUrl *string `type:"string"` // The last-modified date for the UI customization. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The user pool ID for the user pool. UserPoolId *string `min:"1" type:"string"` @@ -22344,7 +22376,19 @@ type UpdateUserPoolClientInput struct { // user pool. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - // A list of allowed callback URLs for the identity providers. + // A list of allowed redirect (callback) URLs for the identity providers. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). CallbackURLs []*string `type:"list"` // The ID of the client associated with the user pool. @@ -22356,6 +22400,18 @@ type UpdateUserPoolClientInput struct { ClientName *string `min:"1" type:"string"` // The default redirect URI. Must be in the CallbackURLs list. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). DefaultRedirectURI *string `min:"1" type:"string"` // Explicit authentication flows. @@ -22834,13 +22890,13 @@ type UserImportJobType struct { CloudWatchLogsRoleArn *string `min:"20" type:"string"` // The date when the user import job was completed. - CompletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletionDate *time.Time `type:"timestamp"` // The message returned when the user import job is completed. CompletionMessage *string `min:"1" type:"string"` // The date the user import job was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The number of users that could not be imported. FailedUsers *int64 `type:"long"` @@ -22861,7 +22917,7 @@ type UserImportJobType struct { SkippedUsers *int64 `type:"long"` // The date when the user import job was started. - StartDate *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDate *time.Time `type:"timestamp"` // The status of the user import job. One of the following: // @@ -23084,7 +23140,19 @@ type UserPoolClientType struct { // The Amazon Pinpoint analytics configuration for the user pool client. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` - // A list of allowed callback URLs for the identity providers. + // A list of allowed redirect (callback) URLs for the identity providers. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). CallbackURLs []*string `type:"list"` // The ID of the client associated with the user pool. @@ -23097,16 +23165,28 @@ type UserPoolClientType struct { ClientSecret *string `min:"1" type:"string"` // The date the user pool client was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The default redirect URI. Must be in the CallbackURLs list. + // + // A redirect URI must: + // + // * Be an absolute URI. + // + // * Be registered with the authorization server. + // + // * Not use HTTP without TLS (i.e. use HTTPS instead of HTTP). + // + // * Not include a fragment component. + // + // See OAuth 2.0 - Redirection Endpoint (https://tools.ietf.org/html/rfc6749#section-3.1.2). DefaultRedirectURI *string `min:"1" type:"string"` // The explicit authentication flows. ExplicitAuthFlows []*string `type:"list"` // The date the user pool client was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A list of allowed logout URLs for the identity providers. LogoutURLs []*string `type:"list"` @@ -23252,7 +23332,7 @@ type UserPoolDescriptionType struct { _ struct{} `type:"structure"` // The date the user pool description was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The ID in a user pool description. Id *string `min:"1" type:"string"` @@ -23261,7 +23341,7 @@ type UserPoolDescriptionType struct { LambdaConfig *LambdaConfigType `type:"structure"` // The date the user pool description was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The name in a user pool description. Name *string `min:"1" type:"string"` @@ -23365,11 +23445,14 @@ type UserPoolType struct { // Specifies the attributes that are aliased in a user pool. AliasAttributes []*string `type:"list"` + // The Amazon Resource Name (ARN) for the user pool. + Arn *string `min:"20" type:"string"` + // Specifies the attributes that are auto-verified in a user pool. AutoVerifiedAttributes []*string `type:"list"` // The date the user pool was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The device configuration. DeviceConfiguration *DeviceConfigurationType `type:"structure"` @@ -23395,11 +23478,11 @@ type UserPoolType struct { // The ID of the user pool. Id *string `min:"1" type:"string"` - // The AWS Lambda triggers associated with tue user pool. + // The AWS Lambda triggers associated with the user pool. LambdaConfig *LambdaConfigType `type:"structure"` // The date the user pool was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Can be one of the following values: // @@ -23473,6 +23556,12 @@ func (s *UserPoolType) SetAliasAttributes(v []*string) *UserPoolType { return s } +// SetArn sets the Arn field's value. +func (s *UserPoolType) SetArn(v string) *UserPoolType { + s.Arn = &v + return s +} + // SetAutoVerifiedAttributes sets the AutoVerifiedAttributes field's value. func (s *UserPoolType) SetAutoVerifiedAttributes(v []*string) *UserPoolType { s.AutoVerifiedAttributes = v @@ -23637,10 +23726,10 @@ type UserType struct { MFAOptions []*MFAOptionType `type:"list"` // The creation date of the user. - UserCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserCreateDate *time.Time `type:"timestamp"` // The last modified date of the user. - UserLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserLastModifiedDate *time.Time `type:"timestamp"` // The user status. Can be one of the following: // @@ -24228,6 +24317,9 @@ const ( // IdentityProviderTypeTypeLoginWithAmazon is a IdentityProviderTypeType enum value IdentityProviderTypeTypeLoginWithAmazon = "LoginWithAmazon" + + // IdentityProviderTypeTypeOidc is a IdentityProviderTypeType enum value + IdentityProviderTypeTypeOidc = "OIDC" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go index 190d20711..68efbd80b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cognito-idp" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "cognito-idp" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cognito Identity Provider" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CognitoIdentityProvider client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index 56e5192db..b8bdc9641 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -709,6 +709,91 @@ func (c *ConfigService) DeletePendingAggregationRequestWithContext(ctx aws.Conte return out, req.Send() } +const opDeleteRetentionConfiguration = "DeleteRetentionConfiguration" + +// DeleteRetentionConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRetentionConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteRetentionConfiguration for more information on using the DeleteRetentionConfiguration +// 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 DeleteRetentionConfigurationRequest method. +// req, resp := client.DeleteRetentionConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration +func (c *ConfigService) DeleteRetentionConfigurationRequest(input *DeleteRetentionConfigurationInput) (req *request.Request, output *DeleteRetentionConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteRetentionConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRetentionConfigurationInput{} + } + + output = &DeleteRetentionConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRetentionConfiguration API operation for AWS Config. +// +// Deletes the retention configuration. +// +// 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 Config's +// API operation DeleteRetentionConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeNoSuchRetentionConfigurationException "NoSuchRetentionConfigurationException" +// You have specified a retention configuration that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRetentionConfiguration +func (c *ConfigService) DeleteRetentionConfiguration(input *DeleteRetentionConfigurationInput) (*DeleteRetentionConfigurationOutput, error) { + req, out := c.DeleteRetentionConfigurationRequest(input) + return out, req.Send() +} + +// DeleteRetentionConfigurationWithContext is the same as DeleteRetentionConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRetentionConfiguration 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 *ConfigService) DeleteRetentionConfigurationWithContext(ctx aws.Context, input *DeleteRetentionConfigurationInput, opts ...request.Option) (*DeleteRetentionConfigurationOutput, error) { + req, out := c.DeleteRetentionConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeliverConfigSnapshot = "DeliverConfigSnapshot" // DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the @@ -1985,6 +2070,98 @@ func (c *ConfigService) DescribePendingAggregationRequestsWithContext(ctx aws.Co return out, req.Send() } +const opDescribeRetentionConfigurations = "DescribeRetentionConfigurations" + +// DescribeRetentionConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRetentionConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeRetentionConfigurations for more information on using the DescribeRetentionConfigurations +// 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 DescribeRetentionConfigurationsRequest method. +// req, resp := client.DescribeRetentionConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations +func (c *ConfigService) DescribeRetentionConfigurationsRequest(input *DescribeRetentionConfigurationsInput) (req *request.Request, output *DescribeRetentionConfigurationsOutput) { + op := &request.Operation{ + Name: opDescribeRetentionConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeRetentionConfigurationsInput{} + } + + output = &DescribeRetentionConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRetentionConfigurations API operation for AWS Config. +// +// Returns the details of one or more retention configurations. If the retention +// configuration name is not specified, this action returns the details for +// all the retention configurations for that account. +// +// Currently, AWS Config supports only one retention configuration per region +// in your 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 AWS Config's +// API operation DescribeRetentionConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeNoSuchRetentionConfigurationException "NoSuchRetentionConfigurationException" +// You have specified a retention configuration that does not exist. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeRetentionConfigurations +func (c *ConfigService) DescribeRetentionConfigurations(input *DescribeRetentionConfigurationsInput) (*DescribeRetentionConfigurationsOutput, error) { + req, out := c.DescribeRetentionConfigurationsRequest(input) + return out, req.Send() +} + +// DescribeRetentionConfigurationsWithContext is the same as DescribeRetentionConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRetentionConfigurations 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 *ConfigService) DescribeRetentionConfigurationsWithContext(ctx aws.Context, input *DescribeRetentionConfigurationsInput, opts ...request.Option) (*DescribeRetentionConfigurationsOutput, error) { + req, out := c.DescribeRetentionConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetailsByConfigRule" // GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the @@ -2673,7 +2850,9 @@ func (c *ConfigService) GetResourceConfigHistoryRequest(input *GetResourceConfig // // Returns a list of configuration items for the specified resource. The list // contains details about each state of the resource during the specified time -// interval. +// interval. If you specified a retention period to retain your ConfigurationItems +// between a minimum of 30 days and a maximum of 7 years (2557 days), AWS Config +// returns the ConfigurationItems for the specified retention period. // // The response is paginated. By default, AWS Config returns a limit of 10 configuration // items per page. You can customize this number with the limit parameter. The @@ -3153,9 +3332,15 @@ func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfiguratio // PutConfigurationAggregator API operation for AWS Config. // // Creates and updates the configuration aggregator with the selected source -// accounts and regions. +// accounts and regions. The source account can be individual account(s) or +// an organization. // -// AWS Config should be enabled in accounts and regions you want to aggreagate. +// AWS Config should be enabled in source accounts and regions you want to aggregate. +// +// If your source type is an organization, you must be signed in to the master +// account and all features must be enabled in your organization. AWS Config +// calls EnableAwsServiceAccess API to enable integration between AWS Config +// and AWS Organizations. // // 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 @@ -3511,6 +3696,97 @@ func (c *ConfigService) PutEvaluationsWithContext(ctx aws.Context, input *PutEva return out, req.Send() } +const opPutRetentionConfiguration = "PutRetentionConfiguration" + +// PutRetentionConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutRetentionConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutRetentionConfiguration for more information on using the PutRetentionConfiguration +// 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 PutRetentionConfigurationRequest method. +// req, resp := client.PutRetentionConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration +func (c *ConfigService) PutRetentionConfigurationRequest(input *PutRetentionConfigurationInput) (req *request.Request, output *PutRetentionConfigurationOutput) { + op := &request.Operation{ + Name: opPutRetentionConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRetentionConfigurationInput{} + } + + output = &PutRetentionConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutRetentionConfiguration API operation for AWS Config. +// +// Creates and updates the retention configuration with details about retention +// period (number of days) that AWS Config stores your historical information. +// The API creates the RetentionConfiguration object and names the object as +// default. When you have a RetentionConfiguration object named default, calling +// the API modifies the default object. +// +// Currently, AWS Config supports only one retention configuration per region +// in your 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 AWS Config's +// API operation PutRetentionConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeMaxNumberOfRetentionConfigurationsExceededException "MaxNumberOfRetentionConfigurationsExceededException" +// Failed to add the retention configuration because a retention configuration +// with that name already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration +func (c *ConfigService) PutRetentionConfiguration(input *PutRetentionConfigurationInput) (*PutRetentionConfigurationOutput, error) { + req, out := c.PutRetentionConfigurationRequest(input) + return out, req.Send() +} + +// PutRetentionConfigurationWithContext is the same as PutRetentionConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutRetentionConfiguration 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 *ConfigService) PutRetentionConfigurationWithContext(ctx aws.Context, input *PutRetentionConfigurationInput, opts ...request.Option) (*PutRetentionConfigurationOutput, error) { + req, out := c.PutRetentionConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" // StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the @@ -3811,7 +4087,7 @@ type AccountAggregationSource struct { // AccountIds is a required field AccountIds []*string `min:"1" type:"list" required:"true"` - // If true, aggreagate existing AWS Config regions and future regions. + // If true, aggregate existing AWS Config regions and future regions. AllAwsRegions *bool `type:"boolean"` // The source regions being aggregated. @@ -3979,13 +4255,13 @@ type AggregateEvaluationResult struct { ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the aggregate evaluation result. - ResultRecordedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResultRecordedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4065,7 +4341,7 @@ type AggregatedSourceStatus struct { LastUpdateStatus *string `type:"string" enum:"AggregatedSourceStatusType"` // The time of the last update. - LastUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `type:"timestamp"` // The source account ID or an organization. SourceId *string `type:"string"` @@ -4141,7 +4417,7 @@ type AggregationAuthorization struct { AuthorizedAwsRegion *string `min:"1" type:"string"` // The time stamp when the aggregation authorization was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4198,7 +4474,7 @@ type BaseConfigurationItem struct { Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp" timestampFormat:"unix"` + ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // The configuration item status. ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` @@ -4208,10 +4484,10 @@ type BaseConfigurationItem struct { ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` + ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example., sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -4579,7 +4855,7 @@ type ComplianceSummary struct { _ struct{} `type:"structure"` // The time that AWS Config created the compliance summary. - ComplianceSummaryTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ComplianceSummaryTimestamp *time.Time `type:"timestamp"` // The number of AWS Config rules or AWS resources that are compliant, up to // a maximum of 25 for rules and 100 for resources. @@ -4660,7 +4936,7 @@ type ConfigExportDeliveryInfo struct { _ struct{} `type:"structure"` // The time of the last attempted delivery. - LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp" timestampFormat:"unix"` + LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp"` // The error code from the last attempted delivery. LastErrorCode *string `locationName:"lastErrorCode" type:"string"` @@ -4672,10 +4948,10 @@ type ConfigExportDeliveryInfo struct { LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time of the last successful delivery. - LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp" timestampFormat:"unix"` + LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp"` // The time that the next delivery occurs. - NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp" timestampFormat:"unix"` + NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp"` } // String returns the string representation @@ -5032,7 +5308,7 @@ type ConfigRuleEvaluationStatus struct { ConfigRuleName *string `min:"1" type:"string"` // The time that you first activated the AWS Config rule. - FirstActivatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + FirstActivatedTime *time.Time `type:"timestamp"` // Indicates whether AWS Config has evaluated your resources against the rule // at least once. @@ -5052,19 +5328,19 @@ type ConfigRuleEvaluationStatus struct { // The time that AWS Config last failed to evaluate your AWS resources against // the rule. - LastFailedEvaluationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastFailedEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last failed to invoke the AWS Config rule to evaluate // your AWS resources. - LastFailedInvocationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastFailedInvocationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully evaluated your AWS resources against // the rule. - LastSuccessfulEvaluationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully invoked the AWS Config rule to // evaluate your AWS resources. - LastSuccessfulInvocationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulInvocationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -5224,7 +5500,7 @@ type ConfigStreamDeliveryInfo struct { LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time from the last status change. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp" timestampFormat:"unix"` + LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` } // String returns the string representation @@ -5276,10 +5552,10 @@ type ConfigurationAggregator struct { ConfigurationAggregatorName *string `min:"1" type:"string"` // The time stamp when the configuration aggregator was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The time of the last update. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // Provides an organization and list of regions to be aggregated. OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` @@ -5351,7 +5627,7 @@ type ConfigurationItem struct { Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp" timestampFormat:"unix"` + ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // Unique MD5 hash that represents the configuration item's state. // @@ -5380,10 +5656,10 @@ type ConfigurationItem struct { Relationships []*Relationship `locationName:"relationships" type:"list"` // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` + ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -5591,16 +5867,16 @@ type ConfigurationRecorderStatus struct { LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` // The time the recorder was last started. - LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp" timestampFormat:"unix"` + LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp"` // The last (previous) status of the recorder. LastStatus *string `locationName:"lastStatus" type:"string" enum:"RecorderStatus"` // The time when the status was last changed. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp" timestampFormat:"unix"` + LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` // The time the recorder was last stopped. - LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp" timestampFormat:"unix"` + LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp"` // The name of the configuration recorder. Name *string `locationName:"name" type:"string"` @@ -6088,6 +6364,61 @@ func (s DeletePendingAggregationRequestOutput) GoString() string { return s.String() } +type DeleteRetentionConfigurationInput struct { + _ struct{} `type:"structure"` + + // The name of the retention configuration to delete. + // + // RetentionConfigurationName is a required field + RetentionConfigurationName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRetentionConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRetentionConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRetentionConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionConfigurationInput"} + if s.RetentionConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionConfigurationName")) + } + if s.RetentionConfigurationName != nil && len(*s.RetentionConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RetentionConfigurationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRetentionConfigurationName sets the RetentionConfigurationName field's value. +func (s *DeleteRetentionConfigurationInput) SetRetentionConfigurationName(v string) *DeleteRetentionConfigurationInput { + s.RetentionConfigurationName = &v + return s +} + +type DeleteRetentionConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRetentionConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRetentionConfigurationOutput) GoString() string { + return s.String() +} + // The input for the DeliverConfigSnapshot action. type DeliverConfigSnapshotInput struct { _ struct{} `type:"structure"` @@ -6905,7 +7236,7 @@ func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetUpdateStatus(v [] type DescribeConfigurationAggregatorSourcesStatusOutput struct { _ struct{} `type:"structure"` - // Retuns an AggregatedSourceStatus object. + // Returns an AggregatedSourceStatus object. AggregatedSourceStatusList []*AggregatedSourceStatus `type:"list"` // The nextToken string returned on a previous page that you use to get the @@ -7272,6 +7603,77 @@ func (s *DescribePendingAggregationRequestsOutput) SetPendingAggregationRequests return s } +type DescribeRetentionConfigurationsInput struct { + _ struct{} `type:"structure"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // A list of names of retention configurations for which you want details. If + // you do not specify a name, AWS Config returns details for all the retention + // configurations for that account. + // + // Currently, AWS Config supports only one retention configuration per region + // in your account. + RetentionConfigurationNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeRetentionConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRetentionConfigurationsInput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRetentionConfigurationsInput) SetNextToken(v string) *DescribeRetentionConfigurationsInput { + s.NextToken = &v + return s +} + +// SetRetentionConfigurationNames sets the RetentionConfigurationNames field's value. +func (s *DescribeRetentionConfigurationsInput) SetRetentionConfigurationNames(v []*string) *DescribeRetentionConfigurationsInput { + s.RetentionConfigurationNames = v + return s +} + +type DescribeRetentionConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // Returns a retention configuration object. + RetentionConfigurations []*RetentionConfiguration `type:"list"` +} + +// String returns the string representation +func (s DescribeRetentionConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRetentionConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRetentionConfigurationsOutput) SetNextToken(v string) *DescribeRetentionConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetRetentionConfigurations sets the RetentionConfigurations field's value. +func (s *DescribeRetentionConfigurationsOutput) SetRetentionConfigurations(v []*RetentionConfiguration) *DescribeRetentionConfigurationsOutput { + s.RetentionConfigurations = v + return s +} + // Identifies an AWS resource and indicates whether it complies with the AWS // Config rule that it was evaluated against. type Evaluation struct { @@ -7312,7 +7714,7 @@ type Evaluation struct { // (for example, every 24 hours). // // OrderingTimestamp is a required field - OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OrderingTimestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -7404,13 +7806,13 @@ type EvaluationResult struct { ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the evaluation result. - ResultRecordedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResultRecordedTime *time.Time `type:"timestamp"` // An encrypted token that associates an evaluation with an AWS Config rule. // The token identifies the rule, the AWS resource being evaluated, and the @@ -7476,7 +7878,7 @@ type EvaluationResultIdentifier struct { // The time can indicate when AWS Config delivered a configuration item change // notification, or it can indicate when AWS Config delivered the configuration // snapshot, depending on which event triggered the evaluation. - OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + OrderingTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -8256,11 +8658,11 @@ type GetResourceConfigHistoryInput struct { // The time stamp that indicates an earlier time. If not specified, the action // returns paginated results that contain configuration items that start when // the first configuration item was recorded. - EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp" timestampFormat:"unix"` + EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp"` // The time stamp that indicates a later time. If not specified, current time // is taken. - LaterTime *time.Time `locationName:"laterTime" type:"timestamp" timestampFormat:"unix"` + LaterTime *time.Time `locationName:"laterTime" type:"timestamp"` // The maximum number of configuration items returned on each page. The default // is 10. You cannot specify a number greater than 100. If you specify 0, AWS @@ -8274,7 +8676,7 @@ type GetResourceConfigHistoryInput struct { // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field - ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // @@ -8298,6 +8700,9 @@ func (s *GetResourceConfigHistoryInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } @@ -8514,7 +8919,7 @@ func (s *ListDiscoveredResourcesOutput) SetResourceIdentifiers(v []*ResourceIden type OrganizationAggregationSource struct { _ struct{} `type:"structure"` - // If true, aggreagate existing AWS Config regions and future regions. + // If true, aggregate existing AWS Config regions and future regions. AllAwsRegions *bool `type:"boolean"` // The source regions being aggregated. @@ -9053,6 +9458,72 @@ func (s *PutEvaluationsOutput) SetFailedEvaluations(v []*Evaluation) *PutEvaluat return s } +type PutRetentionConfigurationInput struct { + _ struct{} `type:"structure"` + + // Number of days AWS Config stores your historical information. + // + // Currently, only applicable to the configuration item history. + // + // RetentionPeriodInDays is a required field + RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` +} + +// String returns the string representation +func (s PutRetentionConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRetentionConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRetentionConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRetentionConfigurationInput"} + if s.RetentionPeriodInDays == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionPeriodInDays")) + } + if s.RetentionPeriodInDays != nil && *s.RetentionPeriodInDays < 30 { + invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodInDays", 30)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. +func (s *PutRetentionConfigurationInput) SetRetentionPeriodInDays(v int64) *PutRetentionConfigurationInput { + s.RetentionPeriodInDays = &v + return s +} + +type PutRetentionConfigurationOutput struct { + _ struct{} `type:"structure"` + + // Returns a retention configuration object. + RetentionConfiguration *RetentionConfiguration `type:"structure"` +} + +// String returns the string representation +func (s PutRetentionConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRetentionConfigurationOutput) GoString() string { + return s.String() +} + +// SetRetentionConfiguration sets the RetentionConfiguration field's value. +func (s *PutRetentionConfigurationOutput) SetRetentionConfiguration(v *RetentionConfiguration) *PutRetentionConfigurationOutput { + s.RetentionConfiguration = v + return s +} + // Specifies the types of AWS resource for which AWS Config records configuration // changes. // @@ -9161,7 +9632,7 @@ type Relationship struct { RelationshipName *string `locationName:"relationshipName" type:"string"` // The ID of the related resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the related resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -9243,10 +9714,10 @@ type ResourceIdentifier struct { _ struct{} `type:"structure"` // The time that the resource was deleted. - ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp" timestampFormat:"unix"` + ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource (if available). ResourceName *string `locationName:"resourceName" type:"string"` @@ -9297,7 +9768,7 @@ type ResourceKey struct { // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field - ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // @@ -9321,6 +9792,9 @@ func (s *ResourceKey) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } @@ -9343,6 +9817,47 @@ func (s *ResourceKey) SetResourceType(v string) *ResourceKey { return s } +// An object with the name of the retention configuration and the retention +// period in days. The object stores the configuration for data retention in +// AWS Config. +type RetentionConfiguration struct { + _ struct{} `type:"structure"` + + // The name of the retention configuration object. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // Number of days AWS Config stores your historical information. + // + // Currently, only applicable to the configuration item history. + // + // RetentionPeriodInDays is a required field + RetentionPeriodInDays *int64 `min:"30" type:"integer" required:"true"` +} + +// String returns the string representation +func (s RetentionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetentionConfiguration) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *RetentionConfiguration) SetName(v string) *RetentionConfiguration { + s.Name = &v + return s +} + +// SetRetentionPeriodInDays sets the RetentionPeriodInDays field's value. +func (s *RetentionConfiguration) SetRetentionPeriodInDays(v int64) *RetentionConfiguration { + s.RetentionPeriodInDays = &v + return s +} + // Defines which resources trigger an evaluation for an AWS Config rule. The // scope can include one or more resource types, a combination of a tag key // and value, or a combination of one resource type and one resource ID. Specify @@ -9541,7 +10056,8 @@ type SourceDetail struct { // when AWS Config delivers a configuration snapshot. // // If you want your custom rule to be triggered by configuration changes, specify - // both ConfigurationItemChangeNotification and OversizedConfigurationItemChangeNotification. + // two SourceDetail objects, one for ConfigurationItemChangeNotification and + // one for OversizedConfigurationItemChangeNotification. MessageType *string `type:"string" enum:"MessageType"` } @@ -10034,4 +10550,28 @@ const ( // ResourceTypeAwsCloudFrontStreamingDistribution is a ResourceType enum value ResourceTypeAwsCloudFrontStreamingDistribution = "AWS::CloudFront::StreamingDistribution" + + // ResourceTypeAwsWafRuleGroup is a ResourceType enum value + ResourceTypeAwsWafRuleGroup = "AWS::WAF::RuleGroup" + + // ResourceTypeAwsWafregionalRuleGroup is a ResourceType enum value + ResourceTypeAwsWafregionalRuleGroup = "AWS::WAFRegional::RuleGroup" + + // ResourceTypeAwsLambdaFunction is a ResourceType enum value + ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" + + // ResourceTypeAwsElasticBeanstalkApplication is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkApplication = "AWS::ElasticBeanstalk::Application" + + // ResourceTypeAwsElasticBeanstalkApplicationVersion is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkApplicationVersion = "AWS::ElasticBeanstalk::ApplicationVersion" + + // ResourceTypeAwsElasticBeanstalkEnvironment is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkEnvironment = "AWS::ElasticBeanstalk::Environment" + + // ResourceTypeAwsElasticLoadBalancingLoadBalancer is a ResourceType enum value + ResourceTypeAwsElasticLoadBalancingLoadBalancer = "AWS::ElasticLoadBalancing::LoadBalancer" + + // ResourceTypeAwsXrayEncryptionConfig is a ResourceType enum value + ResourceTypeAwsXrayEncryptionConfig = "AWS::XRay::EncryptionConfig" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go index 433f766a8..b57a5cec4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go @@ -126,6 +126,13 @@ const ( // You have reached the limit of the number of delivery channels you can create. ErrCodeMaxNumberOfDeliveryChannelsExceededException = "MaxNumberOfDeliveryChannelsExceededException" + // ErrCodeMaxNumberOfRetentionConfigurationsExceededException for service response error code + // "MaxNumberOfRetentionConfigurationsExceededException". + // + // Failed to add the retention configuration because a retention configuration + // with that name already exists. + ErrCodeMaxNumberOfRetentionConfigurationsExceededException = "MaxNumberOfRetentionConfigurationsExceededException" + // ErrCodeNoAvailableConfigurationRecorderException for service response error code // "NoAvailableConfigurationRecorderException". // @@ -182,6 +189,12 @@ const ( // You have specified a delivery channel that does not exist. ErrCodeNoSuchDeliveryChannelException = "NoSuchDeliveryChannelException" + // ErrCodeNoSuchRetentionConfigurationException for service response error code + // "NoSuchRetentionConfigurationException". + // + // You have specified a retention configuration that does not exist. + ErrCodeNoSuchRetentionConfigurationException = "NoSuchRetentionConfigurationException" + // ErrCodeOrganizationAccessDeniedException for service response error code // "OrganizationAccessDeniedException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go index 3593126ad..2fdea9556 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "config" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "config" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Config Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ConfigService client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 64dbf7084..2f746d1ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -55,10 +55,10 @@ func (c *DatabaseMigrationService) AddTagsToResourceRequest(input *AddTagsToReso // AddTagsToResource API operation for AWS Database Migration Service. // -// Adds metadata tags to a DMS resource, including replication instance, endpoint, -// security group, and migration task. These tags can also be used with cost -// allocation reporting to track cost associated with DMS resources, or used -// in a Condition statement in an IAM policy for DMS. +// Adds metadata tags to an AWS DMS resource, including replication instance, +// endpoint, security group, and migration task. These tags can also be used +// with cost allocation reporting to track cost associated with DMS resources, +// or used in a Condition statement in an IAM policy for DMS. // // 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 @@ -4274,6 +4274,9 @@ func (c *DatabaseMigrationService) StartReplicationTaskRequest(input *StartRepli // The resource is in a state that prevents it from being used for database // migration. // +// * ErrCodeAccessDeniedFault "AccessDeniedFault" +// AWS DMS was denied access to the endpoint. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTask func (c *DatabaseMigrationService) StartReplicationTask(input *StartReplicationTaskInput) (*StartReplicationTaskOutput, error) { req, out := c.StartReplicationTaskRequest(input) @@ -4695,7 +4698,7 @@ type Certificate struct { CertificateArn *string `type:"string"` // The date that the certificate was created. - CertificateCreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CertificateCreationDate *time.Time `type:"timestamp"` // The customer-assigned name of the certificate. Valid characters are A-z and // 0-9. @@ -4719,10 +4722,10 @@ type Certificate struct { SigningAlgorithm *string `type:"string"` // The beginning date that the certificate is valid. - ValidFromDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidFromDate *time.Time `type:"timestamp"` // The final date that the certificate is valid. - ValidToDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidToDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -4875,6 +4878,27 @@ type CreateEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * bucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // Settings in JSON format for the target Amazon DynamoDB endpoint. For more // information about the available settings, see the Using Object Mapping to // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as @@ -4894,12 +4918,15 @@ type CreateEndpointInput struct { EndpointType *string `type:"string" required:"true" enum:"ReplicationEndpointTypeValue"` // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, + // s3, db2, azuredb, sybase, dynamodb, mongodb, and sqlserver. // // EngineName is a required field EngineName *string `type:"string" required:"true"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional attributes associated with the connection. ExtraConnectionAttributes *string `type:"string"` @@ -4913,7 +4940,7 @@ type CreateEndpointInput struct { // Settings in JSON format for the source MongoDB endpoint. For more information // about the available settings, see the Configuration Properties When Using // MongoDB as a Source for AWS Database Migration Service section at Using - // Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). + // MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). MongoDbSettings *MongoDbSettings `type:"structure"` // The password to be used to login to the endpoint database. @@ -4922,7 +4949,7 @@ type CreateEndpointInput struct { // The port used by the endpoint database. Port *int64 `type:"integer"` - // Settings in JSON format for the target S3 endpoint. For more information + // Settings in JSON format for the target Amazon S3 endpoint. For more information // about the available settings, see the Extra Connection Attributes section // at Using Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html). S3Settings *S3Settings `type:"structure"` @@ -4930,6 +4957,10 @@ type CreateEndpointInput struct { // The name of the server where the endpoint database resides. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) for the service access role you want to use + // to create the endpoint. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode to use for the SSL connection. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -4990,6 +5021,12 @@ func (s *CreateEndpointInput) SetDatabaseName(v string) *CreateEndpointInput { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *CreateEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *CreateEndpointInput { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *CreateEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *CreateEndpointInput { s.DynamoDbSettings = v @@ -5014,6 +5051,12 @@ func (s *CreateEndpointInput) SetEngineName(v string) *CreateEndpointInput { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *CreateEndpointInput) SetExternalTableDefinition(v string) *CreateEndpointInput { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *CreateEndpointInput) SetExtraConnectionAttributes(v string) *CreateEndpointInput { s.ExtraConnectionAttributes = &v @@ -5056,6 +5099,12 @@ func (s *CreateEndpointInput) SetServerName(v string) *CreateEndpointInput { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *CreateEndpointInput) SetServiceAccessRoleArn(v string) *CreateEndpointInput { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *CreateEndpointInput) SetSslMode(v string) *CreateEndpointInput { s.SslMode = &v @@ -5132,7 +5181,7 @@ type CreateEventSubscriptionInput struct { // Valid values: replication-instance | migration-task SourceType *string `type:"string"` - // The name of the DMS event notification subscription. + // The name of the AWS DMS event notification subscription. // // Constraints: The name must be less than 255 characters. // @@ -5557,8 +5606,34 @@ func (s *CreateReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *Replic type CreateReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” + CdcStartTime *time.Time `type:"timestamp"` + + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` // The migration type. // @@ -5649,12 +5724,24 @@ func (s *CreateReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *CreateReplicationTaskInput) SetCdcStartPosition(v string) *CreateReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *CreateReplicationTaskInput) SetCdcStartTime(v time.Time) *CreateReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *CreateReplicationTaskInput) SetCdcStopPosition(v string) *CreateReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetMigrationType sets the MigrationType field's value. func (s *CreateReplicationTaskInput) SetMigrationType(v string) *CreateReplicationTaskInput { s.MigrationType = &v @@ -6731,7 +6818,7 @@ type DescribeEventsInput struct { Duration *int64 `type:"integer"` // The end time for the events to be listed. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // A list of event categories for a source type that you want to subscribe to. EventCategories []*string `type:"list"` @@ -6764,7 +6851,7 @@ type DescribeEventsInput struct { SourceType *string `type:"string" enum:"SourceType"` // The start time for the events to be listed. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -7766,6 +7853,39 @@ func (s *DescribeTableStatisticsOutput) SetTableStatistics(v []*TableStatistics) return s } +// The settings in JSON format for the DMS Transfer type source endpoint. +type DmsTransferSettings struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket to use. + BucketName *string `type:"string"` + + // The IAM role that has permission to access the Amazon S3 bucket. + ServiceAccessRoleArn *string `type:"string"` +} + +// String returns the string representation +func (s DmsTransferSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DmsTransferSettings) GoString() string { + return s.String() +} + +// SetBucketName sets the BucketName field's value. +func (s *DmsTransferSettings) SetBucketName(v string) *DmsTransferSettings { + s.BucketName = &v + return s +} + +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *DmsTransferSettings) SetServiceAccessRoleArn(v string) *DmsTransferSettings { + s.ServiceAccessRoleArn = &v + return s +} + type DynamoDbSettings struct { _ struct{} `type:"structure"` @@ -7813,6 +7933,27 @@ type Endpoint struct { // The name of the database at the endpoint. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * bucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // The settings for the target DynamoDB database. For more information, see // the DynamoDBSettings structure. DynamoDbSettings *DynamoDbSettings `type:"structure"` @@ -7828,9 +7969,13 @@ type Endpoint struct { // The type of endpoint. EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` + // The expanded name for the engine name. For example, if the EngineName parameter + // is "aurora," this value would be "Amazon Aurora MySQL." + EngineDisplayName *string `type:"string"` + // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, + // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` // Value returned by a call to CreateEndpoint that can be used for cross-account @@ -7838,6 +7983,9 @@ type Endpoint struct { // with a cross-account. ExternalId *string `type:"string"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional connection attributes used to connect to the endpoint. ExtraConnectionAttributes *string `type:"string"` @@ -7862,6 +8010,9 @@ type Endpoint struct { // The name of the server at the endpoint. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) used by the service access IAM role. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode used to connect to the endpoint. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -7898,6 +8049,12 @@ func (s *Endpoint) SetDatabaseName(v string) *Endpoint { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *Endpoint) SetDmsTransferSettings(v *DmsTransferSettings) *Endpoint { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *Endpoint) SetDynamoDbSettings(v *DynamoDbSettings) *Endpoint { s.DynamoDbSettings = v @@ -7922,6 +8079,12 @@ func (s *Endpoint) SetEndpointType(v string) *Endpoint { return s } +// SetEngineDisplayName sets the EngineDisplayName field's value. +func (s *Endpoint) SetEngineDisplayName(v string) *Endpoint { + s.EngineDisplayName = &v + return s +} + // SetEngineName sets the EngineName field's value. func (s *Endpoint) SetEngineName(v string) *Endpoint { s.EngineName = &v @@ -7934,6 +8097,12 @@ func (s *Endpoint) SetExternalId(v string) *Endpoint { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *Endpoint) SetExternalTableDefinition(v string) *Endpoint { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *Endpoint) SetExtraConnectionAttributes(v string) *Endpoint { s.ExtraConnectionAttributes = &v @@ -7970,6 +8139,12 @@ func (s *Endpoint) SetServerName(v string) *Endpoint { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *Endpoint) SetServiceAccessRoleArn(v string) *Endpoint { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *Endpoint) SetSslMode(v string) *Endpoint { s.SslMode = &v @@ -7992,7 +8167,7 @@ type Event struct { _ struct{} `type:"structure"` // The date of the event. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // The event categories available for the specified source type. EventCategories []*string `type:"list"` @@ -8409,6 +8584,27 @@ type ModifyEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * BucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // Settings in JSON format for the target Amazon DynamoDB endpoint. For more // information about the available settings, see the Using Object Mapping to // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as @@ -8429,10 +8625,13 @@ type ModifyEndpointInput struct { EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, + // s3, db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional attributes associated with the connection. To reset this parameter, // pass the empty string ("") as an argument. ExtraConnectionAttributes *string `type:"string"` @@ -8457,6 +8656,10 @@ type ModifyEndpointInput struct { // The name of the server where the endpoint database resides. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) for the service access role you want to use + // to modify the endpoint. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode to be used. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -8508,6 +8711,12 @@ func (s *ModifyEndpointInput) SetDatabaseName(v string) *ModifyEndpointInput { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *ModifyEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *ModifyEndpointInput { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *ModifyEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *ModifyEndpointInput { s.DynamoDbSettings = v @@ -8538,6 +8747,12 @@ func (s *ModifyEndpointInput) SetEngineName(v string) *ModifyEndpointInput { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *ModifyEndpointInput) SetExternalTableDefinition(v string) *ModifyEndpointInput { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *ModifyEndpointInput) SetExtraConnectionAttributes(v string) *ModifyEndpointInput { s.ExtraConnectionAttributes = &v @@ -8574,6 +8789,12 @@ func (s *ModifyEndpointInput) SetServerName(v string) *ModifyEndpointInput { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *ModifyEndpointInput) SetServiceAccessRoleArn(v string) *ModifyEndpointInput { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *ModifyEndpointInput) SetSslMode(v string) *ModifyEndpointInput { s.SslMode = &v @@ -8984,8 +9205,34 @@ func (s *ModifyReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *Replic type ModifyReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” + CdcStartTime *time.Time `type:"timestamp"` + + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` // The migration type. // @@ -9042,12 +9289,24 @@ func (s *ModifyReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *ModifyReplicationTaskInput) SetCdcStartPosition(v string) *ModifyReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *ModifyReplicationTaskInput) SetCdcStartTime(v time.Time) *ModifyReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *ModifyReplicationTaskInput) SetCdcStopPosition(v string) *ModifyReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetMigrationType sets the MigrationType field's value. func (s *ModifyReplicationTaskInput) SetMigrationType(v string) *ModifyReplicationTaskInput { s.MigrationType = &v @@ -9140,6 +9399,13 @@ type MongoDbSettings struct { // Default value is false. ExtractDocId *string `type:"string"` + // The KMS key identifier that will be used to encrypt the connection parameters. + // If you do not specify a value for the KmsKeyId parameter, then AWS DMS will + // use your default encryption key. AWS KMS creates the default encryption key + // for your AWS account. Your AWS account has a different default encryption + // key for each AWS region. + KmsKeyId *string `type:"string"` + // Specifies either document or table mode. // // Valid values: NONE, ONE @@ -9207,6 +9473,12 @@ func (s *MongoDbSettings) SetExtractDocId(v string) *MongoDbSettings { return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *MongoDbSettings) SetKmsKeyId(v string) *MongoDbSettings { + s.KmsKeyId = &v + return s +} + // SetNestingLevel sets the NestingLevel field's value. func (s *MongoDbSettings) SetNestingLevel(v string) *MongoDbSettings { s.NestingLevel = &v @@ -9477,7 +9749,7 @@ type RefreshSchemasStatus struct { LastFailureMessage *string `type:"string"` // The date the schema was last refreshed. - LastRefreshDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastRefreshDate *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the replication instance. ReplicationInstanceArn *string `type:"string"` @@ -9529,7 +9801,16 @@ func (s *RefreshSchemasStatus) SetStatus(v string) *RefreshSchemasStatus { type ReloadTablesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the replication instance. + // Options for reload. Specify data-reload to reload the data and re-validate + // it if validation is enabled. Specify validate-only to re-validate the table. + // This option applies only when validation is enabled for the task. + // + // Valid values: data-reload, validate-only + // + // Default value is data-reload. + ReloadOption *string `type:"string" enum:"ReloadOptionValue"` + + // The Amazon Resource Name (ARN) of the replication task. // // ReplicationTaskArn is a required field ReplicationTaskArn *string `type:"string" required:"true"` @@ -9566,6 +9847,12 @@ func (s *ReloadTablesInput) Validate() error { return nil } +// SetReloadOption sets the ReloadOption field's value. +func (s *ReloadTablesInput) SetReloadOption(v string) *ReloadTablesInput { + s.ReloadOption = &v + return s +} + // SetReplicationTaskArn sets the ReplicationTaskArn field's value. func (s *ReloadTablesInput) SetReplicationTaskArn(v string) *ReloadTablesInput { s.ReplicationTaskArn = &v @@ -9685,8 +9972,12 @@ type ReplicationInstance struct { // The engine version number of the replication instance. EngineVersion *string `type:"string"` + // The expiration date of the free replication instance that is part of the + // Free DMS program. + FreeUntil *time.Time `type:"timestamp"` + // The time the replication instance was created. - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + InstanceCreateTime *time.Time `type:"timestamp"` // The KMS key identifier that is used to encrypt the content on the replication // instance. If you do not specify a value for the KmsKeyId parameter, then @@ -9792,6 +10083,12 @@ func (s *ReplicationInstance) SetEngineVersion(v string) *ReplicationInstance { return s } +// SetFreeUntil sets the FreeUntil field's value. +func (s *ReplicationInstance) SetFreeUntil(v time.Time) *ReplicationInstance { + s.FreeUntil = &v + return s +} + // SetInstanceCreateTime sets the InstanceCreateTime field's value. func (s *ReplicationInstance) SetInstanceCreateTime(v time.Time) *ReplicationInstance { s.InstanceCreateTime = &v @@ -10053,12 +10350,39 @@ func (s *ReplicationSubnetGroup) SetVpcId(v string) *ReplicationSubnetGroup { type ReplicationTask struct { _ struct{} `type:"structure"` + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` + // The last error (failure) message generated for the replication instance. LastFailureMessage *string `type:"string"` // The type of migration. MigrationType *string `type:"string" enum:"MigrationTypeValue"` + // Indicates the last checkpoint that occurred during a change data capture + // (CDC) operation. You can provide this value to the CdcStartPosition parameter + // to start a CDC operation that begins at that checkpoint. + RecoveryCheckpoint *string `type:"string"` + // The Amazon Resource Name (ARN) of the replication instance. ReplicationInstanceArn *string `type:"string"` @@ -10066,9 +10390,9 @@ type ReplicationTask struct { ReplicationTaskArn *string `type:"string"` // The date the replication task was created. - ReplicationTaskCreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskCreationDate *time.Time `type:"timestamp"` - // The replication task identifier. + // The user-assigned replication task identifier or name. // // Constraints: // @@ -10083,7 +10407,7 @@ type ReplicationTask struct { ReplicationTaskSettings *string `type:"string"` // The date the replication task is scheduled to start. - ReplicationTaskStartDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskStartDate *time.Time `type:"timestamp"` // The statistics for the task, including elapsed time, tables loaded, and table // errors. @@ -10115,6 +10439,18 @@ func (s ReplicationTask) GoString() string { return s.String() } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *ReplicationTask) SetCdcStartPosition(v string) *ReplicationTask { + s.CdcStartPosition = &v + return s +} + +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *ReplicationTask) SetCdcStopPosition(v string) *ReplicationTask { + s.CdcStopPosition = &v + return s +} + // SetLastFailureMessage sets the LastFailureMessage field's value. func (s *ReplicationTask) SetLastFailureMessage(v string) *ReplicationTask { s.LastFailureMessage = &v @@ -10127,6 +10463,12 @@ func (s *ReplicationTask) SetMigrationType(v string) *ReplicationTask { return s } +// SetRecoveryCheckpoint sets the RecoveryCheckpoint field's value. +func (s *ReplicationTask) SetRecoveryCheckpoint(v string) *ReplicationTask { + s.RecoveryCheckpoint = &v + return s +} + // SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. func (s *ReplicationTask) SetReplicationInstanceArn(v string) *ReplicationTask { s.ReplicationInstanceArn = &v @@ -10220,7 +10562,7 @@ type ReplicationTaskAssessmentResult struct { ReplicationTaskIdentifier *string `type:"string"` // The date the task assessment was completed. - ReplicationTaskLastAssessmentDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskLastAssessmentDate *time.Time `type:"timestamp"` // The URL of the S3 object containing the task assessment results. S3ObjectUrl *string `type:"string"` @@ -10370,6 +10712,7 @@ type S3Settings struct { // carriage return (\n). CsvRowDelimiter *string `type:"string"` + // The external table definition. ExternalTableDefinition *string `type:"string"` // The Amazon Resource Name (ARN) used by the service access IAM role. @@ -10492,8 +10835,34 @@ func (s *StartReplicationTaskAssessmentOutput) SetReplicationTask(v *Replication type StartReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” + CdcStartTime *time.Time `type:"timestamp"` + + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` // The Amazon Resource Name (ARN) of the replication task to be started. // @@ -10532,12 +10901,24 @@ func (s *StartReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *StartReplicationTaskInput) SetCdcStartPosition(v string) *StartReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *StartReplicationTaskInput) SetCdcStartTime(v time.Time) *StartReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *StartReplicationTaskInput) SetCdcStopPosition(v string) *StartReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetReplicationTaskArn sets the ReplicationTaskArn field's value. func (s *StartReplicationTaskInput) SetReplicationTaskArn(v string) *StartReplicationTaskInput { s.ReplicationTaskArn = &v @@ -10681,9 +11062,13 @@ type SupportedEndpointType struct { // The type of endpoint. EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` + // The expanded name for the engine name. For example, if the EngineName parameter + // is "aurora," this value would be "Amazon Aurora MySQL." + EngineDisplayName *string `type:"string"` + // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, + // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` // Indicates if Change Data Capture (CDC) is supported. @@ -10706,6 +11091,12 @@ func (s *SupportedEndpointType) SetEndpointType(v string) *SupportedEndpointType return s } +// SetEngineDisplayName sets the EngineDisplayName field's value. +func (s *SupportedEndpointType) SetEngineDisplayName(v string) *SupportedEndpointType { + s.EngineDisplayName = &v + return s +} + // SetEngineName sets the EngineName field's value. func (s *SupportedEndpointType) SetEngineName(v string) *SupportedEndpointType { s.EngineName = &v @@ -10743,7 +11134,7 @@ type TableStatistics struct { Inserts *int64 `type:"long"` // The last time the table was updated. - LastUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `type:"timestamp"` // The schema name. SchemaName *string `type:"string"` @@ -10793,6 +11184,9 @@ type TableStatistics struct { // * Error—The table could not be validated because of an unexpected error. ValidationState *string `type:"string"` + // Additional details about the state of validation. + ValidationStateDetails *string `type:"string"` + // The number of records that could not be validated. ValidationSuspendedRecords *int64 `type:"long"` } @@ -10891,6 +11285,12 @@ func (s *TableStatistics) SetValidationState(v string) *TableStatistics { return s } +// SetValidationStateDetails sets the ValidationStateDetails field's value. +func (s *TableStatistics) SetValidationStateDetails(v string) *TableStatistics { + s.ValidationStateDetails = &v + return s +} + // SetValidationSuspendedRecords sets the ValidationSuspendedRecords field's value. func (s *TableStatistics) SetValidationSuspendedRecords(v int64) *TableStatistics { s.ValidationSuspendedRecords = &v @@ -11145,6 +11545,14 @@ const ( RefreshSchemasStatusTypeValueRefreshing = "refreshing" ) +const ( + // ReloadOptionValueDataReload is a ReloadOptionValue enum value + ReloadOptionValueDataReload = "data-reload" + + // ReloadOptionValueValidateOnly is a ReloadOptionValue enum value + ReloadOptionValueValidateOnly = "validate-only" +) + const ( // ReplicationEndpointTypeValueSource is a ReplicationEndpointTypeValue enum value ReplicationEndpointTypeValueSource = "source" diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go index bf5b47613..8ee775e03 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dms" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "dms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Database Migration Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DatabaseMigrationService client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 558bb610e..843d7d869 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -2925,7 +2925,7 @@ type DescribeEventsInput struct { // The end of the time interval for which to retrieve events, specified in ISO // 8601 format. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The maximum number of results to include in the response. If more results // exist than the specified MaxResults value, a token is included in the response @@ -2949,7 +2949,7 @@ type DescribeEventsInput struct { // The beginning of the time interval to retrieve events for, specified in ISO // 8601 format. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3343,7 +3343,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time when the event occurred. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // A user-defined message associated with the event. Message *string `type:"string"` @@ -3573,7 +3573,7 @@ type Node struct { Endpoint *Endpoint `type:"structure"` // The date and time (in UNIX epoch format) when the node was launched. - NodeCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + NodeCreateTime *time.Time `type:"timestamp"` // A system-generated identifier for the node. NodeId *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go index a80ed1441..545ea0312 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dax" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "dax" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "DAX" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DAX client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index aeffc22fa..cf8deb7a7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -539,6 +539,92 @@ func (c *DeviceFarm) CreateUploadWithContext(ctx aws.Context, input *CreateUploa return out, req.Send() } +const opCreateVPCEConfiguration = "CreateVPCEConfiguration" + +// CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the CreateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateVPCEConfiguration for more information on using the CreateVPCEConfiguration +// 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 CreateVPCEConfigurationRequest method. +// req, resp := client.CreateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfigurationRequest(input *CreateVPCEConfigurationInput) (req *request.Request, output *CreateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opCreateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVPCEConfigurationInput{} + } + + output = &CreateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVPCEConfiguration API operation for AWS Device Farm. +// +// Creates a configuration record in Device Farm for your Amazon Virtual Private +// Cloud (VPC) endpoint. +// +// 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 Device Farm's +// API operation CreateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfiguration(input *CreateVPCEConfigurationInput) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// CreateVPCEConfigurationWithContext is the same as CreateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVPCEConfiguration 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 *DeviceFarm) CreateVPCEConfigurationWithContext(ctx aws.Context, input *CreateVPCEConfigurationInput, opts ...request.Option) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the @@ -1160,6 +1246,95 @@ func (c *DeviceFarm) DeleteUploadWithContext(ctx aws.Context, input *DeleteUploa return out, req.Send() } +const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" + +// DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteVPCEConfiguration for more information on using the DeleteVPCEConfiguration +// 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 DeleteVPCEConfigurationRequest method. +// req, resp := client.DeleteVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfigurationRequest(input *DeleteVPCEConfigurationInput) (req *request.Request, output *DeleteVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVPCEConfigurationInput{} + } + + output = &DeleteVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVPCEConfiguration API operation for AWS Device Farm. +// +// Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint. +// +// 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 Device Farm's +// API operation DeleteVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfiguration(input *DeleteVPCEConfigurationInput) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + return out, req.Send() +} + +// DeleteVPCEConfigurationWithContext is the same as DeleteVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVPCEConfiguration 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 *DeviceFarm) DeleteVPCEConfigurationWithContext(ctx aws.Context, input *DeleteVPCEConfigurationInput, opts ...request.Option) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the @@ -2547,6 +2722,92 @@ func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput return out, req.Send() } +const opGetVPCEConfiguration = "GetVPCEConfiguration" + +// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetVPCEConfiguration for more information on using the GetVPCEConfiguration +// 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 GetVPCEConfigurationRequest method. +// req, resp := client.GetVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opGetVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetVPCEConfigurationInput{} + } + + output = &GetVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVPCEConfiguration API operation for AWS Device Farm. +// +// Returns information about the configuration settings for your Amazon Virtual +// Private Cloud (VPC) endpoint. +// +// 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 Device Farm's +// API operation GetVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + return out, req.Send() +} + +// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetVPCEConfiguration 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 *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the @@ -4976,6 +5237,89 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl return p.Err() } +const opListVPCEConfigurations = "ListVPCEConfigurations" + +// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListVPCEConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListVPCEConfigurations for more information on using the ListVPCEConfigurations +// 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 ListVPCEConfigurationsRequest method. +// req, resp := client.ListVPCEConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { + op := &request.Operation{ + Name: opListVPCEConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVPCEConfigurationsInput{} + } + + output = &ListVPCEConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVPCEConfigurations API operation for AWS Device Farm. +// +// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint +// configurations in the AWS 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 AWS Device Farm's +// API operation ListVPCEConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + return out, req.Send() +} + +// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListVPCEConfigurations 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 *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the @@ -5883,6 +6227,96 @@ func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProj return out, req.Send() } +const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" + +// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration +// 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 UpdateVPCEConfigurationRequest method. +// req, resp := client.UpdateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVPCEConfigurationInput{} + } + + output = &UpdateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVPCEConfiguration API operation for AWS Device Farm. +// +// Updates information about an existing Amazon Virtual Private Cloud (VPC) +// endpoint configuration. +// +// 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 Device Farm's +// API operation UpdateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVPCEConfiguration 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 *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // A container for account-level settings within AWS Device Farm. type AccountSettings struct { _ struct{} `type:"structure"` @@ -6671,6 +7105,9 @@ type CreateRemoteAccessSessionConfiguration struct { // The billing method for the remote access session. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + + // An array of Amazon Resource Names (ARNs) included in the VPC endpoint configuration. + VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` } // String returns the string representation @@ -6689,6 +7126,12 @@ func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *Cre return s } +// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. +func (s *CreateRemoteAccessSessionConfiguration) SetVpceConfigurationArns(v []*string) *CreateRemoteAccessSessionConfiguration { + s.VpceConfigurationArns = v + return s +} + // Creates and submits a request to start a remote access session. type CreateRemoteAccessSessionInput struct { _ struct{} `type:"structure"` @@ -7042,6 +7485,107 @@ func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { return s } +type CreateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The DNS name of the service running in your VPC that you want Device Farm + // to test. + // + // ServiceDnsName is a required field + ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + // + // VpceConfigurationName is a required field + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + // + // VpceServiceName is a required field + VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} + if s.ServiceDnsName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) + } + if s.VpceConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) + } + if s.VpceServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type CreateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // A JSON object specifying the paths where the artifacts generated by the customer's // tests, on the device or in the test environment, will be pulled from. // @@ -7493,6 +8037,62 @@ func (s DeleteUploadOutput) GoString() string { return s.String() } +type DeleteVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { + s.Arn = &v + return s +} + +type DeleteVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVPCEConfigurationOutput) GoString() string { + return s.String() +} + // Represents a device type that an app is tested against. type Device struct { _ struct{} `type:"structure"` @@ -8163,6 +8763,9 @@ type GetDevicePoolCompatibilityInput struct { // The ARN of the app that is associated with the specified device pool. AppArn *string `locationName:"appArn" min:"32" type:"string"` + // An object containing information about the settings for a run. + Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` + // The device pool's ARN. // // DevicePoolArn is a required field @@ -8229,6 +8832,11 @@ func (s *GetDevicePoolCompatibilityInput) Validate() error { if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) } + if s.Configuration != nil { + if err := s.Configuration.Validate(); err != nil { + invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) + } + } if s.Test != nil { if err := s.Test.Validate(); err != nil { invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) @@ -8247,6 +8855,12 @@ func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolComp return s } +// SetConfiguration sets the Configuration field's value. +func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { + s.Configuration = v + return s +} + // SetDevicePoolArn sets the DevicePoolArn field's value. func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { s.DevicePoolArn = &v @@ -9040,6 +9654,71 @@ func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { return s } +type GetVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to describe. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { + s.Arn = &v + return s +} + +type GetVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s GetVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // Represents information about incompatibility. type IncompatibilityMessage struct { _ struct{} `type:"structure"` @@ -9259,7 +9938,7 @@ type Job struct { Counters *Counters `locationName:"counters" type:"structure"` // When the job was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The device (phone or tablet). Device *Device `locationName:"device" type:"structure"` @@ -9296,7 +9975,7 @@ type Job struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The job's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The job's status. // @@ -9322,7 +10001,7 @@ type Job struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The job's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The job's type. // @@ -11052,6 +11731,87 @@ func (s *ListUploadsOutput) SetUploads(v []*Upload) *ListUploadsOutput { return s } +type ListVPCEConfigurationsInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVPCEConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVPCEConfigurationsInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListVPCEConfigurationsInput) SetMaxResults(v int64) *ListVPCEConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsInput) SetNextToken(v string) *ListVPCEConfigurationsInput { + s.NextToken = &v + return s +} + +type ListVPCEConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // An array of VPCEConfiguration objects containing information about your VPC + // endpoint configuration. + VpceConfigurations []*VPCEConfiguration `locationName:"vpceConfigurations" type:"list"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsOutput) SetNextToken(v string) *ListVPCEConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetVpceConfigurations sets the VpceConfigurations field's value. +func (s *ListVPCEConfigurationsOutput) SetVpceConfigurations(v []*VPCEConfiguration) *ListVPCEConfigurationsOutput { + s.VpceConfigurations = v + return s +} + // Represents a latitude and longitude pair, expressed in geographic coordinate // system degrees (for example 47.6204, -122.3491). // @@ -11366,7 +12126,7 @@ type OfferingStatus struct { _ struct{} `type:"structure"` // The date on which the offering is effective. - EffectiveOn *time.Time `locationName:"effectiveOn" type:"timestamp" timestampFormat:"unix"` + EffectiveOn *time.Time `locationName:"effectiveOn" type:"timestamp"` // Represents the metadata of an offering status. Offering *Offering `locationName:"offering" type:"structure"` @@ -11420,7 +12180,7 @@ type OfferingTransaction struct { Cost *MonetaryAmount `locationName:"cost" type:"structure"` // The date on which an offering transaction was created. - CreatedOn *time.Time `locationName:"createdOn" type:"timestamp" timestampFormat:"unix"` + CreatedOn *time.Time `locationName:"createdOn" type:"timestamp"` // The ID that corresponds to a device offering promotion. OfferingPromotionId *string `locationName:"offeringPromotionId" min:"4" type:"string"` @@ -11608,7 +12368,7 @@ type Project struct { Arn *string `locationName:"arn" min:"32" type:"string"` // When the project was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The default number of minutes (at the project level) a test run will execute // before it times out. Default value is 60 minutes. @@ -11836,7 +12596,7 @@ type RemoteAccessSession struct { ClientId *string `locationName:"clientId" type:"string"` // The date and time the remote access session was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The device (phone or tablet) used in the remote access session. Device *Device `locationName:"device" type:"structure"` @@ -11918,7 +12678,7 @@ type RemoteAccessSession struct { SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` // The date and time the remote access session was started. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The status of the remote access session. Can be any of the following: // @@ -11942,7 +12702,7 @@ type RemoteAccessSession struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The date and time the remote access session was stopped. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` } // String returns the string representation @@ -12279,7 +13039,7 @@ type Run struct { Counters *Counters `locationName:"counters" type:"structure"` // When the run was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Output CustomerArtifactPaths object for the test run. CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` @@ -12366,7 +13126,7 @@ type Run struct { SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` // The run's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The run's status. // @@ -12392,7 +13152,7 @@ type Run struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The run's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The total number of jobs for the run. TotalJobs *int64 `locationName:"totalJobs" type:"integer"` @@ -12735,6 +13495,9 @@ type ScheduleRunConfiguration struct { // Information about the radio states for the run. Radios *Radios `locationName:"radios" type:"structure"` + + // An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations. + VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` } // String returns the string representation @@ -12816,6 +13579,12 @@ func (s *ScheduleRunConfiguration) SetRadios(v *Radios) *ScheduleRunConfiguratio return s } +// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. +func (s *ScheduleRunConfiguration) SetVpceConfigurationArns(v []*string) *ScheduleRunConfiguration { + s.VpceConfigurationArns = v + return s +} + // Represents a request to the schedule run operation. type ScheduleRunInput struct { _ struct{} `type:"structure"` @@ -13282,7 +14051,7 @@ type Suite struct { Counters *Counters `locationName:"counters" type:"structure"` // When the suite was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Represents the total (metered or unmetered) minutes used by the test suite. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` @@ -13313,7 +14082,7 @@ type Suite struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The suite's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The suite's status. // @@ -13339,7 +14108,7 @@ type Suite struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The suite's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The suite's type. // @@ -13464,7 +14233,7 @@ type Test struct { Counters *Counters `locationName:"counters" type:"structure"` // When the test was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Represents the total (metered or unmetered) minutes used by the test. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` @@ -13495,7 +14264,7 @@ type Test struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The test's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The test's status. // @@ -13521,7 +14290,7 @@ type Test struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The test's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The test's type. // @@ -14251,6 +15020,110 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to update. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The DNS (domain) name used to connect to your private service in your Amazon + // VPC. The DNS name must not already be in use on the Internet. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateVPCEConfigurationInput) SetArn(v string) *UpdateVPCEConfigurationInput { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *UpdateVPCEConfigurationInput) SetServiceDnsName(v string) *UpdateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationName(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceServiceName(v string) *UpdateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type UpdateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *UpdateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *UpdateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // An app or a set of one or more tests to upload or that have been uploaded. type Upload struct { _ struct{} `type:"structure"` @@ -14262,7 +15135,7 @@ type Upload struct { ContentType *string `locationName:"contentType" type:"string"` // When the upload was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // A message about the upload's result. Message *string `locationName:"message" type:"string"` @@ -14397,6 +15270,69 @@ func (s *Upload) SetUrl(v string) *Upload { return s } +// Represents an Amazon Virtual Private Cloud (VPC) endpoint configuration. +type VPCEConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The DNS name that maps to the private IP address of the service you want + // to access. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s VPCEConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCEConfiguration) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VPCEConfiguration) SetArn(v string) *VPCEConfiguration { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *VPCEConfiguration) SetServiceDnsName(v string) *VPCEConfiguration { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *VPCEConfiguration) SetVpceConfigurationDescription(v string) *VPCEConfiguration { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *VPCEConfiguration) SetVpceConfigurationName(v string) *VPCEConfiguration { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *VPCEConfiguration) SetVpceServiceName(v string) *VPCEConfiguration { + s.VpceServiceName = &v + return s +} + const ( // ArtifactCategoryScreenshot is a ArtifactCategory enum value ArtifactCategoryScreenshot = "SCREENSHOT" @@ -14531,6 +15467,9 @@ const ( // DeviceAttributeInstanceLabels is a DeviceAttribute enum value DeviceAttributeInstanceLabels = "INSTANCE_LABELS" + + // DeviceAttributeFleetType is a DeviceAttribute enum value + DeviceAttributeFleetType = "FLEET_TYPE" ) const ( @@ -14583,6 +15522,9 @@ const ( const ( // ExecutionResultCodeParsingFailed is a ExecutionResultCode enum value ExecutionResultCodeParsingFailed = "PARSING_FAILED" + + // ExecutionResultCodeVpcEndpointSetupFailed is a ExecutionResultCode enum value + ExecutionResultCodeVpcEndpointSetupFailed = "VPC_ENDPOINT_SETUP_FAILED" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go index bcb0d4601..2d9e5abdf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go @@ -16,6 +16,13 @@ const ( // An entity with the same name already exists. ErrCodeIdempotencyException = "IdempotencyException" + // ErrCodeInvalidOperationException for service response error code + // "InvalidOperationException". + // + // There was an error with the update request, or you do not have sufficient + // permissions to update this VPC endpoint configuration. + ErrCodeInvalidOperationException = "InvalidOperationException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go index 76cf7ca61..0f2354a4e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "devicefarm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "devicefarm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Device Farm" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DeviceFarm client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index 6ad8c8e30..ca88ba0f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -75,11 +75,11 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // API operation AllocateConnectionOnInterconnect for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -165,11 +165,11 @@ func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedCon // API operation AllocateHostedConnection for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -254,11 +254,11 @@ func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePr // API operation AllocatePrivateVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -350,11 +350,11 @@ func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePub // API operation AllocatePublicVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -450,11 +450,11 @@ func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnec // API operation AssociateConnectionWithLag for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -540,11 +540,11 @@ func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedC // API operation AssociateHostedConnection for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -638,11 +638,11 @@ func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtual // API operation AssociateVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -726,11 +726,11 @@ func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) // API operation ConfirmConnection for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -814,11 +814,11 @@ func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPriv // API operation ConfirmPrivateVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -901,11 +901,11 @@ func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPubli // API operation ConfirmPublicVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -997,11 +997,11 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // API operation CreateBGPPeer for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1098,11 +1098,11 @@ func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (r // API operation CreateConnection for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1189,11 +1189,11 @@ func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectCon // API operation CreateDirectConnectGateway for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1275,11 +1275,11 @@ func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *Crea // API operation CreateDirectConnectGatewayAssociation for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1382,11 +1382,11 @@ func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput // API operation CreateInterconnect for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1490,11 +1490,11 @@ func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Re // API operation CreateLag for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1576,11 +1576,11 @@ func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivat // API operation CreatePrivateVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1667,11 +1667,11 @@ func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicV // API operation CreatePublicVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1753,11 +1753,11 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // API operation DeleteBGPPeer for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1842,11 +1842,11 @@ func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (r // API operation DeleteConnection for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -1928,11 +1928,11 @@ func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectCon // API operation DeleteDirectConnectGateway for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2013,11 +2013,11 @@ func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *Dele // API operation DeleteDirectConnectGatewayAssociation for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2099,11 +2099,11 @@ func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput // API operation DeleteInterconnect for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2184,11 +2184,11 @@ func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Re // API operation DeleteLag for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2268,11 +2268,11 @@ func (c *DirectConnect) DeleteVirtualInterfaceRequest(input *DeleteVirtualInterf // API operation DeleteVirtualInterface for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2363,11 +2363,11 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // API operation DescribeConnectionLoa for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2449,11 +2449,11 @@ func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInp // API operation DescribeConnections for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2540,11 +2540,11 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // API operation DescribeConnectionsOnInterconnect for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2630,11 +2630,11 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *D // API operation DescribeDirectConnectGatewayAssociations for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2720,11 +2720,11 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *De // API operation DescribeDirectConnectGatewayAttachments for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2808,11 +2808,11 @@ func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDire // API operation DescribeDirectConnectGateways for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2895,11 +2895,11 @@ func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedCo // API operation DescribeHostedConnections for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -2990,11 +2990,11 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // API operation DescribeInterconnectLoa for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3076,11 +3076,11 @@ func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnect // API operation DescribeInterconnects for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3162,11 +3162,11 @@ func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *requ // API operation DescribeLags for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3253,11 +3253,11 @@ func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *reques // API operation DescribeLoa for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3339,11 +3339,11 @@ func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) // API operation DescribeLocations for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3423,11 +3423,11 @@ func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *requ // API operation DescribeTags for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3513,11 +3513,11 @@ func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGat // API operation DescribeVirtualGateways for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3604,11 +3604,11 @@ func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualI // API operation DescribeVirtualInterfaces for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3698,11 +3698,11 @@ func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *Disassociate // API operation DisassociateConnectionFromLag for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3794,11 +3794,11 @@ func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *reques // You have reached the limit on the number of tags that can be assigned to // a Direct Connect resource. // -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3878,11 +3878,11 @@ func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *re // API operation UntagResource for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -3976,11 +3976,11 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // API operation UpdateLag for usage and error information. // // Returned Error Codes: -// * ErrCodeServerException "ServerException" +// * ErrCodeServerException "DirectConnectServerException" // A server-side error occurred during the API call. The error message will // contain additional details about the cause. // -// * ErrCodeClientException "ClientException" +// * ErrCodeClientException "DirectConnectClientException" // The API was called with invalid parameters. The error message will contain // additional details about the cause. // @@ -5052,7 +5052,7 @@ type Connection struct { LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeLoa for this connection. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` // Where the connection is located. // @@ -7677,7 +7677,7 @@ type Interconnect struct { LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeInterconnectLoa for this Interconnect. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` // Where the connection is located. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go index cbf9bf2f5..454cfe5ae 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go @@ -5,11 +5,11 @@ package directconnect const ( // ErrCodeClientException for service response error code - // "ClientException". + // "DirectConnectClientException". // // The API was called with invalid parameters. The error message will contain // additional details about the cause. - ErrCodeClientException = "ClientException" + ErrCodeClientException = "DirectConnectClientException" // ErrCodeDuplicateTagKeysException for service response error code // "DuplicateTagKeysException". @@ -18,11 +18,11 @@ const ( ErrCodeDuplicateTagKeysException = "DuplicateTagKeysException" // ErrCodeServerException for service response error code - // "ServerException". + // "DirectConnectServerException". // // A server-side error occurred during the API call. The error message will // contain additional details about the cause. - ErrCodeServerException = "ServerException" + ErrCodeServerException = "DirectConnectServerException" // ErrCodeTooManyTagsException for service response error code // "TooManyTagsException". diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go index 1798ae11a..bb182821c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "directconnect" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "directconnect" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Direct Connect" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DirectConnect client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index fc3674146..77c69861b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -3239,6 +3239,105 @@ func (c *DirectoryService) RemoveTagsFromResourceWithContext(ctx aws.Context, in return out, req.Send() } +const opResetUserPassword = "ResetUserPassword" + +// ResetUserPasswordRequest generates a "aws/request.Request" representing the +// client's request for the ResetUserPassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ResetUserPassword for more information on using the ResetUserPassword +// 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 ResetUserPasswordRequest method. +// req, resp := client.ResetUserPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ResetUserPassword +func (c *DirectoryService) ResetUserPasswordRequest(input *ResetUserPasswordInput) (req *request.Request, output *ResetUserPasswordOutput) { + op := &request.Operation{ + Name: opResetUserPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetUserPasswordInput{} + } + + output = &ResetUserPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetUserPassword API operation for AWS Directory Service. +// +// Resets the password for any user in your AWS Managed Microsoft AD or Simple +// AD directory. +// +// 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 Directory Service's +// API operation ResetUserPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" +// The specified directory is unavailable or could not be found. +// +// * ErrCodeUserDoesNotExistException "UserDoesNotExistException" +// The user provided a username that does not exist in your directory. +// +// * ErrCodeInvalidPasswordException "InvalidPasswordException" +// The new password provided by the user does not meet the password complexity +// requirements defined in your directory. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ResetUserPassword +func (c *DirectoryService) ResetUserPassword(input *ResetUserPasswordInput) (*ResetUserPasswordOutput, error) { + req, out := c.ResetUserPasswordRequest(input) + return out, req.Send() +} + +// ResetUserPasswordWithContext is the same as ResetUserPassword with the addition of +// the ability to pass a context and additional request options. +// +// See ResetUserPassword 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 *DirectoryService) ResetUserPasswordWithContext(ctx aws.Context, input *ResetUserPasswordInput, opts ...request.Option) (*ResetUserPasswordOutput, error) { + req, out := c.ResetUserPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRestoreFromSnapshot = "RestoreFromSnapshot" // RestoreFromSnapshotRequest generates a "aws/request.Request" representing the @@ -6172,7 +6271,7 @@ type DirectoryDescription struct { Edition *string `type:"string" enum:"DirectoryEdition"` // Specifies when the directory was created. - LaunchTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LaunchTime *time.Time `type:"timestamp"` // The fully-qualified name of the directory. Name *string `type:"string"` @@ -6198,7 +6297,7 @@ type DirectoryDescription struct { Stage *string `type:"string" enum:"DirectoryStage"` // The date and time that the stage was last updated. - StageLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StageLastUpdatedDateTime *time.Time `type:"timestamp"` // Additional information about the directory stage. StageReason *string `type:"string"` @@ -6703,13 +6802,13 @@ type DomainController struct { DomainControllerId *string `type:"string"` // Specifies when the domain controller was created. - LaunchTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LaunchTime *time.Time `type:"timestamp"` // The status of the domain controller. Status *string `type:"string" enum:"DomainControllerStatus"` // The date and time that the status was last updated. - StatusLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StatusLastUpdatedDateTime *time.Time `type:"timestamp"` // A description of the domain controller state. StatusReason *string `type:"string"` @@ -6957,7 +7056,7 @@ type EventTopic struct { _ struct{} `type:"structure"` // The date and time of when you associated your directory with the SNS topic. - CreatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDateTime *time.Time `type:"timestamp"` // The Directory ID of an AWS Directory Service directory that will publish // status messages to an SNS topic. @@ -7158,7 +7257,7 @@ type IpRouteInfo struct { _ struct{} `type:"structure"` // The date and time the address block was added to the directory. - AddedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + AddedDateTime *time.Time `type:"timestamp"` // IP address block in the IpRoute. CidrIp *string `type:"string"` @@ -7812,6 +7911,93 @@ func (s RemoveTagsFromResourceOutput) GoString() string { return s.String() } +type ResetUserPasswordInput struct { + _ struct{} `type:"structure"` + + // Identifier of the AWS Managed Microsoft AD or Simple AD directory in which + // the user resides. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The new password that will be reset. + // + // NewPassword is a required field + NewPassword *string `min:"1" type:"string" required:"true"` + + // The username of the user whose password will be reset. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ResetUserPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetUserPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetUserPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetUserPasswordInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.NewPassword == nil { + invalidParams.Add(request.NewErrParamRequired("NewPassword")) + } + if s.NewPassword != nil && len(*s.NewPassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewPassword", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ResetUserPasswordInput) SetDirectoryId(v string) *ResetUserPasswordInput { + s.DirectoryId = &v + return s +} + +// SetNewPassword sets the NewPassword field's value. +func (s *ResetUserPasswordInput) SetNewPassword(v string) *ResetUserPasswordInput { + s.NewPassword = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *ResetUserPasswordInput) SetUserName(v string) *ResetUserPasswordInput { + s.UserName = &v + return s +} + +type ResetUserPasswordOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ResetUserPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetUserPasswordOutput) GoString() string { + return s.String() +} + // An object representing the inputs for the RestoreFromSnapshot operation. type RestoreFromSnapshotInput struct { _ struct{} `type:"structure"` @@ -7877,7 +8063,7 @@ type SchemaExtensionInfo struct { DirectoryId *string `type:"string"` // The date and time that the schema extension was completed. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The identifier of the schema extension. SchemaExtensionId *string `type:"string"` @@ -7890,7 +8076,7 @@ type SchemaExtensionInfo struct { // The date and time that the schema extension started being applied to the // directory. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -7959,7 +8145,7 @@ type Snapshot struct { SnapshotId *string `type:"string"` // The date and time that the snapshot was taken. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The snapshot status. Status *string `type:"string" enum:"SnapshotStatus"` @@ -8232,20 +8418,20 @@ type Trust struct { _ struct{} `type:"structure"` // The date and time that the trust relationship was created. - CreatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDateTime *time.Time `type:"timestamp"` // The Directory ID of the AWS directory involved in the trust relationship. DirectoryId *string `type:"string"` // The date and time that the trust relationship was last updated. - LastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedDateTime *time.Time `type:"timestamp"` // The Fully Qualified Domain Name (FQDN) of the external domain involved in // the trust relationship. RemoteDomainName *string `type:"string"` // The date and time that the TrustState was last updated. - StateLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StateLastUpdatedDateTime *time.Time `type:"timestamp"` // The trust relationship direction. TrustDirection *string `type:"string" enum:"TrustDirection"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go index f7560305b..85d831364 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go @@ -67,6 +67,13 @@ const ( // One or more parameters are not valid. ErrCodeInvalidParameterException = "InvalidParameterException" + // ErrCodeInvalidPasswordException for service response error code + // "InvalidPasswordException". + // + // The new password provided by the user does not meet the password complexity + // requirements defined in your directory. + ErrCodeInvalidPasswordException = "InvalidPasswordException" + // ErrCodeIpRouteLimitExceededException for service response error code // "IpRouteLimitExceededException". // @@ -99,4 +106,10 @@ const ( // // The operation is not supported. ErrCodeUnsupportedOperationException = "UnsupportedOperationException" + + // ErrCodeUserDoesNotExistException for service response error code + // "UserDoesNotExistException". + // + // The user provided a username that does not exist in your directory. + ErrCodeUserDoesNotExistException = "UserDoesNotExistException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go index 59299ae5d..0743c9632 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ds" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "ds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Directory Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DirectoryService client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index fb9dc1492..d3fa4f9a7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -472,8 +472,7 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R // table. The backups is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -558,16 +557,35 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // relationship between two or more DynamoDB tables with the same table name // in the provided regions. // -// Tables can only be added as the replicas of a global table group under the -// following conditions: +// If you want to add a new replica table to a global table, each of the following +// conditions must be true: // -// * The tables must have the same name. +// * The table must have the same primary key as all of the other replicas. // -// * The tables must contain no items. +// * The table must have the same name as all of the other replicas. // -// * The tables must have the same hash key and sort key (if present). +// * The table must have DynamoDB Streams enabled, with the stream containing +// both the new and the old images of the item. // -// * The tables must have DynamoDB Streams enabled (NEW_AND_OLD_IMAGES). +// * None of the replica tables in the global table can contain any data. +// +// If global secondary indexes are specified, then the following conditions +// must also be met: +// +// * The global secondary indexes must have the same name. +// +// * The global secondary indexes must have the same hash key and sort key +// (if present). +// +// Write capacity settings should be set consistently across your replica tables +// and secondary indexes. DynamoDB strongly recommends enabling auto scaling +// to manage the write capacity settings for all of your global tables replicas +// and indexes. +// +// If you prefer to manage write capacity settings manually, you should provision +// equal replicated write capacity units to your replica tables. You should +// also provision equal replicated write capacity units to matching secondary +// indexes across your global table. // // 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 @@ -578,8 +596,7 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // // Returned Error Codes: // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -697,8 +714,7 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req // in the CREATING state. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -799,8 +815,7 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R // table. The backups is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -1029,8 +1044,7 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req // might not be specified correctly, or its status might not be ACTIVE. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -1204,8 +1218,7 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. -// You can restore your table to any point in time during the last 35 days with -// a 1-minute granularity. +// You can restore your table to any point in time during the last 35 days. // // You can call DescribeContinuousBackups at a maximum rate of 10 times per // second. @@ -1329,6 +1342,88 @@ func (c *DynamoDB) DescribeGlobalTableWithContext(ctx aws.Context, input *Descri return out, req.Send() } +const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings" + +// DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGlobalTableSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeGlobalTableSettings for more information on using the DescribeGlobalTableSettings +// 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 DescribeGlobalTableSettingsRequest method. +// req, resp := client.DescribeGlobalTableSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings +func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTableSettingsInput) (req *request.Request, output *DescribeGlobalTableSettingsOutput) { + op := &request.Operation{ + Name: opDescribeGlobalTableSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGlobalTableSettingsInput{} + } + + output = &DescribeGlobalTableSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGlobalTableSettings API operation for Amazon DynamoDB. +// +// Describes region specific settings for a global table. +// +// 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 DynamoDB's +// API operation DescribeGlobalTableSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" +// The specified global table does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings +func (c *DynamoDB) DescribeGlobalTableSettings(input *DescribeGlobalTableSettingsInput) (*DescribeGlobalTableSettingsOutput, error) { + req, out := c.DescribeGlobalTableSettingsRequest(input) + return out, req.Send() +} + +// DescribeGlobalTableSettingsWithContext is the same as DescribeGlobalTableSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGlobalTableSettings 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 *DynamoDB) DescribeGlobalTableSettingsWithContext(ctx aws.Context, input *DescribeGlobalTableSettingsInput, opts ...request.Option) (*DescribeGlobalTableSettingsOutput, error) { + req, out := c.DescribeGlobalTableSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the @@ -2546,8 +2641,7 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn // table. The backups is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -2630,9 +2724,26 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn // // Restores the specified table to the specified point in time within EarliestRestorableDateTime // and LatestRestorableDateTime. You can restore your table to any point in -// time during the last 35 days with a 1-minute granularity. Any number of users -// can execute up to 4 concurrent restores (any type of restore) in a given -// account. +// time during the last 35 days. Any number of users can execute up to 4 concurrent +// restores (any type of restore) in a given account. +// +// When you restore using point in time recovery, DynamoDB restores your table +// data to the state based on the selected date and time (day:hour:minute:second) +// to a new table. +// +// Along with data, the following are also included on the new restored table +// using point in time recovery: +// +// * Global secondary indexes (GSIs) +// +// * Local secondary indexes (LSIs) +// +// * Provisioned read and write capacity +// +// * Encryption settings +// +// All these settings come from the current settings of the source table at +// the time of restore. // // You must manually set up the following on the restored table: // @@ -2669,8 +2780,7 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn // A target table with the specified name is either being created or deleted. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -2951,8 +3061,7 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req // // Returned Error Codes: // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -3059,8 +3168,7 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request // // Returned Error Codes: // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -3160,8 +3268,7 @@ func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackups // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. -// You can restore your table to any point in time during the last 35 days with -// a 1-minute granularity. +// You can restore your table to any point in time during the last 35 days.. // // 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 @@ -3250,12 +3357,24 @@ func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req // Adds or removes replicas in the specified global table. The global table // must already exist to be able to use this operation. Any replica to be added // must be empty, must have the same name as the global table, must have the -// same key schema, and must have DynamoDB Streams enabled. +// same key schema, and must have DynamoDB Streams enabled and must have same +// provisioned and maximum write capacity units. // // Although you can use UpdateGlobalTable to add replicas and remove replicas // in a single request, for simplicity we recommend that you issue separate // requests for adding or removing replicas. // +// If global secondary indexes are specified, then the following conditions +// must also be met: +// +// * The global secondary indexes must have the same name. +// +// * The global secondary indexes must have the same hash key and sort key +// (if present). +// +// * The global secondary indexes must have the same provisioned and maximum +// write capacity units. +// // 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. @@ -3302,6 +3421,112 @@ func (c *DynamoDB) UpdateGlobalTableWithContext(ctx aws.Context, input *UpdateGl return out, req.Send() } +const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings" + +// UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGlobalTableSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateGlobalTableSettings for more information on using the UpdateGlobalTableSettings +// 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 UpdateGlobalTableSettingsRequest method. +// req, resp := client.UpdateGlobalTableSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings +func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSettingsInput) (req *request.Request, output *UpdateGlobalTableSettingsOutput) { + op := &request.Operation{ + Name: opUpdateGlobalTableSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGlobalTableSettingsInput{} + } + + output = &UpdateGlobalTableSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGlobalTableSettings API operation for Amazon DynamoDB. +// +// Updates settings for a global table. +// +// 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 DynamoDB's +// API operation UpdateGlobalTableSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" +// The specified global table does not exist. +// +// * ErrCodeReplicaNotFoundException "ReplicaNotFoundException" +// The specified replica is no longer part of the global table. +// +// * ErrCodeIndexNotFoundException "IndexNotFoundException" +// The operation tried to access a nonexistent index. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// There is no limit to the number of daily on-demand backups that can be taken. +// +// Up to 10 simultaneous table operations are allowed per account. These operations +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. +// +// For tables with secondary indexes, only one of those tables can be in the +// CREATING state at any point in time. Do not attempt to create more than one +// such table simultaneously. +// +// The total limit of tables in the ACTIVE state is 250. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to recreate an existing table, or tried to delete a table currently +// in the CREATING state. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings +func (c *DynamoDB) UpdateGlobalTableSettings(input *UpdateGlobalTableSettingsInput) (*UpdateGlobalTableSettingsOutput, error) { + req, out := c.UpdateGlobalTableSettingsRequest(input) + return out, req.Send() +} + +// UpdateGlobalTableSettingsWithContext is the same as UpdateGlobalTableSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGlobalTableSettings 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 *DynamoDB) UpdateGlobalTableSettingsWithContext(ctx aws.Context, input *UpdateGlobalTableSettingsInput, opts ...request.Option) (*UpdateGlobalTableSettingsOutput, error) { + req, out := c.UpdateGlobalTableSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the @@ -3488,8 +3713,7 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req // might not be specified correctly, or its status might not be ACTIVE. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -3617,8 +3841,7 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r // might not be specified correctly, or its status might not be ACTIVE. // // * ErrCodeLimitExceededException "LimitExceededException" -// Up to 50 CreateBackup operations are allowed per second, per account. There -// is no limit to the number of daily on-demand backups that can be taken. +// There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, @@ -4023,7 +4246,7 @@ type BackupDetails struct { // Time at which the backup was created. This is the request time of the backup. // // BackupCreationDateTime is a required field - BackupCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + BackupCreationDateTime *time.Time `type:"timestamp" required:"true"` // Name of the requested backup. // @@ -4087,7 +4310,7 @@ type BackupSummary struct { BackupArn *string `min:"37" type:"string"` // Time at which the backup was created. - BackupCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + BackupCreationDateTime *time.Time `type:"timestamp"` // Name of the specified backup. BackupName *string `min:"3" type:"string"` @@ -6081,7 +6304,8 @@ func (s *DescribeContinuousBackupsInput) SetTableName(v string) *DescribeContinu type DescribeContinuousBackupsOutput struct { _ struct{} `type:"structure"` - // ContinuousBackupsDescription can be one of the following : ENABLED, DISABLED. + // Represents the continuous backups and point in time recovery settings on + // the table. ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"` } @@ -6165,6 +6389,79 @@ func (s *DescribeGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDesc return s } +type DescribeGlobalTableSettingsInput struct { + _ struct{} `type:"structure"` + + // The name of the global table to describe. + // + // GlobalTableName is a required field + GlobalTableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeGlobalTableSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalTableSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGlobalTableSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableSettingsInput"} + if s.GlobalTableName == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) + } + if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *DescribeGlobalTableSettingsInput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsInput { + s.GlobalTableName = &v + return s +} + +type DescribeGlobalTableSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the global table. + GlobalTableName *string `min:"3" type:"string"` + + // The region specific settings for the global table. + ReplicaSettings []*ReplicaSettingsDescription `type:"list"` +} + +// String returns the string representation +func (s DescribeGlobalTableSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalTableSettingsOutput) GoString() string { + return s.String() +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *DescribeGlobalTableSettingsOutput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsOutput { + s.GlobalTableName = &v + return s +} + +// SetReplicaSettings sets the ReplicaSettings field's value. +func (s *DescribeGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *DescribeGlobalTableSettingsOutput { + s.ReplicaSettings = v + return s +} + // Represents the input of a DescribeLimits operation. Has no content. type DescribeLimitsInput struct { _ struct{} `type:"structure"` @@ -7185,7 +7482,7 @@ type GlobalTableDescription struct { _ struct{} `type:"structure"` // The creation time of the global table. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The unique identifier of the global table. GlobalTableArn *string `type:"string"` @@ -7248,6 +7545,63 @@ func (s *GlobalTableDescription) SetReplicationGroup(v []*ReplicaDescription) *G return s } +// Represents the settings of a global secondary index for a global table that +// will be modified. +type GlobalTableGlobalSecondaryIndexSettingsUpdate struct { + _ struct{} `type:"structure"` + + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. + // + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GlobalTableGlobalSecondaryIndexSettingsUpdate"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.ProvisionedWriteCapacityUnits != nil && *s.ProvisionedWriteCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProvisionedWriteCapacityUnits", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIndexName sets the IndexName field's value. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *GlobalTableGlobalSecondaryIndexSettingsUpdate { + s.IndexName = &v + return s +} + +// SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityUnits(v int64) *GlobalTableGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedWriteCapacityUnits = &v + return s +} + // Information about item collections, if any, that were affected by the operation. // ItemCollectionMetrics is only returned if the request asked for it. If the // table does not have any local secondary indexes, this information is not @@ -7509,7 +7863,10 @@ func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes type ListBackupsInput struct { _ struct{} `type:"structure"` - // LastEvaluatedBackupARN returned by the previous ListBackups call. + // LastEvaluatedBackupArn is the ARN of the backup last evaluated when the current + // page of results was returned, inclusive of the current page of results. This + // value may be specified as the ExclusiveStartBackupArn of a new ListBackups + // operation in order to fetch the next page of results. ExclusiveStartBackupArn *string `min:"37" type:"string"` // Maximum number of backups to return at once. @@ -7519,11 +7876,11 @@ type ListBackupsInput struct { TableName *string `min:"3" type:"string"` // Only backups created after this time are listed. TimeRangeLowerBound is inclusive. - TimeRangeLowerBound *time.Time `type:"timestamp" timestampFormat:"unix"` + TimeRangeLowerBound *time.Time `type:"timestamp"` // Only backups created before this time are listed. TimeRangeUpperBound is // exclusive. - TimeRangeUpperBound *time.Time `type:"timestamp" timestampFormat:"unix"` + TimeRangeUpperBound *time.Time `type:"timestamp"` } // String returns the string representation @@ -7591,7 +7948,17 @@ type ListBackupsOutput struct { // List of BackupSummary objects. BackupSummaries []*BackupSummary `type:"list"` - // Last evaluated BackupARN. + // The ARN of the backup last evaluated when the current page of results was + // returned, inclusive of the current page of results. This value may be specified + // as the ExclusiveStartBackupArn of a new ListBackups operation in order to + // fetch the next page of results. + // + // If LastEvaluatedBackupArn is empty, then the last page of results has been + // processed and there are no more results to be retrieved. + // + // If LastEvaluatedBackupArn is not empty, this may or may not indicate there + // is more data to be returned. All results are guaranteed to have been returned + // if and only if no value for LastEvaluatedBackupArn is returned. LastEvaluatedBackupArn *string `min:"37" type:"string"` } @@ -8144,14 +8511,12 @@ func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIn type PointInTimeRecoveryDescription struct { _ struct{} `type:"structure"` - // Specifies the earliest point in time you can restore your table to. It is - // equal to the maximum of point in time recovery enabled time and CurrentTime - // - PointInTimeRecoveryPeriod. - EarliestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Specifies the earliest point in time you can restore your table to. It You + // can restore your table to any point in time during the last 35 days. + EarliestRestorableDateTime *time.Time `type:"timestamp"` - // LatestRestorableDateTime is 5 minutes from now and there is a +/- 1 minute - // fuzziness on the restore times. - LatestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // LatestRestorableDateTime is typically 5 minutes before the current time. + LatestRestorableDateTime *time.Time `type:"timestamp"` // The current state of point in time recovery: // @@ -8367,10 +8732,10 @@ type ProvisionedThroughputDescription struct { _ struct{} `type:"structure"` // The date and time of the last provisioned throughput decrease for this table. - LastDecreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastDecreaseDateTime *time.Time `type:"timestamp"` // The date and time of the last provisioned throughput increase for this table. - LastIncreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastIncreaseDateTime *time.Time `type:"timestamp"` // The number of provisioned throughput decreases for this table during this // UTC calendar day. For current maximums on provisioned throughput decreases, @@ -9359,6 +9724,280 @@ func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription { return s } +// Represents the properties of a global secondary index. +type ReplicaGlobalSecondaryIndexSettingsDescription struct { + _ struct{} `type:"structure"` + + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. + // + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The current status of the global secondary index: + // + // * CREATING - The global secondary index is being created. + // + // * UPDATING - The global secondary index is being updated. + // + // * DELETING - The global secondary index is being deleted. + // + // * ACTIVE - The global secondary index is ready for use. + IndexStatus *string `type:"string" enum:"IndexStatus"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. + ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string { + return s.String() +} + +// SetIndexName sets the IndexName field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.IndexName = &v + return s +} + +// SetIndexStatus sets the IndexStatus field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.IndexStatus = &v + return s +} + +// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedReadCapacityUnits = &v + return s +} + +// SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedWriteCapacityUnits = &v + return s +} + +// Represents the settings of a global secondary index for a global table that +// will be modified. +type ReplicaGlobalSecondaryIndexSettingsUpdate struct { + _ struct{} `type:"structure"` + + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. + // + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. + ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexSettingsUpdate"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.ProvisionedReadCapacityUnits != nil && *s.ProvisionedReadCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProvisionedReadCapacityUnits", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIndexName sets the IndexName field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsUpdate { + s.IndexName = &v + return s +} + +// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedReadCapacityUnits = &v + return s +} + +// Represents the properties of a replica. +type ReplicaSettingsDescription struct { + _ struct{} `type:"structure"` + + // The region name of the replica. + // + // RegionName is a required field + RegionName *string `type:"string" required:"true"` + + // Replica global secondary index settings for the global table. + ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. For more information, see Specifying + // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. For more information, see Specifying Read and Write + // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` + + // The current state of the region: + // + // * CREATING - The region is being created. + // + // * UPDATING - The region is being updated. + // + // * DELETING - The region is being deleted. + // + // * ACTIVE - The region is ready for use. + ReplicaStatus *string `type:"string" enum:"ReplicaStatus"` +} + +// String returns the string representation +func (s ReplicaSettingsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaSettingsDescription) GoString() string { + return s.String() +} + +// SetRegionName sets the RegionName field's value. +func (s *ReplicaSettingsDescription) SetRegionName(v string) *ReplicaSettingsDescription { + s.RegionName = &v + return s +} + +// SetReplicaGlobalSecondaryIndexSettings sets the ReplicaGlobalSecondaryIndexSettings field's value. +func (s *ReplicaSettingsDescription) SetReplicaGlobalSecondaryIndexSettings(v []*ReplicaGlobalSecondaryIndexSettingsDescription) *ReplicaSettingsDescription { + s.ReplicaGlobalSecondaryIndexSettings = v + return s +} + +// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription { + s.ReplicaProvisionedReadCapacityUnits = &v + return s +} + +// SetReplicaProvisionedWriteCapacityUnits sets the ReplicaProvisionedWriteCapacityUnits field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityUnits(v int64) *ReplicaSettingsDescription { + s.ReplicaProvisionedWriteCapacityUnits = &v + return s +} + +// SetReplicaStatus sets the ReplicaStatus field's value. +func (s *ReplicaSettingsDescription) SetReplicaStatus(v string) *ReplicaSettingsDescription { + s.ReplicaStatus = &v + return s +} + +// Represents the settings for a global table in a region that will be modified. +type ReplicaSettingsUpdate struct { + _ struct{} `type:"structure"` + + // The region of the replica to be added. + // + // RegionName is a required field + RegionName *string `type:"string" required:"true"` + + // Represents the settings of a global secondary index for a global table that + // will be modified. + ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. For more information, see Specifying + // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicaSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicaSettingsUpdate"} + if s.RegionName == nil { + invalidParams.Add(request.NewErrParamRequired("RegionName")) + } + if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil && len(s.ReplicaGlobalSecondaryIndexSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReplicaGlobalSecondaryIndexSettingsUpdate", 1)) + } + if s.ReplicaProvisionedReadCapacityUnits != nil && *s.ReplicaProvisionedReadCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ReplicaProvisionedReadCapacityUnits", 1)) + } + if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil { + for i, v := range s.ReplicaGlobalSecondaryIndexSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegionName sets the RegionName field's value. +func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate { + s.RegionName = &v + return s +} + +// SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value. +func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate { + s.ReplicaGlobalSecondaryIndexSettingsUpdate = v + return s +} + +// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. +func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate { + s.ReplicaProvisionedReadCapacityUnits = &v + return s +} + // Represents one of the following: // // * A new replica to be added to an existing global table. @@ -9425,7 +10064,7 @@ type RestoreSummary struct { // Point in time or source backup time. // // RestoreDateTime is a required field - RestoreDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + RestoreDateTime *time.Time `type:"timestamp" required:"true"` // Indicates if a restore is in progress or not. // @@ -9558,7 +10197,7 @@ type RestoreTableToPointInTimeInput struct { _ struct{} `type:"structure"` // Time in the past to restore the table to. - RestoreDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RestoreDateTime *time.Time `type:"timestamp"` // Name of the source table that is being restored. // @@ -9658,6 +10297,16 @@ func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescriptio type SSEDescription struct { _ struct{} `type:"structure"` + // The KMS master key ARN used for the KMS encryption. + KMSMasterKeyArn *string `type:"string"` + + // Server-side encryption type: + // + // * AES256 - Server-side encryption which uses the AES256 algorithm. + // + // * KMS - Server-side encryption which uses AWS Key Management Service. + SSEType *string `type:"string" enum:"SSEType"` + // The current state of server-side encryption: // // * ENABLING - Server-side encryption is being enabled. @@ -9680,6 +10329,18 @@ func (s SSEDescription) GoString() string { return s.String() } +// SetKMSMasterKeyArn sets the KMSMasterKeyArn field's value. +func (s *SSEDescription) SetKMSMasterKeyArn(v string) *SSEDescription { + s.KMSMasterKeyArn = &v + return s +} + +// SetSSEType sets the SSEType field's value. +func (s *SSEDescription) SetSSEType(v string) *SSEDescription { + s.SSEType = &v + return s +} + // SetStatus sets the Status field's value. func (s *SSEDescription) SetStatus(v string) *SSEDescription { s.Status = &v @@ -10226,7 +10887,7 @@ type SourceTableDetails struct { // Time when the source table was created. // // TableCreationDateTime is a required field - TableCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + TableCreationDateTime *time.Time `type:"timestamp" required:"true"` // Unique identifier for the table for which the backup was created. // @@ -10430,7 +11091,7 @@ type TableDescription struct { // The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/) // format. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The global secondary indexes, if any, on the table. Each index is scoped // to a given partition key value. Each element is composed of: @@ -11282,6 +11943,137 @@ func (s *UpdateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescri return s } +type UpdateGlobalTableSettingsInput struct { + _ struct{} `type:"structure"` + + // Represents the settings of a global secondary index for a global table that + // will be modified. + GlobalTableGlobalSecondaryIndexSettingsUpdate []*GlobalTableGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` + + // The name of the global table + // + // GlobalTableName is a required field + GlobalTableName *string `min:"3" type:"string" required:"true"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + GlobalTableProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` + + // Represents the settings for a global table in a region that will be modified. + ReplicaSettingsUpdate []*ReplicaSettingsUpdate `min:"1" type:"list"` +} + +// String returns the string representation +func (s UpdateGlobalTableSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalTableSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGlobalTableSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableSettingsInput"} + if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil && len(s.GlobalTableGlobalSecondaryIndexSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableGlobalSecondaryIndexSettingsUpdate", 1)) + } + if s.GlobalTableName == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) + } + if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) + } + if s.GlobalTableProvisionedWriteCapacityUnits != nil && *s.GlobalTableProvisionedWriteCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("GlobalTableProvisionedWriteCapacityUnits", 1)) + } + if s.ReplicaSettingsUpdate != nil && len(s.ReplicaSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReplicaSettingsUpdate", 1)) + } + if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil { + for i, v := range s.GlobalTableGlobalSecondaryIndexSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalTableGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ReplicaSettingsUpdate != nil { + for i, v := range s.ReplicaSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalTableGlobalSecondaryIndexSettingsUpdate sets the GlobalTableGlobalSecondaryIndexSettingsUpdate field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableGlobalSecondaryIndexSettingsUpdate(v []*GlobalTableGlobalSecondaryIndexSettingsUpdate) *UpdateGlobalTableSettingsInput { + s.GlobalTableGlobalSecondaryIndexSettingsUpdate = v + return s +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsInput { + s.GlobalTableName = &v + return s +} + +// SetGlobalTableProvisionedWriteCapacityUnits sets the GlobalTableProvisionedWriteCapacityUnits field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityUnits(v int64) *UpdateGlobalTableSettingsInput { + s.GlobalTableProvisionedWriteCapacityUnits = &v + return s +} + +// SetReplicaSettingsUpdate sets the ReplicaSettingsUpdate field's value. +func (s *UpdateGlobalTableSettingsInput) SetReplicaSettingsUpdate(v []*ReplicaSettingsUpdate) *UpdateGlobalTableSettingsInput { + s.ReplicaSettingsUpdate = v + return s +} + +type UpdateGlobalTableSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the global table. + GlobalTableName *string `min:"3" type:"string"` + + // The region specific settings for the global table. + ReplicaSettings []*ReplicaSettingsDescription `type:"list"` +} + +// String returns the string representation +func (s UpdateGlobalTableSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalTableSettingsOutput) GoString() string { + return s.String() +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *UpdateGlobalTableSettingsOutput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsOutput { + s.GlobalTableName = &v + return s +} + +// SetReplicaSettings sets the ReplicaSettings field's value. +func (s *UpdateGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *UpdateGlobalTableSettingsOutput { + s.ReplicaSettings = v + return s +} + // Represents the input of an UpdateItem operation. type UpdateItemInput struct { _ struct{} `type:"structure"` @@ -12087,6 +12879,20 @@ const ( ProjectionTypeInclude = "INCLUDE" ) +const ( + // ReplicaStatusCreating is a ReplicaStatus enum value + ReplicaStatusCreating = "CREATING" + + // ReplicaStatusUpdating is a ReplicaStatus enum value + ReplicaStatusUpdating = "UPDATING" + + // ReplicaStatusDeleting is a ReplicaStatus enum value + ReplicaStatusDeleting = "DELETING" + + // ReplicaStatusActive is a ReplicaStatus enum value + ReplicaStatusActive = "ACTIVE" +) + // Determines the level of detail about provisioned throughput consumption that // is returned in the response: // @@ -12152,6 +12958,14 @@ const ( SSEStatusDisabled = "DISABLED" ) +const ( + // SSETypeAes256 is a SSEType enum value + SSETypeAes256 = "AES256" + + // SSETypeKms is a SSEType enum value + SSETypeKms = "KMS" +) + const ( // ScalarAttributeTypeS is a ScalarAttributeType enum value ScalarAttributeTypeS = "S" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go index 05b8470d2..4abbbe663 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go @@ -41,6 +41,12 @@ const ( // The specified global table does not exist. ErrCodeGlobalTableNotFoundException = "GlobalTableNotFoundException" + // ErrCodeIndexNotFoundException for service response error code + // "IndexNotFoundException". + // + // The operation tried to access a nonexistent index. + ErrCodeIndexNotFoundException = "IndexNotFoundException" + // ErrCodeInternalServerError for service response error code // "InternalServerError". // @@ -64,8 +70,7 @@ const ( // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // Up to 50 CreateBackup operations are allowed per second, per account. There - // is no limit to the number of daily on-demand backups that can be taken. + // There is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go index 80dcd19fd..346f52ce4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dynamodb" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "dynamodb" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "DynamoDB" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DynamoDB client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 28f434bbf..9a758173d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -373,9 +373,8 @@ func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Requ // AllocateHosts API operation for Amazon Elastic Compute Cloud. // -// Allocates a Dedicated Host to your account. At minimum you need to specify -// the instance size type, Availability Zone, and quantity of hosts you want -// to allocate. +// Allocates a Dedicated Host to your account. At a minimum, specify the instance +// size type, Availability Zone, and quantity of hosts to allocate. // // 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 @@ -1374,8 +1373,6 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // the product. For example, you can't detach a volume from a Windows instance // and attach it to a Linux instance. // -// For an overview of the AWS Marketplace, see Introducing AWS Marketplace (https://aws.amazon.com/marketplace/help/200900000). -// // For more information about EBS volumes, see Attaching Amazon EBS Volumes // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -2268,11 +2265,7 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest // CancelSpotInstanceRequests API operation for Amazon Elastic Compute Cloud. // -// Cancels one or more Spot Instance requests. Spot Instances are instances -// that Amazon EC2 starts on your behalf when the maximum price that you specify -// exceeds the current Spot price. For more information, see Spot Instance Requests -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in -// the Amazon Elastic Compute Cloud User Guide. +// Cancels one or more Spot Instance requests. // // Canceling a Spot Instance request does not terminate running Spot Instances // associated with the request. @@ -2594,7 +2587,7 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques // To copy an encrypted snapshot that has been shared from another account, // you must have permissions for the CMK used to encrypt the snapshot. // -// Snapshots created by the CopySnapshot action have an arbitrary volume ID +// Snapshots created by copying another snapshot have an arbitrary volume ID // that should not be used for any purpose. // // For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) @@ -3080,6 +3073,86 @@ func (c *EC2) CreateEgressOnlyInternetGatewayWithContext(ctx aws.Context, input return out, req.Send() } +const opCreateFleet = "CreateFleet" + +// CreateFleetRequest generates a "aws/request.Request" representing the +// client's request for the CreateFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateFleet for more information on using the CreateFleet +// 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 CreateFleetRequest method. +// req, resp := client.CreateFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet +func (c *EC2) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { + op := &request.Operation{ + Name: opCreateFleet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateFleetInput{} + } + + output = &CreateFleetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFleet API operation for Amazon Elastic Compute Cloud. +// +// Launches an EC2 Fleet. +// +// You can create a single EC2 Fleet that includes multiple launch specifications +// that vary by instance type, AMI, Availability Zone, or subnet. +// +// For more information, see Launching an EC2 Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) +// in the Amazon Elastic Compute Cloud User 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 Elastic Compute Cloud's +// API operation CreateFleet for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet +func (c *EC2) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + return out, req.Send() +} + +// CreateFleetWithContext is the same as CreateFleet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFleet 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 *EC2) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateFlowLogs = "CreateFlowLogs" // CreateFlowLogsRequest generates a "aws/request.Request" representing the @@ -3771,11 +3844,12 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques // CreateNatGateway API operation for Amazon Elastic Compute Cloud. // -// Creates a NAT gateway in the specified subnet. A NAT gateway can be used -// to enable instances in a private subnet to connect to the Internet. This -// action creates a network interface in the specified subnet with a private -// IP address from the IP address range of the subnet. For more information, -// see NAT Gateways (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) +// Creates a NAT gateway in the specified public subnet. This action creates +// a network interface in the specified subnet with a private IP address from +// the IP address range of the subnet. Internet-bound traffic from a private +// subnet can be routed to the NAT gateway, therefore enabling instances in +// the private subnet to connect to the internet. For more information, see +// NAT Gateways (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4098,8 +4172,8 @@ func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterf // CreateNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud. // -// Grants an AWS authorized partner account permission to attach the specified -// network interface to an instance in their account. +// Grants an AWS-authorized account permission to attach the specified network +// interface to an instance in their account. // // You can grant permission to a single AWS account only, and only one account // at a time. @@ -4654,7 +4728,8 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re // protected. // // You can tag your snapshots during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). +// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// in the Amazon Elastic Compute Cloud User Guide. // // For more information, see Amazon Elastic Block Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) // and Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) @@ -4735,7 +4810,7 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub // Creates a data feed for Spot Instances, enabling you to view Spot Instance // usage logs. You can create one data feed per AWS account. For more information, // see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // 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 @@ -5008,7 +5083,8 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques // in the Amazon Elastic Compute Cloud User Guide. // // You can tag your volumes during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). +// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// in the Amazon Elastic Compute Cloud User Guide. // // For more information, see Creating an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -5958,6 +6034,86 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayWithContext(ctx aws.Context, input return out, req.Send() } +const opDeleteFleets = "DeleteFleets" + +// DeleteFleetsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFleets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteFleets for more information on using the DeleteFleets +// 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 DeleteFleetsRequest method. +// req, resp := client.DeleteFleetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets +func (c *EC2) DeleteFleetsRequest(input *DeleteFleetsInput) (req *request.Request, output *DeleteFleetsOutput) { + op := &request.Operation{ + Name: opDeleteFleets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFleetsInput{} + } + + output = &DeleteFleetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFleets API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified EC2 Fleet. +// +// After you delete an EC2 Fleet, it launches no new instances. You must specify +// whether an EC2 Fleet should also terminate its instances. If you terminate +// the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, +// the EC2 Fleet enters the deleted_running state, and the instances continue +// to run until they are interrupted or you terminate them manually. +// +// 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 Elastic Compute Cloud's +// API operation DeleteFleets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets +func (c *EC2) DeleteFleets(input *DeleteFleetsInput) (*DeleteFleetsOutput, error) { + req, out := c.DeleteFleetsRequest(input) + return out, req.Send() +} + +// DeleteFleetsWithContext is the same as DeleteFleets with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFleets 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 *EC2) DeleteFleetsWithContext(ctx aws.Context, input *DeleteFleetsInput, opts ...request.Option) (*DeleteFleetsOutput, error) { + req, out := c.DeleteFleetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteFlowLogs = "DeleteFlowLogs" // DeleteFlowLogsRequest generates a "aws/request.Request" representing the @@ -7480,7 +7636,7 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques // Deletes the specified EBS volume. The volume must be in the available state // (not attached to an instance). // -// The volume may remain in the deleting state for several minutes. +// The volume can remain in the deleting state for several minutes. // // For more information, see Deleting an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -9177,6 +9333,228 @@ func (c *EC2) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExp return out, req.Send() } +const opDescribeFleetHistory = "DescribeFleetHistory" + +// DescribeFleetHistoryRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleetHistory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeFleetHistory for more information on using the DescribeFleetHistory +// 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 DescribeFleetHistoryRequest method. +// req, resp := client.DescribeFleetHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory +func (c *EC2) DescribeFleetHistoryRequest(input *DescribeFleetHistoryInput) (req *request.Request, output *DescribeFleetHistoryOutput) { + op := &request.Operation{ + Name: opDescribeFleetHistory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetHistoryInput{} + } + + output = &DescribeFleetHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleetHistory API operation for Amazon Elastic Compute Cloud. +// +// Describes the events for the specified EC2 Fleet during the specified time. +// +// 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 Elastic Compute Cloud's +// API operation DescribeFleetHistory for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory +func (c *EC2) DescribeFleetHistory(input *DescribeFleetHistoryInput) (*DescribeFleetHistoryOutput, error) { + req, out := c.DescribeFleetHistoryRequest(input) + return out, req.Send() +} + +// DescribeFleetHistoryWithContext is the same as DescribeFleetHistory with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleetHistory 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 *EC2) DescribeFleetHistoryWithContext(ctx aws.Context, input *DescribeFleetHistoryInput, opts ...request.Option) (*DescribeFleetHistoryOutput, error) { + req, out := c.DescribeFleetHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFleetInstances = "DescribeFleetInstances" + +// DescribeFleetInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleetInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeFleetInstances for more information on using the DescribeFleetInstances +// 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 DescribeFleetInstancesRequest method. +// req, resp := client.DescribeFleetInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances +func (c *EC2) DescribeFleetInstancesRequest(input *DescribeFleetInstancesInput) (req *request.Request, output *DescribeFleetInstancesOutput) { + op := &request.Operation{ + Name: opDescribeFleetInstances, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetInstancesInput{} + } + + output = &DescribeFleetInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleetInstances API operation for Amazon Elastic Compute Cloud. +// +// Describes the running instances for the specified EC2 Fleet. +// +// 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 Elastic Compute Cloud's +// API operation DescribeFleetInstances for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances +func (c *EC2) DescribeFleetInstances(input *DescribeFleetInstancesInput) (*DescribeFleetInstancesOutput, error) { + req, out := c.DescribeFleetInstancesRequest(input) + return out, req.Send() +} + +// DescribeFleetInstancesWithContext is the same as DescribeFleetInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleetInstances 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 *EC2) DescribeFleetInstancesWithContext(ctx aws.Context, input *DescribeFleetInstancesInput, opts ...request.Option) (*DescribeFleetInstancesOutput, error) { + req, out := c.DescribeFleetInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFleets = "DescribeFleets" + +// DescribeFleetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeFleets for more information on using the DescribeFleets +// 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 DescribeFleetsRequest method. +// req, resp := client.DescribeFleetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets +func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Request, output *DescribeFleetsOutput) { + op := &request.Operation{ + Name: opDescribeFleets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetsInput{} + } + + output = &DescribeFleetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleets API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more of your EC2 Fleet. +// +// 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 Elastic Compute Cloud's +// API operation DescribeFleets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets +func (c *EC2) DescribeFleets(input *DescribeFleetsInput) (*DescribeFleetsOutput, error) { + req, out := c.DescribeFleetsRequest(input) + return out, req.Send() +} + +// DescribeFleetsWithContext is the same as DescribeFleets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleets 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 *EC2) DescribeFleetsWithContext(ctx aws.Context, input *DescribeFleetsInput, opts ...request.Option) (*DescribeFleetsOutput, error) { + req, out := c.DescribeFleetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeFlowLogs = "DescribeFlowLogs" // DescribeFlowLogsRequest generates a "aws/request.Request" representing the @@ -11594,7 +11972,8 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req * // the prefix list name and prefix list ID of the service and the IP address // range for the service. A prefix list ID is required for creating an outbound // security group rule that allows traffic from a VPC to access an AWS service -// through a gateway VPC endpoint. +// through a gateway VPC endpoint. Currently, the services that support this +// action are Amazon S3 and Amazon DynamoDB. // // 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 @@ -12931,7 +13310,7 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee // // Describes the data feed for Spot Instances. For more information, see Spot // Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // 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 @@ -13291,11 +13670,7 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // DescribeSpotInstanceRequests API operation for Amazon Elastic Compute Cloud. // -// Describes the Spot Instance requests that belong to your account. Spot Instances -// are instances that Amazon EC2 launches when the Spot price that you specify -// exceeds the current Spot price. For more information, see Spot Instance Requests -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in -// the Amazon Elastic Compute Cloud User Guide. +// Describes the specified Spot Instance requests. // // You can use DescribeSpotInstanceRequests to find a running Spot Instance // by examining the response. If the status of the Spot Instance is fulfilled, @@ -13303,8 +13678,8 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // instance. Alternatively, you can use DescribeInstances with a filter to look // for instances where the instance lifecycle is spot. // -// Spot Instance requests are deleted 4 hours after they are canceled and their -// instances are terminated. +// Spot Instance requests are deleted four hours after they are canceled and +// their instances are terminated. // // 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 @@ -13386,7 +13761,7 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp // // Describes the Spot price history. For more information, see Spot Instance // Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // When you specify a start and end time, this operation returns the prices // of the instance types within the time range that you specified and the time @@ -13903,8 +14278,9 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req // status of the volume is ok. If the check fails, the overall status is impaired. // If the status is insufficient-data, then the checks may still be taking place // on your volume at the time. We recommend that you retry the request. For -// more information on volume status, see Monitoring the Status of Your Volumes -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html). +// more information about volume status, see Monitoring the Status of Your Volumes +// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Events: Reflect the cause of a volume status and may require you to take // action. For example, if your volume returns an impaired status, then the @@ -14196,7 +14572,8 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica // You can also use CloudWatch Events to check the status of a modification // to an EBS volume. For information about CloudWatch Events, see the Amazon // CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// For more information, see Monitoring Volume Modifications" (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). +// For more information, see Monitoring Volume Modifications" (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods) +// in the Amazon Elastic Compute Cloud User 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 @@ -16591,24 +16968,23 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques // GetConsoleOutput API operation for Amazon Elastic Compute Cloud. // -// Gets the console output for the specified instance. +// Gets the console output for the specified instance. For Linux instances, +// the instance console output displays the exact console output that would +// normally be displayed on a physical monitor attached to a computer. For Windows +// instances, the instance console output includes output from the EC2Config +// service. // -// Instances do not have a physical monitor through which you can view their -// console output. They also lack physical controls that allow you to power -// up, reboot, or shut them down. To allow these actions, we provide them through -// the Amazon EC2 API and command line interface. +// GetConsoleOutput returns up to 64 KB of console output shortly after it's +// generated by the instance. // -// Instance console output is buffered and posted shortly after instance boot, -// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output, -// which is available for at least one hour after the most recent post. +// By default, the console output returns buffered information that was posted +// shortly after an instance transition state (start, stop, reboot, or terminate). +// This information is available for at least one hour after the most recent +// post. // -// For Linux instances, the instance console output displays the exact console -// output that would normally be displayed on a physical monitor attached to -// a computer. This output is buffered because the instance produces it and -// then posts it to a store where the instance's owner can retrieve it. -// -// For Windows instances, the instance console output includes output from the -// EC2Config service. +// You can optionally retrieve the latest serial console output at any time +// during the instance lifecycle. This option is only supported on C5, M5, and +// i3.metal instances. // // 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 @@ -17426,6 +17802,82 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, return out, req.Send() } +const opModifyFleet = "ModifyFleet" + +// ModifyFleetRequest generates a "aws/request.Request" representing the +// client's request for the ModifyFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyFleet for more information on using the ModifyFleet +// 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 ModifyFleetRequest method. +// req, resp := client.ModifyFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet +func (c *EC2) ModifyFleetRequest(input *ModifyFleetInput) (req *request.Request, output *ModifyFleetOutput) { + op := &request.Operation{ + Name: opModifyFleet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyFleetInput{} + } + + output = &ModifyFleetOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyFleet API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified EC2 Fleet. +// +// While the EC2 Fleet is being modified, it is in the modifying state. +// +// 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 Elastic Compute Cloud's +// API operation ModifyFleet for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet +func (c *EC2) ModifyFleet(input *ModifyFleetInput) (*ModifyFleetOutput, error) { + req, out := c.ModifyFleetRequest(input) + return out, req.Send() +} + +// ModifyFleetWithContext is the same as ModifyFleet with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyFleet 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 *EC2) ModifyFleetWithContext(ctx aws.Context, input *ModifyFleetInput, opts ...request.Option) (*ModifyFleetOutput, error) { + req, out := c.ModifyFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" // ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the @@ -17910,6 +18362,12 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput // Modifies the specified attribute of the specified instance. You can specify // only one attribute at a time. // +// Note: Using this action to change the security groups associated with an +// elastic network interface (ENI) attached to an instance in a VPC can result +// in an error if the instance has more than one ENI. To change the security +// groups associated with an ENI attached to an instance that has multiple ENIs, +// we recommend that you use the ModifyNetworkInterfaceAttribute action. +// // To modify some attributes, the instance must be stopped. For more information, // see Modifying Attributes of a Stopped Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -18404,7 +18862,7 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput // be made public. Snapshots encrypted with your default CMK cannot be shared // with other accounts. // -// For more information on modifying snapshot permissions, see Sharing Snapshots +// For more information about modifying snapshot permissions, see Sharing Snapshots // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -18677,10 +19135,9 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques // // With previous-generation instance types, resizing an EBS volume may require // detaching and reattaching the volume or stopping and restarting the instance. -// For more information about modifying an EBS volume running Linux, see Modifying -// the Size, IOPS, or Type of an EBS Volume on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html). -// For more information about modifying an EBS volume running Windows, see Modifying -// the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). +// For more information, see Modifying the Size, IOPS, or Type of an EBS Volume +// on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html) +// and Modifying the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). // // If you reach the maximum volume modification rate per volume limit, you will // need to wait at least six hours before applying further modifications to @@ -20806,6 +21263,10 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // // Creates a Spot Fleet request. // +// The Spot Fleet request specifies the total target capacity and the On-Demand +// target capacity. Amazon EC2 calculates the difference between the total capacity +// and On-Demand capacity, and launches the difference as Spot capacity. +// // You can submit a single request that includes multiple launch specifications // that vary by instance type, AMI, Availability Zone, or subnet. // @@ -20820,10 +21281,11 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // pools, you can improve the availability of your fleet. // // You can specify tags for the Spot Instances. You cannot tag other resource -// types in a Spot Fleet request; only the instance resource type is supported. +// types in a Spot Fleet request because only the instance resource type is +// supported. // // For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // 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 @@ -20897,10 +21359,10 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req // RequestSpotInstances API operation for Amazon Elastic Compute Cloud. // -// Creates a Spot Instance request. Spot Instances are instances that Amazon -// EC2 launches when the maximum price that you specify exceeds the current -// Spot price. For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) -// in the Amazon Elastic Compute Cloud User Guide. +// Creates a Spot Instance request. +// +// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) +// in the Amazon EC2 User Guide for Linux Instances. // // 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 @@ -21292,7 +21754,7 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) // // Resets permission settings for the specified snapshot. // -// For more information on modifying snapshot permissions, see Sharing Snapshots +// For more information about modifying snapshot permissions, see Sharing Snapshots // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -23036,20 +23498,19 @@ type AllocateHostsInput struct { // AvailabilityZone is a required field AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string `locationName:"clientToken" type:"string"` - // Specify the instance type that you want your Dedicated Hosts to be configured - // for. When you specify the instance type, that is the only instance type that - // you can launch onto that host. + // Specify the instance type for which to configure your Dedicated Hosts. When + // you specify the instance type, that is the only instance type that you can + // launch onto that host. // // InstanceType is a required field InstanceType *string `locationName:"instanceType" type:"string" required:"true"` - // The number of Dedicated Hosts you want to allocate to your account with these - // parameters. + // The number of Dedicated Hosts to allocate to your account with these parameters. // // Quantity is a required field Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` @@ -23118,8 +23579,8 @@ func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput { type AllocateHostsOutput struct { _ struct{} `type:"structure"` - // The ID of the allocated Dedicated Host. This is used when you want to launch - // an instance onto a specific host. + // The ID of the allocated Dedicated Host. This is used to launch an instance + // onto a specific host. HostIds []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` } @@ -24983,7 +25444,7 @@ type BundleTask struct { Progress *string `locationName:"progress" type:"string"` // The time this task started. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The state of the task. State *string `locationName:"state" type:"string" enum:"BundleTaskState"` @@ -24992,7 +25453,7 @@ type BundleTask struct { Storage *Storage `locationName:"storage" type:"structure"` // The time of the most recent update for the task. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -25975,13 +26436,13 @@ type ClientData struct { Comment *string `type:"string"` // The time that the disk upload ends. - UploadEnd *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadEnd *time.Time `type:"timestamp"` // The size of the uploaded disk image, in GiB. UploadSize *float64 `type:"double"` // The time that the disk upload starts. - UploadStart *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadStart *time.Time `type:"timestamp"` } // String returns the string representation @@ -26202,9 +26663,7 @@ type ConversionTask struct { _ struct{} `type:"structure"` // The ID of the conversion task. - // - // ConversionTaskId is a required field - ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"` + ConversionTaskId *string `locationName:"conversionTaskId" type:"string"` // The time when the task expires. If the upload isn't complete before the expiration // time, we automatically cancel the task. @@ -26219,9 +26678,7 @@ type ConversionTask struct { ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` // The state of the conversion task. - // - // State is a required field - State *string `locationName:"state" type:"string" required:"true" enum:"ConversionTaskState"` + State *string `locationName:"state" type:"string" enum:"ConversionTaskState"` // The status message related to the conversion task. StatusMessage *string `locationName:"statusMessage" type:"string"` @@ -26580,10 +27037,10 @@ type CopySnapshotInput struct { // copy operation. This parameter is only valid for specifying the destination // region in a PresignedUrl parameter, where it is required. // - // CopySnapshot sends the snapshot copy to the regional endpoint that you send - // the HTTP request to, such as ec2.us-east-1.amazonaws.com (in the AWS CLI, - // this is specified with the --region parameter or the default region in your - // AWS configuration file). + // The snapshot copy is sent to the regional endpoint that you sent the HTTP + // request to (for example, ec2.us-east-1.amazonaws.com). With the AWS CLI, + // this is specified using the --region parameter or the default region in your + // AWS configuration file. DestinationRegion *string `locationName:"destinationRegion" type:"string"` // Checks whether you have the required permissions for the action, without @@ -26628,9 +27085,9 @@ type CopySnapshotInput struct { // will eventually fail. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The pre-signed URL parameter is required when copying an encrypted snapshot - // with the Amazon EC2 Query API; it is available as an optional parameter in - // all other cases. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). + // When you copy an encrypted source snapshot using the Amazon EC2 Query API, + // you must supply a pre-signed URL. This parameter is optional for unencrypted + // snapshots. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). // // The PresignedUrl should use the snapshot source endpoint, the CopySnapshot // action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion @@ -26752,6 +27209,75 @@ func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput { return s } +// The CPU options for the instance. +type CpuOptions struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` + + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` +} + +// String returns the string representation +func (s CpuOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CpuOptions) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptions) SetCoreCount(v int64) *CpuOptions { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptions) SetThreadsPerCore(v int64) *CpuOptions { + s.ThreadsPerCore = &v + return s +} + +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type CpuOptionsRequest struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` +} + +// String returns the string representation +func (s CpuOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CpuOptionsRequest) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptionsRequest) SetCoreCount(v int64) *CpuOptionsRequest { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + // Contains the parameters for CreateCustomerGateway. type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -27150,6 +27676,208 @@ func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v * return s } +type CreateFleetInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The configuration for the EC2 Fleet. + // + // LaunchTemplateConfigs is a required field + LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` + + // Indicates whether EC2 Fleet should replace unhealthy instances. + ReplaceUnhealthyInstances *bool `type:"boolean"` + + // Includes SpotAllocationStrategy and SpotInstanceInterruptionBehavior inside + // this structure. + SpotOptions *SpotOptionsRequest `type:"structure"` + + // The key-value pair for tagging the EC2 Fleet request on creation. The value + // for ResourceType must be fleet, otherwise the fleet request fails. To tag + // instances at launch, specify the tags in the launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). + // For information about tagging after launch, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and + // DefaultCapacityType structure. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `type:"boolean"` + + // The type of request. Indicates whether the EC2 Fleet only requests the target + // capacity, or also attempts to maintain it. If you request a certain target + // capacity, EC2 Fleet only places the required requests. It does not attempt + // to replenish instances if capacity is diminished, and does not submit requests + // in alternative capacity pools if capacity is unavailable. To maintain a certain + // target capacity, EC2 Fleet places the required requests to meet this target + // capacity. It also automatically replenishes any interrupted Spot Instances. + // Default: maintain. + Type *string `type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `type:"timestamp"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new EC2 Fleet requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CreateFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} + if s.LaunchTemplateConfigs == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateConfigs")) + } + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) + } + if s.LaunchTemplateConfigs != nil { + for i, v := range s.LaunchTemplateConfigs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { + s.DryRun = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput { + s.LaunchTemplateConfigs = v + return s +} + +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { + s.ReplaceUnhealthyInstances = &v + return s +} + +// SetSpotOptions sets the SpotOptions field's value. +func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput { + s.SpotOptions = v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput { + s.TagSpecifications = v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput { + s.TargetCapacitySpecification = v + return s +} + +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput { + s.TerminateInstancesWithExpiration = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateFleetInput) SetType(v string) *CreateFleetInput { + s.Type = &v + return s +} + +// SetValidFrom sets the ValidFrom field's value. +func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput { + s.ValidFrom = &v + return s +} + +// SetValidUntil sets the ValidUntil field's value. +func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { + s.ValidUntil = &v + return s +} + +type CreateFleetOutput struct { + _ struct{} `type:"structure"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` +} + +// String returns the string representation +func (s CreateFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetOutput) GoString() string { + return s.String() +} + +// SetFleetId sets the FleetId field's value. +func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { + s.FleetId = &v + return s +} + // Contains the parameters for CreateFlowLogs. type CreateFlowLogsInput struct { _ struct{} `type:"structure"` @@ -28162,12 +28890,12 @@ type CreateNetworkAclEntryInput struct { PortRange *PortRange `locationName:"portRange" type:"structure"` // The protocol. A value of -1 or all means all protocols. If you specify all, - // -1, or a protocol number other than tcp, udp, or icmp, traffic on all ports - // is allowed, regardless of any ports or ICMP types or codes you specify. If - // you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, traffic - // for all ICMP types and codes allowed, regardless of any that you specify. - // If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, you must - // specify an ICMP type and code. + // -1, or a protocol number other than 6 (tcp), 17 (udp), or 1 (icmp), traffic + // on all ports is allowed, regardless of any ports or ICMP types or codes you + // specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, + // traffic for all ICMP types and codes allowed, regardless of any that you + // specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, + // you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -28441,16 +29169,6 @@ func (s *CreateNetworkInterfaceInput) Validate() error { if s.SubnetId == nil { invalidParams.Add(request.NewErrParamRequired("SubnetId")) } - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -29542,11 +30260,12 @@ type CreateVolumeInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // Only valid for Provisioned IOPS SSD volumes. The number of I/O operations - // per second (IOPS) to provision for the volume, with a maximum ratio of 50 - // IOPS/GiB. + // The number of I/O operations per second (IOPS) to provision for the volume, + // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 32000 IOPS for volumes + // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes + // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. Iops *int64 `type:"integer"` // An identifier for the AWS Key Management Service (AWS KMS) customer master @@ -29596,7 +30315,10 @@ type CreateVolumeInput struct { // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard // for Magnetic volumes. // - // Default: standard + // Defaults: If no volume type is specified, the default is standard in us-east-1, + // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, + // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, + // and cn-north-1. In all other regions, EBS defaults to gp2. VolumeType *string `type:"string" enum:"VolumeType"` } @@ -30972,6 +31694,211 @@ func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgr return s } +// Describes an EC2 Fleet error. +type DeleteFleetError struct { + _ struct{} `type:"structure"` + + // The error code. + Code *string `locationName:"code" type:"string" enum:"DeleteFleetErrorCode"` + + // The description for the error code. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s DeleteFleetError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *DeleteFleetError) SetCode(v string) *DeleteFleetError { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *DeleteFleetError) SetMessage(v string) *DeleteFleetError { + s.Message = &v + return s +} + +// Describes an EC2 Fleet that was not successfully deleted. +type DeleteFleetErrorItem struct { + _ struct{} `type:"structure"` + + // The error. + Error *DeleteFleetError `locationName:"error" type:"structure"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` +} + +// String returns the string representation +func (s DeleteFleetErrorItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetErrorItem) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *DeleteFleetErrorItem) SetError(v *DeleteFleetError) *DeleteFleetErrorItem { + s.Error = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetErrorItem) SetFleetId(v string) *DeleteFleetErrorItem { + s.FleetId = &v + return s +} + +// Describes an EC2 Fleet that was successfully deleted. +type DeleteFleetSuccessItem struct { + _ struct{} `type:"structure"` + + // The current state of the EC2 Fleet. + CurrentFleetState *string `locationName:"currentFleetState" type:"string" enum:"FleetStateCode"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The previous state of the EC2 Fleet. + PreviousFleetState *string `locationName:"previousFleetState" type:"string" enum:"FleetStateCode"` +} + +// String returns the string representation +func (s DeleteFleetSuccessItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetSuccessItem) GoString() string { + return s.String() +} + +// SetCurrentFleetState sets the CurrentFleetState field's value. +func (s *DeleteFleetSuccessItem) SetCurrentFleetState(v string) *DeleteFleetSuccessItem { + s.CurrentFleetState = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetSuccessItem) SetFleetId(v string) *DeleteFleetSuccessItem { + s.FleetId = &v + return s +} + +// SetPreviousFleetState sets the PreviousFleetState field's value. +func (s *DeleteFleetSuccessItem) SetPreviousFleetState(v string) *DeleteFleetSuccessItem { + s.PreviousFleetState = &v + return s +} + +type DeleteFleetsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the EC2 Fleets. + // + // FleetIds is a required field + FleetIds []*string `locationName:"FleetId" type:"list" required:"true"` + + // Indicates whether to terminate instances for an EC2 Fleet if it is deleted + // successfully. + // + // TerminateInstances is a required field + TerminateInstances *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s DeleteFleetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFleetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFleetsInput"} + if s.FleetIds == nil { + invalidParams.Add(request.NewErrParamRequired("FleetIds")) + } + if s.TerminateInstances == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteFleetsInput) SetDryRun(v bool) *DeleteFleetsInput { + s.DryRun = &v + return s +} + +// SetFleetIds sets the FleetIds field's value. +func (s *DeleteFleetsInput) SetFleetIds(v []*string) *DeleteFleetsInput { + s.FleetIds = v + return s +} + +// SetTerminateInstances sets the TerminateInstances field's value. +func (s *DeleteFleetsInput) SetTerminateInstances(v bool) *DeleteFleetsInput { + s.TerminateInstances = &v + return s +} + +type DeleteFleetsOutput struct { + _ struct{} `type:"structure"` + + // Information about the EC2 Fleets that are successfully deleted. + SuccessfulFleetDeletions []*DeleteFleetSuccessItem `locationName:"successfulFleetDeletionSet" locationNameList:"item" type:"list"` + + // Information about the EC2 Fleets that are not successfully deleted. + UnsuccessfulFleetDeletions []*DeleteFleetErrorItem `locationName:"unsuccessfulFleetDeletionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DeleteFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetsOutput) GoString() string { + return s.String() +} + +// SetSuccessfulFleetDeletions sets the SuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetSuccessfulFleetDeletions(v []*DeleteFleetSuccessItem) *DeleteFleetsOutput { + s.SuccessfulFleetDeletions = v + return s +} + +// SetUnsuccessfulFleetDeletions sets the UnsuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetErrorItem) *DeleteFleetsOutput { + s.UnsuccessfulFleetDeletions = v + return s +} + // Contains the parameters for DeleteFlowLogs. type DeleteFlowLogsInput struct { _ struct{} `type:"structure"` @@ -33206,12 +34133,9 @@ type DescribeAddressesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of the tag's key). If you want to - // list only resources where Purpose is X, see the tag:key=value filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // [EC2-Classic] One or more Elastic IP addresses. @@ -33529,16 +34453,9 @@ type DescribeClassicLinkInstancesInput struct { // // * tag:key=value - The key/value combination of a tag assigned to the resource. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC that the instance is linked to. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -33730,16 +34647,9 @@ type DescribeCustomerGatewaysInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } @@ -33823,16 +34733,9 @@ type DescribeDhcpOptionsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } @@ -34142,6 +35045,395 @@ func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExp return s } +type DescribeFleetHistoryInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The type of events to describe. By default, all events are described. + EventType *string `type:"string" enum:"FleetEventType"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s DescribeFleetHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetHistoryInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetHistoryInput) SetDryRun(v bool) *DescribeFleetHistoryInput { + s.DryRun = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *DescribeFleetHistoryInput) SetEventType(v string) *DescribeFleetHistoryInput { + s.EventType = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryInput) SetFleetId(v string) *DescribeFleetHistoryInput { + s.FleetId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetHistoryInput) SetMaxResults(v int64) *DescribeFleetHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetHistoryInput) SetNextToken(v string) *DescribeFleetHistoryInput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryInput) SetStartTime(v time.Time) *DescribeFleetHistoryInput { + s.StartTime = &v + return s +} + +type DescribeFleetHistoryOutput struct { + _ struct{} `type:"structure"` + + // The ID of the EC Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // Information about the events in the history of the EC2 Fleet. + HistoryRecords []*HistoryRecordEntry `locationName:"historyRecordSet" locationNameList:"item" type:"list"` + + // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // All records up to this time were retrieved. + // + // If nextToken indicates that there are more results, this value is not present. + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + StartTime *time.Time `locationName:"startTime" type:"timestamp"` +} + +// String returns the string representation +func (s DescribeFleetHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetHistoryOutput) GoString() string { + return s.String() +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryOutput) SetFleetId(v string) *DescribeFleetHistoryOutput { + s.FleetId = &v + return s +} + +// SetHistoryRecords sets the HistoryRecords field's value. +func (s *DescribeFleetHistoryOutput) SetHistoryRecords(v []*HistoryRecordEntry) *DescribeFleetHistoryOutput { + s.HistoryRecords = v + return s +} + +// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. +func (s *DescribeFleetHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeFleetHistoryOutput { + s.LastEvaluatedTime = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetHistoryOutput) SetNextToken(v string) *DescribeFleetHistoryOutput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryOutput) SetStartTime(v time.Time) *DescribeFleetHistoryOutput { + s.StartTime = &v + return s +} + +type DescribeFleetInstancesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // * instance-type - The instance type. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeFleetInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetInstancesInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetInstancesInput) SetDryRun(v bool) *DescribeFleetInstancesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeFleetInstancesInput) SetFilters(v []*Filter) *DescribeFleetInstancesInput { + s.Filters = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesInput) SetFleetId(v string) *DescribeFleetInstancesInput { + s.FleetId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetInstancesInput) SetMaxResults(v int64) *DescribeFleetInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesInput) SetNextToken(v string) *DescribeFleetInstancesInput { + s.NextToken = &v + return s +} + +type DescribeFleetInstancesOutput struct { + _ struct{} `type:"structure"` + + // The running instances. This list is refreshed periodically and might be out + // of date. + ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetInstancesOutput) GoString() string { + return s.String() +} + +// SetActiveInstances sets the ActiveInstances field's value. +func (s *DescribeFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeFleetInstancesOutput { + s.ActiveInstances = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesOutput) SetFleetId(v string) *DescribeFleetInstancesOutput { + s.FleetId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesOutput) SetNextToken(v string) *DescribeFleetInstancesOutput { + s.NextToken = &v + return s +} + +type DescribeFleetsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // * activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment + // | pending-termination | fulfilled). + // + // * excess-capacity-termination-policy - Indicates whether to terminate + // running instances if the target capacity is decreased below the current + // EC2 Fleet size (true | false). + // + // * fleet-state - The state of the EC2 Fleet (submitted | active | deleted + // | failed | deleted-running | deleted-terminating | modifying). + // + // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace + // unhealthy instances (true | false). + // + // * type - The type of request (request | maintain). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The ID of the EC2 Fleets. + FleetIds []*string `locationName:"FleetId" type:"list"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeFleetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetsInput) SetDryRun(v bool) *DescribeFleetsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeFleetsInput) SetFilters(v []*Filter) *DescribeFleetsInput { + s.Filters = v + return s +} + +// SetFleetIds sets the FleetIds field's value. +func (s *DescribeFleetsInput) SetFleetIds(v []*string) *DescribeFleetsInput { + s.FleetIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetsInput) SetMaxResults(v int64) *DescribeFleetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { + s.NextToken = &v + return s +} + +type DescribeFleetsOutput struct { + _ struct{} `type:"structure"` + + // Information about the EC2 Fleets. + Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetsOutput) GoString() string { + return s.String() +} + +// SetFleets sets the Fleets field's value. +func (s *DescribeFleetsOutput) SetFleets(v []*FleetData) *DescribeFleetsOutput { + s.Fleets = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { + s.NextToken = &v + return s +} + // Contains the parameters for DescribeFlowLogs. type DescribeFlowLogsInput struct { _ struct{} `type:"structure"` @@ -34361,16 +35653,9 @@ type DescribeFpgaImagesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * update-time - The time of the most recent update. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -34699,21 +35984,25 @@ type DescribeHostsInput struct { // One or more filters. // - // * instance-type - The instance type size that the Dedicated Host is configured - // to support. - // // * auto-placement - Whether auto-placement is enabled or disabled (on | // off). // + // * availability-zone - The Availability Zone of the host. + // + // * client-token - The idempotency token you provided when you allocated + // the host. + // // * host-reservation-id - The ID of the reservation assigned to this host. // - // * client-token - The idempotency token you provided when you launched - // the instance + // * instance-type - The instance type size that the Dedicated Host is configured + // to support. // - // * state- The allocation state of the Dedicated Host (available | under-assessment + // * state - The allocation state of the Dedicated Host (available | under-assessment // | permanent-failure | released | released-permanent-failure). // - // * availability-zone - The Availability Zone of the host. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. @@ -35278,16 +36567,9 @@ type DescribeImagesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * virtualization-type - The virtualization type (paravirtual | hvm). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -36275,15 +37557,9 @@ type DescribeInstancesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of the tag's key). If you want to - // list only resources where Purpose is X, see the tag:key=value filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * tenancy - The tenancy of an instance (dedicated | default | host). // @@ -36301,7 +37577,7 @@ type DescribeInstancesInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. This // value can be between 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter or tag filters in the same call. + // instance IDs parameter in the same call. MaxResults *int64 `locationName:"maxResults" type:"integer"` // The token to request the next page of results. @@ -36406,16 +37682,9 @@ type DescribeInternetGatewaysInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more Internet gateway IDs. @@ -36591,7 +37860,7 @@ type DescribeLaunchTemplateVersionsInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. + // value can be between 1 and 200. MaxResults *int64 `type:"integer"` // The version number up to which to describe launch template versions. @@ -36737,12 +38006,9 @@ type DescribeLaunchTemplatesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of the tag's key). If you want to - // list only resources where Purpose is X, see the tag:key=value filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more launch template IDs. @@ -36962,16 +38228,9 @@ type DescribeNatGatewaysInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC in which the NAT gateway resides. Filter []*Filter `locationNameList:"Filter" type:"list"` @@ -37112,16 +38371,9 @@ type DescribeNetworkAclsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the network ACL. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -37512,16 +38764,9 @@ type DescribeNetworkInterfacesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the network interface. Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` @@ -37985,16 +39230,9 @@ type DescribeReservedInstancesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * usage-price - The usage price of the Reserved Instance, per hour (for // example, 0.84). @@ -38569,16 +39807,9 @@ type DescribeRouteTablesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the route table. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -39069,9 +40300,9 @@ type DescribeSecurityGroupsInput struct { // // * owner-id - The AWS account ID of the owner of the security group. // - // * tag-key - The key of a tag assigned to the security group. - // - // * tag-value - The value of a tag assigned to the security group. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC specified when the security group was created. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -39321,16 +40552,9 @@ type DescribeSnapshotsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * volume-id - The ID of the volume the snapshot is for. // @@ -39582,8 +40806,8 @@ func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *Descr type DescribeSpotFleetInstancesOutput struct { _ struct{} `type:"structure"` - // The running instances. Note that this list is refreshed periodically and - // might be out of date. + // The running instances. This list is refreshed periodically and might be out + // of date. // // ActiveInstances is a required field ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"` @@ -39655,7 +40879,7 @@ type DescribeSpotFleetRequestHistoryInput struct { // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` } // String returns the string representation @@ -39735,7 +40959,7 @@ type DescribeSpotFleetRequestHistoryOutput struct { // If nextToken indicates that there are more results, this value is not present. // // LastEvaluatedTime is a required field - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" required:"true"` // The token required to retrieve the next set of results. This value is null // when there are no more results to return. @@ -39749,7 +40973,7 @@ type DescribeSpotFleetRequestHistoryOutput struct { // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` } // String returns the string representation @@ -39924,7 +41148,9 @@ type DescribeSpotInstanceRequestsInput struct { // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. // - // * launch.group-id - The security group for the instance. + // * launch.group-id - The ID of the security group for the instance. + // + // * launch.group-name - The name of the security group for the instance. // // * launch.image-id - The ID of the AMI. // @@ -39975,7 +41201,7 @@ type DescribeSpotInstanceRequestsInput struct { // | cancelled | failed). Spot request status information can help you track // your Amazon EC2 Spot Instance requests. For more information, see Spot // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. // // * status-code - The short code describing the most recent evaluation of // your Spot Instance request. @@ -39988,16 +41214,9 @@ type DescribeSpotInstanceRequestsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of Spot Instance request (one-time | persistent). // @@ -40077,7 +41296,7 @@ type DescribeSpotPriceHistoryInput struct { // The date and time, up to the current date, from which to stop retrieving // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // One or more filters. // @@ -40093,9 +41312,9 @@ type DescribeSpotPriceHistoryInput struct { // * spot-price - The Spot price. The value must match exactly (or use wildcards; // greater than or less than comparison is not supported). // - // * timestamp - The timestamp of the Spot price history, in UTC format (for - // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater - // than or less than comparison is not supported. + // * timestamp - The time stamp of the Spot price history, in UTC format + // (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). + // Greater than or less than comparison is not supported. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // Filters the results by the specified instance types. @@ -40114,7 +41333,7 @@ type DescribeSpotPriceHistoryInput struct { // The date and time, up to the past 90 days, from which to start retrieving // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -40368,16 +41587,9 @@ type DescribeSubnetsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the subnet. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -40457,9 +41669,9 @@ type DescribeTagsInput struct { // * resource-id - The resource ID. // // * resource-type - The resource type (customer-gateway | dhcp-options | - // elastic-ip | fpga-image | image | instance | internet-gateway | launch-template - // | natgateway | network-acl | network-interface | reserved-instances | - // route-table | security-group | snapshot | spot-instances-request | subnet + // elastic-ip | fleet | fpga-image | image | instance | internet-gateway + // | launch-template | natgateway | network-acl | network-interface | reserved-instances + // | route-table | security-group | snapshot | spot-instances-request | subnet // | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). // // * value - The tag value. @@ -40806,8 +42018,7 @@ type DescribeVolumesInput struct { // * attachment.instance-id - The ID of the instance the volume is attached // to. // - // * attachment.status - The attachment state (attaching | attached | detaching - // | detached). + // * attachment.status - The attachment state (attaching | attached | detaching). // // * availability-zone - The Availability Zone in which the volume was created. // @@ -40827,16 +42038,9 @@ type DescribeVolumesInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * volume-id - The volume ID. // @@ -41264,16 +42468,9 @@ type DescribeVpcClassicLinkInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more VPCs for which you want to describe the ClassicLink status. @@ -42029,16 +43226,9 @@ type DescribeVpcPeeringConnectionsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-peering-connection-id - The ID of the VPC peering connection. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -42147,16 +43337,9 @@ type DescribeVpcsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -42255,16 +43438,9 @@ type DescribeVpnConnectionsInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of VPN connection. Currently the only supported type // is ipsec.1. @@ -42364,16 +43540,9 @@ type DescribeVpnGatewaysInput struct { // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose // for the filter name and X for the filter value. // - // * tag-key - The key of a tag assigned to the resource. This filter is - // independent of the tag-value filter. For example, if you use both the - // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources - // assigned both the tag key Purpose (regardless of what the tag's value - // is), and the tag value X (regardless of what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of virtual private gateway. Currently the only supported // type is ipsec.1. @@ -43514,9 +44683,7 @@ type DiskImageDescription struct { Checksum *string `locationName:"checksum" type:"string"` // The disk image format. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` + Format *string `locationName:"format" type:"string" enum:"DiskImageFormat"` // A presigned URL for the import manifest stored in Amazon S3. For information // about creating a presigned URL for an Amazon S3 object, read the "Query String @@ -43526,14 +44693,10 @@ type DiskImageDescription struct { // // For information about the import manifest referenced by this API action, // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). - // - // ImportManifestUrl is a required field - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string"` // The size of the disk image, in GiB. - // - // Size is a required field - Size *int64 `locationName:"size" type:"long" required:"true"` + Size *int64 `locationName:"size" type:"long"` } // String returns the string representation @@ -43649,9 +44812,7 @@ type DiskImageVolumeDescription struct { _ struct{} `type:"structure"` // The volume identifier. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` + Id *string `locationName:"id" type:"string"` // The size of the volume, in GiB. Size *int64 `locationName:"size" type:"long"` @@ -43743,8 +44904,8 @@ type EbsBlockDevice struct { // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK // under which the EBS volume is encrypted. // - // Note: This parameter is only supported on BlockDeviceMapping objects called - // by RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), + // This parameter is only supported on BlockDeviceMapping objects called by + // RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). KmsKeyId *string `type:"string"` @@ -43827,7 +44988,7 @@ type EbsInstanceBlockDevice struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // Indicates whether the volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -44434,9 +45595,9 @@ type EventInformation struct { // * cancelled - The Spot Fleet is canceled and has no running Spot Instances. // The Spot Fleet will be deleted two days after its instances were terminated. // - // * cancelled_running - The Spot Fleet is canceled and will not launch additional - // Spot Instances, but its existing Spot Instances continue to run until - // they are interrupted or terminated. + // * cancelled_running - The Spot Fleet is canceled and does not launch additional + // Spot Instances. Existing Spot Instances continue to run until they are + // interrupted or terminated. // // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances // are terminating. @@ -44682,8 +45843,30 @@ func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpeci } // A filter name and value pair that is used to return a more specific list -// of results. Filters can be used to match a set of resources by various criteria, -// such as tags, attributes, or IDs. +// of results from a describe operation. Filters can be used to match a set +// of resources by specific criteria, such as tags, attributes, or IDs. The +// filters supported by a describe operation are documented with the describe +// operation. For example: +// +// * DescribeAvailabilityZones +// +// * DescribeImages +// +// * DescribeInstances +// +// * DescribeKeyPairs +// +// * DescribeSecurityGroups +// +// * DescribeSnapshots +// +// * DescribeSubnets +// +// * DescribeTags +// +// * DescribeVolumes +// +// * DescribeVpcs type Filter struct { _ struct{} `type:"structure"` @@ -44716,6 +45899,403 @@ func (s *Filter) SetValues(v []*string) *Filter { return s } +// Describes an EC2 Fleet. +type FleetData struct { + _ struct{} `type:"structure"` + + // The progress of the EC2 Fleet. If there is an error, the status is error. + // After all requests are placed, the status is pending_fulfillment. If the + // size of the EC2 Fleet is equal to or greater than its target capacity, the + // status is fulfilled. If the size of the EC2 Fleet is decreased, the status + // is pending_termination while instances are terminating. + ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"FleetActivityStatus"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // Constraints: Maximum 64 ASCII characters + ClientToken *string `locationName:"clientToken" type:"string"` + + // The creation date and time of the EC2 Fleet. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + + // Indicates whether running instances should be terminated if the target capacity + // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The state of the EC2 Fleet. + FleetState *string `locationName:"fleetState" type:"string" enum:"FleetStateCode"` + + // The number of units fulfilled by this request compared to the set target + // capacity. + FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` + + // The number of units fulfilled by this request compared to the set target + // On-Demand capacity. + FulfilledOnDemandCapacity *float64 `locationName:"fulfilledOnDemandCapacity" type:"double"` + + // The launch template and overrides. + LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + + // Indicates whether EC2 Fleet should replace unhealthy instances. + ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + + // The configuration of Spot Instances in an EC2 Fleet. + SpotOptions *SpotOptions `locationName:"spotOptions" type:"structure"` + + // The tags for an EC2 Fleet resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The number of units to request. You can choose to set the target capacity + // in terms of instances or a performance characteristic that is important to + // your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + TargetCapacitySpecification *TargetCapacitySpecification `locationName:"targetCapacitySpecification" type:"structure"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` + + // The type of request. Indicates whether the EC2 Fleet only requests the target + // capacity, or also attempts to maintain it. If you request a certain target + // capacity, EC2 Fleet only places the required requests; it does not attempt + // to replenish instances if capacity is diminished, and does not submit requests + // in alternative capacity pools if capacity is unavailable. To maintain a certain + // target capacity, EC2 Fleet places the required requests to meet this target + // capacity. It also automatically replenishes any interrupted Spot Instances. + // Default: maintain. + Type *string `locationName:"type" type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new instance requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` +} + +// String returns the string representation +func (s FleetData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetData) GoString() string { + return s.String() +} + +// SetActivityStatus sets the ActivityStatus field's value. +func (s *FleetData) SetActivityStatus(v string) *FleetData { + s.ActivityStatus = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *FleetData) SetClientToken(v string) *FleetData { + s.ClientToken = &v + return s +} + +// SetCreateTime sets the CreateTime field's value. +func (s *FleetData) SetCreateTime(v time.Time) *FleetData { + s.CreateTime = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *FleetData) SetFleetId(v string) *FleetData { + s.FleetId = &v + return s +} + +// SetFleetState sets the FleetState field's value. +func (s *FleetData) SetFleetState(v string) *FleetData { + s.FleetState = &v + return s +} + +// SetFulfilledCapacity sets the FulfilledCapacity field's value. +func (s *FleetData) SetFulfilledCapacity(v float64) *FleetData { + s.FulfilledCapacity = &v + return s +} + +// SetFulfilledOnDemandCapacity sets the FulfilledOnDemandCapacity field's value. +func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { + s.FulfilledOnDemandCapacity = &v + return s +} + +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { + s.LaunchTemplateConfigs = v + return s +} + +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { + s.ReplaceUnhealthyInstances = &v + return s +} + +// SetSpotOptions sets the SpotOptions field's value. +func (s *FleetData) SetSpotOptions(v *SpotOptions) *FleetData { + s.SpotOptions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *FleetData) SetTags(v []*Tag) *FleetData { + s.Tags = v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *FleetData) SetTargetCapacitySpecification(v *TargetCapacitySpecification) *FleetData { + s.TargetCapacitySpecification = v + return s +} + +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *FleetData) SetTerminateInstancesWithExpiration(v bool) *FleetData { + s.TerminateInstancesWithExpiration = &v + return s +} + +// SetType sets the Type field's value. +func (s *FleetData) SetType(v string) *FleetData { + s.Type = &v + return s +} + +// SetValidFrom sets the ValidFrom field's value. +func (s *FleetData) SetValidFrom(v time.Time) *FleetData { + s.ValidFrom = &v + return s +} + +// SetValidUntil sets the ValidUntil field's value. +func (s *FleetData) SetValidUntil(v time.Time) *FleetData { + s.ValidUntil = &v + return s +} + +// Describes a launch template and overrides. +type FleetLaunchTemplateConfig struct { + _ struct{} `type:"structure"` + + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s FleetLaunchTemplateConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateConfig) GoString() string { + return s.String() +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *FleetLaunchTemplateConfig { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfig) SetOverrides(v []*FleetLaunchTemplateOverrides) *FleetLaunchTemplateConfig { + s.Overrides = v + return s +} + +// Describes a launch template and overrides. +type FleetLaunchTemplateConfigRequest struct { + _ struct{} `type:"structure"` + + // The launch template to use. You must specify either the launch template ID + // or launch template name in the request. + LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest `type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s FleetLaunchTemplateConfigRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateConfigRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FleetLaunchTemplateConfigRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateConfigRequest"} + if s.LaunchTemplateSpecification != nil { + if err := s.LaunchTemplateSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfigRequest) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecificationRequest) *FleetLaunchTemplateConfigRequest { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfigRequest) SetOverrides(v []*FleetLaunchTemplateOverridesRequest) *FleetLaunchTemplateConfigRequest { + s.Overrides = v + return s +} + +// Describes overrides for a launch template. +type FleetLaunchTemplateOverrides struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `locationName:"maxPrice" type:"string"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` +} + +// String returns the string representation +func (s FleetLaunchTemplateOverrides) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateOverrides) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverrides) SetAvailabilityZone(v string) *FleetLaunchTemplateOverrides { + s.AvailabilityZone = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverrides) SetInstanceType(v string) *FleetLaunchTemplateOverrides { + s.InstanceType = &v + return s +} + +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplateOverrides { + s.MaxPrice = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { + s.SubnetId = &v + return s +} + +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverrides) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverrides { + s.WeightedCapacity = &v + return s +} + +// Describes overrides for a launch template. +type FleetLaunchTemplateOverridesRequest struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `type:"string"` + + // The instance type. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `type:"string"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `type:"double"` +} + +// String returns the string representation +func (s FleetLaunchTemplateOverridesRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateOverridesRequest) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetAvailabilityZone(v string) *FleetLaunchTemplateOverridesRequest { + s.AvailabilityZone = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetInstanceType(v string) *FleetLaunchTemplateOverridesRequest { + s.InstanceType = &v + return s +} + +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunchTemplateOverridesRequest { + s.MaxPrice = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { + s.SubnetId = &v + return s +} + +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverridesRequest { + s.WeightedCapacity = &v + return s +} + // Describes a launch template. type FleetLaunchTemplateSpecification struct { _ struct{} `type:"structure"` @@ -44774,12 +46354,68 @@ func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemp return s } +// The launch template to use. You must specify either the launch template ID +// or launch template name in the request. +type FleetLaunchTemplateSpecificationRequest struct { + _ struct{} `type:"structure"` + + // The ID of the launch template. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. + LaunchTemplateName *string `min:"3" type:"string"` + + // The version number of the launch template. + Version *string `type:"string"` +} + +// String returns the string representation +func (s FleetLaunchTemplateSpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateSpecificationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FleetLaunchTemplateSpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecificationRequest"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetVersion(v string) *FleetLaunchTemplateSpecificationRequest { + s.Version = &v + return s +} + // Describes a flow log. type FlowLog struct { _ struct{} `type:"structure"` // The date and time the flow log was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` // Information about the error that occurred. Rate limited indicates that CloudWatch // logs throttling has been applied for one or more network interfaces, or that @@ -44880,7 +46516,7 @@ type FpgaImage struct { _ struct{} `type:"structure"` // The date and time the AFI was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The description of the AFI. Description *string `locationName:"description" type:"string"` @@ -44919,7 +46555,7 @@ type FpgaImage struct { Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"` // The time of the most recent update to the AFI. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -45132,6 +46768,11 @@ type GetConsoleOutputInput struct { // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` + + // When enabled, retrieves the latest console output for the instance. + // + // Default: disabled (false) + Latest *bool `type:"boolean"` } // String returns the string representation @@ -45169,6 +46810,12 @@ func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput { return s } +// SetLatest sets the Latest field's value. +func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { + s.Latest = &v + return s +} + // Contains the output of GetConsoleOutput. type GetConsoleOutputOutput struct { _ struct{} `type:"structure"` @@ -45176,12 +46823,12 @@ type GetConsoleOutputOutput struct { // The ID of the instance. InstanceId *string `locationName:"instanceId" type:"string"` - // The console output, Base64-encoded. If using a command line tool, the tool - // decodes the output for you. + // The console output, base64-encoded. If you are using a command line tool, + // the tool decodes the output for you. Output *string `locationName:"output" type:"string"` - // The time the output was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + // The time at which the output was last updated. + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -45547,7 +47194,7 @@ type GetPasswordDataOutput struct { PasswordData *string `locationName:"passwordData" type:"string"` // The time the data was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -45660,7 +47307,7 @@ type GetReservedInstancesExchangeQuoteOutput struct { IsValidExchange *bool `locationName:"isValidExchange" type:"boolean"` // The new end date of the reservation term. - OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp" timestampFormat:"iso8601"` + OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp"` // The total true upfront charge for the exchange. PaymentDue *string `locationName:"paymentDue" type:"string"` @@ -45804,7 +47451,7 @@ type HistoryRecord struct { // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` } // String returns the string representation @@ -45835,10 +47482,55 @@ func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { return s } +// Describes an event in the history of an EC2 Fleet. +type HistoryRecordEntry struct { + _ struct{} `type:"structure"` + + // Information about the event. + EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` + + // The event type. + EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` + + // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` +} + +// String returns the string representation +func (s HistoryRecordEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HistoryRecordEntry) GoString() string { + return s.String() +} + +// SetEventInformation sets the EventInformation field's value. +func (s *HistoryRecordEntry) SetEventInformation(v *EventInformation) *HistoryRecordEntry { + s.EventInformation = v + return s +} + +// SetEventType sets the EventType field's value. +func (s *HistoryRecordEntry) SetEventType(v string) *HistoryRecordEntry { + s.EventType = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *HistoryRecordEntry) SetTimestamp(v time.Time) *HistoryRecordEntry { + s.Timestamp = &v + return s +} + // Describes the properties of the Dedicated Host. type Host struct { _ struct{} `type:"structure"` + // The time that the Dedicated Host was allocated. + AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` + // Whether auto-placement is on or off. AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` @@ -45866,8 +47558,14 @@ type Host struct { // The IDs and instance type that are currently running on the Dedicated Host. Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` + // The time that the Dedicated Host was released. + ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp"` + // The Dedicated Host's state. State *string `locationName:"state" type:"string" enum:"AllocationState"` + + // Any tags assigned to the Dedicated Host. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -45880,6 +47578,12 @@ func (s Host) GoString() string { return s.String() } +// SetAllocationTime sets the AllocationTime field's value. +func (s *Host) SetAllocationTime(v time.Time) *Host { + s.AllocationTime = &v + return s +} + // SetAutoPlacement sets the AutoPlacement field's value. func (s *Host) SetAutoPlacement(v string) *Host { s.AutoPlacement = &v @@ -45928,12 +47632,24 @@ func (s *Host) SetInstances(v []*HostInstance) *Host { return s } +// SetReleaseTime sets the ReleaseTime field's value. +func (s *Host) SetReleaseTime(v time.Time) *Host { + s.ReleaseTime = &v + return s +} + // SetState sets the State field's value. func (s *Host) SetState(v string) *Host { s.State = &v return s } +// SetTags sets the Tags field's value. +func (s *Host) SetTags(v []*Tag) *Host { + s.Tags = v + return s +} + // Describes an instance running on a Dedicated Host. type HostInstance struct { _ struct{} `type:"structure"` @@ -46112,7 +47828,7 @@ type HostReservation struct { Duration *int64 `locationName:"duration" type:"integer"` // The date and time that the reservation ends. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"` + End *time.Time `locationName:"end" type:"timestamp"` // The IDs of the Dedicated Hosts associated with the reservation. HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` @@ -46136,7 +47852,7 @@ type HostReservation struct { PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` // The date and time that the reservation started. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` + Start *time.Time `locationName:"start" type:"timestamp"` // The state of the reservation. State *string `locationName:"state" type:"string" enum:"ReservationState"` @@ -46283,7 +47999,7 @@ type IamInstanceProfileAssociation struct { State *string `locationName:"state" type:"string" enum:"IamInstanceProfileAssociationState"` // The time the IAM instance profile was associated with the instance. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -46399,7 +48115,7 @@ type IdFormat struct { // The date in UTC at which you are permanently switched over to using longer // IDs. If a deadline is not yet available for this resource type, this field // is not returned. - Deadline *time.Time `locationName:"deadline" type:"timestamp" timestampFormat:"iso8601"` + Deadline *time.Time `locationName:"deadline" type:"timestamp"` // The type of resource. Resource *string `locationName:"resource" type:"string"` @@ -47343,9 +49059,7 @@ type ImportInstanceTaskDetails struct { Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // One or more volumes. - // - // Volumes is a required field - Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list" required:"true"` + Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list"` } // String returns the string representation @@ -47854,27 +49568,19 @@ type ImportVolumeTaskDetails struct { _ struct{} `type:"structure"` // The Availability Zone where the resulting volume will reside. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The number of bytes converted so far. - // - // BytesConverted is a required field - BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"` + BytesConverted *int64 `locationName:"bytesConverted" type:"long"` // The description you provided when starting the import volume task. Description *string `locationName:"description" type:"string"` // The image. - // - // Image is a required field - Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"` + Image *DiskImageDescription `locationName:"image" type:"structure"` // The volume. - // - // Volume is a required field - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"` + Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` } // String returns the string representation @@ -47934,6 +49640,9 @@ type Instance struct { // The idempotency token you provided when you launched the instance, if applicable. ClientToken *string `locationName:"clientToken" type:"string"` + // The CPU options for the instance. + CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration // stack to provide optimal I/O performance. This optimization isn't available @@ -47973,7 +49682,7 @@ type Instance struct { KeyName *string `locationName:"keyName" type:"string"` // The time the instance was launched. - LaunchTime *time.Time `locationName:"launchTime" type:"timestamp" timestampFormat:"iso8601"` + LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` // The monitoring for the instance. Monitoring *Monitoring `locationName:"monitoring" type:"structure"` @@ -48095,6 +49804,12 @@ func (s *Instance) SetClientToken(v string) *Instance { return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance { + s.CpuOptions = v + return s +} + // SetEbsOptimized sets the EbsOptimized field's value. func (s *Instance) SetEbsOptimized(v bool) *Instance { s.EbsOptimized = &v @@ -48879,7 +50594,7 @@ type InstanceNetworkInterfaceAttachment struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // The ID of the network interface attachment. AttachmentId *string `locationName:"attachmentId" type:"string"` @@ -49011,26 +50726,6 @@ func (s InstanceNetworkInterfaceSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceNetworkInterfaceSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceNetworkInterfaceSpecification"} - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. func (s *InstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *InstanceNetworkInterfaceSpecification { s.AssociatePublicIpAddress = &v @@ -49322,7 +51017,7 @@ type InstanceStatusDetails struct { // The time when a status check failed. For an instance that was launched and // impaired, this is the time when the instance was launched. - ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp" timestampFormat:"iso8601"` + ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp"` // The type of instance status. Name *string `locationName:"name" type:"string" enum:"StatusName"` @@ -49374,10 +51069,10 @@ type InstanceStatusEvent struct { Description *string `locationName:"description" type:"string"` // The latest scheduled end time for the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The earliest scheduled start time for the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` } // String returns the string representation @@ -49984,7 +51679,7 @@ type LaunchTemplate struct { _ struct{} `type:"structure"` // The time launch template was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The principal that created the launch template. CreatedBy *string `locationName:"createdBy" type:"string"` @@ -50215,6 +51910,75 @@ func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *Launc return s } +// The CPU options for the instance. +type LaunchTemplateCpuOptions struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` + + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` +} + +// String returns the string representation +func (s LaunchTemplateCpuOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCpuOptions) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptions) SetCoreCount(v int64) *LaunchTemplateCpuOptions { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptions) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptions { + s.ThreadsPerCore = &v + return s +} + +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type LaunchTemplateCpuOptionsRequest struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` +} + +// String returns the string representation +func (s LaunchTemplateCpuOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCpuOptionsRequest) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetCoreCount(v int64) *LaunchTemplateCpuOptionsRequest { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + // Describes a block device for an EBS volume. type LaunchTemplateEbsBlockDevice struct { _ struct{} `type:"structure"` @@ -50695,26 +52459,6 @@ func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() s return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateInstanceNetworkInterfaceSpecificationRequest"} - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { s.AssociatePublicIpAddress = &v @@ -50988,7 +52732,7 @@ func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePla } // The launch template to use. You must specify either the launch template ID -// or launch template name in the request. +// or launch template name in the request, but not both. type LaunchTemplateSpecification struct { _ struct{} `type:"structure"` @@ -51054,7 +52798,7 @@ type LaunchTemplateSpotMarketOptions struct { // active until all instances launch, the request is canceled, or this date // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -51120,7 +52864,7 @@ type LaunchTemplateSpotMarketOptionsRequest struct { // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. The default end date is 7 days from the // current date. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -51201,7 +52945,8 @@ type LaunchTemplateTagSpecificationRequest struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance and volume. + // on creation are instance and volume. To tag a resource after it has been + // created, see CreateTags. ResourceType *string `type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -51235,7 +52980,7 @@ type LaunchTemplateVersion struct { _ struct{} `type:"structure"` // The time the version was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The principal that created the version. CreatedBy *string `locationName:"createdBy" type:"string"` @@ -51520,6 +53265,109 @@ func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { return s } +type ModifyFleetInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The size of the EC2 Fleet. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ModifyFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyFleetInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) + } + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { + s.DryRun = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *ModifyFleetInput) SetExcessCapacityTerminationPolicy(v string) *ModifyFleetInput { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *ModifyFleetInput) SetFleetId(v string) *ModifyFleetInput { + s.FleetId = &v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *ModifyFleetInput { + s.TargetCapacitySpecification = v + return s +} + +type ModifyFleetOutput struct { + _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifyFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFleetOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifyFleetOutput) SetReturn(v bool) *ModifyFleetOutput { + s.Return = &v + return s +} + type ModifyFpgaImageAttributeInput struct { _ struct{} `type:"structure"` @@ -52796,9 +54644,8 @@ func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v str type ModifySnapshotAttributeInput struct { _ struct{} `type:"structure"` - // The snapshot attribute to modify. - // - // Only volume creation permissions may be modified at the customer level. + // The snapshot attribute to modify. Only volume creation permissions can be + // modified. Attribute *string `type:"string" enum:"SnapshotAttributeName"` // A JSON representation of the snapshot attribute modification. @@ -53151,19 +54998,17 @@ type ModifyVolumeInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // Target IOPS rate of the volume to be modified. + // The target IOPS rate of the volume. // - // Only valid for Provisioned IOPS SSD (io1) volumes. For more information about - // io1 IOPS configuration, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). + // This is only valid for Provisioned IOPS SSD (io1) volumes. For more information, + // see Provisioned IOPS SSD (io1) Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). // // Default: If no IOPS value is specified, the existing value is retained. Iops *int64 `type:"integer"` - // Target size in GiB of the volume to be modified. Target volume size must - // be greater than or equal to than the existing size of the volume. For information - // about available EBS volume sizes, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // The target size of the volume, in GiB. The target volume size must be greater + // than or equal to than the existing size of the volume. For information about + // available EBS volume sizes, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). // // Default: If no size is specified, the existing size is retained. Size *int64 `type:"integer"` @@ -53173,10 +55018,7 @@ type ModifyVolumeInput struct { // VolumeId is a required field VolumeId *string `type:"string" required:"true"` - // Target EBS volume type of the volume to be modified - // - // The API does not support modifications for volume type standard. You also - // cannot change the type of a volume to standard. + // The target EBS volume type of the volume. // // Default: If no type is specified, the existing type is retained. VolumeType *string `type:"string" enum:"VolumeType"` @@ -53238,7 +55080,7 @@ func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput { type ModifyVolumeOutput struct { _ struct{} `type:"structure"` - // A VolumeModification object. + // Information about the volume modification. VolumeModification *VolumeModification `locationName:"volumeModification" type:"structure"` } @@ -54200,10 +56042,10 @@ type NatGateway struct { _ struct{} `type:"structure"` // The date and time the NAT gateway was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The date and time the NAT gateway was deleted, if applicable. - DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp" timestampFormat:"iso8601"` + DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp"` // If the NAT gateway could not be created, specifies the error code for the // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound @@ -54863,7 +56705,7 @@ type NetworkInterfaceAttachment struct { _ struct{} `type:"structure"` // The timestamp indicating when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // The ID of the network interface attachment. AttachmentId *string `locationName:"attachmentId" type:"string"` @@ -55728,9 +57570,7 @@ type PrivateIpAddressSpecification struct { Primary *bool `locationName:"primary" type:"boolean"` // The private IPv4 addresses. - // - // PrivateIpAddress is a required field - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string" required:"true"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } // String returns the string representation @@ -55743,19 +57583,6 @@ func (s PrivateIpAddressSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PrivateIpAddressSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PrivateIpAddressSpecification"} - if s.PrivateIpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateIpAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetPrimary sets the Primary field's value. func (s *PrivateIpAddressSpecification) SetPrimary(v bool) *PrivateIpAddressSpecification { s.Primary = &v @@ -55834,7 +57661,7 @@ type ProvisionedBandwidth struct { // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp" timestampFormat:"iso8601"` + ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), @@ -55844,7 +57671,7 @@ type ProvisionedBandwidth struct { // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - RequestTime *time.Time `locationName:"requestTime" type:"timestamp" timestampFormat:"iso8601"` + RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), @@ -57584,7 +59411,7 @@ type ReportInstanceStatusInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The time at which the reported instance health state ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // One or more instances. // @@ -57618,7 +59445,7 @@ type ReportInstanceStatusInput struct { ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` // The time at which the reported instance health state began. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The status of all instances listed. // @@ -57724,6 +59551,11 @@ type RequestLaunchTemplateData struct { // cannot be changed using this action. BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` + // The credit option for CPU usage of the instance. Valid for T2 instances only. CreditSpecification *CreditSpecificationRequest `type:"structure"` @@ -57800,9 +59632,10 @@ type RequestLaunchTemplateData struct { // group ID and security name in the same request. SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - // The tags to apply to the resources during launch. You can tag instances and - // volumes. The specified tags are applied to all instances or volumes that - // are created during launch. + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` // The Base64-encoded user data to make available to the instance. For more @@ -57840,16 +59673,6 @@ func (s *RequestLaunchTemplateData) Validate() error { } } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -57863,6 +59686,12 @@ func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBl return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData { s.CreditSpecification = v @@ -58093,13 +59922,13 @@ type RequestSpotInstancesInput struct { // for termination and provides a Spot Instance termination notice, which gives // the instance a two-minute warning before it terminates. // - // Note that you can't specify an Availability Zone group or a launch group - // if you specify a duration. + // You can't specify an Availability Zone group or a launch group if you specify + // a duration. BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` // Unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. ClientToken *string `locationName:"clientToken" type:"string"` // Checks whether you have the required permissions for the action, without @@ -58139,14 +59968,14 @@ type RequestSpotInstancesInput struct { // launch, the request expires, or the request is canceled. If the request is // persistent, the request becomes active at this date and time and remains // active until it expires or is canceled. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date of the request. If this is a one-time request, the request remains // active until all instances launch, the request is canceled, or this date // is reached. If the request is persistent, it remains active until it is canceled // or this date is reached. The default end date is 7 days from the current // date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -58355,16 +60184,6 @@ func (s *RequestSpotLaunchSpecification) Validate() error { invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -58655,7 +60474,7 @@ type ReservedInstances struct { Duration *int64 `locationName:"duration" type:"long"` // The time when the Reserved Instance expires. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"` + End *time.Time `locationName:"end" type:"timestamp"` // The purchase price of the Reserved Instance. FixedPrice *float64 `locationName:"fixedPrice" type:"float"` @@ -58688,7 +60507,7 @@ type ReservedInstances struct { Scope *string `locationName:"scope" type:"string" enum:"scope"` // The date and time the Reserved Instance started. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` + Start *time.Time `locationName:"start" type:"timestamp"` // The state of the Reserved Instance purchase. State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` @@ -58913,7 +60732,7 @@ type ReservedInstancesListing struct { ClientToken *string `locationName:"clientToken" type:"string"` // The time the listing was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The number of instances in this state. InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"` @@ -58938,7 +60757,7 @@ type ReservedInstancesListing struct { Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The last modified timestamp of the listing. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` } // String returns the string representation @@ -59020,10 +60839,10 @@ type ReservedInstancesModification struct { ClientToken *string `locationName:"clientToken" type:"string"` // The time when the modification request was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The time for the modification to become effective. - EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp" timestampFormat:"iso8601"` + EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp"` // Contains target configurations along with their corresponding new Reserved // Instance IDs. @@ -59042,7 +60861,7 @@ type ReservedInstancesModification struct { StatusMessage *string `locationName:"statusMessage" type:"string"` // The time when the modification request was last updated. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` } // String returns the string representation @@ -59741,6 +61560,11 @@ type ResponseLaunchTemplateData struct { // The block device mappings. BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptions `locationName:"cpuOptions" type:"structure"` + // The credit option for CPU usage of the instance. CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"` @@ -59817,6 +61641,12 @@ func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateB return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData { s.CreditSpecification = v @@ -60558,6 +62388,11 @@ type RunInstancesInput struct { // Constraints: Maximum 64 ASCII characters ClientToken *string `locationName:"clientToken" type:"string"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *CpuOptionsRequest `type:"structure"` + // The credit option for CPU usage of the instance. Valid values are standard // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. // For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) @@ -60646,6 +62481,7 @@ type RunInstancesInput struct { // The launch template to use to launch the instances. Any parameters that you // specify in RunInstances override the same parameters in the launch template. + // You can specify either the name or ID of a launch template, but not both. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // The maximum number of instances to launch. If you specify more instances @@ -60711,9 +62547,10 @@ type RunInstancesInput struct { // [EC2-VPC] The ID of the subnet to launch the instance into. SubnetId *string `type:"string"` - // The tags to apply to the resources during launch. You can tag instances and - // volumes. The specified tags are applied to all instances or volumes that - // are created during launch. + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The user data to make available to the instance. For more information, see @@ -60764,16 +62601,6 @@ func (s *RunInstancesInput) Validate() error { invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -60799,6 +62626,12 @@ func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput { return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *RunInstancesInput) SetCpuOptions(v *CpuOptionsRequest) *RunInstancesInput { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput { s.CreditSpecification = v @@ -61193,7 +63026,7 @@ type ScheduledInstance struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The date when the Scheduled Instance was purchased. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The hourly price for a single instance. HourlyPrice *string `locationName:"hourlyPrice" type:"string"` @@ -61208,13 +63041,13 @@ type ScheduledInstance struct { NetworkPlatform *string `locationName:"networkPlatform" type:"string"` // The time for the next schedule to start. - NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp" timestampFormat:"iso8601"` + NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp"` // The platform (Linux/UNIX or Windows). Platform *string `locationName:"platform" type:"string"` // The time that the previous schedule ended or will end. - PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp" timestampFormat:"iso8601"` + PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp"` // The schedule recurrence. Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` @@ -61226,10 +63059,10 @@ type ScheduledInstance struct { SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` // The end date for the Scheduled Instance. - TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp" timestampFormat:"iso8601"` + TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp"` // The start date for the Scheduled Instance. - TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp" timestampFormat:"iso8601"` + TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp"` // The total number of hours for a single instance for the entire term. TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` @@ -61346,7 +63179,7 @@ type ScheduledInstanceAvailability struct { AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` // The time period for the first schedule to start. - FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp" timestampFormat:"iso8601"` + FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp"` // The hourly price for a single instance. HourlyPrice *string `locationName:"hourlyPrice" type:"string"` @@ -62574,14 +64407,14 @@ type SlotDateTimeRangeRequest struct { // The earliest date and time, in UTC, for the Scheduled Instance to start. // // EarliestTime is a required field - EarliestTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EarliestTime *time.Time `type:"timestamp" required:"true"` // The latest date and time, in UTC, for the Scheduled Instance to start. This // value must be later than or equal to the earliest date and at most three // months in the future. // // LatestTime is a required field - LatestTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LatestTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -62627,10 +64460,10 @@ type SlotStartTimeRangeRequest struct { _ struct{} `type:"structure"` // The earliest date and time, in UTC, for the Scheduled Instance to start. - EarliestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestTime *time.Time `type:"timestamp"` // The latest date and time, in UTC, for the Scheduled Instance to start. - LatestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -62694,7 +64527,7 @@ type Snapshot struct { SnapshotId *string `locationName:"snapshotId" type:"string"` // The time stamp when the snapshot was initiated. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The snapshot state. State *string `locationName:"status" type:"string" enum:"SnapshotState"` @@ -63218,26 +65051,6 @@ func (s SpotFleetLaunchSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *SpotFleetLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpotFleetLaunchSpecification"} - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAddressingType sets the AddressingType field's value. func (s *SpotFleetLaunchSpecification) SetAddressingType(v string) *SpotFleetLaunchSpecification { s.AddressingType = &v @@ -63386,7 +65199,7 @@ type SpotFleetRequestConfig struct { // The creation date and time of the request. // // CreateTime is a required field - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"` // The configuration of the Spot Fleet request. // @@ -63452,8 +65265,8 @@ type SpotFleetRequestConfigData struct { // by the Spot Fleet request. The default is lowestPrice. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` - // A unique, case-sensitive identifier you provide to ensure idempotency of - // your listings. This helps avoid duplicate listings. For more information, + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of your listings. This helps to avoid duplicate listings. For more information, // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` @@ -63491,6 +65304,17 @@ type SpotFleetRequestConfigData struct { // HS1, M1, M2, M3, and T1. LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` + // The number of On-Demand units fulfilled by this request compared to the set + // target On-Demand capacity. + OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` + + // The number of On-Demand units to request. You can choose to set the target + // capacity in terms of instances or a performance characteristic that is important + // to your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + // Indicates whether Spot Fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` @@ -63511,24 +65335,23 @@ type SpotFleetRequestConfigData struct { // Fleet request expires. TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` - // The type of request. Indicates whether the fleet will only request the target - // capacity or also attempt to maintain it. When you request a certain target - // capacity, the fleet will only place the required requests. It will not attempt - // to replenish Spot Instances if capacity is diminished, nor will it submit - // requests in alternative Spot pools if capacity is not available. When you - // want to maintain a certain target capacity, fleet will place the required - // requests to meet this target capacity. It will also automatically replenish - // any interrupted instances. Default: maintain. + // The type of request. Indicates whether the Spot Fleet only requests the target + // capacity or also attempts to maintain it. When this value is request, the + // Spot Fleet only places the required requests. It does not attempt to replenish + // Spot Instances if capacity is diminished, nor does it submit requests in + // alternative Spot pools if capacity is not available. To maintain a certain + // target capacity, the Spot Fleet places the required requests to meet capacity + // and automatically replenishes any interrupted instances. Default: maintain. Type *string `locationName:"type" type:"string" enum:"FleetType"` // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // At this point, no new Spot Instance requests are placed or able to fulfill // the request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -63550,16 +65373,6 @@ func (s *SpotFleetRequestConfigData) Validate() error { if s.TargetCapacity == nil { invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) } - if s.LaunchSpecifications != nil { - for i, v := range s.LaunchSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } if s.LaunchTemplateConfigs != nil { for i, v := range s.LaunchTemplateConfigs { if v == nil { @@ -63636,6 +65449,18 @@ func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConf return s } +// SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { + s.OnDemandFulfilledCapacity = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { + s.OnDemandTargetCapacity = &v + return s +} + // SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { s.ReplaceUnhealthyInstances = &v @@ -63730,7 +65555,7 @@ type SpotInstanceRequest struct { // The date and time when the Spot Instance request was created, in UTC format // (for example, YYYY-MM-DDTHH:MM:SSZ). - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The fault codes for the Spot Instance request, if any. Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` @@ -63761,10 +65586,9 @@ type SpotInstanceRequest struct { // The maximum price per hour that you are willing to pay for a Spot Instance. SpotPrice *string `locationName:"spotPrice" type:"string"` - // The state of the Spot Instance request. Spot status information can help - // you track your Spot Instance requests. For more information, see Spot Status - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The state of the Spot Instance request. Spot status information helps track + // your Spot Instance requests. For more information, see Spot Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) + // in the Amazon EC2 User Guide for Linux Instances. State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` // The status code and status message describing the Spot Instance request. @@ -63778,14 +65602,14 @@ type SpotInstanceRequest struct { // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The request becomes active at this date and time. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // If this is a one-time request, it remains active until all instances launch, // the request is canceled, or this date is reached. If the request is persistent, // it remains active until it is canceled or this date is reached. The default // end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -63950,7 +65774,7 @@ type SpotInstanceStatus struct { _ struct{} `type:"structure"` // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. Code *string `locationName:"code" type:"string"` // The description for the status code. @@ -63958,7 +65782,7 @@ type SpotInstanceStatus struct { // The date and time of the most recent status update, in UTC format (for example, // YYYY-MM-DDTHH:MM:SSZ). - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -64013,7 +65837,7 @@ type SpotMarketOptions struct { // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. The default end date is 7 days from the // current date. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -64056,6 +65880,74 @@ func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { return s } +// Describes the configuration of Spot Instances in an EC2 Fleet. +type SpotOptions struct { + _ struct{} `type:"structure"` + + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` + + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` +} + +// String returns the string representation +func (s SpotOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotOptions) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptions) SetAllocationStrategy(v string) *SpotOptions { + s.AllocationStrategy = &v + return s +} + +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { + s.InstanceInterruptionBehavior = &v + return s +} + +// Describes the configuration of Spot Instances in an EC2 Fleet request. +type SpotOptionsRequest struct { + _ struct{} `type:"structure"` + + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` + + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` +} + +// String returns the string representation +func (s SpotOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotOptionsRequest) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptionsRequest) SetAllocationStrategy(v string) *SpotOptionsRequest { + s.AllocationStrategy = &v + return s +} + +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOptionsRequest { + s.InstanceInterruptionBehavior = &v + return s +} + // Describes Spot Instance placement. type SpotPlacement struct { _ struct{} `type:"structure"` @@ -64121,7 +66013,7 @@ type SpotPrice struct { SpotPrice *string `locationName:"spotPrice" type:"string"` // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -64402,19 +66294,23 @@ type StateReason struct { // The message for the state change. // - // * Server.InsufficientInstanceCapacity: There was insufficient instance - // capacity to satisfy the launch request. + // * Server.InsufficientInstanceCapacity: There was insufficient capacity + // available to satisfy the launch request. // - // * Server.InternalError: An internal error occurred during instance launch, - // resulting in termination. + // * Server.InternalError: An internal error caused the instance to terminate + // during launch. // // * Server.ScheduledStop: The instance was stopped due to a scheduled retirement. // - // * Server.SpotInstanceTermination: A Spot Instance was terminated due to - // an increase in the Spot price. + // * Server.SpotInstanceShutdown: The instance was stopped because the number + // of Spot requests with a maximum price equal to or higher than the Spot + // price exceeded available capacity or because of an increase in the Spot + // price. // - // * Client.InternalError: A client error caused the instance to terminate - // on launch. + // * Server.SpotInstanceTermination: The instance was terminated because + // the number of Spot requests with a maximum price equal to or higher than + // the Spot price exceeded available capacity or because of an increase in + // the Spot price. // // * Client.InstanceInitiatedShutdown: The instance was shut down using the // shutdown -h command from the instance. @@ -64422,14 +66318,17 @@ type StateReason struct { // * Client.InstanceTerminated: The instance was terminated or rebooted during // AMI creation. // + // * Client.InternalError: A client error caused the instance to terminate + // during launch. + // + // * Client.InvalidSnapshot.NotFound: The specified snapshot was not found. + // // * Client.UserInitiatedShutdown: The instance was shut down using the Amazon // EC2 API. // // * Client.VolumeLimitExceeded: The limit on the number of EBS volumes or // total storage was exceeded. Decrease usage or request an increase in your - // limits. - // - // * Client.InvalidSnapshot.NotFound: The specified snapshot was not found. + // account limits. Message *string `locationName:"message" type:"string"` } @@ -64913,7 +66812,8 @@ type TagSpecification struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance and volume. + // on creation are fleet, instance, snapshot, and volume. To tag a resource + // after it has been created, see CreateTags. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -64942,6 +66842,131 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { return s } +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecification struct { + _ struct{} `type:"structure"` + + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` + + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + + // The maximum number of Spot units to launch. + SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + TotalTargetCapacity *int64 `locationName:"totalTargetCapacity" type:"integer"` +} + +// String returns the string representation +func (s TargetCapacitySpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetCapacitySpecification) GoString() string { + return s.String() +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecification) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecification { + s.DefaultTargetCapacityType = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecification { + s.OnDemandTargetCapacity = &v + return s +} + +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetSpotTargetCapacity(v int64) *TargetCapacitySpecification { + s.SpotTargetCapacity = &v + return s +} + +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCapacitySpecification { + s.TotalTargetCapacity = &v + return s +} + +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecificationRequest struct { + _ struct{} `type:"structure"` + + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `type:"string" enum:"DefaultTargetCapacityType"` + + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `type:"integer"` + + // The number of Spot units to request. + SpotTargetCapacity *int64 `type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + // + // TotalTargetCapacity is a required field + TotalTargetCapacity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s TargetCapacitySpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetCapacitySpecificationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetCapacitySpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetCapacitySpecificationRequest"} + if s.TotalTargetCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("TotalTargetCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecificationRequest) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecificationRequest { + s.DefaultTargetCapacityType = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.OnDemandTargetCapacity = &v + return s +} + +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetSpotTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.SpotTargetCapacity = &v + return s +} + +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetTotalTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.TotalTargetCapacity = &v + return s +} + // Information about the Convertible Reserved Instance offering. type TargetConfiguration struct { _ struct{} `type:"structure"` @@ -65985,7 +68010,7 @@ type VgwTelemetry struct { AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"` // The date and time of the last change in status. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"iso8601"` + LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` // The Internet-routable IP address of the virtual private gateway's outside // interface. @@ -66049,7 +68074,7 @@ type Volume struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The time stamp when volume creation was initiated. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // Indicates whether the volume will be encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` @@ -66058,11 +68083,12 @@ type Volume struct { // For Provisioned IOPS SSD volumes, this represents the number of IOPS that // are provisioned for the volume. For General Purpose SSD volumes, this represents // the baseline performance of the volume and the rate at which the volume accumulates - // I/O credits for bursting. For more information on General Purpose SSD baseline - // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // I/O credits for bursting. For more information about General Purpose SSD + // baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // Constraint: Range is 100-32000 IOPS for io1 volumes and 100-10000 IOPS for // gp2 volumes. // // Condition: This parameter is required for requests to create io1 volumes; @@ -66181,7 +68207,7 @@ type VolumeAttachment struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // Indicates whether the EBS volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -66290,41 +68316,41 @@ func (s *VolumeDetail) SetSize(v int64) *VolumeDetail { type VolumeModification struct { _ struct{} `type:"structure"` - // Modification completion or failure time. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + // The modification completion or failure time. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` - // Current state of modification. Modification state is null for unmodified + // The current modification state. The modification state is null for unmodified // volumes. ModificationState *string `locationName:"modificationState" type:"string" enum:"VolumeModificationState"` - // Original IOPS rate of the volume being modified. + // The original IOPS rate of the volume. OriginalIops *int64 `locationName:"originalIops" type:"integer"` - // Original size of the volume being modified. + // The original size of the volume. OriginalSize *int64 `locationName:"originalSize" type:"integer"` - // Original EBS volume type of the volume being modified. + // The original EBS volume type of the volume. OriginalVolumeType *string `locationName:"originalVolumeType" type:"string" enum:"VolumeType"` - // Modification progress from 0 to 100%. + // The modification progress, from 0 to 100 percent complete. Progress *int64 `locationName:"progress" type:"long"` - // Modification start time - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + // The modification start time. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` - // Generic status message on modification progress or failure. + // A status message about the modification progress or failure. StatusMessage *string `locationName:"statusMessage" type:"string"` - // Target IOPS rate of the volume being modified. + // The target IOPS rate of the volume. TargetIops *int64 `locationName:"targetIops" type:"integer"` - // Target size of the volume being modified. + // The target size of the volume, in GiB. TargetSize *int64 `locationName:"targetSize" type:"integer"` - // Target EBS volume type of the volume being modified. + // The target EBS volume type of the volume. TargetVolumeType *string `locationName:"targetVolumeType" type:"string" enum:"VolumeType"` - // ID of the volume being modified. + // The ID of the volume. VolumeId *string `locationName:"volumeId" type:"string"` } @@ -66508,10 +68534,10 @@ type VolumeStatusEvent struct { EventType *string `locationName:"eventType" type:"string"` // The latest end time of the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The earliest start time of the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` } // String returns the string representation @@ -66899,7 +68925,7 @@ type VpcEndpoint struct { _ struct{} `type:"structure"` // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` // (Interface endpoint) The DNS entries for the endpoint. DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"` @@ -67033,7 +69059,7 @@ type VpcEndpointConnection struct { _ struct{} `type:"structure"` // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` // The ID of the service to which the endpoint is connected. ServiceId *string `locationName:"serviceId" type:"string"` @@ -67139,7 +69165,7 @@ type VpcPeeringConnection struct { AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"` // The time that an unaccepted VPC peering connection will expire. - ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"` + ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp"` // Information about the requester VPC. CIDR block information is only returned // when describing an active VPC peering connection. @@ -67938,6 +69964,28 @@ const ( DatafeedSubscriptionStateInactive = "Inactive" ) +const ( + // DefaultTargetCapacityTypeSpot is a DefaultTargetCapacityType enum value + DefaultTargetCapacityTypeSpot = "spot" + + // DefaultTargetCapacityTypeOnDemand is a DefaultTargetCapacityType enum value + DefaultTargetCapacityTypeOnDemand = "on-demand" +) + +const ( + // DeleteFleetErrorCodeFleetIdDoesNotExist is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetIdDoesNotExist = "fleetIdDoesNotExist" + + // DeleteFleetErrorCodeFleetIdMalformed is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetIdMalformed = "fleetIdMalformed" + + // DeleteFleetErrorCodeFleetNotInDeletableState is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetNotInDeletableState = "fleetNotInDeletableState" + + // DeleteFleetErrorCodeUnexpectedError is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeUnexpectedError = "unexpectedError" +) + const ( // DeviceTypeEbs is a DeviceType enum value DeviceTypeEbs = "ebs" @@ -68039,6 +70087,62 @@ const ( ExportTaskStateCompleted = "completed" ) +const ( + // FleetActivityStatusError is a FleetActivityStatus enum value + FleetActivityStatusError = "error" + + // FleetActivityStatusPendingFulfillment is a FleetActivityStatus enum value + FleetActivityStatusPendingFulfillment = "pending-fulfillment" + + // FleetActivityStatusPendingTermination is a FleetActivityStatus enum value + FleetActivityStatusPendingTermination = "pending-termination" + + // FleetActivityStatusFulfilled is a FleetActivityStatus enum value + FleetActivityStatusFulfilled = "fulfilled" +) + +const ( + // FleetEventTypeInstanceChange is a FleetEventType enum value + FleetEventTypeInstanceChange = "instance-change" + + // FleetEventTypeFleetChange is a FleetEventType enum value + FleetEventTypeFleetChange = "fleet-change" + + // FleetEventTypeServiceError is a FleetEventType enum value + FleetEventTypeServiceError = "service-error" +) + +const ( + // FleetExcessCapacityTerminationPolicyNoTermination is a FleetExcessCapacityTerminationPolicy enum value + FleetExcessCapacityTerminationPolicyNoTermination = "no-termination" + + // FleetExcessCapacityTerminationPolicyTermination is a FleetExcessCapacityTerminationPolicy enum value + FleetExcessCapacityTerminationPolicyTermination = "termination" +) + +const ( + // FleetStateCodeSubmitted is a FleetStateCode enum value + FleetStateCodeSubmitted = "submitted" + + // FleetStateCodeActive is a FleetStateCode enum value + FleetStateCodeActive = "active" + + // FleetStateCodeDeleted is a FleetStateCode enum value + FleetStateCodeDeleted = "deleted" + + // FleetStateCodeFailed is a FleetStateCode enum value + FleetStateCodeFailed = "failed" + + // FleetStateCodeDeletedRunning is a FleetStateCode enum value + FleetStateCodeDeletedRunning = "deleted-running" + + // FleetStateCodeDeletedTerminating is a FleetStateCode enum value + FleetStateCodeDeletedTerminating = "deleted-terminating" + + // FleetStateCodeModifying is a FleetStateCode enum value + FleetStateCodeModifying = "modifying" +) + const ( // FleetTypeRequest is a FleetType enum value FleetTypeRequest = "request" @@ -68435,6 +70539,9 @@ const ( // InstanceTypeI316xlarge is a InstanceType enum value InstanceTypeI316xlarge = "i3.16xlarge" + // InstanceTypeI3Metal is a InstanceType enum value + InstanceTypeI3Metal = "i3.metal" + // InstanceTypeHi14xlarge is a InstanceType enum value InstanceTypeHi14xlarge = "hi1.4xlarge" @@ -68495,6 +70602,24 @@ const ( // InstanceTypeC518xlarge is a InstanceType enum value InstanceTypeC518xlarge = "c5.18xlarge" + // InstanceTypeC5dLarge is a InstanceType enum value + InstanceTypeC5dLarge = "c5d.large" + + // InstanceTypeC5dXlarge is a InstanceType enum value + InstanceTypeC5dXlarge = "c5d.xlarge" + + // InstanceTypeC5d2xlarge is a InstanceType enum value + InstanceTypeC5d2xlarge = "c5d.2xlarge" + + // InstanceTypeC5d4xlarge is a InstanceType enum value + InstanceTypeC5d4xlarge = "c5d.4xlarge" + + // InstanceTypeC5d9xlarge is a InstanceType enum value + InstanceTypeC5d9xlarge = "c5d.9xlarge" + + // InstanceTypeC5d18xlarge is a InstanceType enum value + InstanceTypeC5d18xlarge = "c5d.18xlarge" + // InstanceTypeCc14xlarge is a InstanceType enum value InstanceTypeCc14xlarge = "cc1.4xlarge" @@ -68573,6 +70698,24 @@ const ( // InstanceTypeM524xlarge is a InstanceType enum value InstanceTypeM524xlarge = "m5.24xlarge" + // InstanceTypeM5dLarge is a InstanceType enum value + InstanceTypeM5dLarge = "m5d.large" + + // InstanceTypeM5dXlarge is a InstanceType enum value + InstanceTypeM5dXlarge = "m5d.xlarge" + + // InstanceTypeM5d2xlarge is a InstanceType enum value + InstanceTypeM5d2xlarge = "m5d.2xlarge" + + // InstanceTypeM5d4xlarge is a InstanceType enum value + InstanceTypeM5d4xlarge = "m5d.4xlarge" + + // InstanceTypeM5d12xlarge is a InstanceType enum value + InstanceTypeM5d12xlarge = "m5d.12xlarge" + + // InstanceTypeM5d24xlarge is a InstanceType enum value + InstanceTypeM5d24xlarge = "m5d.24xlarge" + // InstanceTypeH12xlarge is a InstanceType enum value InstanceTypeH12xlarge = "h1.2xlarge" @@ -69072,6 +71215,25 @@ const ( SnapshotStateError = "error" ) +const ( + // SpotAllocationStrategyLowestPrice is a SpotAllocationStrategy enum value + SpotAllocationStrategyLowestPrice = "lowest-price" + + // SpotAllocationStrategyDiversified is a SpotAllocationStrategy enum value + SpotAllocationStrategyDiversified = "diversified" +) + +const ( + // SpotInstanceInterruptionBehaviorHibernate is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorHibernate = "hibernate" + + // SpotInstanceInterruptionBehaviorStop is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorStop = "stop" + + // SpotInstanceInterruptionBehaviorTerminate is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorTerminate = "terminate" +) + const ( // SpotInstanceStateOpen is a SpotInstanceState enum value SpotInstanceStateOpen = "open" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go index ba4433d38..6acbc43fe 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ec2" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "ec2" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EC2" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EC2 client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index d9bcf883b..e7b467d34 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -2247,7 +2247,7 @@ type AuthorizationData struct { // The Unix time in seconds and milliseconds when the authorization token expires. // Authorization tokens are valid for 12 hours. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"` + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` // The registry URL to use for this authorization token in a docker login command. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com. @@ -2857,7 +2857,7 @@ type DeleteLifecyclePolicyOutput struct { _ struct{} `type:"structure"` // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` // The JSON lifecycle policy text. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` @@ -3579,7 +3579,7 @@ type GetLifecyclePolicyOutput struct { _ struct{} `type:"structure"` // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` // The JSON lifecycle policy text. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` @@ -3964,7 +3964,7 @@ type ImageDetail struct { // The date and time, expressed in standard JavaScript date format, at which // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` + ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` // The size, in bytes, of the image in the repository. // @@ -4323,7 +4323,7 @@ type LifecyclePolicyPreviewResult struct { // The date and time, expressed in standard JavaScript date format, at which // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` + ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` // The list of tags associated with this image. ImageTags []*string `locationName:"imageTags" type:"list"` @@ -4784,7 +4784,7 @@ type Repository struct { _ struct{} `type:"structure"` // The date and time, in JavaScript date format, when the repository was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The AWS account ID associated with the registry that contains the repository. RegistryId *string `locationName:"registryId" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go index 95de12e25..7bdf21370 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ecr" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "ecr" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ECR" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ECR client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index f6e48bfd7..89acca2b3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -180,17 +180,21 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // balancer are considered healthy if they are in the RUNNING state. Tasks for // services that do use a load balancer are considered healthy if they are in // the RUNNING state and the container instance they are hosted on is reported -// as healthy by the load balancer. The default value for minimumHealthyPercent -// is 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs. +// as healthy by the load balancer. The default value for a replica service +// for minimumHealthyPercent is 50% in the console and 100% for the AWS CLI, +// the AWS SDKs, and the APIs. The default value for a daemon service for minimumHealthyPercent +// is 0% for the AWS CLI, the AWS SDKs, and the APIs and 50% for the console. // // The maximumPercent parameter represents an upper limit on the number of your // service's tasks that are allowed in the RUNNING or PENDING state during a // deployment, as a percentage of the desiredCount (rounded down to the nearest // integer). This parameter enables you to define the deployment batch size. -// For example, if your service has a desiredCount of four tasks and a maximumPercent -// value of 200%, the scheduler can start four new tasks before stopping the -// four older tasks (provided that the cluster resources required to do this -// are available). The default value for maximumPercent is 200%. +// For example, if your replica service has a desiredCount of four tasks and +// a maximumPercent value of 200%, the scheduler can start four new tasks before +// stopping the four older tasks (provided that the cluster resources required +// to do this are available). The default value for a replica service for maximumPercent +// is 200%. If you are using a daemon service type, the maximumPercent should +// remain at 100%, which is the default value. // // When the service scheduler launches new tasks, it determines task placement // in your cluster using the following logic: @@ -203,11 +207,11 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // Zones in this manner (although you can choose a different placement strategy) // with the placementStrategy parameter): // -// Sort the valid container instances by the fewest number of running tasks -// for this service in the same Availability Zone as the instance. For example, -// if zone A has one running service task and zones B and C each have zero, -// valid container instances in either zone B or C are considered optimal -// for placement. +// Sort the valid container instances, giving priority to instances that have +// the fewest number of running tasks for this service in their respective +// Availability Zone. For example, if zone A has one running service task +// and zones B and C each have zero, valid container instances in either +// zone B or C are considered optimal for placement. // // Place the new service task on a valid container instance in an optimal Availability // Zone (based on the previous steps), favoring container instances with @@ -4201,6 +4205,8 @@ type ContainerDefinition struct { // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/#create-a-container) // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.27/) // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/). + // + // The hostname parameter is not supported if using the awsvpc networkMode. Hostname *string `locationName:"hostname" type:"string"` // The image used to start a container. This string is passed directly to the @@ -4695,7 +4701,7 @@ type ContainerInstance struct { PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` // The Unix time stamp for when the container instance was registered. - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix"` + RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"` // For CPU and memory resource types, this parameter describes the amount of // each resource that was available on the container instance when the container @@ -4707,12 +4713,12 @@ type ContainerInstance struct { RegisteredResources []*Resource `locationName:"registeredResources" type:"list"` // For CPU and memory resource types, this parameter describes the remaining - // CPU and memory on the that has not already been allocated to tasks (and is - // therefore available for new tasks). For port resource types, this parameter - // describes the ports that were reserved by the Amazon ECS container agent - // (at instance registration time) and any task containers that have reserved - // port mappings on the host (with the host or bridge network mode). Any port - // that is not specified here is available for new tasks. + // CPU and memory that has not already been allocated to tasks and is therefore + // available for new tasks. For port resource types, this parameter describes + // the ports that were reserved by the Amazon ECS container agent (at instance + // registration time) and any task containers that have reserved port mappings + // on the host (with the host or bridge network mode). Any port that is not + // specified here is available for new tasks. RemainingResources []*Resource `locationName:"remainingResources" type:"list"` // The number of tasks on the container instance that are in the RUNNING status. @@ -5027,8 +5033,8 @@ func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { type CreateServiceInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. Up to 32 ASCII characters are allowed. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. Up to 32 ASCII characters are allowed. ClientToken *string `locationName:"clientToken" type:"string"` // The short name or full Amazon Resource Name (ARN) of the cluster on which @@ -5042,9 +5048,7 @@ type CreateServiceInput struct { // The number of instantiations of the specified task definition to place and // keep running on your cluster. - // - // DesiredCount is a required field - DesiredCount *int64 `locationName:"desiredCount" type:"integer" required:"true"` + DesiredCount *int64 `locationName:"desiredCount" type:"integer"` // The period of time, in seconds, that the Amazon ECS service scheduler should // ignore unhealthy Elastic Load Balancing target health checks after a task @@ -5077,6 +5081,13 @@ type CreateServiceInput struct { // balancer. When a task from this service is placed on a container instance, // the container instance and port combination is registered as a target in // the target group specified here. + // + // Services with tasks that use the awsvpc network mode (for example, those + // with the Fargate launch type) only support Application Load Balancers and + // Network Load Balancers; Classic Load Balancers are not supported. Also, when + // you create any target groups for these services, you must choose ip as the + // target type, not instance, because tasks that use the awsvpc network mode + // are associated with an elastic network interface, not an Amazon EC2 instance. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` // The network configuration for the service. This parameter is required for @@ -5121,6 +5132,25 @@ type CreateServiceInput struct { // in the IAM User Guide. Role *string `locationName:"role" type:"string"` + // The scheduling strategy to use for the service. For more information, see + // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguideecs_services.html). + // + // There are two service scheduler strategies available: + // + // * REPLICA-The replica scheduling strategy places and maintains the desired + // number of tasks across your cluster. By default, the service scheduler + // spreads tasks across Availability Zones. You can use task placement strategies + // and constraints to customize task placement decisions. + // + // * DAEMON-The daemon scheduling strategy deploys exactly one task on each + // active container instance that meets all of the task placement constraints + // that you specify in your cluster. When using this strategy, there is no + // need to specify a desired number of tasks, a task placement strategy, + // or use Service Auto Scaling policies. + // + // Fargate tasks do not support the DAEMON scheduling strategy. + SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` + // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, // hyphens, and underscores are allowed. Service names must be unique within // a cluster, but you can have similarly named services in multiple clusters @@ -5130,7 +5160,11 @@ type CreateServiceInput struct { ServiceName *string `locationName:"serviceName" type:"string" required:"true"` // The details of the service discovery registries you want to assign to this - // service. For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguideservice-discovery.html). + // service. For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). + // + // Service discovery is supported for Fargate tasks if using platform version + // v1.1.0 or later. For more information, see AWS Fargate Platform Versions + // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` // The family and revision (family:revision) or full ARN of the task definition @@ -5154,9 +5188,6 @@ func (s CreateServiceInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateServiceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} - if s.DesiredCount == nil { - invalidParams.Add(request.NewErrParamRequired("DesiredCount")) - } if s.ServiceName == nil { invalidParams.Add(request.NewErrParamRequired("ServiceName")) } @@ -5247,6 +5278,12 @@ func (s *CreateServiceInput) SetRole(v string) *CreateServiceInput { return s } +// SetSchedulingStrategy sets the SchedulingStrategy field's value. +func (s *CreateServiceInput) SetSchedulingStrategy(v string) *CreateServiceInput { + s.SchedulingStrategy = &v + return s +} + // SetServiceName sets the ServiceName field's value. func (s *CreateServiceInput) SetServiceName(v string) *CreateServiceInput { s.ServiceName = &v @@ -5442,6 +5479,11 @@ type DeleteServiceInput struct { // is assumed. Cluster *string `locationName:"cluster" type:"string"` + // If true, allows you to delete a service even if it has not been scaled down + // to zero tasks. It is only necessary to use this if the service is using the + // REPLICA scheduling strategy. + Force *bool `locationName:"force" type:"boolean"` + // The name of the service to delete. // // Service is a required field @@ -5477,6 +5519,12 @@ func (s *DeleteServiceInput) SetCluster(v string) *DeleteServiceInput { return s } +// SetForce sets the Force field's value. +func (s *DeleteServiceInput) SetForce(v bool) *DeleteServiceInput { + s.Force = &v + return s +} + // SetService sets the Service field's value. func (s *DeleteServiceInput) SetService(v string) *DeleteServiceInput { s.Service = &v @@ -5511,7 +5559,7 @@ type Deployment struct { _ struct{} `type:"structure"` // The Unix time stamp for when the service was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The most recent desired count of tasks that was specified for the service // to deploy or maintain. @@ -5546,7 +5594,7 @@ type Deployment struct { TaskDefinition *string `locationName:"taskDefinition" type:"string"` // The Unix time stamp for when the service was last updated. - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` } // String returns the string representation @@ -5914,7 +5962,8 @@ type DescribeContainerInstancesInput struct { // default cluster is assumed. Cluster *string `locationName:"cluster" type:"string"` - // A list of container instance IDs or full ARN entries. + // A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) + // entries. // // ContainerInstances is a required field ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` @@ -6689,12 +6738,18 @@ type LinuxParameters struct { // command: sudo docker version | grep "Server API version" InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"` - // The value for the size of the /dev/shm volume. This parameter maps to the - // --shm-size option to docker run (https://docs.docker.com/engine/reference/run/). + // The value for the size (in MiB) of the /dev/shm volume. This parameter maps + // to the --shm-size option to docker run (https://docs.docker.com/engine/reference/run/). + // + // If you are using tasks that use the Fargate launch type, the sharedMemorySize + // parameter is not supported. SharedMemorySize *int64 `locationName:"sharedMemorySize" type:"integer"` - // The container path, mount options, and size of the tmpfs mount. This parameter - // maps to the --tmpfs option to docker run (https://docs.docker.com/engine/reference/run/). + // The container path, mount options, and size (in MiB) of the tmpfs mount. + // This parameter maps to the --tmpfs option to docker run (https://docs.docker.com/engine/reference/run/). + // + // If you are using tasks that use the Fargate launch type, the tmpfs parameter + // is not supported. Tmpfs []*Tmpfs `locationName:"tmpfs" type:"list"` } @@ -7125,6 +7180,9 @@ type ListServicesInput struct { // This token should be treated as an opaque identifier that is only used to // retrieve the next items in a list and not for other programmatic purposes. NextToken *string `locationName:"nextToken" type:"string"` + + // The scheduling strategy for services to list. + SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` } // String returns the string representation @@ -7161,6 +7219,12 @@ func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput { return s } +// SetSchedulingStrategy sets the SchedulingStrategy field's value. +func (s *ListServicesInput) SetSchedulingStrategy(v string) *ListServicesInput { + s.SchedulingStrategy = &v + return s +} + type ListServicesOutput struct { _ struct{} `type:"structure"` @@ -7581,6 +7645,13 @@ func (s *ListTasksOutput) SetTaskArns(v []*string) *ListTasksOutput { } // Details on a load balancer that is used with a service. +// +// Services with tasks that use the awsvpc network mode (for example, those +// with the Fargate launch type) only support Application Load Balancers and +// Network Load Balancers; Classic Load Balancers are not supported. Also, when +// you create any target groups for these services, you must choose ip as the +// target type, not instance, because tasks that use the awsvpc network mode +// are associated with an elastic network interface, not an Amazon EC2 instance. type LoadBalancer struct { _ struct{} `type:"structure"` @@ -7599,6 +7670,11 @@ type LoadBalancer struct { // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target // group associated with a service. + // + // If your service's task definition uses the awsvpc network mode (which is + // required for the Fargate launch type), you must choose ip as the target type, + // not instance, because tasks that use the awsvpc network mode are associated + // with an elastic network interface, not an Amazon EC2 instance. TargetGroupArn *string `locationName:"targetGroupArn" type:"string"` } @@ -8542,7 +8618,8 @@ type Resource struct { // precision floating-point type. LongValue *int64 `locationName:"longValue" type:"long"` - // The name of the resource, such as cpu, memory, ports, or a user-defined resource. + // The name of the resource, such as CPU, MEMORY, PORTS, PORTS_UDP, or a user-defined + // resource. Name *string `locationName:"name" type:"string"` // When the stringSetValue type is set, the value of the resource must be a @@ -8803,7 +8880,7 @@ type Service struct { ClusterArn *string `locationName:"clusterArn" type:"string"` // The Unix time stamp for when the service was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // Optional deployment parameters that control how many tasks run during the // deployment and the ordering of stopping and starting tasks. @@ -8832,6 +8909,13 @@ type Service struct { // A list of Elastic Load Balancing load balancer objects, containing the load // balancer name, the container name (as it appears in a container definition), // and the container port to access from the load balancer. + // + // Services with tasks that use the awsvpc network mode (for example, those + // with the Fargate launch type) only support Application Load Balancers and + // Network Load Balancers; Classic Load Balancers are not supported. Also, when + // you create any target groups for these services, you must choose ip as the + // target type, not instance, because tasks that use the awsvpc network mode + // are associated with an elastic network interface, not an Amazon EC2 instance. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` // The VPC subnet and security group configuration for tasks that receive their @@ -8860,6 +8944,23 @@ type Service struct { // The number of tasks in the cluster that are in the RUNNING state. RunningCount *int64 `locationName:"runningCount" type:"integer"` + // The scheduling strategy to use for the service. For more information, see + // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguideecs_services.html). + // + // There are two service scheduler strategies available: + // + // * REPLICA-The replica scheduling strategy places and maintains the desired + // number of tasks across your cluster. By default, the service scheduler + // spreads tasks across Availability Zones. You can use task placement strategies + // and constraints to customize task placement decisions. + // + // * DAEMON-The daemon scheduling strategy deploys exactly one task on each + // container instance in your cluster. When using this strategy, do not specify + // a desired number of tasks or any task placement strategies. + // + // Fargate tasks do not support the DAEMON scheduling strategy. + SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` + // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, // followed by the region of the service, the AWS account ID of the service // owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service. @@ -8988,6 +9089,12 @@ func (s *Service) SetRunningCount(v int64) *Service { return s } +// SetSchedulingStrategy sets the SchedulingStrategy field's value. +func (s *Service) SetSchedulingStrategy(v string) *Service { + s.SchedulingStrategy = &v + return s +} + // SetServiceArn sets the ServiceArn field's value. func (s *Service) SetServiceArn(v string) *Service { s.ServiceArn = &v @@ -9023,7 +9130,7 @@ type ServiceEvent struct { _ struct{} `type:"structure"` // The Unix time stamp for when the event was triggered. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The ID string of the event. Id *string `locationName:"id" type:"string"` @@ -9064,12 +9171,32 @@ func (s *ServiceEvent) SetMessage(v string) *ServiceEvent { type ServiceRegistry struct { _ struct{} `type:"structure"` - // The port value used if your Service Discovery service specified an SRV record. + // The container name value, already specified in the task definition, to be + // used for your service discovery service. If the task definition that your + // service task specifies uses the bridge or host network mode, you must specify + // a containerName and containerPort combination from the task definition. If + // the task definition that your service task specifies uses the awsvpc network + // mode and a type SRV DNS record is used, you must specify either a containerName + // and containerPort combination or a port value, but not both. + ContainerName *string `locationName:"containerName" type:"string"` + + // The port value, already specified in the task definition, to be used for + // your service discovery service. If the task definition your service task + // specifies uses the bridge or host network mode, you must specify a containerName + // and containerPort combination from the task definition. If the task definition + // your service task specifies uses the awsvpc network mode and a type SRV DNS + // record is used, you must specify either a containerName and containerPort + // combination or a port value, but not both. + ContainerPort *int64 `locationName:"containerPort" type:"integer"` + + // The port value used if your service discovery service specified an SRV record. + // This field is required if both the awsvpc network mode and SRV records are + // used. Port *int64 `locationName:"port" type:"integer"` - // The Amazon Resource Name (ARN) of the Service Registry. The currently supported - // service registry is Amazon Route 53 Auto Naming Service. For more information, - // see Service (https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html). + // The Amazon Resource Name (ARN) of the service registry. The currently supported + // service registry is Amazon Route 53 Auto Naming. For more information, see + // Service (https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html). RegistryArn *string `locationName:"registryArn" type:"string"` } @@ -9083,6 +9210,18 @@ func (s ServiceRegistry) GoString() string { return s.String() } +// SetContainerName sets the ContainerName field's value. +func (s *ServiceRegistry) SetContainerName(v string) *ServiceRegistry { + s.ContainerName = &v + return s +} + +// SetContainerPort sets the ContainerPort field's value. +func (s *ServiceRegistry) SetContainerPort(v int64) *ServiceRegistry { + s.ContainerPort = &v + return s +} + // SetPort sets the Port field's value. func (s *ServiceRegistry) SetPort(v int64) *ServiceRegistry { s.Port = &v @@ -9453,13 +9592,13 @@ type SubmitTaskStateChangeInput struct { Containers []*ContainerStateChange `locationName:"containers" type:"list"` // The Unix time stamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp" timestampFormat:"unix"` + ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` // The Unix time stamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp" timestampFormat:"unix"` + PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` // The Unix time stamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp" timestampFormat:"unix"` + PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` // The reason for the state change request. Reason *string `locationName:"reason" type:"string"` @@ -9593,7 +9732,7 @@ type Task struct { Connectivity *string `locationName:"connectivity" type:"string" enum:"Connectivity"` // The Unix time stamp for when the task last went into CONNECTED status. - ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp" timestampFormat:"unix"` + ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp"` // The ARN of the container instances that host the task. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` @@ -9631,13 +9770,13 @@ type Task struct { // The Unix time stamp for when the task was created (the task entered the PENDING // state). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The desired status of the task. DesiredStatus *string `locationName:"desiredStatus" type:"string"` // The Unix time stamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp" timestampFormat:"unix"` + ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` // The name of the task group associated with the task. Group *string `locationName:"group" type:"string"` @@ -9697,14 +9836,14 @@ type Task struct { PlatformVersion *string `locationName:"platformVersion" type:"string"` // The Unix time stamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp" timestampFormat:"unix"` + PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` // The Unix time stamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp" timestampFormat:"unix"` + PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` // The Unix time stamp for when the task started (the task transitioned from // the PENDING state to the RUNNING state). - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The tag specified when a task is started. If the task is started by an Amazon // ECS service, then the startedBy parameter contains the deployment ID of the @@ -9713,14 +9852,14 @@ type Task struct { // The Unix time stamp for when the task was stopped (the task transitioned // from the RUNNING state to the STOPPED state). - StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp" timestampFormat:"unix"` + StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp"` // The reason the task was stopped. StoppedReason *string `locationName:"stoppedReason" type:"string"` // The Unix time stamp for when the task will stop (transitions from the RUNNING // state to STOPPED). - StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp" timestampFormat:"unix"` + StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"` // The Amazon Resource Name (ARN) of the task. TaskArn *string `locationName:"taskArn" type:"string"` @@ -10261,7 +10400,7 @@ type Tmpfs struct { // | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" MountOptions []*string `locationName:"mountOptions" type:"list"` - // The size of the tmpfs volume. + // The size (in MiB) of the tmpfs volume. // // Size is a required field Size *int64 `locationName:"size" type:"integer" required:"true"` @@ -10991,6 +11130,14 @@ const ( PlacementStrategyTypeBinpack = "binpack" ) +const ( + // SchedulingStrategyReplica is a SchedulingStrategy enum value + SchedulingStrategyReplica = "REPLICA" + + // SchedulingStrategyDaemon is a SchedulingStrategy enum value + SchedulingStrategyDaemon = "DAEMON" +) + const ( // SortOrderAsc is a SortOrder enum value SortOrderAsc = "ASC" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go index 6082b9282..c268614ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ecs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "ecs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ECS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ECS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 129093458..5254d3fef 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -39,7 +39,7 @@ const opCreateFileSystem = "CreateFileSystem" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) { +func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { op := &request.Operation{ Name: opCreateFileSystem, HTTPMethod: "POST", @@ -50,7 +50,7 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques input = &CreateFileSystemInput{} } - output = &FileSystemDescription{} + output = &UpdateFileSystemOutput{} req = c.newRequest(op, input, output) return } @@ -124,11 +124,22 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques // the creation token you provided. // // * ErrCodeFileSystemLimitExceeded "FileSystemLimitExceeded" -// Returned if the AWS account has already created maximum number of file systems -// allowed per account. +// Returned if the AWS account has already created the maximum number of file +// systems allowed per account. +// +// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" +// Returned if there's not enough capacity to provision additional throughput. +// This value might be returned when you try to create a file system in provisioned +// throughput mode, when you attempt to increase the provisioned throughput +// of an existing file system, or when you attempt to change an existing file +// system from bursting to provisioned throughput mode. +// +// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" +// Returned if the throughput mode or amount of provisioned throughput can't +// be changed because the throughput limit of 1024 MiB/s has been reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) { +func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*UpdateFileSystemOutput, error) { req, out := c.CreateFileSystemRequest(input) return out, req.Send() } @@ -142,7 +153,7 @@ func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescrip // 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 *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) { +func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { req, out := c.CreateFileSystemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) @@ -305,11 +316,11 @@ func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *requ // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" -// Returned if the file system's life cycle state is not "created". +// Returned if the file system's lifecycle state is not "available". // // * ErrCodeMountTargetConflict "MountTargetConflict" // Returned if the mount target would violate one of the specified restrictions @@ -327,18 +338,19 @@ func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *requ // the subnet. // // * ErrCodeNetworkInterfaceLimitExceeded "NetworkInterfaceLimitExceeded" -// The calling account has reached the ENI limit for the specific AWS region. -// Client should try to delete some ENIs or get its account limit raised. For -// more information, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) -// in the Amazon Virtual Private Cloud User Guide (see the Network interfaces -// per VPC entry in the table). +// The calling account has reached the limit for elastic network interfaces +// for the specific AWS Region. The client should try to delete some elastic +// network interfaces or get the account limit raised. For more information, +// see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) +// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in +// the table). // // * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded" // Returned if the size of SecurityGroups specified in the request is greater // than five. // // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups does not exist in the subnet's +// Returned if one of the specified security groups doesn't exist in the subnet's // VPC. // // * ErrCodeUnsupportedAvailabilityZone "UnsupportedAvailabilityZone" @@ -435,7 +447,7 @@ func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags @@ -539,7 +551,7 @@ func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *reques // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeFileSystemInUse "FileSystemInUse" @@ -755,7 +767,7 @@ func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags @@ -867,7 +879,7 @@ func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req * // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems @@ -1060,7 +1072,7 @@ func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeMountTargetNotFound "MountTargetNotFound" @@ -1156,7 +1168,7 @@ func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags @@ -1271,7 +1283,7 @@ func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSec // than five. // // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups does not exist in the subnet's +// Returned if one of the specified security groups doesn't exist in the subnet's // VPC. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups @@ -1296,6 +1308,112 @@ func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input return out, req.Send() } +const opUpdateFileSystem = "UpdateFileSystem" + +// UpdateFileSystemRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFileSystem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateFileSystem for more information on using the UpdateFileSystem +// 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 UpdateFileSystemRequest method. +// req, resp := client.UpdateFileSystemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem +func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { + op := &request.Operation{ + Name: opUpdateFileSystem, + HTTPMethod: "PUT", + HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", + } + + if input == nil { + input = &UpdateFileSystemInput{} + } + + output = &UpdateFileSystemOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFileSystem API operation for Amazon Elastic File System. +// +// Updates the throughput mode or the amount of provisioned throughput of an +// existing file system. +// +// 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 Elastic File System's +// API operation UpdateFileSystem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// Returned if the request is malformed or contains an error such as an invalid +// parameter value or a missing required parameter. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// Returned if the specified FileSystemId value doesn't exist in the requester's +// AWS account. +// +// * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" +// Returned if the file system's lifecycle state is not "available". +// +// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" +// Returned if there's not enough capacity to provision additional throughput. +// This value might be returned when you try to create a file system in provisioned +// throughput mode, when you attempt to increase the provisioned throughput +// of an existing file system, or when you attempt to change an existing file +// system from bursting to provisioned throughput mode. +// +// * ErrCodeInternalServerError "InternalServerError" +// Returned if an error occurred on the server side. +// +// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" +// Returned if the throughput mode or amount of provisioned throughput can't +// be changed because the throughput limit of 1024 MiB/s has been reached. +// +// * ErrCodeTooManyRequests "TooManyRequests" +// Returned if you don’t wait at least 24 hours before changing the throughput +// mode, or decreasing the Provisioned Throughput value. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem +func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + return out, req.Send() +} + +// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFileSystem 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 *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type CreateFileSystemInput struct { _ struct{} `type:"structure"` @@ -1305,30 +1423,29 @@ type CreateFileSystemInput struct { // CreationToken is a required field CreationToken *string `min:"1" type:"string" required:"true"` - // A boolean value that, if true, creates an encrypted file system. When creating + // A Boolean value that, if true, creates an encrypted file system. When creating // an encrypted file system, you have the option of specifying a CreateFileSystemRequest$KmsKeyId // for an existing AWS Key Management Service (AWS KMS) customer master key // (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem, // is used to protect the encrypted file system. Encrypted *bool `type:"boolean"` - // The id of the AWS KMS CMK that will be used to protect the encrypted file - // system. This parameter is only required if you want to use a non-default - // CMK. If this parameter is not specified, the default CMK for Amazon EFS is - // used. This id can be in one of the following formats: + // The ID of the AWS KMS CMK to be used to protect the encrypted file system. + // This parameter is only required if you want to use a non-default CMK. If + // this parameter is not specified, the default CMK for Amazon EFS is used. + // This ID can be in one of the following formats: // - // * Key ID - A unique identifier of the key. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. + // * Key ID - A unique identifier of the key, for example, 1234abcd-12ab-34cd-56ef-1234567890ab. // - // * ARN - An Amazon Resource Name for the key. For example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + // * ARN - An Amazon Resource Name (ARN) for the key, for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. // // * Key alias - A previously created display name for a key. For example, // alias/projectKey1. // - // * Key alias ARN - An Amazon Resource Name for a key alias. For example, - // arn:aws:kms:us-west-2:444455556666:alias/projectKey1. + // * Key alias ARN - An ARN for a key alias, for example, arn:aws:kms:us-west-2:444455556666:alias/projectKey1. // - // Note that if the KmsKeyId is specified, the CreateFileSystemRequest$Encrypted - // parameter must be set to true. + // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter + // must be set to true. KmsKeyId *string `min:"1" type:"string"` // The PerformanceMode of the file system. We recommend generalPurpose performance @@ -1337,6 +1454,20 @@ type CreateFileSystemInput struct { // with a tradeoff of slightly higher latencies for most file operations. This // can't be changed after the file system has been created. PerformanceMode *string `type:"string" enum:"PerformanceMode"` + + // The throughput, measured in MiB/s, that you want to provision for a file + // system that you're creating. The limit on throughput is 1024 MiB/s. You can + // get these limits increased by contacting AWS Support. For more information, + // see Amazon EFS Limits That You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) + // in the Amazon EFS User Guide. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // The throughput mode for the file system to be created. There are two throughput + // modes to choose from for your file system: bursting and provisioned. You + // can decrease your file system's throughput in Provisioned Throughput mode + // or change between the throughput modes as long as it’s been more than 24 + // hours since the last decrease or throughput mode change. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` } // String returns the string representation @@ -1392,6 +1523,18 @@ func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemIn return s } +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput { + s.ThroughputMode = &v + return s +} + type CreateMountTargetInput struct { _ struct{} `type:"structure"` @@ -1788,7 +1931,7 @@ type DescribeFileSystemsOutput struct { _ struct{} `type:"structure"` // Array of file system descriptions. - FileSystems []*FileSystemDescription `type:"list"` + FileSystems []*UpdateFileSystemOutput `type:"list"` // Present if provided by caller in the request (String). Marker *string `type:"string"` @@ -1809,7 +1952,7 @@ func (s DescribeFileSystemsOutput) GoString() string { } // SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput { +func (s *DescribeFileSystemsOutput) SetFileSystems(v []*UpdateFileSystemOutput) *DescribeFileSystemsOutput { s.FileSystems = v return s } @@ -2110,149 +2253,6 @@ func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { return s } -// Description of the file system. -type FileSystemDescription struct { - _ struct{} `type:"structure"` - - // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` - - // Opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The id of an AWS Key Management Service (AWS KMS) customer master key (CMK) - // that was used to protect the encrypted file system. - KmsKeyId *string `min:"1" type:"string"` - - // Lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateTags. If the file system has a Name tag, Amazon EFS returns the - // value in this field. - Name *string `type:"string"` - - // Current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // AWS account that created the file system. If the file system was created - // by an IAM user, the parent account to which the user belongs is the owner. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The PerformanceMode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // Latest known metered size (in bytes) of data stored in the file system, in - // bytes, in its Value field, and the time at which that size was determined - // in its Timestamp field. The Timestamp value is the integer number of seconds - // since 1970-01-01T00:00:00Z. Note that the value does not represent the size - // of a consistent snapshot of the file system, but it is eventually consistent - // when there are no writes to the file system. That is, the value will represent - // actual size only if the file system is not modified for a period longer than - // a couple of hours. Otherwise, the value is not the exact size the file system - // was at any instant in time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` -} - -// String returns the string representation -func (s FileSystemDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystemDescription) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription { - s.Encrypted = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription { - s.FileSystemId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *FileSystemDescription) SetName(v string) *FileSystemDescription { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription { - s.PerformanceMode = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription { - s.SizeInBytes = v - return s -} - // Latest known metered size (in bytes) of data stored in the file system, in // its Value field, and the time at which that size was determined in its Timestamp // field. Note that the value does not represent the size of a consistent snapshot @@ -2266,7 +2266,7 @@ type FileSystemSize struct { // Time at which the size of data, returned in the Value field, was determined. // The value is the integer number of seconds since 1970-01-01T00:00:00Z. - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` // Latest known metered size (in bytes) of data stored in the file system. // @@ -2501,6 +2501,235 @@ func (s *Tag) SetValue(v string) *Tag { return s } +type UpdateFileSystemInput struct { + _ struct{} `type:"structure"` + + // The ID of the file system that you want to update. + // + // FileSystemId is a required field + FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` + + // (Optional) The amount of throughput, in MiB/s, that you want to provision + // for your file system. If you're not updating the amount of provisioned throughput + // for your file system, you don't need to provide this value in your request. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // (Optional) The throughput mode that you want your file system to use. If + // you're not updating your throughput mode, you don't need to provide this + // value in your request. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` +} + +// String returns the string representation +func (s UpdateFileSystemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { + s.FileSystemId = &v + return s +} + +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput { + s.ThroughputMode = &v + return s +} + +// Description of the file system. +type UpdateFileSystemOutput struct { + _ struct{} `type:"structure"` + + // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Opaque string specified in the request. + // + // CreationToken is a required field + CreationToken *string `min:"1" type:"string" required:"true"` + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool `type:"boolean"` + + // ID of the file system, assigned by Amazon EFS. + // + // FileSystemId is a required field + FileSystemId *string `type:"string" required:"true"` + + // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) + // that was used to protect the encrypted file system. + KmsKeyId *string `min:"1" type:"string"` + + // Lifecycle phase of the file system. + // + // LifeCycleState is a required field + LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateTags. If the file system has a Name tag, Amazon EFS returns the + // value in this field. + Name *string `type:"string"` + + // Current number of mount targets that the file system has. For more information, + // see CreateMountTarget. + // + // NumberOfMountTargets is a required field + NumberOfMountTargets *int64 `type:"integer" required:"true"` + + // AWS account that created the file system. If the file system was created + // by an IAM user, the parent account to which the user belongs is the owner. + // + // OwnerId is a required field + OwnerId *string `type:"string" required:"true"` + + // The PerformanceMode of the file system. + // + // PerformanceMode is a required field + PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` + + // The throughput, measured in MiB/s, that you want to provision for a file + // system. The limit on throughput is 1024 MiB/s. You can get these limits increased + // by contacting AWS Support. For more information, see Amazon EFS Limits That + // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) + // in the Amazon EFS User Guide. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // Latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. + // The SizeInBytes value doesn't represent the size of a consistent snapshot + // of the file system, but it is eventually consistent when there are no writes + // to the file system. That is, SizeInBytes represents actual size only if the + // file system is not modified for a period longer than a couple of hours. Otherwise, + // the value is not the exact size that the file system was at any point in + // time. + // + // SizeInBytes is a required field + SizeInBytes *FileSystemSize `type:"structure" required:"true"` + + // The throughput mode for a file system. There are two throughput modes to + // choose from for your file system: bursting and provisioned. You can decrease + // your file system's throughput in Provisioned Throughput mode or change between + // the throughput modes as long as it’s been more than 24 hours since the last + // decrease or throughput mode change. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` +} + +// String returns the string representation +func (s UpdateFileSystemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput { + s.CreationTime = &v + return s +} + +// SetCreationToken sets the CreationToken field's value. +func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput { + s.CreationToken = &v + return s +} + +// SetEncrypted sets the Encrypted field's value. +func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput { + s.Encrypted = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput { + s.FileSystemId = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput { + s.KmsKeyId = &v + return s +} + +// SetLifeCycleState sets the LifeCycleState field's value. +func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput { + s.LifeCycleState = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput { + s.Name = &v + return s +} + +// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. +func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput { + s.NumberOfMountTargets = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput { + s.OwnerId = &v + return s +} + +// SetPerformanceMode sets the PerformanceMode field's value. +func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput { + s.PerformanceMode = &v + return s +} + +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetSizeInBytes sets the SizeInBytes field's value. +func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput { + s.SizeInBytes = v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput { + s.ThroughputMode = &v + return s +} + const ( // LifeCycleStateCreating is a LifeCycleState enum value LifeCycleStateCreating = "creating" @@ -2508,6 +2737,9 @@ const ( // LifeCycleStateAvailable is a LifeCycleState enum value LifeCycleStateAvailable = "available" + // LifeCycleStateUpdating is a LifeCycleState enum value + LifeCycleStateUpdating = "updating" + // LifeCycleStateDeleting is a LifeCycleState enum value LifeCycleStateDeleting = "deleting" @@ -2522,3 +2754,11 @@ const ( // PerformanceModeMaxIo is a PerformanceMode enum value PerformanceModeMaxIo = "maxIO" ) + +const ( + // ThroughputModeBursting is a ThroughputMode enum value + ThroughputModeBursting = "bursting" + + // ThroughputModeProvisioned is a ThroughputMode enum value + ThroughputModeProvisioned = "provisioned" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go index 950e4ca5f..b616a864c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go @@ -34,21 +34,21 @@ const ( // ErrCodeFileSystemLimitExceeded for service response error code // "FileSystemLimitExceeded". // - // Returned if the AWS account has already created maximum number of file systems - // allowed per account. + // Returned if the AWS account has already created the maximum number of file + // systems allowed per account. ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded" // ErrCodeFileSystemNotFound for service response error code // "FileSystemNotFound". // - // Returned if the specified FileSystemId does not exist in the requester's + // Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. ErrCodeFileSystemNotFound = "FileSystemNotFound" // ErrCodeIncorrectFileSystemLifeCycleState for service response error code // "IncorrectFileSystemLifeCycleState". // - // Returned if the file system's life cycle state is not "created". + // Returned if the file system's lifecycle state is not "available". ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState" // ErrCodeIncorrectMountTargetState for service response error code @@ -57,6 +57,16 @@ const ( // Returned if the mount target is not in the correct state for the operation. ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState" + // ErrCodeInsufficientThroughputCapacity for service response error code + // "InsufficientThroughputCapacity". + // + // Returned if there's not enough capacity to provision additional throughput. + // This value might be returned when you try to create a file system in provisioned + // throughput mode, when you attempt to increase the provisioned throughput + // of an existing file system, or when you attempt to change an existing file + // system from bursting to provisioned throughput mode. + ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity" + // ErrCodeInternalServerError for service response error code // "InternalServerError". // @@ -87,11 +97,12 @@ const ( // ErrCodeNetworkInterfaceLimitExceeded for service response error code // "NetworkInterfaceLimitExceeded". // - // The calling account has reached the ENI limit for the specific AWS region. - // Client should try to delete some ENIs or get its account limit raised. For - // more information, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) - // in the Amazon Virtual Private Cloud User Guide (see the Network interfaces - // per VPC entry in the table). + // The calling account has reached the limit for elastic network interfaces + // for the specific AWS Region. The client should try to delete some elastic + // network interfaces or get the account limit raised. For more information, + // see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) + // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in + // the table). ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded" // ErrCodeNoFreeAddressesInSubnet for service response error code @@ -111,7 +122,7 @@ const ( // ErrCodeSecurityGroupNotFound for service response error code // "SecurityGroupNotFound". // - // Returned if one of the specified security groups does not exist in the subnet's + // Returned if one of the specified security groups doesn't exist in the subnet's // VPC. ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound" @@ -121,6 +132,20 @@ const ( // Returned if there is no subnet with ID SubnetId provided in the request. ErrCodeSubnetNotFound = "SubnetNotFound" + // ErrCodeThroughputLimitExceeded for service response error code + // "ThroughputLimitExceeded". + // + // Returned if the throughput mode or amount of provisioned throughput can't + // be changed because the throughput limit of 1024 MiB/s has been reached. + ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded" + + // ErrCodeTooManyRequests for service response error code + // "TooManyRequests". + // + // Returned if you don’t wait at least 24 hours before changing the throughput + // mode, or decreasing the Provisioned Throughput value. + ErrCodeTooManyRequests = "TooManyRequests" + // ErrCodeUnsupportedAvailabilityZone for service response error code // "UnsupportedAvailabilityZone". ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone" diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go index 4d6bb2cdc..6b1a11c90 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticfilesystem" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticfilesystem" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EFS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EFS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go new file mode 100644 index 000000000..4d76063f1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -0,0 +1,1012 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eks + +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 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 +// successfuly. +// +// 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/eks-2017-11-01/CreateCluster +func (c *EKS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { + op := &request.Operation{ + Name: opCreateCluster, + HTTPMethod: "POST", + HTTPPath: "/clusters", + } + + if input == nil { + input = &CreateClusterInput{} + } + + output = &CreateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCluster API operation for Amazon Elastic Container Service for Kubernetes. +// +// Creates an Amazon EKS control plane. +// +// The Amazon EKS control plane consists of control plane instances that run +// the Kubernetes software, like etcd and the API server. The control plane +// runs in an account managed by AWS, and the Kubernetes API is exposed via +// the Amazon EKS API server endpoint. +// +// Amazon EKS worker nodes run in your AWS account and connect to your cluster's +// control plane via the Kubernetes API server endpoint and a certificate file +// that is created for your cluster. +// +// The cluster control plane is provisioned across multiple Availability Zones +// and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS +// also provisions elastic network interfaces in your VPC subnets to provide +// connectivity from the control plane instances to the worker nodes (for example, +// to support kubectl exec, logs, and proxy data flows). +// +// After you create an Amazon EKS cluster, you must configure your Kubernetes +// tooling to communicate with the API server and launch worker nodes into your +// cluster. For more information, see Managing Cluster Authentication (http://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html) +// and Launching Amazon EKS Worker Nodes (http://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html)in +// the Amazon EKS User 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 Elastic Container Service for Kubernetes's +// API operation CreateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUseException "ResourceInUseException" +// The specified resource is in use. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// You have encountered a service limit on the specified resource. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is unavailable, back off and retry the operation. +// +// * ErrCodeUnsupportedAvailabilityZoneException "UnsupportedAvailabilityZoneException" +// At least one of your specified cluster subnets is in an Availability Zone +// that does not support Amazon EKS. The exception output will specify the supported +// Availability Zones for your account, from which you can choose subnets for +// your cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/CreateCluster +func (c *EKS) 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 *EKS) 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 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 +// successfuly. +// +// 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/eks-2017-11-01/DeleteCluster +func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { + op := &request.Operation{ + Name: opDeleteCluster, + HTTPMethod: "DELETE", + HTTPPath: "/clusters/{name}", + } + + if input == nil { + input = &DeleteClusterInput{} + } + + output = &DeleteClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCluster API operation for Amazon Elastic Container Service for Kubernetes. +// +// Deletes the Amazon EKS cluster control plane. +// +// If you have active services in your cluster that are associated with a load +// balancer, you must delete those services before deleting the cluster so that +// the load balancers are deleted properly. Otherwise, you can have orphaned +// resources in your VPC that prevent you from being able to delete the VPC. +// For more information, see Deleting a Cluster (http://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html) +// in the Amazon EKS User 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 Elastic Container Service for Kubernetes's +// API operation DeleteCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUseException "ResourceInUseException" +// The specified resource is in use. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. You can view your available clusters +// with ListClusters. Amazon EKS clusters are region-specific. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is unavailable, back off and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster +func (c *EKS) 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 *EKS) 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 opDescribeCluster = "DescribeCluster" + +// DescribeClusterRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeCluster for more information on using the DescribeCluster +// 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 DescribeClusterRequest method. +// req, resp := client.DescribeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster +func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) { + op := &request.Operation{ + Name: opDescribeCluster, + HTTPMethod: "GET", + HTTPPath: "/clusters/{name}", + } + + if input == nil { + input = &DescribeClusterInput{} + } + + output = &DescribeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCluster API operation for Amazon Elastic Container Service for Kubernetes. +// +// Returns descriptive information about an Amazon EKS cluster. +// +// The API server endpoint and certificate authority data returned by this operation +// are required for kubelet and kubectl to communicate with your Kubernetes +// API server. For more information, see Create a kubeconfig for Amazon EKS +// (http://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html). +// +// The API server endpoint and certificate authority data are not available +// until the cluster reaches the ACTIVE state. +// +// 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 Elastic Container Service for Kubernetes's +// API operation DescribeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. You can view your available clusters +// with ListClusters. Amazon EKS clusters are region-specific. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is unavailable, back off and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster +func (c *EKS) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { + req, out := c.DescribeClusterRequest(input) + return out, req.Send() +} + +// DescribeClusterWithContext is the same as DescribeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCluster 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 *EKS) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error) { + req, out := c.DescribeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListClusters = "ListClusters" + +// ListClustersRequest generates a "aws/request.Request" representing the +// client's request for the ListClusters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListClusters for more information on using the ListClusters +// 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 ListClustersRequest method. +// req, resp := client.ListClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters +func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { + op := &request.Operation{ + Name: opListClusters, + HTTPMethod: "GET", + HTTPPath: "/clusters", + } + + if input == nil { + input = &ListClustersInput{} + } + + output = &ListClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListClusters API operation for Amazon Elastic Container Service for Kubernetes. +// +// Lists the Amazon EKS clusters in your AWS account in the specified 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 Amazon Elastic Container Service for Kubernetes's +// API operation ListClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is unavailable, back off and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters +func (c *EKS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { + req, out := c.ListClustersRequest(input) + return out, req.Send() +} + +// ListClustersWithContext is the same as ListClusters with the addition of +// the ability to pass a context and additional request options. +// +// See ListClusters 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 *EKS) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { + req, out := c.ListClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// An object representing the certificate-authority-data for your cluster. +type Certificate struct { + _ struct{} `type:"structure"` + + // The base64 encoded certificate data required to communicate with your cluster. + // Add this to the certificate-authority-data section of the kubeconfig file + // for your cluster. + Data *string `locationName:"data" type:"string"` +} + +// String returns the string representation +func (s Certificate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Certificate) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *Certificate) SetData(v string) *Certificate { + s.Data = &v + return s +} + +// An object representing an Amazon EKS cluster. +type Cluster struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the cluster. + Arn *string `locationName:"arn" type:"string"` + + // The certificate-authority-data for your cluster. + CertificateAuthority *Certificate `locationName:"certificateAuthority" type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` + + // The Unix epoch time stamp in seconds for when the cluster was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The endpoint for your Kubernetes API server. + Endpoint *string `locationName:"endpoint" type:"string"` + + // The name of the cluster. + Name *string `locationName:"name" type:"string"` + + // The VPC subnets and security groups used by the cluster control plane. Amazon + // EKS VPC resources have specific requirements to work properly with Kubernetes. + // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) + // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) + // in the Amazon EKS User Guide. + ResourcesVpcConfig *VpcConfigResponse `locationName:"resourcesVpcConfig" type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that provides permissions + // for the Kubernetes control plane to make calls to AWS API operations on your + // behalf. + RoleArn *string `locationName:"roleArn" type:"string"` + + // The current status of the cluster. + Status *string `locationName:"status" type:"string" enum:"ClusterStatus"` + + // The Kubernetes server version for the cluster. + Version *string `locationName:"version" 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() +} + +// SetArn sets the Arn field's value. +func (s *Cluster) SetArn(v string) *Cluster { + s.Arn = &v + return s +} + +// SetCertificateAuthority sets the CertificateAuthority field's value. +func (s *Cluster) SetCertificateAuthority(v *Certificate) *Cluster { + s.CertificateAuthority = v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *Cluster) SetClientRequestToken(v string) *Cluster { + s.ClientRequestToken = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Cluster) SetCreatedAt(v time.Time) *Cluster { + s.CreatedAt = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *Cluster) SetEndpoint(v string) *Cluster { + s.Endpoint = &v + return s +} + +// SetName sets the Name field's value. +func (s *Cluster) SetName(v string) *Cluster { + s.Name = &v + return s +} + +// SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. +func (s *Cluster) SetResourcesVpcConfig(v *VpcConfigResponse) *Cluster { + s.ResourcesVpcConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Cluster) SetRoleArn(v string) *Cluster { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Cluster) SetStatus(v string) *Cluster { + s.Status = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *Cluster) SetVersion(v string) *Cluster { + s.Version = &v + return s +} + +type CreateClusterInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` + + // The unique name to give to your cluster. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The VPC subnets and security groups used by the cluster control plane. Amazon + // EKS VPC resources have specific requirements to work properly with Kubernetes. + // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) + // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) + // in the Amazon EKS User Guide. + // + // ResourcesVpcConfig is a required field + ResourcesVpcConfig *VpcConfigRequest `locationName:"resourcesVpcConfig" type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role that provides permissions + // for Amazon EKS to make calls to other AWS API operations on your behalf. + // For more information, see Amazon EKS Service IAM Role (http://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) + // in the Amazon EKS User Guide + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The desired Kubernetes version for your cluster. If you do not specify a + // value here, the latest version available in Amazon EKS is used. + Version *string `locationName:"version" type:"string"` +} + +// 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.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.ResourcesVpcConfig == nil { + invalidParams.Add(request.NewErrParamRequired("ResourcesVpcConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.ResourcesVpcConfig != nil { + if err := s.ResourcesVpcConfig.Validate(); err != nil { + invalidParams.AddNested("ResourcesVpcConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateClusterInput) SetClientRequestToken(v string) *CreateClusterInput { + s.ClientRequestToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateClusterInput) SetName(v string) *CreateClusterInput { + s.Name = &v + return s +} + +// SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. +func (s *CreateClusterInput) SetResourcesVpcConfig(v *VpcConfigRequest) *CreateClusterInput { + s.ResourcesVpcConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateClusterInput) SetRoleArn(v string) *CreateClusterInput { + s.RoleArn = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateClusterInput) SetVersion(v string) *CreateClusterInput { + s.Version = &v + return s +} + +type CreateClusterOutput struct { + _ struct{} `type:"structure"` + + // The full description of your new cluster. + Cluster *Cluster `locationName:"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 DeleteClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the cluster to delete. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" 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.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteClusterInput) SetName(v string) *DeleteClusterInput { + s.Name = &v + return s +} + +type DeleteClusterOutput struct { + _ struct{} `type:"structure"` + + // The full description of the cluster to delete. + Cluster *Cluster `locationName:"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 DescribeClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the cluster to describe. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeClusterInput) SetName(v string) *DescribeClusterInput { + s.Name = &v + return s +} + +type DescribeClusterOutput struct { + _ struct{} `type:"structure"` + + // The full description of your specified cluster. + Cluster *Cluster `locationName:"cluster" type:"structure"` +} + +// String returns the string representation +func (s DescribeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *DescribeClusterOutput) SetCluster(v *Cluster) *DescribeClusterOutput { + s.Cluster = v + return s +} + +type ListClustersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of cluster results returned by ListClusters in paginated + // output. When this parameter is used, ListClusters only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListClusters + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListClusters returns up to 100 results + // and a nextToken value if applicable. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The nextToken value returned from a previous paginated ListClusters request + // where maxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // nextToken value. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { + s.NextToken = &v + return s +} + +type ListClustersOutput struct { + _ struct{} `type:"structure"` + + // A list of all of the clusters for your account in the specified region. + Clusters []*string `locationName:"clusters" type:"list"` + + // The nextToken value to include in a future ListClusters request. When the + // results of a ListClusters request exceed maxResults, this value can be used + // to retrieve the next page of results. This value is null when there are no + // more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClustersOutput) GoString() string { + return s.String() +} + +// SetClusters sets the Clusters field's value. +func (s *ListClustersOutput) SetClusters(v []*string) *ListClustersOutput { + s.Clusters = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { + s.NextToken = &v + return s +} + +// An object representing an Amazon EKS cluster VPC configuration request. +type VpcConfigRequest struct { + _ struct{} `type:"structure"` + + // Specify one or more security groups for the cross-account elastic network + // interfaces that Amazon EKS creates to use to allow communication between + // your worker nodes and the Kubernetes control plane. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account + // elastic network interfaces in these subnets to allow communication between + // your worker nodes and the Kubernetes control plane. + // + // SubnetIds is a required field + SubnetIds []*string `locationName:"subnetIds" type:"list" required:"true"` +} + +// String returns the string representation +func (s VpcConfigRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfigRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcConfigRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcConfigRequest"} + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfigRequest) SetSecurityGroupIds(v []*string) *VpcConfigRequest { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfigRequest) SetSubnetIds(v []*string) *VpcConfigRequest { + s.SubnetIds = v + return s +} + +// An object representing an Amazon EKS cluster VPC configuration response. +type VpcConfigResponse struct { + _ struct{} `type:"structure"` + + // The security groups associated with the cross-account elastic network interfaces + // that are used to allow communication between your worker nodes and the Kubernetes + // control plane. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // The subnets associated with your cluster. + SubnetIds []*string `locationName:"subnetIds" type:"list"` + + // The VPC associated with your cluster. + VpcId *string `locationName:"vpcId" type:"string"` +} + +// String returns the string representation +func (s VpcConfigResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfigResponse) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfigResponse) SetSubnetIds(v []*string) *VpcConfigResponse { + s.SubnetIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse { + s.VpcId = &v + return s +} + +const ( + // ClusterStatusCreating is a ClusterStatus enum value + ClusterStatusCreating = "CREATING" + + // ClusterStatusActive is a ClusterStatus enum value + ClusterStatusActive = "ACTIVE" + + // ClusterStatusDeleting is a ClusterStatus enum value + ClusterStatusDeleting = "DELETING" + + // ClusterStatusFailed is a ClusterStatus enum value + ClusterStatusFailed = "FAILED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go new file mode 100644 index 000000000..9f819afc6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go @@ -0,0 +1,54 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package eks provides the client and types for making API +// requests to Amazon Elastic Container Service for Kubernetes. +// +// Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managed +// service that makes it easy for you to run Kubernetes on AWS without needing +// to stand up or maintain your own Kubernetes control plane. Kubernetes is +// an open-source system for automating the deployment, scaling, and management +// of containerized applications. +// +// Amazon EKS runs three Kubernetes control plane instances across three Availability +// Zones to ensure high availability. Amazon EKS automatically detects and replaces +// unhealthy control plane instances, and it provides automated version upgrades +// and patching for them. +// +// Amazon EKS is also integrated with many AWS services to provide scalability +// and security for your applications, including the following: +// +// * Elastic Load Balancing for load distribution +// +// * IAM for authentication +// +// * Amazon VPC for isolation +// +// Amazon EKS runs up to date versions of the open-source Kubernetes software, +// so you can use all the existing plugins and tooling from the Kubernetes community. +// Applications running on Amazon EKS are fully compatible with applications +// running on any standard Kubernetes environment, whether running in on-premises +// data centers or public clouds. This means that you can easily migrate any +// standard Kubernetes application to Amazon EKS without any code modification +// required. +// +// See https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01 for more information on this service. +// +// See eks package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/eks/ +// +// Using the Client +// +// To contact Amazon Elastic Container Service for Kubernetes 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 Elastic Container Service for Kubernetes client EKS for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/eks/#New +package eks diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go new file mode 100644 index 000000000..825e7d2db --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go @@ -0,0 +1,61 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eks + +const ( + + // ErrCodeClientException for service response error code + // "ClientException". + // + // These errors are usually caused by a client action, such as using an action + // or resource on behalf of a user that doesn't have permissions to use the + // action or resource, or specifying an identifier that is not valid. + ErrCodeClientException = "ClientException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // The specified parameter is invalid. Review the available parameters for the + // API request. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // The specified resource is in use. + ErrCodeResourceInUseException = "ResourceInUseException" + + // ErrCodeResourceLimitExceededException for service response error code + // "ResourceLimitExceededException". + // + // You have encountered a service limit on the specified resource. + ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource could not be found. You can view your available clusters + // with ListClusters. Amazon EKS clusters are region-specific. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServerException for service response error code + // "ServerException". + // + // These errors are usually caused by a server-side issue. + ErrCodeServerException = "ServerException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The service is unavailable, back off and retry the operation. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeUnsupportedAvailabilityZoneException for service response error code + // "UnsupportedAvailabilityZoneException". + // + // At least one of your specified cluster subnets is in an Availability Zone + // that does not support Amazon EKS. The exception output will specify the supported + // Availability Zones for your account, from which you can choose subnets for + // your cluster. + ErrCodeUnsupportedAvailabilityZoneException = "UnsupportedAvailabilityZoneException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/service.go b/vendor/github.com/aws/aws-sdk-go/service/eks/service.go new file mode 100644 index 000000000..e72b2c362 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eks + +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/restjson" +) + +// EKS provides the API operation methods for making requests to +// Amazon Elastic Container Service for Kubernetes. See this package's package overview docs +// for details on the service. +// +// EKS methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type EKS 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 = "eks" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EKS" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the EKS client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a EKS client from just a session. +// svc := eks.New(mySession) +// +// // Create a EKS client with additional configuration +// svc := eks.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *EKS { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "eks" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EKS { + svc := &EKS{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-11-01", + JSONVersion: "1.1", + }, + 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(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a EKS operation and runs any +// custom request initialization. +func (c *EKS) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 96ab771ef..18d404a5c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -4919,7 +4919,7 @@ type CacheCluster struct { AutoMinorVersionUpgrade *bool `type:"boolean"` // The date and time when the cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheClusterCreateTime *time.Time `type:"timestamp"` // The user-supplied identifier of the cluster. This identifier is a unique // key that identifies a cluster. @@ -5378,7 +5378,7 @@ type CacheNode struct { _ struct{} `type:"structure"` // The date and time when the cache node was created. - CacheNodeCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheNodeCreateTime *time.Time `type:"timestamp"` // The cache node identifier. A node ID is a numeric identifier (0001, 0002, // etc.). The combination of cluster ID and node ID uniquely identifies every @@ -8423,7 +8423,7 @@ type DescribeEventsInput struct { // 8601 format. // // Example: 2017-03-30T07:03:49.555Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -8451,7 +8451,7 @@ type DescribeEventsInput struct { // 8601 format. // // Example: 2017-03-30T07:03:49.555Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -9279,7 +9279,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time when the event occurred. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // The text of the event. Message *string `type:"string"` @@ -10595,7 +10595,7 @@ type NodeSnapshot struct { CacheClusterId *string `type:"string"` // The date and time when the cache node was created in the source cluster. - CacheNodeCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheNodeCreateTime *time.Time `type:"timestamp"` // The cache node identifier for the node in the source cluster. CacheNodeId *string `type:"string"` @@ -10611,7 +10611,7 @@ type NodeSnapshot struct { // The date and time when the source node's metadata and cache data set was // obtained for the snapshot. - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -11502,7 +11502,7 @@ type ReservedCacheNode struct { ReservedCacheNodesOfferingId *string `type:"string"` // The time the reservation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved cache node. State *string `type:"string"` @@ -12028,7 +12028,7 @@ type Snapshot struct { AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` // The date and time when the source cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheClusterCreateTime *time.Time `type:"timestamp"` // The user-supplied identifier of the source cluster. CacheClusterId *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go index 40bed298a..fd5f8c517 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticache" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticache" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ElastiCache" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElastiCache client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 178bb2a3a..3424828c3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -152,7 +152,7 @@ func (c *ElasticBeanstalk) ApplyEnvironmentManagedActionRequest(input *ApplyEnvi // API operation ApplyEnvironmentManagedAction for usage and error information. // // Returned Error Codes: -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // * ErrCodeManagedActionInvalidStateException "ManagedActionInvalidStateException" @@ -776,7 +776,7 @@ func (c *ElasticBeanstalk) CreatePlatformVersionRequest(input *CreatePlatformVer // The specified account does not have sufficient privileges for one or more // AWS services. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // * ErrCodeTooManyPlatformsException "TooManyPlatformsException" @@ -1315,7 +1315,7 @@ func (c *ElasticBeanstalk) DeletePlatformVersionRequest(input *DeletePlatformVer // The specified account does not have sufficient privileges for one or more // AWS services. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // * ErrCodePlatformVersionStillReferencedException "PlatformVersionStillReferencedException" @@ -1809,7 +1809,7 @@ func (c *ElasticBeanstalk) DescribeEnvironmentHealthRequest(input *DescribeEnvir // One or more input parameters is not valid. Please correct the input parameters // and try the operation again. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentHealth @@ -1888,7 +1888,7 @@ func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionHistoryRequest(input // API operation DescribeEnvironmentManagedActionHistory for usage and error information. // // Returned Error Codes: -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActionHistory @@ -1967,7 +1967,7 @@ func (c *ElasticBeanstalk) DescribeEnvironmentManagedActionsRequest(input *Descr // API operation DescribeEnvironmentManagedActions for usage and error information. // // Returned Error Codes: -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentManagedActions @@ -2322,8 +2322,8 @@ func (c *ElasticBeanstalk) DescribeInstancesHealthRequest(input *DescribeInstanc // DescribeInstancesHealth API operation for AWS Elastic Beanstalk. // -// Retrives detailed information about the health of instances in your AWS Elastic -// Beanstalk. This operation requires enhanced health reporting (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced.html). +// Retrieves detailed information about the health of instances in your AWS +// Elastic Beanstalk. This operation requires enhanced health reporting (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced.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 @@ -2337,7 +2337,7 @@ func (c *ElasticBeanstalk) DescribeInstancesHealthRequest(input *DescribeInstanc // One or more input parameters is not valid. Please correct the input parameters // and try the operation again. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeInstancesHealth @@ -2420,7 +2420,7 @@ func (c *ElasticBeanstalk) DescribePlatformVersionRequest(input *DescribePlatfor // The specified account does not have sufficient privileges for one or more // AWS services. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribePlatformVersion @@ -2578,7 +2578,7 @@ func (c *ElasticBeanstalk) ListPlatformVersionsRequest(input *ListPlatformVersio // The specified account does not have sufficient privileges for one or more // AWS services. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeServiceException "ElasticBeanstalkServiceException" // A generic service exception has occurred. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListPlatformVersions @@ -3867,6 +3867,9 @@ func (s AbortEnvironmentUpdateOutput) GoString() string { type ApplicationDescription struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the application. + ApplicationArn *string `type:"string"` + // The name of the application. ApplicationName *string `min:"1" type:"string"` @@ -3874,10 +3877,10 @@ type ApplicationDescription struct { ConfigurationTemplates []*string `type:"list"` // The date when the application was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date when the application was last modified. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // User-defined description of the application. Description *string `type:"string"` @@ -3899,6 +3902,12 @@ func (s ApplicationDescription) GoString() string { return s.String() } +// SetApplicationArn sets the ApplicationArn field's value. +func (s *ApplicationDescription) SetApplicationArn(v string) *ApplicationDescription { + s.ApplicationArn = &v + return s +} + // SetApplicationName sets the ApplicationName field's value. func (s *ApplicationDescription) SetApplicationName(v string) *ApplicationDescription { s.ApplicationName = &v @@ -4030,6 +4039,14 @@ type ApplicationResourceLifecycleConfig struct { _ struct{} `type:"structure"` // The ARN of an IAM service role that Elastic Beanstalk has permission to assume. + // + // The ServiceRole property is required the first time that you provide a VersionLifecycleConfig + // for the application in one of the supporting calls (CreateApplication or + // UpdateApplicationResourceLifecycle). After you provide it once, in either + // one of the calls, Elastic Beanstalk persists the Service Role with the application, + // and you don't need to specify it again in subsequent UpdateApplicationResourceLifecycle + // calls. You can, however, specify it in subsequent calls to change the Service + // Role to another value. ServiceRole *string `type:"string"` // The application version lifecycle configuration. @@ -4080,14 +4097,17 @@ type ApplicationVersionDescription struct { // The name of the application to which the application version belongs. ApplicationName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the application version. + ApplicationVersionArn *string `type:"string"` + // Reference to the artifact from the AWS CodeBuild build. BuildArn *string `type:"string"` // The creation date of the application version. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The last modified date of the application version. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // The description of the application version. Description *string `type:"string"` @@ -4100,7 +4120,25 @@ type ApplicationVersionDescription struct { // S3. SourceBundle *S3Location `type:"structure"` - // The processing status of the application version. + // The processing status of the application version. Reflects the state of the + // application version during its creation. Many of the values are only applicable + // if you specified True for the Process parameter of the CreateApplicationVersion + // action. The following list describes the possible values. + // + // * Unprocessed – Application version wasn't pre-processed or validated. + // Elastic Beanstalk will validate configuration files during deployment + // of the application version to an environment. + // + // * Processing – Elastic Beanstalk is currently processing the application + // version. + // + // * Building – Application version is currently undergoing an AWS CodeBuild + // build. + // + // * Processed – Elastic Beanstalk was successfully pre-processed and validated. + // + // * Failed – Either the AWS CodeBuild build failed or configuration files + // didn't pass validation. This application version isn't usable. Status *string `type:"string" enum:"ApplicationVersionStatus"` // A unique identifier for the application version. @@ -4123,6 +4161,12 @@ func (s *ApplicationVersionDescription) SetApplicationName(v string) *Applicatio return s } +// SetApplicationVersionArn sets the ApplicationVersionArn field's value. +func (s *ApplicationVersionDescription) SetApplicationVersionArn(v string) *ApplicationVersionDescription { + s.ApplicationVersionArn = &v + return s +} + // SetBuildArn sets the BuildArn field's value. func (s *ApplicationVersionDescription) SetBuildArn(v string) *ApplicationVersionDescription { s.BuildArn = &v @@ -4964,10 +5008,10 @@ type ConfigurationSettingsDescription struct { ApplicationName *string `min:"1" type:"string"` // The date (in UTC time) when this configuration set was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date (in UTC time) when this configuration set was last modified. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // If this configuration set is associated with an environment, the DeploymentStatus // parameter indicates the deployment status of this configuration set: @@ -5162,11 +5206,15 @@ type CreateApplicationVersionInput struct { // Describes this version. Description *string `type:"string"` - // Preprocesses and validates the environment manifest (env.yaml) and configuration + // Pre-processes and validates the environment manifest (env.yaml) and configuration // files (*.config files in the .ebextensions folder) in the source bundle. // Validating configuration files can identify issues prior to deploying the // application version to an environment. // + // You must turn processing on for application versions that you create using + // AWS CodeBuild or AWS CodeCommit. For application versions built from a source + // bundle in Amazon S3, processing is optional. + // // The Process option validates Elastic Beanstalk configuration files. It doesn't // validate your application's configuration files, like proxy server or Docker // configuration. @@ -5500,6 +5548,9 @@ type CreateEnvironmentInput struct { // This is an alternative to specifying a template name. If specified, AWS Elastic // Beanstalk sets the configuration values to the default values associated // with the specified solution stack. + // + // For a list of current solution stacks, see Elastic Beanstalk Supported Platforms + // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html). SolutionStackName *string `type:"string"` // This specifies the tags applied to resources in the environment. @@ -6226,7 +6277,7 @@ type Deployment struct { // For in-progress deployments, the time that the deployment started. // // For completed deployments, the time that the deployment ended. - DeploymentTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeploymentTime *time.Time `type:"timestamp"` // The status of the deployment: // @@ -6800,7 +6851,7 @@ type DescribeEnvironmentHealthOutput struct { InstancesHealth *InstanceHealthSummary `type:"structure"` // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RefreshedAt *time.Time `type:"timestamp"` // The environment's operational status. Ready, Launching, Updating, Terminating, // or Terminated. @@ -7133,7 +7184,7 @@ type DescribeEnvironmentsInput struct { // If specified when IncludeDeleted is set to true, then environments deleted // after this date are displayed. - IncludedDeletedBackTo *time.Time `type:"timestamp" timestampFormat:"iso8601"` + IncludedDeletedBackTo *time.Time `type:"timestamp"` // For a paginated request. Specify a maximum number of environments to include // in each response. @@ -7241,7 +7292,7 @@ type DescribeEventsInput struct { // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that occur up to, but not including, the EndTime. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those associated with this environment. @@ -7271,7 +7322,7 @@ type DescribeEventsInput struct { // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that occur on or after this time. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that are associated with this environment configuration. @@ -7503,7 +7554,7 @@ type DescribeInstancesHealthOutput struct { NextToken *string `min:"1" type:"string"` // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RefreshedAt *time.Time `type:"timestamp"` } // String returns the string representation @@ -7599,10 +7650,10 @@ type EnvironmentDescription struct { CNAME *string `min:"1" type:"string"` // The creation date for this environment. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The last modified date for this environment. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // Describes this environment. Description *string `type:"string"` @@ -7612,7 +7663,7 @@ type EnvironmentDescription struct { EndpointURL *string `type:"string"` // The environment's Amazon Resource Name (ARN), which can be used in other - // API reuqests that require an ARN. + // API requests that require an ARN. EnvironmentArn *string `type:"string"` // The ID of this environment. @@ -7858,7 +7909,7 @@ type EnvironmentInfoDescription struct { Message *string `type:"string"` // The time stamp when this information was retrieved. - SampleTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SampleTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -8045,7 +8096,11 @@ type EnvironmentTier struct { // The type of this environment tier. Type *string `type:"string"` - // The version of this environment tier. + // The version of this environment tier. When you don't set a value to it, Elastic + // Beanstalk uses the latest compatible worker tier version. + // + // This member is deprecated. Any specific version that you set may become out + // of date. We recommend leaving it unspecified. Version *string `type:"string"` } @@ -8088,7 +8143,7 @@ type EventDescription struct { EnvironmentName *string `min:"4" type:"string"` // The date when the event occurred. - EventDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EventDate *time.Time `type:"timestamp"` // The event message. Message *string `type:"string"` @@ -8737,7 +8792,7 @@ type ManagedAction struct { // The start time of the maintenance window in which the managed action will // execute. - WindowStartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + WindowStartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -8794,7 +8849,7 @@ type ManagedActionHistoryItem struct { ActionType *string `type:"string" enum:"ActionType"` // The date and time that the action started executing. - ExecutedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ExecutedTime *time.Time `type:"timestamp"` // If the action failed, a description of the failure. FailureDescription *string `type:"string"` @@ -8803,7 +8858,7 @@ type ManagedActionHistoryItem struct { FailureType *string `type:"string" enum:"FailureType"` // The date and time that the action finished executing. - FinishedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + FinishedTime *time.Time `type:"timestamp"` // The status of the action. Status *string `type:"string" enum:"ActionHistoryStatus"` @@ -9083,10 +9138,10 @@ type PlatformDescription struct { CustomAmiList []*CustomAmi `type:"list"` // The date when the platform was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date when the platform was last updated. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // The description of the platform. Description *string `type:"string"` @@ -9964,7 +10019,7 @@ type SingleInstanceHealth struct { InstanceType *string `type:"string"` // The time at which the EC2 instance was launched. - LaunchedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LaunchedAt *time.Time `type:"timestamp"` // Operating system metrics from the instance. System *SystemStatus `type:"structure"` @@ -11494,6 +11549,9 @@ const ( // EnvironmentHealthStatusSevere is a EnvironmentHealthStatus enum value EnvironmentHealthStatusSevere = "Severe" + + // EnvironmentHealthStatusSuspended is a EnvironmentHealthStatus enum value + EnvironmentHealthStatusSuspended = "Suspended" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go index adb0f27e3..d13041287 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go @@ -77,10 +77,10 @@ const ( ErrCodeS3SubscriptionRequiredException = "S3SubscriptionRequiredException" // ErrCodeServiceException for service response error code - // "ServiceException". + // "ElasticBeanstalkServiceException". // // A generic service exception has occurred. - ErrCodeServiceException = "ServiceException" + ErrCodeServiceException = "ElasticBeanstalkServiceException" // ErrCodeSourceBundleDeletionException for service response error code // "SourceBundleDeletionFailure". diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go index e56509610..12e8b1c81 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticbeanstalk" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticbeanstalk" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Beanstalk" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticBeanstalk client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 0784f815e..f3cff5fbf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -756,6 +756,298 @@ func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsWithContex return out, req.Send() } +const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasticsearchInstanceOfferings" + +// DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeReservedElasticsearchInstanceOfferings for more information on using the DescribeReservedElasticsearchInstanceOfferings +// 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 DescribeReservedElasticsearchInstanceOfferingsRequest method. +// req, resp := client.DescribeReservedElasticsearchInstanceOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsRequest(input *DescribeReservedElasticsearchInstanceOfferingsInput) (req *request.Request, output *DescribeReservedElasticsearchInstanceOfferingsOutput) { + op := &request.Operation{ + Name: opDescribeReservedElasticsearchInstanceOfferings, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/reservedInstanceOfferings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReservedElasticsearchInstanceOfferingsInput{} + } + + output = &DescribeReservedElasticsearchInstanceOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservedElasticsearchInstanceOfferings API operation for Amazon Elasticsearch Service. +// +// Lists available reserved Elasticsearch instance offerings. +// +// 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 Elasticsearch Service's +// API operation DescribeReservedElasticsearchInstanceOfferings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferings(input *DescribeReservedElasticsearchInstanceOfferingsInput) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { + req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstanceOfferingsWithContext is the same as DescribeReservedElasticsearchInstanceOfferings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservedElasticsearchInstanceOfferings 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 *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, opts ...request.Option) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { + req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstanceOfferingsPages iterates over the pages of a DescribeReservedElasticsearchInstanceOfferings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReservedElasticsearchInstanceOfferings 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 DescribeReservedElasticsearchInstanceOfferings operation. +// pageNum := 0 +// err := client.DescribeReservedElasticsearchInstanceOfferingsPages(params, +// func(page *DescribeReservedElasticsearchInstanceOfferingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPages(input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool) error { + return c.DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReservedElasticsearchInstanceOfferingsPagesWithContext same as DescribeReservedElasticsearchInstanceOfferingsPages 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 *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReservedElasticsearchInstanceOfferingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReservedElasticsearchInstanceOfferingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeReservedElasticsearchInstanceOfferingsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeReservedElasticsearchInstances = "DescribeReservedElasticsearchInstances" + +// DescribeReservedElasticsearchInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedElasticsearchInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeReservedElasticsearchInstances for more information on using the DescribeReservedElasticsearchInstances +// 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 DescribeReservedElasticsearchInstancesRequest method. +// req, resp := client.DescribeReservedElasticsearchInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesRequest(input *DescribeReservedElasticsearchInstancesInput) (req *request.Request, output *DescribeReservedElasticsearchInstancesOutput) { + op := &request.Operation{ + Name: opDescribeReservedElasticsearchInstances, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/reservedInstances", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReservedElasticsearchInstancesInput{} + } + + output = &DescribeReservedElasticsearchInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservedElasticsearchInstances API operation for Amazon Elasticsearch Service. +// +// Returns information about reserved Elasticsearch instances for this 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 Elasticsearch Service's +// API operation DescribeReservedElasticsearchInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstances(input *DescribeReservedElasticsearchInstancesInput) (*DescribeReservedElasticsearchInstancesOutput, error) { + req, out := c.DescribeReservedElasticsearchInstancesRequest(input) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstancesWithContext is the same as DescribeReservedElasticsearchInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservedElasticsearchInstances 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 *ElasticsearchService) DescribeReservedElasticsearchInstancesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, opts ...request.Option) (*DescribeReservedElasticsearchInstancesOutput, error) { + req, out := c.DescribeReservedElasticsearchInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstancesPages iterates over the pages of a DescribeReservedElasticsearchInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReservedElasticsearchInstances 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 DescribeReservedElasticsearchInstances operation. +// pageNum := 0 +// err := client.DescribeReservedElasticsearchInstancesPages(params, +// func(page *DescribeReservedElasticsearchInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPages(input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool) error { + return c.DescribeReservedElasticsearchInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReservedElasticsearchInstancesPagesWithContext same as DescribeReservedElasticsearchInstancesPages 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 *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReservedElasticsearchInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReservedElasticsearchInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeReservedElasticsearchInstancesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the @@ -1216,6 +1508,104 @@ func (c *ElasticsearchService) ListTagsWithContext(ctx aws.Context, input *ListT return out, req.Send() } +const opPurchaseReservedElasticsearchInstanceOffering = "PurchaseReservedElasticsearchInstanceOffering" + +// PurchaseReservedElasticsearchInstanceOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseReservedElasticsearchInstanceOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PurchaseReservedElasticsearchInstanceOffering for more information on using the PurchaseReservedElasticsearchInstanceOffering +// 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 PurchaseReservedElasticsearchInstanceOfferingRequest method. +// req, resp := client.PurchaseReservedElasticsearchInstanceOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingRequest(input *PurchaseReservedElasticsearchInstanceOfferingInput) (req *request.Request, output *PurchaseReservedElasticsearchInstanceOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseReservedElasticsearchInstanceOffering, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/purchaseReservedInstanceOffering", + } + + if input == nil { + input = &PurchaseReservedElasticsearchInstanceOfferingInput{} + } + + output = &PurchaseReservedElasticsearchInstanceOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PurchaseReservedElasticsearchInstanceOffering API operation for Amazon Elasticsearch Service. +// +// Allows you to purchase reserved Elasticsearch instances. +// +// 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 Elasticsearch Service's +// API operation PurchaseReservedElasticsearchInstanceOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// An exception for creating a resource that already exists. Gives http status +// code of 400. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// An exception for trying to create more than allowed resources or sub-resources. +// Gives http status code of 409. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOffering(input *PurchaseReservedElasticsearchInstanceOfferingInput) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { + req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) + return out, req.Send() +} + +// PurchaseReservedElasticsearchInstanceOfferingWithContext is the same as PurchaseReservedElasticsearchInstanceOffering with the addition of +// the ability to pass a context and additional request options. +// +// See PurchaseReservedElasticsearchInstanceOffering 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 *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingWithContext(ctx aws.Context, input *PurchaseReservedElasticsearchInstanceOfferingInput, opts ...request.Option) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { + req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the @@ -2299,6 +2689,163 @@ func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[st return s } +// Container for parameters to DescribeReservedElasticsearchInstanceOfferings +type DescribeReservedElasticsearchInstanceOfferingsInput struct { + _ struct{} `type:"structure"` + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // NextToken should be sent in case if earlier API call produced result containing + // NextToken. It is used for pagination. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The offering identifier filter value. Use this parameter to show only the + // available offering that matches the specified reservation identifier. + ReservedElasticsearchInstanceOfferingId *string `location:"querystring" locationName:"offeringId" type:"string"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetReservedElasticsearchInstanceOfferingId(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// Container for results from DescribeReservedElasticsearchInstanceOfferings +type DescribeReservedElasticsearchInstanceOfferingsOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // List of reserved Elasticsearch instance offerings + ReservedElasticsearchInstanceOfferings []*ReservedElasticsearchInstanceOffering `type:"list"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsOutput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstanceOfferings sets the ReservedElasticsearchInstanceOfferings field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetReservedElasticsearchInstanceOfferings(v []*ReservedElasticsearchInstanceOffering) *DescribeReservedElasticsearchInstanceOfferingsOutput { + s.ReservedElasticsearchInstanceOfferings = v + return s +} + +// Container for parameters to DescribeReservedElasticsearchInstances +type DescribeReservedElasticsearchInstancesInput struct { + _ struct{} `type:"structure"` + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // NextToken should be sent in case if earlier API call produced result containing + // NextToken. It is used for pagination. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The reserved instance identifier filter value. Use this parameter to show + // only the reservation that matches the specified reserved Elasticsearch instance + // ID. + ReservedElasticsearchInstanceId *string `location:"querystring" locationName:"reservationId" type:"string"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstancesInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesInput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetReservedElasticsearchInstanceId(v string) *DescribeReservedElasticsearchInstancesInput { + s.ReservedElasticsearchInstanceId = &v + return s +} + +// Container for results from DescribeReservedElasticsearchInstances +type DescribeReservedElasticsearchInstancesOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // List of reserved Elasticsearch instances. + ReservedElasticsearchInstances []*ReservedElasticsearchInstance `type:"list"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstancesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstancesOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesOutput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstances sets the ReservedElasticsearchInstances field's value. +func (s *DescribeReservedElasticsearchInstancesOutput) SetReservedElasticsearchInstances(v []*ReservedElasticsearchInstance) *DescribeReservedElasticsearchInstancesOutput { + s.ReservedElasticsearchInstances = v + return s +} + type DomainInfo struct { _ struct{} `type:"structure"` @@ -3432,7 +3979,7 @@ type OptionStatus struct { // Timestamp which tells the creation date for the entity. // // CreationDate is a required field - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `type:"timestamp" required:"true"` // Indicates whether the Elasticsearch domain is being deleted. PendingDeletion *bool `type:"boolean"` @@ -3445,7 +3992,7 @@ type OptionStatus struct { // Timestamp which tells the last updated time for the entity. // // UpdateDate is a required field - UpdateDate *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `type:"timestamp" required:"true"` // Specifies the latest version for the entity. UpdateVersion *int64 `type:"integer"` @@ -3491,6 +4038,142 @@ func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { return s } +// Container for parameters to PurchaseReservedElasticsearchInstanceOffering +type PurchaseReservedElasticsearchInstanceOfferingInput struct { + _ struct{} `type:"structure"` + + // The number of Elasticsearch instances to reserve. + InstanceCount *int64 `min:"1" type:"integer"` + + // A customer-specified identifier to track this reservation. + // + // ReservationName is a required field + ReservationName *string `min:"5" type:"string" required:"true"` + + // The ID of the reserved Elasticsearch instance offering to purchase. + // + // ReservedElasticsearchInstanceOfferingId is a required field + ReservedElasticsearchInstanceOfferingId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedElasticsearchInstanceOfferingInput"} + if s.InstanceCount != nil && *s.InstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) + } + if s.ReservationName == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationName")) + } + if s.ReservationName != nil && len(*s.ReservationName) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ReservationName", 5)) + } + if s.ReservedElasticsearchInstanceOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedElasticsearchInstanceOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetInstanceCount(v int64) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.InstanceCount = &v + return s +} + +// SetReservationName sets the ReservationName field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservedElasticsearchInstanceOfferingId(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// Represents the output of a PurchaseReservedElasticsearchInstanceOffering +// operation. +type PurchaseReservedElasticsearchInstanceOfferingOutput struct { + _ struct{} `type:"structure"` + + // The customer-specified identifier used to track this reservation. + ReservationName *string `min:"5" type:"string"` + + // Details of the reserved Elasticsearch instance which was purchased. + ReservedElasticsearchInstanceId *string `type:"string"` +} + +// String returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingOutput) GoString() string { + return s.String() +} + +// SetReservationName sets the ReservationName field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservedElasticsearchInstanceId(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { + s.ReservedElasticsearchInstanceId = &v + return s +} + +// Contains the specific price and frequency of a recurring charges for a reserved +// Elasticsearch instance, or for a reserved Elasticsearch instance offering. +type RecurringCharge struct { + _ struct{} `type:"structure"` + + // The monetary amount of the recurring charge. + RecurringChargeAmount *float64 `type:"double"` + + // The frequency of the recurring charge. + RecurringChargeFrequency *string `type:"string"` +} + +// String returns the string representation +func (s RecurringCharge) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecurringCharge) GoString() string { + return s.String() +} + +// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. +func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { + s.RecurringChargeAmount = &v + return s +} + +// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. +func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { + s.RecurringChargeFrequency = &v + return s +} + // Container for the parameters to the RemoveTags operation. Specify the ARN // for the Elasticsearch domain from which you want to remove the specified // TagKey. @@ -3562,6 +4245,232 @@ func (s RemoveTagsOutput) GoString() string { return s.String() } +// Details of a reserved Elasticsearch instance. +type ReservedElasticsearchInstance struct { + _ struct{} `type:"structure"` + + // The currency code for the reserved Elasticsearch instance offering. + CurrencyCode *string `type:"string"` + + // The duration, in seconds, for which the Elasticsearch instance is reserved. + Duration *int64 `type:"integer"` + + // The number of Elasticsearch instances that have been reserved. + ElasticsearchInstanceCount *int64 `type:"integer"` + + // The Elasticsearch instance type offered by the reserved instance offering. + ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` + + // The upfront fixed charge you will paid to purchase the specific reserved + // Elasticsearch instance offering. + FixedPrice *float64 `type:"double"` + + // The payment option as defined in the reserved Elasticsearch instance offering. + PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []*RecurringCharge `type:"list"` + + // The customer-specified identifier to track this reservation. + ReservationName *string `min:"5" type:"string"` + + // The unique identifier for the reservation. + ReservedElasticsearchInstanceId *string `type:"string"` + + // The offering identifier. + ReservedElasticsearchInstanceOfferingId *string `type:"string"` + + // The time the reservation started. + StartTime *time.Time `type:"timestamp"` + + // The state of the reserved Elasticsearch instance. + State *string `type:"string"` + + // The rate you are charged for each hour for the domain that is using this + // reserved instance. + UsagePrice *float64 `type:"double"` +} + +// String returns the string representation +func (s ReservedElasticsearchInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedElasticsearchInstance) GoString() string { + return s.String() +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedElasticsearchInstance) SetCurrencyCode(v string) *ReservedElasticsearchInstance { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *ReservedElasticsearchInstance) SetDuration(v int64) *ReservedElasticsearchInstance { + s.Duration = &v + return s +} + +// SetElasticsearchInstanceCount sets the ElasticsearchInstanceCount field's value. +func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceCount(v int64) *ReservedElasticsearchInstance { + s.ElasticsearchInstanceCount = &v + return s +} + +// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. +func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstance { + s.ElasticsearchInstanceType = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedElasticsearchInstance) SetFixedPrice(v float64) *ReservedElasticsearchInstance { + s.FixedPrice = &v + return s +} + +// SetPaymentOption sets the PaymentOption field's value. +func (s *ReservedElasticsearchInstance) SetPaymentOption(v string) *ReservedElasticsearchInstance { + s.PaymentOption = &v + return s +} + +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedElasticsearchInstance) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstance { + s.RecurringCharges = v + return s +} + +// SetReservationName sets the ReservationName field's value. +func (s *ReservedElasticsearchInstance) SetReservationName(v string) *ReservedElasticsearchInstance { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceId(v string) *ReservedElasticsearchInstance { + s.ReservedElasticsearchInstanceId = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstance { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ReservedElasticsearchInstance) SetStartTime(v time.Time) *ReservedElasticsearchInstance { + s.StartTime = &v + return s +} + +// SetState sets the State field's value. +func (s *ReservedElasticsearchInstance) SetState(v string) *ReservedElasticsearchInstance { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedElasticsearchInstance) SetUsagePrice(v float64) *ReservedElasticsearchInstance { + s.UsagePrice = &v + return s +} + +// Details of a reserved Elasticsearch instance offering. +type ReservedElasticsearchInstanceOffering struct { + _ struct{} `type:"structure"` + + // The currency code for the reserved Elasticsearch instance offering. + CurrencyCode *string `type:"string"` + + // The duration, in seconds, for which the offering will reserve the Elasticsearch + // instance. + Duration *int64 `type:"integer"` + + // The Elasticsearch instance type offered by the reserved instance offering. + ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` + + // The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch + // instance offering. + FixedPrice *float64 `type:"double"` + + // Payment option for the reserved Elasticsearch instance offering + PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []*RecurringCharge `type:"list"` + + // The Elasticsearch reserved instance offering identifier. + ReservedElasticsearchInstanceOfferingId *string `type:"string"` + + // The rate you are charged for each hour the domain that is using the offering + // is running. + UsagePrice *float64 `type:"double"` +} + +// String returns the string representation +func (s ReservedElasticsearchInstanceOffering) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedElasticsearchInstanceOffering) GoString() string { + return s.String() +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedElasticsearchInstanceOffering) SetCurrencyCode(v string) *ReservedElasticsearchInstanceOffering { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *ReservedElasticsearchInstanceOffering) SetDuration(v int64) *ReservedElasticsearchInstanceOffering { + s.Duration = &v + return s +} + +// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. +func (s *ReservedElasticsearchInstanceOffering) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstanceOffering { + s.ElasticsearchInstanceType = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedElasticsearchInstanceOffering) SetFixedPrice(v float64) *ReservedElasticsearchInstanceOffering { + s.FixedPrice = &v + return s +} + +// SetPaymentOption sets the PaymentOption field's value. +func (s *ReservedElasticsearchInstanceOffering) SetPaymentOption(v string) *ReservedElasticsearchInstanceOffering { + s.PaymentOption = &v + return s +} + +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedElasticsearchInstanceOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstanceOffering { + s.RecurringCharges = v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *ReservedElasticsearchInstanceOffering) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstanceOffering { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *ReservedElasticsearchInstanceOffering { + s.UsagePrice = &v + return s +} + // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. type SnapshotOptions struct { @@ -4210,6 +5119,17 @@ const ( OptionStateActive = "Active" ) +const ( + // ReservedElasticsearchInstancePaymentOptionAllUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionAllUpfront = "ALL_UPFRONT" + + // ReservedElasticsearchInstancePaymentOptionPartialUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionPartialUpfront = "PARTIAL_UPFRONT" + + // ReservedElasticsearchInstancePaymentOptionNoUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionNoUpfront = "NO_UPFRONT" +) + // The type of EBS volume, standard, gp2, or io1. See Configuring EBS-based // Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs)for // more information. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go index c4388e79b..d2f8f3827 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "es" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "es" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elasticsearch Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticsearchService client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go index 29d15e2e7..30acb8d1b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elastictranscoder" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elastictranscoder" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Transcoder" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticTranscoder client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index 26720a342..c41d020c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -5406,7 +5406,7 @@ type LoadBalancerDescription struct { CanonicalHostedZoneNameID *string `type:"string"` // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTime *time.Time `type:"timestamp"` // The DNS name of the load balancer. DNSName *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go index 057530f6c..5dfdd322c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticloadbalancing" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticloadbalancing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Load Balancing" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ELB client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index 5a60ca656..8427b6215 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -306,6 +306,12 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request. // * ErrCodeTooManyTargetsException "TooManyTargets" // You've reached the limit on the number of targets. // +// * ErrCodeTooManyActionsException "TooManyActions" +// You've reached the limit on the number of actions per rule. +// +// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" +// The requested action is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener func (c *ELBV2) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { req, out := c.CreateListenerRequest(input) @@ -512,9 +518,9 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // with an Application Load Balancer. // // Rules are evaluated in priority order, from the lowest value to the highest -// value. When the condition for a rule is met, the specified action is taken. -// If no conditions are met, the action for the default rule is taken. For more -// information, see Listener Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) +// value. When the conditions for a rule are met, its actions are performed. +// If the conditions for no rules are met, the actions for the default rule +// are performed. For more information, see Listener Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) // in the Application Load Balancers Guide. // // To view your current rules, use DescribeRules. To update a rule, use ModifyRule. @@ -560,6 +566,15 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // * ErrCodeTooManyTargetsException "TooManyTargets" // You've reached the limit on the number of targets. // +// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" +// The specified protocol is not supported. +// +// * ErrCodeTooManyActionsException "TooManyActions" +// You've reached the limit on the number of actions per rule. +// +// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" +// The requested action is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule func (c *ELBV2) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) { req, out := c.CreateRuleRequest(input) @@ -1338,6 +1353,9 @@ func (c *ELBV2) DescribeListenersRequest(input *DescribeListenersInput) (req *re // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" // The specified load balancer does not exist. // +// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" +// The specified protocol is not supported. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners func (c *ELBV2) DescribeListeners(input *DescribeListenersInput) (*DescribeListenersOutput, error) { req, out := c.DescribeListenersRequest(input) @@ -1457,6 +1475,10 @@ func (c *ELBV2) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalance // Describes the attributes for the specified Application Load Balancer or Network // Load Balancer. // +// For more information, see Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes) +// in the Application Load Balancers Guide or Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes) +// in the Network Load Balancers 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. @@ -1689,6 +1711,9 @@ func (c *ELBV2) DescribeRulesRequest(input *DescribeRulesInput) (req *request.Re // * ErrCodeRuleNotFoundException "RuleNotFound" // The specified rule does not exist. // +// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" +// The specified protocol is not supported. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules func (c *ELBV2) DescribeRules(input *DescribeRulesInput) (*DescribeRulesOutput, error) { req, out := c.DescribeRulesRequest(input) @@ -1929,6 +1954,10 @@ func (c *ELBV2) DescribeTargetGroupAttributesRequest(input *DescribeTargetGroupA // // Describes the attributes for the specified target group. // +// For more information, see Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes) +// in the Application Load Balancers Guide or Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes) +// in the Network Load Balancers 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. @@ -2292,6 +2321,12 @@ func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request. // * ErrCodeTooManyTargetsException "TooManyTargets" // You've reached the limit on the number of targets. // +// * ErrCodeTooManyActionsException "TooManyActions" +// You've reached the limit on the number of actions per rule. +// +// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" +// The requested action is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) { req, out := c.ModifyListenerRequest(input) @@ -2449,7 +2484,7 @@ func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, // // Any existing properties that you do not modify retain their current values. // -// To modify the default action, use ModifyListener. +// To modify the actions for the default rule, use ModifyListener. // // 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 @@ -2481,6 +2516,15 @@ func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" // The specified target group does not exist. // +// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol" +// The specified protocol is not supported. +// +// * ErrCodeTooManyActionsException "TooManyActions" +// You've reached the limit on the number of actions per rule. +// +// * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" +// The requested action is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule func (c *ELBV2) ModifyRule(input *ModifyRuleInput) (*ModifyRuleOutput, error) { req, out := c.ModifyRuleRequest(input) @@ -3323,12 +3367,27 @@ func (c *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, o type Action struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` + // [HTTPS listener] Information for using Amazon Cognito to authenticate users. + // Specify only when Type is authenticate-cognito. + AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"` - // The type of action. + // [HTTPS listener] Information about an identity provider that is compliant + // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc. + AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"` + + // The order for the action. This value is required for rules with multiple + // actions. The action with the lowest value for order is performed first. The + // forward action must be performed last. + Order *int64 `min:"1" type:"integer"` + + // The Amazon Resource Name (ARN) of the target group. Specify only when Type + // is forward. + // + // For a default rule, the protocol of the target group must be HTTP or HTTPS + // for an Application Load Balancer or TCP for a Network Load Balancer. + TargetGroupArn *string `type:"string"` + + // The type of action. Each rule must include one forward action. // // Type is a required field Type *string `type:"string" required:"true" enum:"ActionTypeEnum"` @@ -3347,12 +3406,22 @@ func (s Action) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *Action) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Action"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) + if s.Order != nil && *s.Order < 1 { + invalidParams.Add(request.NewErrParamMinValue("Order", 1)) } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } + if s.AuthenticateCognitoConfig != nil { + if err := s.AuthenticateCognitoConfig.Validate(); err != nil { + invalidParams.AddNested("AuthenticateCognitoConfig", err.(request.ErrInvalidParams)) + } + } + if s.AuthenticateOidcConfig != nil { + if err := s.AuthenticateOidcConfig.Validate(); err != nil { + invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3360,6 +3429,24 @@ func (s *Action) Validate() error { return nil } +// SetAuthenticateCognitoConfig sets the AuthenticateCognitoConfig field's value. +func (s *Action) SetAuthenticateCognitoConfig(v *AuthenticateCognitoActionConfig) *Action { + s.AuthenticateCognitoConfig = v + return s +} + +// SetAuthenticateOidcConfig sets the AuthenticateOidcConfig field's value. +func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Action { + s.AuthenticateOidcConfig = v + return s +} + +// SetOrder sets the Order field's value. +func (s *Action) SetOrder(v int64) *Action { + s.Order = &v + return s +} + // SetTargetGroupArn sets the TargetGroupArn field's value. func (s *Action) SetTargetGroupArn(v string) *Action { s.TargetGroupArn = &v @@ -3526,6 +3613,305 @@ func (s AddTagsOutput) GoString() string { return s.String() } +// Request parameters to use when integrating with Amazon Cognito to authenticate +// users. +type AuthenticateCognitoActionConfig struct { + _ struct{} `type:"structure"` + + // The query parameters (up to 10) to include in the redirect request to the + // authorization endpoint. + AuthenticationRequestExtraParams map[string]*string `type:"map"` + + // The behavior if the user is not authenticated. The following are possible + // values: + // + // * deny - Return an HTTP 401 Unauthorized error. + // + // * allow - Allow the request to be forwarded to the target. + // + // authenticate + OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateCognitoActionConditionalBehaviorEnum"` + + // The set of user claims to be requested from the IdP. The default is openid. + // + // To verify which scope values your IdP supports and how to separate multiple + // values, see the documentation for your IdP. + Scope *string `type:"string"` + + // The name of the cookie used to maintain session information. The default + // is AWSELBAuthSessionCookie. + SessionCookieName *string `type:"string"` + + // The maximum duration of the authentication session, in seconds. The default + // is 604800 seconds (7 days). + SessionTimeout *int64 `type:"long"` + + // The Amazon Resource Name (ARN) of the Amazon Cognito user pool. + // + // UserPoolArn is a required field + UserPoolArn *string `type:"string" required:"true"` + + // The ID of the Amazon Cognito user pool client. + // + // UserPoolClientId is a required field + UserPoolClientId *string `type:"string" required:"true"` + + // The domain prefix or fully-qualified domain name of the Amazon Cognito user + // pool. + // + // UserPoolDomain is a required field + UserPoolDomain *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthenticateCognitoActionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthenticateCognitoActionConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthenticateCognitoActionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthenticateCognitoActionConfig"} + if s.UserPoolArn == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolArn")) + } + if s.UserPoolClientId == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolClientId")) + } + if s.UserPoolDomain == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolDomain")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. +func (s *AuthenticateCognitoActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateCognitoActionConfig { + s.AuthenticationRequestExtraParams = v + return s +} + +// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. +func (s *AuthenticateCognitoActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateCognitoActionConfig { + s.OnUnauthenticatedRequest = &v + return s +} + +// SetScope sets the Scope field's value. +func (s *AuthenticateCognitoActionConfig) SetScope(v string) *AuthenticateCognitoActionConfig { + s.Scope = &v + return s +} + +// SetSessionCookieName sets the SessionCookieName field's value. +func (s *AuthenticateCognitoActionConfig) SetSessionCookieName(v string) *AuthenticateCognitoActionConfig { + s.SessionCookieName = &v + return s +} + +// SetSessionTimeout sets the SessionTimeout field's value. +func (s *AuthenticateCognitoActionConfig) SetSessionTimeout(v int64) *AuthenticateCognitoActionConfig { + s.SessionTimeout = &v + return s +} + +// SetUserPoolArn sets the UserPoolArn field's value. +func (s *AuthenticateCognitoActionConfig) SetUserPoolArn(v string) *AuthenticateCognitoActionConfig { + s.UserPoolArn = &v + return s +} + +// SetUserPoolClientId sets the UserPoolClientId field's value. +func (s *AuthenticateCognitoActionConfig) SetUserPoolClientId(v string) *AuthenticateCognitoActionConfig { + s.UserPoolClientId = &v + return s +} + +// SetUserPoolDomain sets the UserPoolDomain field's value. +func (s *AuthenticateCognitoActionConfig) SetUserPoolDomain(v string) *AuthenticateCognitoActionConfig { + s.UserPoolDomain = &v + return s +} + +// Request parameters when using an identity provider (IdP) that is compliant +// with OpenID Connect (OIDC) to authenticate users. +type AuthenticateOidcActionConfig struct { + _ struct{} `type:"structure"` + + // The query parameters (up to 10) to include in the redirect request to the + // authorization endpoint. + AuthenticationRequestExtraParams map[string]*string `type:"map"` + + // The authorization endpoint of the IdP. This must be a full URL, including + // the HTTPS protocol, the domain, and the path. + // + // AuthorizationEndpoint is a required field + AuthorizationEndpoint *string `type:"string" required:"true"` + + // The OAuth 2.0 client identifier. + // + // ClientId is a required field + ClientId *string `type:"string" required:"true"` + + // The OAuth 2.0 client secret. + // + // ClientSecret is a required field + ClientSecret *string `type:"string" required:"true"` + + // The OIDC issuer identifier of the IdP. This must be a full URL, including + // the HTTPS protocol, the domain, and the path. + // + // Issuer is a required field + Issuer *string `type:"string" required:"true"` + + // The behavior if the user is not authenticated. The following are possible + // values: + // + // * deny - Return an HTTP 401 Unauthorized error. + // + // * allow - Allow the request to be forwarded to the target. + // + // authenticate + OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateOidcActionConditionalBehaviorEnum"` + + // The set of user claims to be requested from the IdP. The default is openid. + // + // To verify which scope values your IdP supports and how to separate multiple + // values, see the documentation for your IdP. + Scope *string `type:"string"` + + // The name of the cookie used to maintain session information. The default + // is AWSELBAuthSessionCookie. + SessionCookieName *string `type:"string"` + + // The maximum duration of the authentication session, in seconds. The default + // is 604800 seconds (7 days). + SessionTimeout *int64 `type:"long"` + + // The token endpoint of the IdP. This must be a full URL, including the HTTPS + // protocol, the domain, and the path. + // + // TokenEndpoint is a required field + TokenEndpoint *string `type:"string" required:"true"` + + // The user info endpoint of the IdP. This must be a full URL, including the + // HTTPS protocol, the domain, and the path. + // + // UserInfoEndpoint is a required field + UserInfoEndpoint *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthenticateOidcActionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthenticateOidcActionConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthenticateOidcActionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthenticateOidcActionConfig"} + if s.AuthorizationEndpoint == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizationEndpoint")) + } + if s.ClientId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientId")) + } + if s.ClientSecret == nil { + invalidParams.Add(request.NewErrParamRequired("ClientSecret")) + } + if s.Issuer == nil { + invalidParams.Add(request.NewErrParamRequired("Issuer")) + } + if s.TokenEndpoint == nil { + invalidParams.Add(request.NewErrParamRequired("TokenEndpoint")) + } + if s.UserInfoEndpoint == nil { + invalidParams.Add(request.NewErrParamRequired("UserInfoEndpoint")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. +func (s *AuthenticateOidcActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateOidcActionConfig { + s.AuthenticationRequestExtraParams = v + return s +} + +// SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value. +func (s *AuthenticateOidcActionConfig) SetAuthorizationEndpoint(v string) *AuthenticateOidcActionConfig { + s.AuthorizationEndpoint = &v + return s +} + +// SetClientId sets the ClientId field's value. +func (s *AuthenticateOidcActionConfig) SetClientId(v string) *AuthenticateOidcActionConfig { + s.ClientId = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *AuthenticateOidcActionConfig) SetClientSecret(v string) *AuthenticateOidcActionConfig { + s.ClientSecret = &v + return s +} + +// SetIssuer sets the Issuer field's value. +func (s *AuthenticateOidcActionConfig) SetIssuer(v string) *AuthenticateOidcActionConfig { + s.Issuer = &v + return s +} + +// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. +func (s *AuthenticateOidcActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateOidcActionConfig { + s.OnUnauthenticatedRequest = &v + return s +} + +// SetScope sets the Scope field's value. +func (s *AuthenticateOidcActionConfig) SetScope(v string) *AuthenticateOidcActionConfig { + s.Scope = &v + return s +} + +// SetSessionCookieName sets the SessionCookieName field's value. +func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig { + s.SessionCookieName = &v + return s +} + +// SetSessionTimeout sets the SessionTimeout field's value. +func (s *AuthenticateOidcActionConfig) SetSessionTimeout(v int64) *AuthenticateOidcActionConfig { + s.SessionTimeout = &v + return s +} + +// SetTokenEndpoint sets the TokenEndpoint field's value. +func (s *AuthenticateOidcActionConfig) SetTokenEndpoint(v string) *AuthenticateOidcActionConfig { + s.TokenEndpoint = &v + return s +} + +// SetUserInfoEndpoint sets the UserInfoEndpoint field's value. +func (s *AuthenticateOidcActionConfig) SetUserInfoEndpoint(v string) *AuthenticateOidcActionConfig { + s.UserInfoEndpoint = &v + return s +} + // Information about an Availability Zone. type AvailabilityZone struct { _ struct{} `type:"structure"` @@ -3637,13 +4023,22 @@ func (s *Cipher) SetPriority(v int64) *Cipher { type CreateListenerInput struct { _ struct{} `type:"structure"` - // [HTTPS listeners] The SSL server certificate. You must provide exactly one - // certificate. + // [HTTPS listeners] The default SSL server certificate. You must provide exactly + // one certificate. To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` - // The default action for the listener. For Application Load Balancers, the - // protocol of the specified target group must be HTTP or HTTPS. For Network - // Load Balancers, the protocol of the specified target group must be TCP. + // The actions for the default rule. The rule must include one forward action. + // + // If the action type is forward, you can specify a single target group. The + // protocol of the target group must be HTTP or HTTPS for an Application Load + // Balancer or TCP for a Network Load Balancer. + // + // If the action type is authenticate-oidc, you can use an identity provider + // that is OpenID Connect (OIDC) compliant to authenticate users as they access + // your application. + // + // If the action type is authenticate-cognito, you can use Amazon Cognito to + // authenticate users as they access your application. // // DefaultActions is a required field DefaultActions []*Action `type:"list" required:"true"` @@ -3786,8 +4181,8 @@ type CreateLoadBalancerInput struct { // The name of the load balancer. // // This name must be unique per region per account, can have a maximum of 32 - // characters, must contain only alphanumeric characters or hyphens, and must - // not begin or end with a hyphen. + // characters, must contain only alphanumeric characters or hyphens, must not + // begin or end with a hyphen, and must not begin with "internal-". // // Name is a required field Name *string `type:"string" required:"true"` @@ -3946,7 +4341,16 @@ func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLo type CreateRuleInput struct { _ struct{} `type:"structure"` - // An action. Each action has the type forward and specifies a target group. + // The actions. Each rule must include one forward action. + // + // If the action type is forward, you can specify a single target group. + // + // If the action type is authenticate-oidc, you can use an identity provider + // that is OpenID Connect (OIDC) compliant to authenticate users as they access + // your application. + // + // If the action type is authenticate-cognito, you can use Amazon Cognito to + // authenticate users as they access your application. // // Actions is a required field Actions []*Action `type:"list" required:"true"` @@ -3989,8 +4393,7 @@ type CreateRuleInput struct { // ListenerArn is a required field ListenerArn *string `type:"string" required:"true"` - // The priority for the rule. A listener can't have multiple rules with the - // same priority. + // The rule priority. A listener can't have multiple rules with the same priority. // // Priority is a required field Priority *int64 `min:"1" type:"integer" required:"true"` @@ -5678,7 +6081,7 @@ type LoadBalancer struct { CanonicalHostedZoneId *string `type:"string"` // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTime *time.Time `type:"timestamp"` // The public DNS name of the load balancer. DNSName *string `type:"string"` @@ -5839,32 +6242,35 @@ type LoadBalancerAttribute struct { // The name of the attribute. // - // * access_logs.s3.enabled - [Application Load Balancers] Indicates whether - // access logs stored in Amazon S3 are enabled. The value is true or false. - // - // * access_logs.s3.bucket - [Application Load Balancers] The name of the - // S3 bucket for the access logs. This attribute is required if access logs - // in Amazon S3 are enabled. The bucket must exist in the same region as - // the load balancer and have a bucket policy that grants Elastic Load Balancing - // permission to write to the bucket. - // - // * access_logs.s3.prefix - [Application Load Balancers] The prefix for - // the location in the S3 bucket. If you don't specify a prefix, the access - // logs are stored in the root of the bucket. + // The following attributes are supported by both Application Load Balancers + // and Network Load Balancers: // // * deletion_protection.enabled - Indicates whether deletion protection - // is enabled. The value is true or false. + // is enabled. The value is true or false. The default is false. // - // * idle_timeout.timeout_seconds - [Application Load Balancers] The idle - // timeout value, in seconds. The valid range is 1-4000. The default is 60 - // seconds. + // The following attributes are supported by only Application Load Balancers: // - // * load_balancing.cross_zone.enabled - [Network Load Balancers] Indicates - // whether cross-zone load balancing is enabled. The value is true or false. - // The default is false. + // * access_logs.s3.enabled - Indicates whether access logs are enabled. + // The value is true or false. The default is false. // - // * routing.http2.enabled - [Application Load Balancers] Indicates whether - // HTTP/2 is enabled. The value is true or false. The default is true. + // * access_logs.s3.bucket - The name of the S3 bucket for the access logs. + // This attribute is required if access logs are enabled. The bucket must + // exist in the same region as the load balancer and have a bucket policy + // that grants Elastic Load Balancing permission to write to the bucket. + // + // * access_logs.s3.prefix - The prefix for the location in the S3 bucket + // for the access logs. + // + // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The + // valid range is 1-4000 seconds. The default is 60 seconds. + // + // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value + // is true or false. The default is true. + // + // The following attributes are supported by only Network Load Balancers: + // + // * load_balancing.cross_zone.enabled - Indicates whether cross-zone load + // balancing is enabled. The value is true or false. The default is false. Key *string `type:"string"` // The value of the attribute. @@ -5976,12 +6382,22 @@ func (s *Matcher) SetHttpCode(v string) *Matcher { type ModifyListenerInput struct { _ struct{} `type:"structure"` - // The default SSL server certificate. + // [HTTPS listeners] The default SSL server certificate. You must provide exactly + // one certificate. To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` - // The default action. For Application Load Balancers, the protocol of the specified - // target group must be HTTP or HTTPS. For Network Load Balancers, the protocol - // of the specified target group must be TCP. + // The actions for the default rule. The rule must include one forward action. + // + // If the action type is forward, you can specify a single target group. The + // protocol of the target group must be HTTP or HTTPS for an Application Load + // Balancer or TCP for a Network Load Balancer. + // + // If the action type is authenticate-oidc, you can use an identity provider + // that is OpenID Connect (OIDC) compliant to authenticate users as they access + // your application. + // + // If the action type is authenticate-cognito, you can use Amazon Cognito to + // authenticate users as they access your application. DefaultActions []*Action `type:"list"` // The Amazon Resource Name (ARN) of the listener. @@ -5997,8 +6413,8 @@ type ModifyListenerInput struct { // TCP. Protocol *string `type:"string" enum:"ProtocolEnum"` - // The security policy that defines which protocols and ciphers are supported. - // For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) + // [HTTPS listeners] The security policy that defines which protocols and ciphers + // are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) // in the Application Load Balancers Guide. SslPolicy *string `type:"string"` } @@ -6078,7 +6494,7 @@ func (s *ModifyListenerInput) SetSslPolicy(v string) *ModifyListenerInput { type ModifyListenerOutput struct { _ struct{} `type:"structure"` - // Information about the modified listeners. + // Information about the modified listener. Listeners []*Listener `type:"list"` } @@ -6176,10 +6592,47 @@ func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttr type ModifyRuleInput struct { _ struct{} `type:"structure"` - // The actions. The target group must use the HTTP or HTTPS protocol. + // The actions. + // + // If the action type is forward, you can specify a single target group. + // + // If the action type is authenticate-oidc, you can use an identity provider + // that is OpenID Connect (OIDC) compliant to authenticate users as they access + // your application. + // + // If the action type is authenticate-cognito, you can use Amazon Cognito to + // authenticate users as they access your application. Actions []*Action `type:"list"` - // The conditions. + // The conditions. Each condition specifies a field name and a single value. + // + // If the field name is host-header, you can specify a single host name (for + // example, my.example.com). A host name is case insensitive, can be up to 128 + // characters in length, and can contain any of the following characters. Note + // that you can include up to three wildcard characters. + // + // * A-Z, a-z, 0-9 + // + // * - . + // + // * * (matches 0 or more characters) + // + // * ? (matches exactly 1 character) + // + // If the field name is path-pattern, you can specify a single path pattern. + // A path pattern is case sensitive, can be up to 128 characters in length, + // and can contain any of the following characters. Note that you can include + // up to three wildcard characters. + // + // * A-Z, a-z, 0-9 + // + // * _ - . $ / ~ " ' @ : + + // + // * & (using &) + // + // * * (matches 0 or more characters) + // + // * ? (matches exactly 1 character) Conditions []*RuleCondition `type:"list"` // The Amazon Resource Name (ARN) of the rule. @@ -6242,7 +6695,7 @@ func (s *ModifyRuleInput) SetRuleArn(v string) *ModifyRuleInput { type ModifyRuleOutput struct { _ struct{} `type:"structure"` - // Information about the rule. + // Information about the modified rule. Rules []*Rule `type:"list"` } @@ -6480,7 +6933,7 @@ func (s *ModifyTargetGroupInput) SetUnhealthyThresholdCount(v int64) *ModifyTarg type ModifyTargetGroupOutput struct { _ struct{} `type:"structure"` - // Information about the target group. + // Information about the modified target group. TargetGroups []*TargetGroup `type:"list"` } @@ -7116,9 +7569,7 @@ type SetSubnetsInput struct { // The IDs of the public subnets. You must specify subnets from at least two // Availability Zones. You can specify only one subnet per Availability Zone. // You must specify either subnets or subnet mappings. - // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` + Subnets []*string `type:"list"` } // String returns the string representation @@ -7137,9 +7588,6 @@ func (s *SetSubnetsInput) Validate() error { if s.LoadBalancerArn == nil { invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } if invalidParams.Len() > 0 { return invalidParams @@ -7581,25 +8029,38 @@ type TargetGroupAttribute struct { // The name of the attribute. // - // * deregistration_delay.timeout_seconds - The amount time for Elastic Load - // Balancing to wait before changing the state of a deregistering target - // from draining to unused. The range is 0-3600 seconds. The default value - // is 300 seconds. + // The following attributes are supported by both Application Load Balancers + // and Network Load Balancers: // - // * proxy_protocol_v2.enabled - [Network Load Balancers] Indicates whether - // Proxy Protocol version 2 is enabled. + // * deregistration_delay.timeout_seconds - The amount of time, in seconds, + // for Elastic Load Balancing to wait before changing the state of a deregistering + // target from draining to unused. The range is 0-3600 seconds. The default + // value is 300 seconds. // - // * stickiness.enabled - [Application Load Balancers] Indicates whether - // sticky sessions are enabled. The value is true or false. + // The following attributes are supported by only Application Load Balancers: // - // * stickiness.type - [Application Load Balancers] The type of sticky sessions. - // The possible value is lb_cookie. + // * slow_start.duration_seconds - The time period, in seconds, during which + // a newly registered target receives a linearly increasing share of the + // traffic to the target group. After this time period ends, the target receives + // its full share of traffic. The range is 30-900 seconds (15 minutes). Slow + // start mode is disabled by default. // - // * stickiness.lb_cookie.duration_seconds - [Application Load Balancers] - // The time period, in seconds, during which requests from a client should - // be routed to the same target. After this time period expires, the load - // balancer-generated cookie is considered stale. The range is 1 second to - // 1 week (604800 seconds). The default value is 1 day (86400 seconds). + // * stickiness.enabled - Indicates whether sticky sessions are enabled. + // The value is true or false. The default is false. + // + // * stickiness.type - The type of sticky sessions. The possible value is + // lb_cookie. + // + // * stickiness.lb_cookie.duration_seconds - The time period, in seconds, + // during which requests from a client should be routed to the same target. + // After this time period expires, the load balancer-generated cookie is + // considered stale. The range is 1 second to 1 week (604800 seconds). The + // default value is 1 day (86400 seconds). + // + // The following attributes are supported by only Network Load Balancers: + // + // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version + // 2 is enabled. The value is true or false. The default is false. Key *string `type:"string"` // The value of the attribute. @@ -7759,6 +8220,34 @@ func (s *TargetHealthDescription) SetTargetHealth(v *TargetHealth) *TargetHealth const ( // ActionTypeEnumForward is a ActionTypeEnum enum value ActionTypeEnumForward = "forward" + + // ActionTypeEnumAuthenticateOidc is a ActionTypeEnum enum value + ActionTypeEnumAuthenticateOidc = "authenticate-oidc" + + // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value + ActionTypeEnumAuthenticateCognito = "authenticate-cognito" +) + +const ( + // AuthenticateCognitoActionConditionalBehaviorEnumDeny is a AuthenticateCognitoActionConditionalBehaviorEnum enum value + AuthenticateCognitoActionConditionalBehaviorEnumDeny = "deny" + + // AuthenticateCognitoActionConditionalBehaviorEnumAllow is a AuthenticateCognitoActionConditionalBehaviorEnum enum value + AuthenticateCognitoActionConditionalBehaviorEnumAllow = "allow" + + // AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate is a AuthenticateCognitoActionConditionalBehaviorEnum enum value + AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate = "authenticate" +) + +const ( + // AuthenticateOidcActionConditionalBehaviorEnumDeny is a AuthenticateOidcActionConditionalBehaviorEnum enum value + AuthenticateOidcActionConditionalBehaviorEnumDeny = "deny" + + // AuthenticateOidcActionConditionalBehaviorEnumAllow is a AuthenticateOidcActionConditionalBehaviorEnum enum value + AuthenticateOidcActionConditionalBehaviorEnumAllow = "allow" + + // AuthenticateOidcActionConditionalBehaviorEnumAuthenticate is a AuthenticateOidcActionConditionalBehaviorEnum enum value + AuthenticateOidcActionConditionalBehaviorEnumAuthenticate = "authenticate" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go index 88edc02e9..b813ebeff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go @@ -65,6 +65,12 @@ const ( // The requested configuration is not valid. ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest" + // ErrCodeInvalidLoadBalancerActionException for service response error code + // "InvalidLoadBalancerAction". + // + // The requested action is not valid. + ErrCodeInvalidLoadBalancerActionException = "InvalidLoadBalancerAction" + // ErrCodeInvalidSchemeException for service response error code // "InvalidScheme". // @@ -150,6 +156,12 @@ const ( // The specified target group does not exist. ErrCodeTargetGroupNotFoundException = "TargetGroupNotFound" + // ErrCodeTooManyActionsException for service response error code + // "TooManyActions". + // + // You've reached the limit on the number of actions per rule. + ErrCodeTooManyActionsException = "TooManyActions" + // ErrCodeTooManyCertificatesException for service response error code // "TooManyCertificates". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go index c3733846c..ad97e8df8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticloadbalancing" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticloadbalancing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Load Balancing v2" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ELBV2 client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 09c135c97..12fe5fb54 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -661,7 +661,7 @@ func (c *EMR) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // DescribeCluster API operation for Amazon Elastic MapReduce. // // Provides cluster-level details including status, hardware and software configuration, -// VPC settings, and so on. For information about the cluster steps, see ListSteps. +// VPC settings, and so on. // // 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 @@ -3675,7 +3675,14 @@ type Cluster struct { // the actual billing rate. NormalizedInstanceHours *int64 `type:"integer"` - // The release label for the Amazon EMR release. + // The Amazon EMR release label, which determines the version of open-source + // application packages installed on the cluster. Release labels are in the + // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, + // emr-5.14.0. For more information about Amazon EMR release versions and included + // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ + // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label + // applies only to Amazon EMR releases versions 4.x and later. Earlier versions + // use AmiVersion. ReleaseLabel *string `type:"string"` // Applies only when CustomAmiID is used. Specifies the type of updates that @@ -4027,13 +4034,13 @@ type ClusterTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the cluster. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the cluster was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the cluster was ready to execute steps. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4215,7 +4222,7 @@ type CreateSecurityConfigurationOutput struct { // The date and time the security configuration was created. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The name of the security configuration. // @@ -4365,10 +4372,10 @@ type DescribeJobFlowsInput struct { _ struct{} `type:"structure"` // Return only job flows created after this date and time. - CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAfter *time.Time `type:"timestamp"` // Return only job flows created before this date and time. - CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedBefore *time.Time `type:"timestamp"` // Return only job flows whose job flow ID is contained in this list. JobFlowIds []*string `type:"list"` @@ -4477,7 +4484,7 @@ type DescribeSecurityConfigurationOutput struct { _ struct{} `type:"structure"` // The date and time the security configuration was created - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The name of the security configuration. Name *string `type:"string"` @@ -5713,13 +5720,13 @@ type InstanceFleetTimeline struct { _ struct{} `type:"structure"` // The time and date the instance fleet was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The time and date the instance fleet terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The time and date the instance fleet was ready to run jobs. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -5761,8 +5768,12 @@ type InstanceGroup struct { // of a CloudWatch metric. See PutAutoScalingPolicy. AutoScalingPolicy *AutoScalingPolicyDescription `type:"structure"` - // The bid price for each EC2 instance in the instance group when launching - // nodes as Spot Instances, expressed in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specify the maximum spot price in USD. If the + // value is NULL and SPOT is specified, the maximum Spot price is set equal + // to the On-Demand price. BidPrice *string `type:"string"` // Amazon EMR releases 4.x or later. @@ -5913,8 +5924,12 @@ type InstanceGroupConfig struct { // of a CloudWatch metric. See PutAutoScalingPolicy. AutoScalingPolicy *AutoScalingPolicy `type:"structure"` - // Bid price for each EC2 instance in the instance group when launching nodes - // as Spot Instances, expressed in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specify the maximum spot price in USD. If the + // value is NULL and SPOT is specified, the maximum Spot price is set equal + // to the On-Demand price. BidPrice *string `type:"string"` // Amazon EMR releases 4.x or later. @@ -6050,17 +6065,20 @@ func (s *InstanceGroupConfig) SetName(v string) *InstanceGroupConfig { type InstanceGroupDetail struct { _ struct{} `type:"structure"` - // Bid price for EC2 Instances when launching nodes as Spot Instances, expressed - // in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specified in USD. If the value is NULL and SPOT + // is specified, the maximum Spot price is set equal to the On-Demand price. BidPrice *string `type:"string"` // The date/time the instance group was created. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The date/time the instance group was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // Unique identifier for the instance group. InstanceGroupId *string `type:"string"` @@ -6097,10 +6115,10 @@ type InstanceGroupDetail struct { Name *string `type:"string"` // The date/time the instance group was available to the cluster. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` // The date/time the instance group was started. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // State of instance group. The following values are deprecated: STARTING, TERMINATED, // and FAILED. @@ -6350,13 +6368,13 @@ type InstanceGroupTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the instance group. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the instance group terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the instance group became ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -6511,13 +6529,13 @@ type InstanceTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the instance. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the instance was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the instance was ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -6751,10 +6769,8 @@ func (s *InstanceTypeSpecification) SetWeightedCapacity(v int64) *InstanceTypeSp type JobFlowDetail struct { _ struct{} `type:"structure"` - // Used only for version 2.x and 3.x of Amazon EMR. The version of the AMI used - // to initialize Amazon EC2 instances in the job flow. For a list of AMI versions - // supported by Amazon EMR, see AMI Versions Supported in EMR (http://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf#nameddest=ami-versions-supported) - // in the Amazon EMR Developer Guide. + // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases + // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. @@ -6929,20 +6945,20 @@ type JobFlowExecutionStatusDetail struct { // The creation date and time of the job flow. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The completion date and time of the job flow. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // Description of the job flow last changed state. LastStateChangeReason *string `type:"string"` // The date and time when the job flow was ready to start running bootstrap // actions. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` // The start date and time of the job flow. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // The state of the job flow. // @@ -7041,11 +7057,12 @@ type JobFlowInstancesConfig struct { // The identifier of the Amazon EC2 security group for the slave nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` - // The Hadoop version for the cluster. Valid inputs are "0.18" (deprecated), - // "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". - // If you do not set this value, the default of 0.18 is used, unless the AmiVersion - // parameter is set in the RunJobFlow call, in which case the default version - // of Hadoop for that AMI version is used. + // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop + // version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), + // "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set + // this value, the default of 0.18 is used, unless the AmiVersion parameter + // is set in the RunJobFlow call, in which case the default version of Hadoop + // for that AMI version is used. HadoopVersion *string `type:"string"` // The number of EC2 instances in the cluster. @@ -7596,10 +7613,10 @@ type ListClustersInput struct { ClusterStates []*string `type:"list"` // The creation date and time beginning value filter for listing clusters. - CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAfter *time.Time `type:"timestamp"` // The creation date and time end value filter for listing clusters. - CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedBefore *time.Time `type:"timestamp"` // The pagination token that indicates the next set of results to retrieve. Marker *string `type:"string"` @@ -8591,22 +8608,8 @@ type RunJobFlowInput struct { // A JSON string for selecting additional features. AdditionalInfo *string `type:"string"` - // For Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and - // later, the Linux AMI is determined by the ReleaseLabel specified or by CustomAmiID. - // The version of the Amazon Machine Image (AMI) to use when launching Amazon - // EC2 instances in the job flow. For details about the AMI versions currently - // supported in EMR version 3.x and 2.x, see AMI Versions Supported in EMR (emr/latest/DeveloperGuide/emr-dg.pdf#nameddest=ami-versions-supported) - // in the Amazon EMR Developer Guide. - // - // If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports - // both Hadoop 0.18 and 0.20), you can use the JobFlowInstancesConfigHadoopVersion - // parameter to modify the version of Hadoop from the defaults shown above. - // - // Previously, the EMR AMI version API parameter options allowed you to use - // latest for the latest AMI version rather than specify a numerical value. - // Some regions no longer support this deprecated option as they only have a - // newer release label version of EMR, which requires you to specify an EMR - // release label release (EMR 4.x or later). + // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases + // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` // For Amazon EMR releases 4.0 and later. A list of applications for the cluster. @@ -8698,8 +8701,14 @@ type RunJobFlowInput struct { // * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. NewSupportedProducts []*SupportedProductConfig `type:"list"` - // The release label for the Amazon EMR release. For Amazon EMR 3.x and 2.x - // AMIs, use AmiVersion instead. + // The Amazon EMR release label, which determines the version of open-source + // application packages installed on the cluster. Release labels are in the + // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, + // emr-5.14.0. For more information about Amazon EMR release versions and included + // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ + // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label + // applies only to Amazon EMR releases versions 4.x and later. Earlier versions + // use AmiVersion. ReleaseLabel *string `type:"string"` // Applies only when CustomAmiID is used. Specifies which updates from the Amazon @@ -9279,7 +9288,7 @@ type SecurityConfigurationSummary struct { _ struct{} `type:"structure"` // The date and time the security configuration was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The name of the security configuration. Name *string `type:"string"` @@ -9814,16 +9823,16 @@ type StepExecutionStatusDetail struct { // The creation date and time of the step. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The completion date and time of the step. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // A description of the step's current state. LastStateChangeReason *string `type:"string"` // The start date and time of the step. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // The state of the step. // @@ -10023,13 +10032,13 @@ type StepTimeline struct { _ struct{} `type:"structure"` // The date and time when the cluster step was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the cluster step execution completed or failed. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the cluster step execution started. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go b/vendor/github.com/aws/aws-sdk-go/service/emr/service.go index 61fc42581..92735a793 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticmapreduce" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "elasticmapreduce" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EMR" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EMR client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index a7d3333ff..5718acff4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -55,9 +55,9 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // CreateDeliveryStream API operation for Amazon Kinesis Firehose. // -// Creates a delivery stream. +// Creates a Kinesis Data Firehose delivery stream. // -// By default, you can create up to 20 delivery streams per region. +// By default, you can create up to 50 delivery streams per AWS Region. // // This is an asynchronous operation that immediately returns. The initial status // of the delivery stream is CREATING. After the delivery stream is created, @@ -65,33 +65,34 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // delivery stream that is not in the ACTIVE state cause an exception. To check // the state of a delivery stream, use DescribeDeliveryStream. // -// A Kinesis Firehose delivery stream can be configured to receive records directly -// from providers using PutRecord or PutRecordBatch, or it can be configured -// to use an existing Kinesis stream as its source. To specify a Kinesis stream -// as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, -// and provide the Kinesis stream ARN and role ARN in the KinesisStreamSourceConfiguration -// parameter. +// A Kinesis Data Firehose delivery stream can be configured to receive records +// directly from providers using PutRecord or PutRecordBatch, or it can be configured +// to use an existing Kinesis stream as its source. To specify a Kinesis data +// stream as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, +// and provide the Kinesis stream Amazon Resource Name (ARN) and role ARN in +// the KinesisStreamSourceConfiguration parameter. // // A delivery stream is configured with a single destination: Amazon S3, Amazon -// ES, or Amazon Redshift. You must specify only one of the following destination -// configuration parameters: ExtendedS3DestinationConfiguration, S3DestinationConfiguration, -// ElasticsearchDestinationConfiguration, or RedshiftDestinationConfiguration. +// ES, Amazon Redshift, or Splunk. You must specify only one of the following +// destination configuration parameters: ExtendedS3DestinationConfiguration, +// S3DestinationConfiguration, ElasticsearchDestinationConfiguration, RedshiftDestinationConfiguration, +// or SplunkDestinationConfiguration. // // When you specify S3DestinationConfiguration, you can also provide the following // optional values: BufferingHints, EncryptionConfiguration, and CompressionFormat. -// By default, if no BufferingHints value is provided, Kinesis Firehose buffers -// data up to 5 MB or for 5 minutes, whichever condition is satisfied first. -// Note that BufferingHints is a hint, so there are some cases where the service -// cannot adhere to these conditions strictly; for example, record boundaries -// are such that the size is a little over or under the configured buffering +// By default, if no BufferingHints value is provided, Kinesis Data Firehose +// buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied +// first. BufferingHints is a hint, so there are some cases where the service +// cannot adhere to these conditions strictly. For example, record boundaries +// might be such that the size is a little over or under the configured buffering // size. By default, no encryption is performed. We strongly recommend that // you enable encryption to ensure secure data storage in Amazon S3. // // A few notes about Amazon Redshift as a destination: // // * An Amazon Redshift destination requires an S3 bucket as intermediate -// location, as Kinesis Firehose first delivers data to S3 and then uses -// COPY syntax to load data into an Amazon Redshift table. This is specified +// location. Kinesis Data Firehose first delivers data to Amazon S3 and then +// uses COPY syntax to load data into an Amazon Redshift table. This is specified // in the RedshiftDestinationConfiguration.S3Configuration parameter. // // * The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration @@ -99,14 +100,15 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // doesn't support these compression formats. // // * We strongly recommend that you use the user name and password you provide -// exclusively with Kinesis Firehose, and that the permissions for the account -// are restricted for Amazon Redshift INSERT permissions. +// exclusively with Kinesis Data Firehose, and that the permissions for the +// account are restricted for Amazon Redshift INSERT permissions. // -// Kinesis Firehose assumes the IAM role that is configured as part of the destination. -// The role should allow the Kinesis Firehose principal to assume the role, -// and the role should have permissions that allow the service to deliver the -// data. For more information, see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) -// in the Amazon Kinesis Firehose Developer Guide. +// Kinesis Data Firehose assumes the IAM role that is configured as part of +// the destination. The role should allow the Kinesis Data Firehose principal +// to assume the role, and the role should have permissions that allow the service +// to deliver the data. For more information, see Grant Kinesis Data Firehose +// Access to an Amazon S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) +// in the Amazon Kinesis Data Firehose 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 @@ -199,10 +201,10 @@ func (c *Firehose) DeleteDeliveryStreamRequest(input *DeleteDeliveryStreamInput) // // To check the state of a delivery stream, use DescribeDeliveryStream. // -// While the delivery stream is DELETING state, the service may continue to -// accept the records, but the service doesn't make any guarantees with respect -// to delivering the data. Therefore, as a best practice, you should first stop -// any applications that are sending records before deleting a delivery stream. +// While the delivery stream is DELETING state, the service might continue to +// accept the records, but it doesn't make any guarantees with respect to delivering +// the data. Therefore, as a best practice, you should first stop any applications +// that are sending records before deleting a delivery stream. // // 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 @@ -286,8 +288,8 @@ func (c *Firehose) DescribeDeliveryStreamRequest(input *DescribeDeliveryStreamIn // // Describes the specified delivery stream and gets the status. For example, // after your delivery stream is created, call DescribeDeliveryStream to see -// if the delivery stream is ACTIVE and therefore ready for data to be sent -// to it. +// whether the delivery stream is ACTIVE and therefore ready for data to be +// sent to it. // // 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 @@ -404,6 +406,92 @@ func (c *Firehose) ListDeliveryStreamsWithContext(ctx aws.Context, input *ListDe return out, req.Send() } +const opListTagsForDeliveryStream = "ListTagsForDeliveryStream" + +// ListTagsForDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListTagsForDeliveryStream for more information on using the ListTagsForDeliveryStream +// 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 ListTagsForDeliveryStreamRequest method. +// req, resp := client.ListTagsForDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream +func (c *Firehose) ListTagsForDeliveryStreamRequest(input *ListTagsForDeliveryStreamInput) (req *request.Request, output *ListTagsForDeliveryStreamOutput) { + op := &request.Operation{ + Name: opListTagsForDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForDeliveryStreamInput{} + } + + output = &ListTagsForDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Lists the tags for the specified delivery stream. This operation has a limit +// of five transactions per second per 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 Kinesis Firehose's +// API operation ListTagsForDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream +func (c *Firehose) ListTagsForDeliveryStream(input *ListTagsForDeliveryStreamInput) (*ListTagsForDeliveryStreamOutput, error) { + req, out := c.ListTagsForDeliveryStreamRequest(input) + return out, req.Send() +} + +// ListTagsForDeliveryStreamWithContext is the same as ListTagsForDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForDeliveryStream 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 *Firehose) ListTagsForDeliveryStreamWithContext(ctx aws.Context, input *ListTagsForDeliveryStreamInput, opts ...request.Option) (*ListTagsForDeliveryStreamOutput, error) { + req, out := c.ListTagsForDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the @@ -448,22 +536,23 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // PutRecord API operation for Amazon Kinesis Firehose. // -// Writes a single data record into an Amazon Kinesis Firehose delivery stream. -// To write multiple data records into a delivery stream, use PutRecordBatch. +// Writes a single data record into an Amazon Kinesis Data Firehose delivery +// stream. To write multiple data records into a delivery stream, use PutRecordBatch. // Applications using these operations are referred to as producers. // // By default, each delivery stream can take in up to 2,000 transactions per -// second, 5,000 records per second, or 5 MB per second. Note that if you use -// PutRecord and PutRecordBatch, the limits are an aggregate across these two -// operations for each delivery stream. For more information about limits and -// how to request an increase, see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// second, 5,000 records per second, or 5 MB per second. If you use PutRecord +// and PutRecordBatch, the limits are an aggregate across these two operations +// for each delivery stream. For more information about limits and how to request +// an increase, see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size, and any kind of data, for example, a segment from a log -// file, geographic location data, website clickstream data, and so on. +// 1,000 KB in size, and any kind of data. For example, it can be a segment +// from a log file, geographic location data, website clickstream data, and +// so on. // -// Kinesis Firehose buffers records before delivering them to the destination. +// Kinesis Data Firehose buffers records before delivering them to the destination. // To disambiguate the data blobs at the destination, a common solution is to // use delimiters in the data, such as a newline (\n) or some other character // unique within the data. This allows the consumer application to parse individual @@ -477,9 +566,9 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // and retry. If the exception persists, it is possible that the throughput // limits have been exceeded for the delivery stream. // -// Data records sent to Kinesis Firehose are stored for 24 hours from the time -// they are added to a delivery stream as it attempts to send the records to -// the destination. If the destination is unreachable for more than 24 hours, +// Data records sent to Kinesis Data Firehose are stored for 24 hours from the +// time they are added to a delivery stream as it tries to send the records +// to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -497,10 +586,10 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // The specified input parameter has a value that is not valid. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. If you continue +// The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecord func (c *Firehose) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { @@ -577,7 +666,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // second, 5,000 records per second, or 5 MB per second. If you use PutRecord // and PutRecordBatch, the limits are an aggregate across these two operations // for each delivery stream. For more information about limits, see Amazon Kinesis -// Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // Each PutRecordBatch request supports up to 500 records. Each record in the // request can be as large as 1,000 KB (before 64-bit encoding), up to a limit @@ -586,10 +675,10 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to // 1,000 KB in size, and any kind of data. For example, it could be a segment -// from a log file, geographic location data, web site clickstream data, and +// from a log file, geographic location data, website clickstream data, and // so on. // -// Kinesis Firehose buffers records before delivering them to the destination. +// Kinesis Data Firehose buffers records before delivering them to the destination. // To disambiguate the data blobs at the destination, a common solution is to // use delimiters in the data, such as a newline (\n) or some other character // unique within the data. This allows the consumer application to parse individual @@ -601,7 +690,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // correlates with a record in the request array using the same ordering, from // the top to the bottom. The response array always includes the same number // of records as the request array. RequestResponses includes both successfully -// and unsuccessfully processed records. Kinesis Firehose attempts to process +// and unsuccessfully processed records. Kinesis Data Firehose tries to process // all records in each PutRecordBatch request. A single record failure does // not stop the processing of subsequent records. // @@ -622,9 +711,9 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // If the exception persists, it is possible that the throughput limits have // been exceeded for the delivery stream. // -// Data records sent to Kinesis Firehose are stored for 24 hours from the time -// they are added to a delivery stream as it attempts to send the records to -// the destination. If the destination is unreachable for more than 24 hours, +// Data records sent to Kinesis Data Firehose are stored for 24 hours from the +// time they are added to a delivery stream as it attempts to send the records +// to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -642,10 +731,10 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // The specified input parameter has a value that is not valid. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. If you continue +// The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch func (c *Firehose) PutRecordBatch(input *PutRecordBatchInput) (*PutRecordBatchOutput, error) { @@ -669,6 +758,198 @@ func (c *Firehose) PutRecordBatchWithContext(ctx aws.Context, input *PutRecordBa return out, req.Send() } +const opTagDeliveryStream = "TagDeliveryStream" + +// TagDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the TagDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 TagDeliveryStream for more information on using the TagDeliveryStream +// 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 TagDeliveryStreamRequest method. +// req, resp := client.TagDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream +func (c *Firehose) TagDeliveryStreamRequest(input *TagDeliveryStreamInput) (req *request.Request, output *TagDeliveryStreamOutput) { + op := &request.Operation{ + Name: opTagDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagDeliveryStreamInput{} + } + + output = &TagDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Adds or updates tags for the specified delivery stream. A tag is a key-value +// pair (the value is optional) that you can define and assign to AWS resources. +// If you specify a tag that already exists, the tag value is replaced with +// the value that you specify in the request. Tags are metadata. For example, +// you can add friendly names and descriptions or other types of information +// that can help you distinguish the delivery stream. For more information about +// tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// in the AWS Billing and Cost Management User Guide. +// +// Each delivery stream can have up to 50 tags. +// +// This operation has a limit of five transactions per second per 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 Kinesis Firehose's +// API operation TagDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream +func (c *Firehose) TagDeliveryStream(input *TagDeliveryStreamInput) (*TagDeliveryStreamOutput, error) { + req, out := c.TagDeliveryStreamRequest(input) + return out, req.Send() +} + +// TagDeliveryStreamWithContext is the same as TagDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See TagDeliveryStream 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 *Firehose) TagDeliveryStreamWithContext(ctx aws.Context, input *TagDeliveryStreamInput, opts ...request.Option) (*TagDeliveryStreamOutput, error) { + req, out := c.TagDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagDeliveryStream = "UntagDeliveryStream" + +// UntagDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the UntagDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UntagDeliveryStream for more information on using the UntagDeliveryStream +// 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 UntagDeliveryStreamRequest method. +// req, resp := client.UntagDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream +func (c *Firehose) UntagDeliveryStreamRequest(input *UntagDeliveryStreamInput) (req *request.Request, output *UntagDeliveryStreamOutput) { + op := &request.Operation{ + Name: opUntagDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagDeliveryStreamInput{} + } + + output = &UntagDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Removes tags from the specified delivery stream. Removed tags are deleted, +// and you can't recover them after this operation successfully completes. +// +// If you specify a tag that doesn't exist, the operation ignores it. +// +// This operation has a limit of five transactions per second per 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 Kinesis Firehose's +// API operation UntagDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream +func (c *Firehose) UntagDeliveryStream(input *UntagDeliveryStreamInput) (*UntagDeliveryStreamOutput, error) { + req, out := c.UntagDeliveryStreamRequest(input) + return out, req.Send() +} + +// UntagDeliveryStreamWithContext is the same as UntagDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See UntagDeliveryStream 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 *Firehose) UntagDeliveryStreamWithContext(ctx aws.Context, input *UntagDeliveryStreamInput, opts ...request.Option) (*UntagDeliveryStreamOutput, error) { + req, out := c.UntagDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateDestination = "UpdateDestination" // UpdateDestinationRequest generates a "aws/request.Request" representing the @@ -715,18 +996,18 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // // Updates the specified destination of the specified delivery stream. // -// You can use this operation to change the destination type (for example, to -// replace the Amazon S3 destination with Amazon Redshift) or change the parameters +// Use this operation to change the destination type (for example, to replace +// the Amazon S3 destination with Amazon Redshift) or change the parameters // associated with a destination (for example, to change the bucket name of // the Amazon S3 destination). The update might not occur immediately. The target // delivery stream remains active while the configurations are updated, so data // writes to the delivery stream can continue during this process. The updated // configurations are usually effective within a few minutes. // -// Note that switching between Amazon ES and other services is not supported. -// For an Amazon ES destination, you can only update to another Amazon ES destination. +// Switching between Amazon ES and other services is not supported. For an Amazon +// ES destination, you can only update to another Amazon ES destination. // -// If the destination type is the same, Kinesis Firehose merges the configuration +// If the destination type is the same, Kinesis Data Firehose merges the configuration // parameters specified with the destination configuration that already exists // on the delivery stream. If any of the parameters are not specified in the // call, the existing values are retained. For example, in the Amazon S3 destination, @@ -734,10 +1015,10 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // is maintained on the destination. // // If the destination type is not the same, for example, changing the destination -// from Amazon S3 to Amazon Redshift, Kinesis Firehose does not merge any parameters. -// In this case, all parameters must be specified. +// from Amazon S3 to Amazon Redshift, Kinesis Data Firehose does not merge any +// parameters. In this case, all parameters must be specified. // -// Kinesis Firehose uses CurrentDeliveryStreamVersionId to avoid race conditions +// Kinesis Data Firehose uses CurrentDeliveryStreamVersionId to avoid race conditions // and conflicting merges. This is a required field, and the service updates // the configuration only if the existing configuration has a version ID that // matches. After the update is applied successfully, the version ID is updated, @@ -788,8 +1069,8 @@ func (c *Firehose) UpdateDestinationWithContext(ctx aws.Context, input *UpdateDe } // Describes hints for the buffering to perform before delivering data to the -// destination. Please note that these options are treated as hints, and therefore -// Kinesis Firehose may choose to use different values when it is optimal. +// destination. These options are treated as hints, and therefore Kinesis Data +// Firehose might choose to use different values when it is optimal. type BufferingHints struct { _ struct{} `type:"structure"` @@ -895,7 +1176,7 @@ type CopyCommand struct { // Optional parameters to use with the Amazon Redshift COPY command. For more // information, see the "Optional Parameters" section of Amazon Redshift COPY // command (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html). Some - // possible examples that would apply to Kinesis Firehose are as follows: + // possible examples that would apply to Kinesis Data Firehose are as follows: // // delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and // compressed using lzop. @@ -971,8 +1252,9 @@ type CreateDeliveryStreamInput struct { _ struct{} `type:"structure"` // The name of the delivery stream. This name must be unique per AWS account - // in the same region. If the delivery streams are in different accounts or - // different regions, you can have multiple delivery streams with the same name. + // in the same AWS Region. If the delivery streams are in different accounts + // or different Regions, you can have multiple delivery streams with the same + // name. // // DeliveryStreamName is a required field DeliveryStreamName *string `min:"1" type:"string" required:"true"` @@ -981,8 +1263,8 @@ type CreateDeliveryStreamInput struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` // The destination in Amazon ES. You can specify only one destination. @@ -991,8 +1273,9 @@ type CreateDeliveryStreamInput struct { // The destination in Amazon S3. You can specify only one destination. ExtendedS3DestinationConfiguration *ExtendedS3DestinationConfiguration `type:"structure"` - // When a Kinesis stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration - // containing the Kinesis stream ARN and the role ARN for the source stream. + // When a Kinesis data stream is used as the source for the delivery stream, + // a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon + // Resource Name (ARN) and the role ARN for the source stream. KinesisStreamSourceConfiguration *KinesisStreamSourceConfiguration `type:"structure"` // The destination in Amazon Redshift. You can specify only one destination. @@ -1132,6 +1415,80 @@ func (s *CreateDeliveryStreamOutput) SetDeliveryStreamARN(v string) *CreateDeliv return s } +// Specifies that you want Kinesis Data Firehose to convert data from the JSON +// format to the Parquet or ORC format before writing it to Amazon S3. Kinesis +// Data Firehose uses the serializer and deserializer that you specify, in addition +// to the column information from the AWS Glue table, to deserialize your input +// data from JSON and then serialize it to the Parquet or ORC format. For more +// information, see Kinesis Data Firehose Record Format Conversion (https://docs.aws.amazon.com/firehose/latest/dev/record-format-conversion.html). +type DataFormatConversionConfiguration struct { + _ struct{} `type:"structure"` + + // Defaults to true. Set it to false if you want to disable format conversion + // while preserving the configuration details. + Enabled *bool `type:"boolean"` + + // Specifies the deserializer that you want Kinesis Data Firehose to use to + // convert the format of your data from JSON. + InputFormatConfiguration *InputFormatConfiguration `type:"structure"` + + // Specifies the serializer that you want Kinesis Data Firehose to use to convert + // the format of your data to the Parquet or ORC format. + OutputFormatConfiguration *OutputFormatConfiguration `type:"structure"` + + // Specifies the AWS Glue Data Catalog table that contains the column information. + SchemaConfiguration *SchemaConfiguration `type:"structure"` +} + +// String returns the string representation +func (s DataFormatConversionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataFormatConversionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DataFormatConversionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DataFormatConversionConfiguration"} + if s.OutputFormatConfiguration != nil { + if err := s.OutputFormatConfiguration.Validate(); err != nil { + invalidParams.AddNested("OutputFormatConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *DataFormatConversionConfiguration) SetEnabled(v bool) *DataFormatConversionConfiguration { + s.Enabled = &v + return s +} + +// SetInputFormatConfiguration sets the InputFormatConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetInputFormatConfiguration(v *InputFormatConfiguration) *DataFormatConversionConfiguration { + s.InputFormatConfiguration = v + return s +} + +// SetOutputFormatConfiguration sets the OutputFormatConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetOutputFormatConfiguration(v *OutputFormatConfiguration) *DataFormatConversionConfiguration { + s.OutputFormatConfiguration = v + return s +} + +// SetSchemaConfiguration sets the SchemaConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetSchemaConfiguration(v *SchemaConfiguration) *DataFormatConversionConfiguration { + s.SchemaConfiguration = v + return s +} + type DeleteDeliveryStreamInput struct { _ struct{} `type:"structure"` @@ -1192,9 +1549,10 @@ type DeliveryStreamDescription struct { _ struct{} `type:"structure"` // The date and time that the delivery stream was created. - CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTimestamp *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the delivery stream. + // The Amazon Resource Name (ARN) of the delivery stream. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // DeliveryStreamARN is a required field DeliveryStreamARN *string `min:"1" type:"string" required:"true"` @@ -1213,8 +1571,8 @@ type DeliveryStreamDescription struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. // // DeliveryStreamType is a required field DeliveryStreamType *string `type:"string" required:"true" enum:"DeliveryStreamType"` @@ -1230,10 +1588,10 @@ type DeliveryStreamDescription struct { HasMoreDestinations *bool `type:"boolean" required:"true"` // The date and time that the delivery stream was last updated. - LastUpdateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTimestamp *time.Time `type:"timestamp"` // If the DeliveryStreamType parameter is KinesisStreamAsSource, a SourceDescription - // object describing the source Kinesis stream. + // object describing the source Kinesis data stream. Source *SourceDescription `type:"structure"` // Each time the destination is updated for a delivery stream, the version ID @@ -1324,11 +1682,11 @@ type DescribeDeliveryStreamInput struct { DeliveryStreamName *string `min:"1" type:"string" required:"true"` // The ID of the destination to start returning the destination information. - // Currently, Kinesis Firehose supports one destination per delivery stream. + // Kinesis Data Firehose supports one destination per delivery stream. ExclusiveStartDestinationId *string `min:"1" type:"string"` - // The limit on the number of destinations to return. Currently, you can have - // one destination per delivery stream. + // The limit on the number of destinations to return. You can have one destination + // per delivery stream. Limit *int64 `min:"1" type:"integer"` } @@ -1407,6 +1765,51 @@ func (s *DescribeDeliveryStreamOutput) SetDeliveryStreamDescription(v *DeliveryS return s } +// The deserializer you want Kinesis Data Firehose to use for converting the +// input data from JSON. Kinesis Data Firehose then serializes the data to its +// final format using the Serializer. Kinesis Data Firehose supports two types +// of deserializers: the Apache Hive JSON SerDe (https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-JSON) +// and the OpenX JSON SerDe (https://github.com/rcongiu/Hive-JSON-Serde). +type Deserializer struct { + _ struct{} `type:"structure"` + + // The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing + // data, which means converting it from the JSON format in preparation for serializing + // it to the Parquet or ORC format. This is one of two deserializers you can + // choose, depending on which one offers the functionality you need. The other + // option is the OpenX SerDe. + HiveJsonSerDe *HiveJsonSerDe `type:"structure"` + + // The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which + // means converting it from the JSON format in preparation for serializing it + // to the Parquet or ORC format. This is one of two deserializers you can choose, + // depending on which one offers the functionality you need. The other option + // is the native Hive / HCatalog JsonSerDe. + OpenXJsonSerDe *OpenXJsonSerDe `type:"structure"` +} + +// String returns the string representation +func (s Deserializer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deserializer) GoString() string { + return s.String() +} + +// SetHiveJsonSerDe sets the HiveJsonSerDe field's value. +func (s *Deserializer) SetHiveJsonSerDe(v *HiveJsonSerDe) *Deserializer { + s.HiveJsonSerDe = v + return s +} + +// SetOpenXJsonSerDe sets the OpenXJsonSerDe field's value. +func (s *Deserializer) SetOpenXJsonSerDe(v *OpenXJsonSerDe) *Deserializer { + s.OpenXJsonSerDe = v + return s +} + // Describes the destination for a delivery stream. type DestinationDescription struct { _ struct{} `type:"structure"` @@ -1542,12 +1945,13 @@ type ElasticsearchDestinationConfiguration struct { // are used. BufferingHints *ElasticsearchBufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the role specified in RoleARN. + // assuming the role specified in RoleARN. For more information, see Amazon + // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // DomainARN is a required field DomainARN *string `min:"1" type:"string" required:"true"` @@ -1559,31 +1963,33 @@ type ElasticsearchDestinationConfiguration struct { // The Elasticsearch index rotation period. Index rotation appends a time stamp // to the IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // The default value is OneDay. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon ES. The default value is 300 (5 minutes). RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the IAM role to be assumed by Kinesis Firehose for calling the - // Amazon ES Configuration API and for indexing documents. For more information, - // see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data + // Firehose for calling the Amazon ES Configuration API and for indexing documents. + // For more information, see Grant Kinesis Data Firehose Access to an Amazon + // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) + // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` - // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any documents that could not be indexed to the configured - // Amazon S3 destination, with elasticsearch-failed/ appended to the key prefix. - // When set to AllDocuments, Kinesis Firehose delivers all incoming records - // to Amazon S3, and also writes failed documents with elasticsearch-failed/ - // appended to the prefix. For more information, see Amazon S3 Backup for Amazon - // Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). + // Defines how documents should be delivered to Amazon S3. When it is set to + // FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could + // not be indexed to the configured Amazon S3 destination, with elasticsearch-failed/ + // appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose + // delivers all incoming records to Amazon S3, and also writes failed documents + // with elasticsearch-failed/ appended to the prefix. For more information, + // see Amazon S3 Backup for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). // Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` @@ -1592,7 +1998,10 @@ type ElasticsearchDestinationConfiguration struct { // S3Configuration is a required field S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` - // The Elasticsearch type name. + // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one + // type per index. If you try to specify a new type for an existing index that + // already has another type, Kinesis Data Firehose returns an error during run + // time. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` @@ -1733,10 +2142,11 @@ type ElasticsearchDestinationDescription struct { // The buffering options. BufferingHints *ElasticsearchBufferingHints `type:"structure"` - // The CloudWatch logging options. + // The Amazon CloudWatch logging options. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The ARN of the Amazon ES domain. + // The ARN of the Amazon ES domain. For more information, see Amazon Resource + // Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). DomainARN *string `min:"1" type:"string"` // The Elasticsearch index name. @@ -1751,7 +2161,8 @@ type ElasticsearchDestinationDescription struct { // The Amazon ES retry options. RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -1853,7 +2264,8 @@ type ElasticsearchDestinationUpdate struct { // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the IAM role specified in RoleARN. + // assuming the IAM role specified in RoleARN. For more information, see Amazon + // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). DomainARN *string `min:"1" type:"string"` // The Elasticsearch index name. @@ -1861,26 +2273,30 @@ type ElasticsearchDestinationUpdate struct { // The Elasticsearch index rotation period. Index rotation appends a time stamp // to IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // Default value is OneDay. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon ES. The default value is 300 (5 minutes). RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the IAM role to be assumed by Kinesis Firehose for calling the - // Amazon ES Configuration API and for indexing documents. For more information, - // see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data + // Firehose for calling the Amazon ES Configuration API and for indexing documents. + // For more information, see Grant Kinesis Data Firehose Access to an Amazon + // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) + // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 destination. S3Update *S3DestinationUpdate `type:"structure"` - // The Elasticsearch type name. + // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one + // type per index. If you try to specify a new type for an existing index that + // already has another type, Kinesis Data Firehose returns an error during runtime. TypeName *string `min:"1" type:"string"` } @@ -1991,16 +2407,16 @@ func (s *ElasticsearchDestinationUpdate) SetTypeName(v string) *ElasticsearchDes return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Amazon ES. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Amazon ES. type ElasticsearchRetryOptions struct { _ struct{} `type:"structure"` // After an initial failure to deliver to Amazon ES, the total amount of time - // during which Kinesis Firehose re-attempts delivery (including the first attempt). - // After this time has elapsed, the failed documents are written to Amazon S3. - // Default value is 300 seconds (5 minutes). A value of 0 (zero) results in - // no retries. + // during which Kinesis Data Firehose retries delivery (including the first + // attempt). After this time has elapsed, the failed documents are written to + // Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) + // results in no retries. DurationInSeconds *int64 `type:"integer"` } @@ -2073,7 +2489,8 @@ func (s *EncryptionConfiguration) SetNoEncryptionConfig(v string) *EncryptionCon type ExtendedS3DestinationConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -2081,27 +2498,33 @@ type ExtendedS3DestinationConfiguration struct { // The buffering option. BufferingHints *BufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. CompressionFormat *string `type:"string" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2143,6 +2566,11 @@ func (s *ExtendedS3DestinationConfiguration) Validate() error { invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) } } + if s.DataFormatConversionConfiguration != nil { + if err := s.DataFormatConversionConfiguration.Validate(); err != nil { + invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) + } + } if s.EncryptionConfiguration != nil { if err := s.EncryptionConfiguration.Validate(); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) @@ -2189,6 +2617,12 @@ func (s *ExtendedS3DestinationConfiguration) SetCompressionFormat(v string) *Ext return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationConfiguration) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationConfiguration { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationConfiguration { s.EncryptionConfiguration = v @@ -2229,7 +2663,8 @@ func (s *ExtendedS3DestinationConfiguration) SetS3BackupMode(v string) *Extended type ExtendedS3DestinationDescription struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -2239,7 +2674,7 @@ type ExtendedS3DestinationDescription struct { // BufferingHints is a required field BufferingHints *BufferingHints `type:"structure" required:"true"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. @@ -2247,6 +2682,10 @@ type ExtendedS3DestinationDescription struct { // CompressionFormat is a required field CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. // @@ -2254,16 +2693,18 @@ type ExtendedS3DestinationDescription struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2309,6 +2750,12 @@ func (s *ExtendedS3DestinationDescription) SetCompressionFormat(v string) *Exten return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationDescription) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationDescription { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationDescription { s.EncryptionConfiguration = v @@ -2349,33 +2796,40 @@ func (s *ExtendedS3DestinationDescription) SetS3BackupMode(v string) *ExtendedS3 type ExtendedS3DestinationUpdate struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). BucketARN *string `min:"1" type:"string"` // The buffering option. BufferingHints *BufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. CompressionFormat *string `type:"string" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // Enables or disables Amazon S3 backup mode. @@ -2409,6 +2863,11 @@ func (s *ExtendedS3DestinationUpdate) Validate() error { invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) } } + if s.DataFormatConversionConfiguration != nil { + if err := s.DataFormatConversionConfiguration.Validate(); err != nil { + invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) + } + } if s.EncryptionConfiguration != nil { if err := s.EncryptionConfiguration.Validate(); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) @@ -2455,6 +2914,12 @@ func (s *ExtendedS3DestinationUpdate) SetCompressionFormat(v string) *ExtendedS3 return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationUpdate) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationUpdate { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationUpdate { s.EncryptionConfiguration = v @@ -2491,12 +2956,74 @@ func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) return s } +// The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing +// data, which means converting it from the JSON format in preparation for serializing +// it to the Parquet or ORC format. This is one of two deserializers you can +// choose, depending on which one offers the functionality you need. The other +// option is the OpenX SerDe. +type HiveJsonSerDe struct { + _ struct{} `type:"structure"` + + // Indicates how you want Kinesis Data Firehose to parse the date and time stamps + // that may be present in your input data JSON. To specify these format strings, + // follow the pattern syntax of JodaTime's DateTimeFormat format strings. For + // more information, see Class DateTimeFormat (https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html). + // You can also use the special value millis to parse time stamps in epoch milliseconds. + // If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf + // by default. + TimestampFormats []*string `type:"list"` +} + +// String returns the string representation +func (s HiveJsonSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HiveJsonSerDe) GoString() string { + return s.String() +} + +// SetTimestampFormats sets the TimestampFormats field's value. +func (s *HiveJsonSerDe) SetTimestampFormats(v []*string) *HiveJsonSerDe { + s.TimestampFormats = v + return s +} + +// Specifies the deserializer you want to use to convert the format of the input +// data. +type InputFormatConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies which deserializer to use. You can choose either the Apache Hive + // JSON SerDe or the OpenX JSON SerDe. If both are non-null, the server rejects + // the request. + Deserializer *Deserializer `type:"structure"` +} + +// String returns the string representation +func (s InputFormatConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputFormatConfiguration) GoString() string { + return s.String() +} + +// SetDeserializer sets the Deserializer field's value. +func (s *InputFormatConfiguration) SetDeserializer(v *Deserializer) *InputFormatConfiguration { + s.Deserializer = v + return s +} + // Describes an encryption key for a destination in Amazon S3. type KMSEncryptionConfig struct { _ struct{} `type:"structure"` - // The ARN of the encryption key. Must belong to the same region as the destination - // Amazon S3 bucket. + // The Amazon Resource Name (ARN) of the encryption key. Must belong to the + // same AWS Region as the destination Amazon S3 bucket. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // AWSKMSKeyARN is a required field AWSKMSKeyARN *string `min:"1" type:"string" required:"true"` @@ -2534,17 +3061,20 @@ func (s *KMSEncryptionConfig) SetAWSKMSKeyARN(v string) *KMSEncryptionConfig { return s } -// The stream and role ARNs for a Kinesis stream used as the source for a delivery -// stream. +// The stream and role Amazon Resource Names (ARNs) for a Kinesis data stream +// used as the source for a delivery stream. type KinesisStreamSourceConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the source Kinesis stream. + // The ARN of the source Kinesis data stream. For more information, see Amazon + // Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). // // KinesisStreamARN is a required field KinesisStreamARN *string `min:"1" type:"string" required:"true"` - // The ARN of the role that provides access to the source Kinesis stream. + // The ARN of the role that provides access to the source Kinesis data stream. + // For more information, see AWS Identity and Access Management (IAM) ARN Format + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2594,19 +3124,21 @@ func (s *KinesisStreamSourceConfiguration) SetRoleARN(v string) *KinesisStreamSo return s } -// Details about a Kinesis stream used as the source for a Kinesis Firehose -// delivery stream. +// Details about a Kinesis data stream used as the source for a Kinesis Data +// Firehose delivery stream. type KinesisStreamSourceDescription struct { _ struct{} `type:"structure"` - // Kinesis Firehose starts retrieving records from the Kinesis stream starting - // with this time stamp. - DeliveryStartTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + // Kinesis Data Firehose starts retrieving records from the Kinesis data stream + // starting with this time stamp. + DeliveryStartTimestamp *time.Time `type:"timestamp"` - // The ARN of the source Kinesis stream. + // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more + // information, see Amazon Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). KinesisStreamARN *string `min:"1" type:"string"` - // The ARN of the role used by the source Kinesis stream. + // The ARN of the role used by the source Kinesis data stream. For more information, + // see AWS Identity and Access Management (IAM) ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). RoleARN *string `min:"1" type:"string"` } @@ -2645,8 +3177,8 @@ type ListDeliveryStreamsInput struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. // // This parameter is optional. If this parameter is omitted, delivery streams // of all types are returned. @@ -2739,6 +3271,457 @@ func (s *ListDeliveryStreamsOutput) SetHasMoreDeliveryStreams(v bool) *ListDeliv return s } +type ListTagsForDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream whose tags you want to list. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // The key to use as the starting point for the list of tags. If you set this + // parameter, ListTagsForDeliveryStream gets all tags that occur after ExclusiveStartTagKey. + ExclusiveStartTagKey *string `min:"1" type:"string"` + + // The number of tags to return. If this number is less than the total number + // of tags associated with the delivery stream, HasMoreTags is set to true in + // the response. To list additional tags, set ExclusiveStartTagKey to the last + // key in the response. + Limit *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s ListTagsForDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *ListTagsForDeliveryStreamInput) SetDeliveryStreamName(v string) *ListTagsForDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value. +func (s *ListTagsForDeliveryStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForDeliveryStreamInput { + s.ExclusiveStartTagKey = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListTagsForDeliveryStreamInput) SetLimit(v int64) *ListTagsForDeliveryStreamInput { + s.Limit = &v + return s +} + +type ListTagsForDeliveryStreamOutput struct { + _ struct{} `type:"structure"` + + // If this is true in the response, more tags are available. To list the remaining + // tags, set ExclusiveStartTagKey to the key of the last tag returned and call + // ListTagsForDeliveryStream again. + // + // HasMoreTags is a required field + HasMoreTags *bool `type:"boolean" required:"true"` + + // A list of tags associated with DeliveryStreamName, starting with the first + // tag after ExclusiveStartTagKey and up to the specified Limit. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTagsForDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDeliveryStreamOutput) GoString() string { + return s.String() +} + +// SetHasMoreTags sets the HasMoreTags field's value. +func (s *ListTagsForDeliveryStreamOutput) SetHasMoreTags(v bool) *ListTagsForDeliveryStreamOutput { + s.HasMoreTags = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForDeliveryStreamOutput) SetTags(v []*Tag) *ListTagsForDeliveryStreamOutput { + s.Tags = v + return s +} + +// The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which +// means converting it from the JSON format in preparation for serializing it +// to the Parquet or ORC format. This is one of two deserializers you can choose, +// depending on which one offers the functionality you need. The other option +// is the native Hive / HCatalog JsonSerDe. +type OpenXJsonSerDe struct { + _ struct{} `type:"structure"` + + // When set to true, which is the default, Kinesis Data Firehose converts JSON + // keys to lowercase before deserializing them. + CaseInsensitive *bool `type:"boolean"` + + // Maps column names to JSON keys that aren't identical to the column names. + // This is useful when the JSON contains keys that are Hive keywords. For example, + // timestamp is a Hive keyword. If you have a JSON key named timestamp, set + // this parameter to {"ts": "timestamp"} to map this key to a column named ts. + ColumnToJsonKeyMappings map[string]*string `type:"map"` + + // When set to true, specifies that the names of the keys include dots and that + // you want Kinesis Data Firehose to replace them with underscores. This is + // useful because Apache Hive does not allow dots in column names. For example, + // if the JSON contains a key whose name is "a.b", you can define the column + // name to be "a_b" when using this option. + // + // The default is false. + ConvertDotsInJsonKeysToUnderscores *bool `type:"boolean"` +} + +// String returns the string representation +func (s OpenXJsonSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpenXJsonSerDe) GoString() string { + return s.String() +} + +// SetCaseInsensitive sets the CaseInsensitive field's value. +func (s *OpenXJsonSerDe) SetCaseInsensitive(v bool) *OpenXJsonSerDe { + s.CaseInsensitive = &v + return s +} + +// SetColumnToJsonKeyMappings sets the ColumnToJsonKeyMappings field's value. +func (s *OpenXJsonSerDe) SetColumnToJsonKeyMappings(v map[string]*string) *OpenXJsonSerDe { + s.ColumnToJsonKeyMappings = v + return s +} + +// SetConvertDotsInJsonKeysToUnderscores sets the ConvertDotsInJsonKeysToUnderscores field's value. +func (s *OpenXJsonSerDe) SetConvertDotsInJsonKeysToUnderscores(v bool) *OpenXJsonSerDe { + s.ConvertDotsInJsonKeysToUnderscores = &v + return s +} + +// A serializer to use for converting data to the ORC format before storing +// it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). +type OrcSerDe struct { + _ struct{} `type:"structure"` + + // The Hadoop Distributed File System (HDFS) block size. This is useful if you + // intend to copy the data from Amazon S3 to HDFS before querying. The default + // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value + // for padding calculations. + BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` + + // The column names for which you want Kinesis Data Firehose to create bloom + // filters. The default is null. + BloomFilterColumns []*string `type:"list"` + + // The Bloom filter false positive probability (FPP). The lower the FPP, the + // bigger the Bloom filter. The default value is 0.05, the minimum is 0, and + // the maximum is 1. + BloomFilterFalsePositiveProbability *float64 `type:"double"` + + // The compression code to use over data blocks. The default is SNAPPY. + Compression *string `type:"string" enum:"OrcCompression"` + + // Represents the fraction of the total number of non-null rows. To turn off + // dictionary encoding, set this fraction to a number that is less than the + // number of distinct keys in a dictionary. To always use dictionary encoding, + // set this threshold to 1. + DictionaryKeyThreshold *float64 `type:"double"` + + // Set this to true to indicate that you want stripes to be padded to the HDFS + // block boundaries. This is useful if you intend to copy the data from Amazon + // S3 to HDFS before querying. The default is false. + EnablePadding *bool `type:"boolean"` + + // The version of the file to write. The possible values are V0_11 and V0_12. + // The default is V0_12. + FormatVersion *string `type:"string" enum:"OrcFormatVersion"` + + // A number between 0 and 1 that defines the tolerance for block padding as + // a decimal fraction of stripe size. The default value is 0.05, which means + // 5 percent of stripe size. + // + // For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the + // default block padding tolerance of 5 percent reserves a maximum of 3.2 MiB + // for padding within the 256 MiB block. In such a case, if the available size + // within the block is more than 3.2 MiB, a new, smaller stripe is inserted + // to fit within that space. This ensures that no stripe crosses block boundaries + // and causes remote reads within a node-local task. + // + // Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding + // is false. + PaddingTolerance *float64 `type:"double"` + + // The number of rows between index entries. The default is 10,000 and the minimum + // is 1,000. + RowIndexStride *int64 `min:"1000" type:"integer"` + + // The number of bytes in each stripe. The default is 64 MiB and the minimum + // is 8 MiB. + StripeSizeBytes *int64 `min:"8.388608e+06" type:"integer"` +} + +// String returns the string representation +func (s OrcSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrcSerDe) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OrcSerDe) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OrcSerDe"} + if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { + invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) + } + if s.RowIndexStride != nil && *s.RowIndexStride < 1000 { + invalidParams.Add(request.NewErrParamMinValue("RowIndexStride", 1000)) + } + if s.StripeSizeBytes != nil && *s.StripeSizeBytes < 8.388608e+06 { + invalidParams.Add(request.NewErrParamMinValue("StripeSizeBytes", 8.388608e+06)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlockSizeBytes sets the BlockSizeBytes field's value. +func (s *OrcSerDe) SetBlockSizeBytes(v int64) *OrcSerDe { + s.BlockSizeBytes = &v + return s +} + +// SetBloomFilterColumns sets the BloomFilterColumns field's value. +func (s *OrcSerDe) SetBloomFilterColumns(v []*string) *OrcSerDe { + s.BloomFilterColumns = v + return s +} + +// SetBloomFilterFalsePositiveProbability sets the BloomFilterFalsePositiveProbability field's value. +func (s *OrcSerDe) SetBloomFilterFalsePositiveProbability(v float64) *OrcSerDe { + s.BloomFilterFalsePositiveProbability = &v + return s +} + +// SetCompression sets the Compression field's value. +func (s *OrcSerDe) SetCompression(v string) *OrcSerDe { + s.Compression = &v + return s +} + +// SetDictionaryKeyThreshold sets the DictionaryKeyThreshold field's value. +func (s *OrcSerDe) SetDictionaryKeyThreshold(v float64) *OrcSerDe { + s.DictionaryKeyThreshold = &v + return s +} + +// SetEnablePadding sets the EnablePadding field's value. +func (s *OrcSerDe) SetEnablePadding(v bool) *OrcSerDe { + s.EnablePadding = &v + return s +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *OrcSerDe) SetFormatVersion(v string) *OrcSerDe { + s.FormatVersion = &v + return s +} + +// SetPaddingTolerance sets the PaddingTolerance field's value. +func (s *OrcSerDe) SetPaddingTolerance(v float64) *OrcSerDe { + s.PaddingTolerance = &v + return s +} + +// SetRowIndexStride sets the RowIndexStride field's value. +func (s *OrcSerDe) SetRowIndexStride(v int64) *OrcSerDe { + s.RowIndexStride = &v + return s +} + +// SetStripeSizeBytes sets the StripeSizeBytes field's value. +func (s *OrcSerDe) SetStripeSizeBytes(v int64) *OrcSerDe { + s.StripeSizeBytes = &v + return s +} + +// Specifies the serializer that you want Kinesis Data Firehose to use to convert +// the format of your data before it writes it to Amazon S3. +type OutputFormatConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies which serializer to use. You can choose either the ORC SerDe or + // the Parquet SerDe. If both are non-null, the server rejects the request. + Serializer *Serializer `type:"structure"` +} + +// String returns the string representation +func (s OutputFormatConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputFormatConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputFormatConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputFormatConfiguration"} + if s.Serializer != nil { + if err := s.Serializer.Validate(); err != nil { + invalidParams.AddNested("Serializer", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSerializer sets the Serializer field's value. +func (s *OutputFormatConfiguration) SetSerializer(v *Serializer) *OutputFormatConfiguration { + s.Serializer = v + return s +} + +// A serializer to use for converting data to the Parquet format before storing +// it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). +type ParquetSerDe struct { + _ struct{} `type:"structure"` + + // The Hadoop Distributed File System (HDFS) block size. This is useful if you + // intend to copy the data from Amazon S3 to HDFS before querying. The default + // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value + // for padding calculations. + BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` + + // The compression code to use over data blocks. The possible values are UNCOMPRESSED, + // SNAPPY, and GZIP, with the default being SNAPPY. Use SNAPPY for higher decompression + // speed. Use GZIP if the compression ration is more important than speed. + Compression *string `type:"string" enum:"ParquetCompression"` + + // Indicates whether to enable dictionary compression. + EnableDictionaryCompression *bool `type:"boolean"` + + // The maximum amount of padding to apply. This is useful if you intend to copy + // the data from Amazon S3 to HDFS before querying. The default is 0. + MaxPaddingBytes *int64 `type:"integer"` + + // The Parquet page size. Column chunks are divided into pages. A page is conceptually + // an indivisible unit (in terms of compression and encoding). The minimum value + // is 64 KiB and the default is 1 MiB. + PageSizeBytes *int64 `min:"65536" type:"integer"` + + // Indicates the version of row format to output. The possible values are V1 + // and V2. The default is V1. + WriterVersion *string `type:"string" enum:"ParquetWriterVersion"` +} + +// String returns the string representation +func (s ParquetSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParquetSerDe) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParquetSerDe) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParquetSerDe"} + if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { + invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) + } + if s.PageSizeBytes != nil && *s.PageSizeBytes < 65536 { + invalidParams.Add(request.NewErrParamMinValue("PageSizeBytes", 65536)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlockSizeBytes sets the BlockSizeBytes field's value. +func (s *ParquetSerDe) SetBlockSizeBytes(v int64) *ParquetSerDe { + s.BlockSizeBytes = &v + return s +} + +// SetCompression sets the Compression field's value. +func (s *ParquetSerDe) SetCompression(v string) *ParquetSerDe { + s.Compression = &v + return s +} + +// SetEnableDictionaryCompression sets the EnableDictionaryCompression field's value. +func (s *ParquetSerDe) SetEnableDictionaryCompression(v bool) *ParquetSerDe { + s.EnableDictionaryCompression = &v + return s +} + +// SetMaxPaddingBytes sets the MaxPaddingBytes field's value. +func (s *ParquetSerDe) SetMaxPaddingBytes(v int64) *ParquetSerDe { + s.MaxPaddingBytes = &v + return s +} + +// SetPageSizeBytes sets the PageSizeBytes field's value. +func (s *ParquetSerDe) SetPageSizeBytes(v int64) *ParquetSerDe { + s.PageSizeBytes = &v + return s +} + +// SetWriterVersion sets the WriterVersion field's value. +func (s *ParquetSerDe) SetWriterVersion(v string) *ParquetSerDe { + s.WriterVersion = &v + return s +} + // Describes a data processing configuration. type ProcessingConfiguration struct { _ struct{} `type:"structure"` @@ -3208,11 +4191,12 @@ type RedshiftDestinationConfiguration struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3379,7 +4363,7 @@ func (s *RedshiftDestinationConfiguration) SetUsername(v string) *RedshiftDestin type RedshiftDestinationDescription struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The database connection string. @@ -3395,11 +4379,12 @@ type RedshiftDestinationDescription struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3495,7 +4480,7 @@ func (s *RedshiftDestinationDescription) SetUsername(v string) *RedshiftDestinat type RedshiftDestinationUpdate struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The database connection string. @@ -3510,11 +4495,12 @@ type RedshiftDestinationUpdate struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -3652,15 +4638,15 @@ func (s *RedshiftDestinationUpdate) SetUsername(v string) *RedshiftDestinationUp return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Amazon Redshift. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Amazon Redshift. type RedshiftRetryOptions struct { _ struct{} `type:"structure"` - // The length of time during which Kinesis Firehose retries delivery after a - // failure, starting from the initial request and including the first attempt. - // The default value is 3600 seconds (60 minutes). Kinesis Firehose does not - // retry if the value of DurationInSeconds is 0 (zero) or if the first delivery + // The length of time during which Kinesis Data Firehose retries delivery after + // a failure, starting from the initial request and including the first attempt. + // The default value is 3600 seconds (60 minutes). Kinesis Data Firehose does + // not retry if the value of DurationInSeconds is 0 (zero) or if the first delivery // attempt takes longer than the current value. DurationInSeconds *int64 `type:"integer"` } @@ -3685,7 +4671,8 @@ func (s *RedshiftRetryOptions) SetDurationInSeconds(v int64) *RedshiftRetryOptio type S3DestinationConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -3709,13 +4696,15 @@ type S3DestinationConfiguration struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3809,7 +4798,8 @@ func (s *S3DestinationConfiguration) SetRoleARN(v string) *S3DestinationConfigur type S3DestinationDescription struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -3820,7 +4810,7 @@ type S3DestinationDescription struct { // BufferingHints is a required field BufferingHints *BufferingHints `type:"structure" required:"true"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. @@ -3835,13 +4825,15 @@ type S3DestinationDescription struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3903,7 +4895,8 @@ func (s *S3DestinationDescription) SetRoleARN(v string) *S3DestinationDescriptio type S3DestinationUpdate struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). BucketARN *string `min:"1" type:"string"` // The buffering option. If no value is specified, BufferingHints object default @@ -3925,13 +4918,15 @@ type S3DestinationUpdate struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` } @@ -4013,12 +5008,148 @@ func (s *S3DestinationUpdate) SetRoleARN(v string) *S3DestinationUpdate { return s } -// Details about a Kinesis stream used as the source for a Kinesis Firehose -// delivery stream. +// Specifies the schema to which you want Kinesis Data Firehose to configure +// your data before it writes it to Amazon S3. +type SchemaConfiguration struct { + _ struct{} `type:"structure"` + + // The ID of the AWS Glue Data Catalog. If you don't supply this, the AWS account + // ID is used by default. + CatalogId *string `type:"string"` + + // Specifies the name of the AWS Glue database that contains the schema for + // the output data. + DatabaseName *string `type:"string"` + + // If you don't specify an AWS Region, the default is the current Region. + Region *string `type:"string"` + + // The role that Kinesis Data Firehose can use to access AWS Glue. This role + // must be in the same account you use for Kinesis Data Firehose. Cross-account + // roles aren't allowed. + RoleARN *string `type:"string"` + + // Specifies the AWS Glue table that contains the column information that constitutes + // your data schema. + TableName *string `type:"string"` + + // Specifies the table version for the output data schema. If you don't specify + // this version ID, or if you set it to LATEST, Kinesis Data Firehose uses the + // most recent version. This means that any updates to the table are automatically + // picked up. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s SchemaConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SchemaConfiguration) GoString() string { + return s.String() +} + +// SetCatalogId sets the CatalogId field's value. +func (s *SchemaConfiguration) SetCatalogId(v string) *SchemaConfiguration { + s.CatalogId = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *SchemaConfiguration) SetDatabaseName(v string) *SchemaConfiguration { + s.DatabaseName = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *SchemaConfiguration) SetRegion(v string) *SchemaConfiguration { + s.Region = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *SchemaConfiguration) SetRoleARN(v string) *SchemaConfiguration { + s.RoleARN = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *SchemaConfiguration) SetTableName(v string) *SchemaConfiguration { + s.TableName = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *SchemaConfiguration) SetVersionId(v string) *SchemaConfiguration { + s.VersionId = &v + return s +} + +// The serializer that you want Kinesis Data Firehose to use to convert data +// to the target format before writing it to Amazon S3. Kinesis Data Firehose +// supports two types of serializers: the ORC SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/orc/OrcSerde.html) +// and the Parquet SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/parquet/serde/ParquetHiveSerDe.html). +type Serializer struct { + _ struct{} `type:"structure"` + + // A serializer to use for converting data to the ORC format before storing + // it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). + OrcSerDe *OrcSerDe `type:"structure"` + + // A serializer to use for converting data to the Parquet format before storing + // it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). + ParquetSerDe *ParquetSerDe `type:"structure"` +} + +// String returns the string representation +func (s Serializer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Serializer) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Serializer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Serializer"} + if s.OrcSerDe != nil { + if err := s.OrcSerDe.Validate(); err != nil { + invalidParams.AddNested("OrcSerDe", err.(request.ErrInvalidParams)) + } + } + if s.ParquetSerDe != nil { + if err := s.ParquetSerDe.Validate(); err != nil { + invalidParams.AddNested("ParquetSerDe", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOrcSerDe sets the OrcSerDe field's value. +func (s *Serializer) SetOrcSerDe(v *OrcSerDe) *Serializer { + s.OrcSerDe = v + return s +} + +// SetParquetSerDe sets the ParquetSerDe field's value. +func (s *Serializer) SetParquetSerDe(v *ParquetSerDe) *Serializer { + s.ParquetSerDe = v + return s +} + +// Details about a Kinesis data stream used as the source for a Kinesis Data +// Firehose delivery stream. type SourceDescription struct { _ struct{} `type:"structure"` - // The KinesisStreamSourceDescription value for the source Kinesis stream. + // The KinesisStreamSourceDescription value for the source Kinesis data stream. KinesisStreamSourceDescription *KinesisStreamSourceDescription `type:"structure"` } @@ -4042,28 +5173,28 @@ func (s *SourceDescription) SetKinesisStreamSourceDescription(v *KinesisStreamSo type SplunkDestinationConfiguration struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends it data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. // // HECEndpoint is a required field HECEndpoint *string `type:"string" required:"true"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." // // HECEndpointType is a required field HECEndpointType *string `type:"string" required:"true" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // This is a GUID that you obtain from your Splunk cluster when you create a + // new HEC endpoint. // // HECToken is a required field HECToken *string `type:"string" required:"true"` @@ -4071,13 +5202,13 @@ type SplunkDestinationConfiguration struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk, or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4191,36 +5322,35 @@ func (s *SplunkDestinationConfiguration) SetS3Configuration(v *S3DestinationConf type SplunkDestinationDescription struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends it data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. HECEndpoint *string `type:"string"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." HECEndpointType *string `type:"string" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // A GUID you obtain from your Splunk cluster when you create a new HEC endpoint. HECToken *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4297,36 +5427,36 @@ func (s *SplunkDestinationDescription) SetS3DestinationDescription(v *S3Destinat type SplunkDestinationUpdate struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. HECEndpoint *string `type:"string"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." HECEndpointType *string `type:"string" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // A GUID that you obtain from your Splunk cluster when you create a new HEC + // endpoint. HECToken *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4422,15 +5552,15 @@ func (s *SplunkDestinationUpdate) SetS3Update(v *S3DestinationUpdate) *SplunkDes return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Splunk or if it doesn't receive an acknowledgment from Splunk. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Splunk, or if it doesn't receive an acknowledgment from Splunk. type SplunkRetryOptions struct { _ struct{} `type:"structure"` - // The total amount of time that Kinesis Firehose spends on retries. This duration - // starts after the initial attempt to send data to Splunk fails and doesn't - // include the periods during which Kinesis Firehose waits for acknowledgment - // from Splunk after each attempt. + // The total amount of time that Kinesis Data Firehose spends on retries. This + // duration starts after the initial attempt to send data to Splunk fails. It + // doesn't include the periods during which Kinesis Data Firehose waits for + // acknowledgment from Splunk after each attempt. DurationInSeconds *int64 `type:"integer"` } @@ -4450,11 +5580,220 @@ func (s *SplunkRetryOptions) SetDurationInSeconds(v int64) *SplunkRetryOptions { return s } +// Metadata that you can assign to a delivery stream, consisting of a key-value +// pair. +type Tag struct { + _ struct{} `type:"structure"` + + // A unique identifier for the tag. Maximum length: 128 characters. Valid characters: + // Unicode letters, digits, white space, _ . / = + - % @ + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // An optional string, which you can use to describe or define the tag. Maximum + // length: 256 characters. Valid characters: Unicode letters, digits, white + // space, _ . / = + - % @ + Value *string `type:"string"` +} + +// 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 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 TagDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream to which you want to add the tags. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // A set of key-value pairs to use to create the tags. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *TagDeliveryStreamInput) SetDeliveryStreamName(v string) *TagDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagDeliveryStreamInput) SetTags(v []*Tag) *TagDeliveryStreamInput { + s.Tags = v + return s +} + +type TagDeliveryStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDeliveryStreamOutput) GoString() string { + return s.String() +} + +type UntagDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // A list of tag keys. Each corresponding tag is removed from the delivery stream. + // + // TagKeys is a required field + TagKeys []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *UntagDeliveryStreamInput) SetDeliveryStreamName(v string) *UntagDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagDeliveryStreamInput) SetTagKeys(v []*string) *UntagDeliveryStreamInput { + s.TagKeys = v + return s +} + +type UntagDeliveryStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagDeliveryStreamOutput) GoString() string { + return s.String() +} + type UpdateDestinationInput struct { _ struct{} `type:"structure"` // Obtain this value from the VersionId result of DeliveryStreamDescription. - // This value is required, and helps the service to perform conditional operations. + // This value is required, and helps the service perform conditional operations. // For example, if there is an interleaving update and this value is null, then // the update destination fails. After the update is successful, the VersionId // value is updated. The service then performs a merge of the old configuration @@ -4685,6 +6024,44 @@ const ( NoEncryptionConfigNoEncryption = "NoEncryption" ) +const ( + // OrcCompressionNone is a OrcCompression enum value + OrcCompressionNone = "NONE" + + // OrcCompressionZlib is a OrcCompression enum value + OrcCompressionZlib = "ZLIB" + + // OrcCompressionSnappy is a OrcCompression enum value + OrcCompressionSnappy = "SNAPPY" +) + +const ( + // OrcFormatVersionV011 is a OrcFormatVersion enum value + OrcFormatVersionV011 = "V0_11" + + // OrcFormatVersionV012 is a OrcFormatVersion enum value + OrcFormatVersionV012 = "V0_12" +) + +const ( + // ParquetCompressionUncompressed is a ParquetCompression enum value + ParquetCompressionUncompressed = "UNCOMPRESSED" + + // ParquetCompressionGzip is a ParquetCompression enum value + ParquetCompressionGzip = "GZIP" + + // ParquetCompressionSnappy is a ParquetCompression enum value + ParquetCompressionSnappy = "SNAPPY" +) + +const ( + // ParquetWriterVersionV1 is a ParquetWriterVersion enum value + ParquetWriterVersionV1 = "V1" + + // ParquetWriterVersionV2 is a ParquetWriterVersion enum value + ParquetWriterVersionV2 = "V2" +) + const ( // ProcessorParameterNameLambdaArn is a ProcessorParameterName enum value ProcessorParameterNameLambdaArn = "LambdaArn" diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go index a183c051c..32bec009c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go @@ -3,9 +3,9 @@ // Package firehose provides the client and types for making API // requests to Amazon Kinesis Firehose. // -// Amazon Kinesis Firehose is a fully managed service that delivers real-time +// Amazon Kinesis Data Firehose is a fully managed service that delivers real-time // streaming data to destinations such as Amazon Simple Storage Service (Amazon -// S3), Amazon Elasticsearch Service (Amazon ES), and Amazon Redshift. +// S3), Amazon Elasticsearch Service (Amazon ES), Amazon Redshift, and Splunk. // // See https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go index 7854fccd3..d70656e3e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go @@ -38,9 +38,9 @@ const ( // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // - // The service is unavailable, back off and retry the operation. If you continue + // The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, - // see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). + // see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). ErrCodeServiceUnavailableException = "ServiceUnavailableException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go index 973386c05..bcdf23dff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "firehose" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "firehose" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Firehose" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Firehose client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go new file mode 100644 index 000000000..68169facc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -0,0 +1,2466 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +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 opAssociateAdminAccount = "AssociateAdminAccount" + +// AssociateAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the AssociateAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AssociateAdminAccount for more information on using the AssociateAdminAccount +// 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 AssociateAdminAccountRequest method. +// req, resp := client.AssociateAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount +func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (req *request.Request, output *AssociateAdminAccountOutput) { + op := &request.Operation{ + Name: opAssociateAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateAdminAccountInput{} + } + + output = &AssociateAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateAdminAccount API operation for Firewall Management Service. +// +// Sets the AWS Firewall Manager administrator account. AWS Firewall Manager +// must be associated with a master account in AWS Organizations or associated +// with a member account that has the appropriate permissions. If the account +// ID that you submit is not an AWS Organizations master account, AWS Firewall +// Manager will set the appropriate permissions for the given member account. +// +// The account that you associate with AWS Firewall Manager is called the AWS +// Firewall manager administrator 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 Firewall Management Service's +// API operation AssociateAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount +func (c *FMS) AssociateAdminAccount(input *AssociateAdminAccountInput) (*AssociateAdminAccountOutput, error) { + req, out := c.AssociateAdminAccountRequest(input) + return out, req.Send() +} + +// AssociateAdminAccountWithContext is the same as AssociateAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateAdminAccount 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 *FMS) AssociateAdminAccountWithContext(ctx aws.Context, input *AssociateAdminAccountInput, opts ...request.Option) (*AssociateAdminAccountOutput, error) { + req, out := c.AssociateAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNotificationChannel = "DeleteNotificationChannel" + +// DeleteNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteNotificationChannel for more information on using the DeleteNotificationChannel +// 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 DeleteNotificationChannelRequest method. +// req, resp := client.DeleteNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel +func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) (req *request.Request, output *DeleteNotificationChannelOutput) { + op := &request.Operation{ + Name: opDeleteNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNotificationChannelInput{} + } + + output = &DeleteNotificationChannelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteNotificationChannel API operation for Firewall Management Service. +// +// Deletes an AWS Firewall Manager association with the IAM role and the Amazon +// Simple Notification Service (SNS) topic that is used to record AWS Firewall +// Manager SNS logs. +// +// 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 Firewall Management Service's +// API operation DeleteNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel +func (c *FMS) DeleteNotificationChannel(input *DeleteNotificationChannelInput) (*DeleteNotificationChannelOutput, error) { + req, out := c.DeleteNotificationChannelRequest(input) + return out, req.Send() +} + +// DeleteNotificationChannelWithContext is the same as DeleteNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNotificationChannel 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 *FMS) DeleteNotificationChannelWithContext(ctx aws.Context, input *DeleteNotificationChannelInput, opts ...request.Option) (*DeleteNotificationChannelOutput, error) { + req, out := c.DeleteNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePolicy = "DeletePolicy" + +// DeletePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeletePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeletePolicy for more information on using the DeletePolicy +// 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 DeletePolicyRequest method. +// req, resp := client.DeletePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy +func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { + op := &request.Operation{ + Name: opDeletePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePolicyInput{} + } + + output = &DeletePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePolicy API operation for Firewall Management Service. +// +// Permanently deletes an AWS Firewall Manager policy. +// +// 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 Firewall Management Service's +// API operation DeletePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy +func (c *FMS) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { + req, out := c.DeletePolicyRequest(input) + return out, req.Send() +} + +// DeletePolicyWithContext is the same as DeletePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePolicy 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 *FMS) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { + req, out := c.DeletePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateAdminAccount = "DisassociateAdminAccount" + +// DisassociateAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DisassociateAdminAccount for more information on using the DisassociateAdminAccount +// 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 DisassociateAdminAccountRequest method. +// req, resp := client.DisassociateAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount +func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) (req *request.Request, output *DisassociateAdminAccountOutput) { + op := &request.Operation{ + Name: opDisassociateAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateAdminAccountInput{} + } + + output = &DisassociateAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateAdminAccount API operation for Firewall Management Service. +// +// Disassociates the account that has been set as the AWS Firewall Manager administrator +// account. You will need to submit an AssociateAdminAccount request to set +// a new account as the AWS Firewall administrator. +// +// 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 Firewall Management Service's +// API operation DisassociateAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount +func (c *FMS) DisassociateAdminAccount(input *DisassociateAdminAccountInput) (*DisassociateAdminAccountOutput, error) { + req, out := c.DisassociateAdminAccountRequest(input) + return out, req.Send() +} + +// DisassociateAdminAccountWithContext is the same as DisassociateAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateAdminAccount 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 *FMS) DisassociateAdminAccountWithContext(ctx aws.Context, input *DisassociateAdminAccountInput, opts ...request.Option) (*DisassociateAdminAccountOutput, error) { + req, out := c.DisassociateAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAdminAccount = "GetAdminAccount" + +// GetAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the GetAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetAdminAccount for more information on using the GetAdminAccount +// 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 GetAdminAccountRequest method. +// req, resp := client.GetAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount +func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) (req *request.Request, output *GetAdminAccountOutput) { + op := &request.Operation{ + Name: opGetAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAdminAccountInput{} + } + + output = &GetAdminAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAdminAccount API operation for Firewall Management Service. +// +// Returns the AWS Organizations master account that is associated with AWS +// Firewall Manager as the AWS Firewall Manager administrator. +// +// 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 Firewall Management Service's +// API operation GetAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount +func (c *FMS) GetAdminAccount(input *GetAdminAccountInput) (*GetAdminAccountOutput, error) { + req, out := c.GetAdminAccountRequest(input) + return out, req.Send() +} + +// GetAdminAccountWithContext is the same as GetAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See GetAdminAccount 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 *FMS) GetAdminAccountWithContext(ctx aws.Context, input *GetAdminAccountInput, opts ...request.Option) (*GetAdminAccountOutput, error) { + req, out := c.GetAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetComplianceDetail = "GetComplianceDetail" + +// GetComplianceDetailRequest generates a "aws/request.Request" representing the +// client's request for the GetComplianceDetail operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetComplianceDetail for more information on using the GetComplianceDetail +// 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 GetComplianceDetailRequest method. +// req, resp := client.GetComplianceDetailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail +func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) (req *request.Request, output *GetComplianceDetailOutput) { + op := &request.Operation{ + Name: opGetComplianceDetail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetComplianceDetailInput{} + } + + output = &GetComplianceDetailOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetComplianceDetail API operation for Firewall Management Service. +// +// Returns detailed compliance information about the specified member account. +// Details include resources that are in and out of compliance with the specified +// policy. Resources are considered non-compliant if the specified policy has +// not been applied to them. +// +// 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 Firewall Management Service's +// API operation GetComplianceDetail for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail +func (c *FMS) GetComplianceDetail(input *GetComplianceDetailInput) (*GetComplianceDetailOutput, error) { + req, out := c.GetComplianceDetailRequest(input) + return out, req.Send() +} + +// GetComplianceDetailWithContext is the same as GetComplianceDetail with the addition of +// the ability to pass a context and additional request options. +// +// See GetComplianceDetail 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 *FMS) GetComplianceDetailWithContext(ctx aws.Context, input *GetComplianceDetailInput, opts ...request.Option) (*GetComplianceDetailOutput, error) { + req, out := c.GetComplianceDetailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetNotificationChannel = "GetNotificationChannel" + +// GetNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetNotificationChannel for more information on using the GetNotificationChannel +// 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 GetNotificationChannelRequest method. +// req, resp := client.GetNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel +func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) (req *request.Request, output *GetNotificationChannelOutput) { + op := &request.Operation{ + Name: opGetNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetNotificationChannelInput{} + } + + output = &GetNotificationChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetNotificationChannel API operation for Firewall Management Service. +// +// Returns information about the Amazon Simple Notification Service (SNS) topic +// that is used to record AWS Firewall Manager SNS logs. +// +// 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 Firewall Management Service's +// API operation GetNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel +func (c *FMS) GetNotificationChannel(input *GetNotificationChannelInput) (*GetNotificationChannelOutput, error) { + req, out := c.GetNotificationChannelRequest(input) + return out, req.Send() +} + +// GetNotificationChannelWithContext is the same as GetNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetNotificationChannel 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 *FMS) GetNotificationChannelWithContext(ctx aws.Context, input *GetNotificationChannelInput, opts ...request.Option) (*GetNotificationChannelOutput, error) { + req, out := c.GetNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPolicy = "GetPolicy" + +// GetPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetPolicy for more information on using the GetPolicy +// 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 GetPolicyRequest method. +// req, resp := client.GetPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy +func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { + op := &request.Operation{ + Name: opGetPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPolicyInput{} + } + + output = &GetPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPolicy API operation for Firewall Management Service. +// +// Returns information about the specified AWS Firewall Manager policy. +// +// 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 Firewall Management Service's +// API operation GetPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy +func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + return out, req.Send() +} + +// GetPolicyWithContext is the same as GetPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetPolicy 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 *FMS) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListComplianceStatus = "ListComplianceStatus" + +// ListComplianceStatusRequest generates a "aws/request.Request" representing the +// client's request for the ListComplianceStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListComplianceStatus for more information on using the ListComplianceStatus +// 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 ListComplianceStatusRequest method. +// req, resp := client.ListComplianceStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus +func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) (req *request.Request, output *ListComplianceStatusOutput) { + op := &request.Operation{ + Name: opListComplianceStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListComplianceStatusInput{} + } + + output = &ListComplianceStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListComplianceStatus API operation for Firewall Management Service. +// +// Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus +// to get a summary of which member accounts are protected by the specified +// policy. +// +// 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 Firewall Management Service's +// API operation ListComplianceStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus +func (c *FMS) ListComplianceStatus(input *ListComplianceStatusInput) (*ListComplianceStatusOutput, error) { + req, out := c.ListComplianceStatusRequest(input) + return out, req.Send() +} + +// ListComplianceStatusWithContext is the same as ListComplianceStatus with the addition of +// the ability to pass a context and additional request options. +// +// See ListComplianceStatus 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 *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListComplianceStatusInput, opts ...request.Option) (*ListComplianceStatusOutput, error) { + req, out := c.ListComplianceStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPolicies = "ListPolicies" + +// ListPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the ListPolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListPolicies for more information on using the ListPolicies +// 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 ListPoliciesRequest method. +// req, resp := client.ListPoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies +func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { + op := &request.Operation{ + Name: opListPolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPoliciesInput{} + } + + output = &ListPoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPolicies API operation for Firewall Management Service. +// +// Returns an array of PolicySummary objects in the response. +// +// 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 Firewall Management Service's +// API operation ListPolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// policy objects that you can create for an AWS account. For more information, +// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies +func (c *FMS) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { + req, out := c.ListPoliciesRequest(input) + return out, req.Send() +} + +// ListPoliciesWithContext is the same as ListPolicies with the addition of +// the ability to pass a context and additional request options. +// +// See ListPolicies 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 *FMS) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { + req, out := c.ListPoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutNotificationChannel = "PutNotificationChannel" + +// PutNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the PutNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutNotificationChannel for more information on using the PutNotificationChannel +// 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 PutNotificationChannelRequest method. +// req, resp := client.PutNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel +func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) (req *request.Request, output *PutNotificationChannelOutput) { + op := &request.Operation{ + Name: opPutNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutNotificationChannelInput{} + } + + output = &PutNotificationChannelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutNotificationChannel API operation for Firewall Management Service. +// +// Designates the IAM role and Amazon Simple Notification Service (SNS) topic +// that AWS Firewall Manager uses to record SNS logs. +// +// 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 Firewall Management Service's +// API operation PutNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel +func (c *FMS) PutNotificationChannel(input *PutNotificationChannelInput) (*PutNotificationChannelOutput, error) { + req, out := c.PutNotificationChannelRequest(input) + return out, req.Send() +} + +// PutNotificationChannelWithContext is the same as PutNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See PutNotificationChannel 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 *FMS) PutNotificationChannelWithContext(ctx aws.Context, input *PutNotificationChannelInput, opts ...request.Option) (*PutNotificationChannelOutput, error) { + req, out := c.PutNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPolicy = "PutPolicy" + +// PutPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutPolicy for more information on using the PutPolicy +// 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 PutPolicyRequest method. +// req, resp := client.PutPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy +func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, output *PutPolicyOutput) { + op := &request.Operation{ + Name: opPutPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPolicyInput{} + } + + output = &PutPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutPolicy API operation for Firewall Management Service. +// +// Creates an AWS Firewall Manager policy. +// +// 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 Firewall Management Service's +// API operation PutPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy +func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) { + req, out := c.PutPolicyRequest(input) + return out, req.Send() +} + +// PutPolicyWithContext is the same as PutPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutPolicy 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 *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts ...request.Option) (*PutPolicyOutput, error) { + req, out := c.PutPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateAdminAccountInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall + // Manager administrator account. This can be an AWS Organizations master account + // or a member account. For more information about AWS Organizations and master + // accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html). + // + // AdminAccount is a required field + AdminAccount *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAdminAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateAdminAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateAdminAccountInput"} + if s.AdminAccount == nil { + invalidParams.Add(request.NewErrParamRequired("AdminAccount")) + } + if s.AdminAccount != nil && len(*s.AdminAccount) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AdminAccount", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminAccount sets the AdminAccount field's value. +func (s *AssociateAdminAccountInput) SetAdminAccount(v string) *AssociateAdminAccountInput { + s.AdminAccount = &v + return s +} + +type AssociateAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAdminAccountOutput) GoString() string { + return s.String() +} + +// Details of the resource that is not protected by the policy. +type ComplianceViolator struct { + _ struct{} `type:"structure"` + + // The resource ID. + ResourceId *string `min:"1" type:"string"` + + // The resource type. This is in the format shown in AWS Resource Types Reference + // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + ResourceType *string `min:"1" type:"string"` + + // The reason that the resource is not protected by the policy. + ViolationReason *string `type:"string" enum:"ViolationReason"` +} + +// String returns the string representation +func (s ComplianceViolator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComplianceViolator) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *ComplianceViolator) SetResourceId(v string) *ComplianceViolator { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ComplianceViolator) SetResourceType(v string) *ComplianceViolator { + s.ResourceType = &v + return s +} + +// SetViolationReason sets the ViolationReason field's value. +func (s *ComplianceViolator) SetViolationReason(v string) *ComplianceViolator { + s.ViolationReason = &v + return s +} + +type DeleteNotificationChannelInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationChannelInput) GoString() string { + return s.String() +} + +type DeleteNotificationChannelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationChannelOutput) GoString() string { + return s.String() +} + +type DeletePolicyInput struct { + _ struct{} `type:"structure"` + + // The ID of the policy that you want to delete. PolicyId is returned by PutPolicy + // and by ListPolicies. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { + s.PolicyId = &v + return s +} + +type DeletePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyOutput) GoString() string { + return s.String() +} + +type DisassociateAdminAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAdminAccountInput) GoString() string { + return s.String() +} + +type DisassociateAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAdminAccountOutput) GoString() string { + return s.String() +} + +// Describes the compliance status for the account. An account is considered +// non-compliant if it includes resources that are not protected by the specified +// policy. +type EvaluationResult struct { + _ struct{} `type:"structure"` + + // Describes an AWS account's compliance with the AWS Firewall Manager policy. + ComplianceStatus *string `type:"string" enum:"PolicyComplianceStatusType"` + + // Indicates that over 100 resources are non-compliant with the AWS Firewall + // Manager policy. + EvaluationLimitExceeded *bool `type:"boolean"` + + // Number of resources that are non-compliant with the specified policy. A resource + // is considered non-compliant if it is not associated with the specified policy. + ViolatorCount *int64 `type:"long"` +} + +// String returns the string representation +func (s EvaluationResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluationResult) GoString() string { + return s.String() +} + +// SetComplianceStatus sets the ComplianceStatus field's value. +func (s *EvaluationResult) SetComplianceStatus(v string) *EvaluationResult { + s.ComplianceStatus = &v + return s +} + +// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. +func (s *EvaluationResult) SetEvaluationLimitExceeded(v bool) *EvaluationResult { + s.EvaluationLimitExceeded = &v + return s +} + +// SetViolatorCount sets the ViolatorCount field's value. +func (s *EvaluationResult) SetViolatorCount(v int64) *EvaluationResult { + s.ViolatorCount = &v + return s +} + +type GetAdminAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdminAccountInput) GoString() string { + return s.String() +} + +type GetAdminAccountOutput struct { + _ struct{} `type:"structure"` + + // The AWS account that is set as the AWS Firewall Manager administrator. + AdminAccount *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdminAccountOutput) GoString() string { + return s.String() +} + +// SetAdminAccount sets the AdminAccount field's value. +func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput { + s.AdminAccount = &v + return s +} + +type GetComplianceDetailInput struct { + _ struct{} `type:"structure"` + + // The AWS account that owns the resources that you want to get the details + // for. + // + // MemberAccount is a required field + MemberAccount *string `min:"1" type:"string" required:"true"` + + // The ID of the policy that you want to get the details for. PolicyId is returned + // by PutPolicy and by ListPolicies. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetComplianceDetailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetComplianceDetailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetComplianceDetailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailInput"} + if s.MemberAccount == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccount")) + } + if s.MemberAccount != nil && len(*s.MemberAccount) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberAccount", 1)) + } + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *GetComplianceDetailInput) SetMemberAccount(v string) *GetComplianceDetailInput { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput { + s.PolicyId = &v + return s +} + +type GetComplianceDetailOutput struct { + _ struct{} `type:"structure"` + + // Information about the resources and the policy that you specified in the + // GetComplianceDetail request. + PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"` +} + +// String returns the string representation +func (s GetComplianceDetailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetComplianceDetailOutput) GoString() string { + return s.String() +} + +// SetPolicyComplianceDetail sets the PolicyComplianceDetail field's value. +func (s *GetComplianceDetailOutput) SetPolicyComplianceDetail(v *PolicyComplianceDetail) *GetComplianceDetailOutput { + s.PolicyComplianceDetail = v + return s +} + +type GetNotificationChannelInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNotificationChannelInput) GoString() string { + return s.String() +} + +type GetNotificationChannelOutput struct { + _ struct{} `type:"structure"` + + // The IAM role that is used by AWS Firewall Manager to record activity to SNS. + SnsRoleName *string `min:"1" type:"string"` + + // The SNS topic that records AWS Firewall Manager activity. + SnsTopicArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNotificationChannelOutput) GoString() string { + return s.String() +} + +// SetSnsRoleName sets the SnsRoleName field's value. +func (s *GetNotificationChannelOutput) SetSnsRoleName(v string) *GetNotificationChannelOutput { + s.SnsRoleName = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *GetNotificationChannelOutput) SetSnsTopicArn(v string) *GetNotificationChannelOutput { + s.SnsTopicArn = &v + return s +} + +type GetPolicyInput struct { + _ struct{} `type:"structure"` + + // The ID of the AWS Firewall Manager policy that you want the details for. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput { + s.PolicyId = &v + return s +} + +type GetPolicyOutput struct { + _ struct{} `type:"structure"` + + // Information about the specified AWS Firewall Manager policy. + Policy *Policy `type:"structure"` + + // The Amazon Resource Name (ARN) of the specified policy. + PolicyArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput { + s.Policy = v + return s +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput { + s.PolicyArn = &v + return s +} + +type ListComplianceStatusInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of PolicyComplianceStatus objects that you want AWS + // Firewall Manager to return for this request. If you have more PolicyComplianceStatus + // objects than the number that you specify for MaxResults, the response includes + // a NextToken value that you can use to get another batch of PolicyComplianceStatus + // objects. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more PolicyComplianceStatus + // objects than the number that you specify for MaxResults, AWS Firewall Manager + // returns a NextToken value in the response that allows you to list another + // group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus + // requests, specify the value of NextToken from the previous response to get + // information about another batch of PolicyComplianceStatus objects. + NextToken *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy that you want the details for. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListComplianceStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListComplianceStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListComplianceStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListComplianceStatusInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListComplianceStatusInput) SetMaxResults(v int64) *ListComplianceStatusInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListComplianceStatusInput) SetNextToken(v string) *ListComplianceStatusInput { + s.NextToken = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *ListComplianceStatusInput) SetPolicyId(v string) *ListComplianceStatusInput { + s.PolicyId = &v + return s +} + +type ListComplianceStatusOutput struct { + _ struct{} `type:"structure"` + + // If you have more PolicyComplianceStatus objects than the number that you + // specified for MaxResults in the request, the response includes a NextToken + // value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus + // request, and specify the NextToken value from the response in the NextToken + // value in the next request. + NextToken *string `min:"1" type:"string"` + + // An array of PolicyComplianceStatus objects. + PolicyComplianceStatusList []*PolicyComplianceStatus `type:"list"` +} + +// String returns the string representation +func (s ListComplianceStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListComplianceStatusOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListComplianceStatusOutput) SetNextToken(v string) *ListComplianceStatusOutput { + s.NextToken = &v + return s +} + +// SetPolicyComplianceStatusList sets the PolicyComplianceStatusList field's value. +func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyComplianceStatus) *ListComplianceStatusOutput { + s.PolicyComplianceStatusList = v + return s +} + +type ListPoliciesInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of PolicySummary objects that you want AWS Firewall + // Manager to return for this request. If you have more PolicySummary objects + // than the number that you specify for MaxResults, the response includes a + // NextToken value that you can use to get another batch of PolicySummary objects. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more PolicySummary objects + // than the number that you specify for MaxResults, AWS Firewall Manager returns + // a NextToken value in the response that allows you to list another group of + // PolicySummary objects. For the second and subsequent ListPolicies requests, + // specify the value of NextToken from the previous response to get information + // about another batch of PolicySummary objects. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput { + s.NextToken = &v + return s +} + +type ListPoliciesOutput struct { + _ struct{} `type:"structure"` + + // If you have more PolicySummary objects than the number that you specified + // for MaxResults in the request, the response includes a NextToken value. To + // list more PolicySummary objects, submit another ListPolicies request, and + // specify the NextToken value from the response in the NextToken value in the + // next request. + NextToken *string `min:"1" type:"string"` + + // An array of PolicySummary objects. + PolicyList []*PolicySummary `type:"list"` +} + +// String returns the string representation +func (s ListPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput { + s.NextToken = &v + return s +} + +// SetPolicyList sets the PolicyList field's value. +func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutput { + s.PolicyList = v + return s +} + +// An AWS Firewall Manager policy. +type Policy struct { + _ struct{} `type:"structure"` + + // If set to True, resources with the tags that are specified in the ResourceTag + // array are not protected by the policy. If set to False, and the ResourceTag + // array is not null, only resources with the specified tags are associated + // with the policy. + // + // ExcludeResourceTags is a required field + ExcludeResourceTags *bool `type:"boolean" required:"true"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the AWS Firewall Manager policy. + // + // PolicyName is a required field + PolicyName *string `min:"1" type:"string" required:"true"` + + // A unique identifier for each update to the policy. When issuing a PutPolicy + // request, the PolicyUpdateToken in the request must match the PolicyUpdateToken + // of the current policy version. To get the PolicyUpdateToken of the current + // policy version, use a GetPolicy request. + PolicyUpdateToken *string `min:"1" type:"string"` + + // Indicates if the policy should be automatically applied to new resources. + // + // RemediationEnabled is a required field + RemediationEnabled *bool `type:"boolean" required:"true"` + + // An array of ResourceTag objects. + ResourceTags []*ResourceTag `type:"list"` + + // The type of resource to protect with the policy, either an Application Load + // Balancer or a CloudFront distribution. This is in the format shown in AWS + // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + // + // ResourceType is a required field + ResourceType *string `min:"1" type:"string" required:"true"` + + // Details about the security service that is being used to protect the resources. + // + // SecurityServicePolicyData is a required field + SecurityServicePolicyData *SecurityServicePolicyData `type:"structure" required:"true"` +} + +// String returns the string representation +func (s Policy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Policy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Policy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Policy"} + if s.ExcludeResourceTags == nil { + invalidParams.Add(request.NewErrParamRequired("ExcludeResourceTags")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.PolicyUpdateToken != nil && len(*s.PolicyUpdateToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyUpdateToken", 1)) + } + if s.RemediationEnabled == nil { + invalidParams.Add(request.NewErrParamRequired("RemediationEnabled")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.ResourceType != nil && len(*s.ResourceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) + } + if s.SecurityServicePolicyData == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityServicePolicyData")) + } + if s.ResourceTags != nil { + for i, v := range s.ResourceTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceTags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecurityServicePolicyData != nil { + if err := s.SecurityServicePolicyData.Validate(); err != nil { + invalidParams.AddNested("SecurityServicePolicyData", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExcludeResourceTags sets the ExcludeResourceTags field's value. +func (s *Policy) SetExcludeResourceTags(v bool) *Policy { + s.ExcludeResourceTags = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *Policy) SetPolicyId(v string) *Policy { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *Policy) SetPolicyName(v string) *Policy { + s.PolicyName = &v + return s +} + +// SetPolicyUpdateToken sets the PolicyUpdateToken field's value. +func (s *Policy) SetPolicyUpdateToken(v string) *Policy { + s.PolicyUpdateToken = &v + return s +} + +// SetRemediationEnabled sets the RemediationEnabled field's value. +func (s *Policy) SetRemediationEnabled(v bool) *Policy { + s.RemediationEnabled = &v + return s +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *Policy) SetResourceTags(v []*ResourceTag) *Policy { + s.ResourceTags = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *Policy) SetResourceType(v string) *Policy { + s.ResourceType = &v + return s +} + +// SetSecurityServicePolicyData sets the SecurityServicePolicyData field's value. +func (s *Policy) SetSecurityServicePolicyData(v *SecurityServicePolicyData) *Policy { + s.SecurityServicePolicyData = v + return s +} + +// Describes the non-compliant resources in a member account for a specific +// AWS Firewall Manager policy. A maximum of 100 entries are displayed. If more +// than 100 resources are non-compliant, EvaluationLimitExceeded is set to True. +type PolicyComplianceDetail struct { + _ struct{} `type:"structure"` + + // Indicates if over 100 resources are non-compliant with the AWS Firewall Manager + // policy. + EvaluationLimitExceeded *bool `type:"boolean"` + + // A time stamp that indicates when the returned information should be considered + // out-of-date. + ExpiredAt *time.Time `type:"timestamp"` + + // The AWS account ID. + MemberAccount *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The AWS account that created the AWS Firewall Manager policy. + PolicyOwner *string `min:"1" type:"string"` + + // An array of resources that are not protected by the policy. + Violators []*ComplianceViolator `type:"list"` +} + +// String returns the string representation +func (s PolicyComplianceDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyComplianceDetail) GoString() string { + return s.String() +} + +// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. +func (s *PolicyComplianceDetail) SetEvaluationLimitExceeded(v bool) *PolicyComplianceDetail { + s.EvaluationLimitExceeded = &v + return s +} + +// SetExpiredAt sets the ExpiredAt field's value. +func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDetail { + s.ExpiredAt = &v + return s +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicyComplianceDetail) SetPolicyId(v string) *PolicyComplianceDetail { + s.PolicyId = &v + return s +} + +// SetPolicyOwner sets the PolicyOwner field's value. +func (s *PolicyComplianceDetail) SetPolicyOwner(v string) *PolicyComplianceDetail { + s.PolicyOwner = &v + return s +} + +// SetViolators sets the Violators field's value. +func (s *PolicyComplianceDetail) SetViolators(v []*ComplianceViolator) *PolicyComplianceDetail { + s.Violators = v + return s +} + +// Indicates whether the account is compliant with the specified policy. An +// account is considered non-compliant if it includes resources that are not +// protected by the policy. +type PolicyComplianceStatus struct { + _ struct{} `type:"structure"` + + // An array of EvaluationResult objects. + EvaluationResults []*EvaluationResult `type:"list"` + + // Time stamp of the last update to the EvaluationResult objects. + LastUpdated *time.Time `type:"timestamp"` + + // The member account ID. + MemberAccount *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the AWS Firewall Manager policy. + PolicyName *string `min:"1" type:"string"` + + // The AWS account that created the AWS Firewall Manager policy. + PolicyOwner *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PolicyComplianceStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyComplianceStatus) GoString() string { + return s.String() +} + +// SetEvaluationResults sets the EvaluationResults field's value. +func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *PolicyComplianceStatus { + s.EvaluationResults = v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus { + s.LastUpdated = &v + return s +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *PolicyComplianceStatus) SetMemberAccount(v string) *PolicyComplianceStatus { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicyComplianceStatus) SetPolicyName(v string) *PolicyComplianceStatus { + s.PolicyName = &v + return s +} + +// SetPolicyOwner sets the PolicyOwner field's value. +func (s *PolicyComplianceStatus) SetPolicyOwner(v string) *PolicyComplianceStatus { + s.PolicyOwner = &v + return s +} + +// Details of the AWS Firewall Manager policy. +type PolicySummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the specified policy. + PolicyArn *string `min:"1" type:"string"` + + // The ID of the specified policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the specified policy. + PolicyName *string `min:"1" type:"string"` + + // Indicates if the policy should be automatically applied to new resources. + RemediationEnabled *bool `type:"boolean"` + + // The type of resource to protect with the policy, either an Application Load + // Balancer or a CloudFront distribution. This is in the format shown in AWS + // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + ResourceType *string `min:"1" type:"string"` + + // The service that the policy is using to protect the resources. This value + // is WAF. + SecurityServiceType *string `type:"string" enum:"SecurityServiceType"` +} + +// String returns the string representation +func (s PolicySummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicySummary) GoString() string { + return s.String() +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary { + s.PolicyArn = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicySummary) SetPolicyId(v string) *PolicySummary { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicySummary) SetPolicyName(v string) *PolicySummary { + s.PolicyName = &v + return s +} + +// SetRemediationEnabled sets the RemediationEnabled field's value. +func (s *PolicySummary) SetRemediationEnabled(v bool) *PolicySummary { + s.RemediationEnabled = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *PolicySummary) SetResourceType(v string) *PolicySummary { + s.ResourceType = &v + return s +} + +// SetSecurityServiceType sets the SecurityServiceType field's value. +func (s *PolicySummary) SetSecurityServiceType(v string) *PolicySummary { + s.SecurityServiceType = &v + return s +} + +type PutNotificationChannelInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to + // record AWS Firewall Manager activity. + // + // SnsRoleName is a required field + SnsRoleName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the SNS topic that collects notifications + // from AWS Firewall Manager. + // + // SnsTopicArn is a required field + SnsTopicArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutNotificationChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutNotificationChannelInput"} + if s.SnsRoleName == nil { + invalidParams.Add(request.NewErrParamRequired("SnsRoleName")) + } + if s.SnsRoleName != nil && len(*s.SnsRoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnsRoleName", 1)) + } + if s.SnsTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) + } + if s.SnsTopicArn != nil && len(*s.SnsTopicArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnsTopicArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnsRoleName sets the SnsRoleName field's value. +func (s *PutNotificationChannelInput) SetSnsRoleName(v string) *PutNotificationChannelInput { + s.SnsRoleName = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *PutNotificationChannelInput) SetSnsTopicArn(v string) *PutNotificationChannelInput { + s.SnsTopicArn = &v + return s +} + +type PutNotificationChannelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationChannelOutput) GoString() string { + return s.String() +} + +type PutPolicyInput struct { + _ struct{} `type:"structure"` + + // The details of the AWS Firewall Manager policy to be created. + // + // Policy is a required field + Policy *Policy `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPolicyInput"} + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil { + if err := s.Policy.Validate(); err != nil { + invalidParams.AddNested("Policy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicy sets the Policy field's value. +func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput { + s.Policy = v + return s +} + +type PutPolicyOutput struct { + _ struct{} `type:"structure"` + + // The details of the AWS Firewall Manager policy that was created. + Policy *Policy `type:"structure"` + + // The Amazon Resource Name (ARN) of the policy that was created. + PolicyArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *PutPolicyOutput) SetPolicy(v *Policy) *PutPolicyOutput { + s.Policy = v + return s +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput { + s.PolicyArn = &v + return s +} + +// The resource tags that AWS Firewall Manager uses to determine if a particular +// resource should be included or excluded from protection by the AWS Firewall +// Manager policy. Tags enable you to categorize your AWS resources in different +// ways, for example, by purpose, owner, or environment. Each tag consists of +// a key and an optional value, both of which you define. Tags are combined +// with an "OR." That is, if you add more than one tag, if any of the tags matches, +// the resource is considered a match for the include or exclude. Working with +// Tag Editor (https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html). +type ResourceTag struct { + _ struct{} `type:"structure"` + + // The resource tag key. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The resource tag value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ResourceTag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceTag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceTag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceTag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *ResourceTag) SetKey(v string) *ResourceTag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ResourceTag) SetValue(v string) *ResourceTag { + s.Value = &v + return s +} + +// Details about the security service that is being used to protect the resources. +type SecurityServicePolicyData struct { + _ struct{} `type:"structure"` + + // Details about the service. This contains WAF data in JSON format, as shown + // in the following example: + // + // ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", + // \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": + // \"BLOCK\"}} + ManagedServiceData *string `min:"1" type:"string"` + + // The service that the policy is using to protect the resources. This value + // is WAF. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"SecurityServiceType"` +} + +// String returns the string representation +func (s SecurityServicePolicyData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityServicePolicyData) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SecurityServicePolicyData) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SecurityServicePolicyData"} + if s.ManagedServiceData != nil && len(*s.ManagedServiceData) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ManagedServiceData", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetManagedServiceData sets the ManagedServiceData field's value. +func (s *SecurityServicePolicyData) SetManagedServiceData(v string) *SecurityServicePolicyData { + s.ManagedServiceData = &v + return s +} + +// SetType sets the Type field's value. +func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData { + s.Type = &v + return s +} + +const ( + // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value + PolicyComplianceStatusTypeCompliant = "COMPLIANT" + + // PolicyComplianceStatusTypeNonCompliant is a PolicyComplianceStatusType enum value + PolicyComplianceStatusTypeNonCompliant = "NON_COMPLIANT" +) + +const ( + // SecurityServiceTypeWaf is a SecurityServiceType enum value + SecurityServiceTypeWaf = "WAF" +) + +const ( + // ViolationReasonWebAclMissingRuleGroup is a ViolationReason enum value + ViolationReasonWebAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP" + + // ViolationReasonResourceMissingWebAcl is a ViolationReason enum value + ViolationReasonResourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL" + + // ViolationReasonResourceIncorrectWebAcl is a ViolationReason enum value + ViolationReasonResourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go new file mode 100644 index 000000000..baae6d87f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go @@ -0,0 +1,31 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package fms provides the client and types for making API +// requests to Firewall Management Service. +// +// This is the AWS Firewall Manager API Reference. This guide is for developers +// who need detailed information about the AWS Firewall Manager API actions, +// data types, and errors. For detailed information about AWS Firewall Manager +// features, see the AWS Firewall Manager Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01 for more information on this service. +// +// See fms package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/ +// +// Using the Client +// +// To contact Firewall Management Service 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 Firewall Management Service client FMS for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/#New +package fms diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go new file mode 100644 index 000000000..f0a64c975 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +const ( + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // The operation failed because of a system problem, even though the request + // was valid. Retry your request. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeInvalidInputException for service response error code + // "InvalidInputException". + // + // The parameters of the request were invalid. + ErrCodeInvalidInputException = "InvalidInputException" + + // ErrCodeInvalidOperationException for service response error code + // "InvalidOperationException". + // + // The operation failed because there was nothing to do. For example, you might + // have submitted an AssociateAdminAccount request, but the account ID that + // you submitted was already set as the AWS Firewall Manager administrator. + ErrCodeInvalidOperationException = "InvalidOperationException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The operation exceeds a resource limit, for example, the maximum number of + // policy objects that you can create for an AWS account. For more information, + // see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) + // in the AWS WAF Developer Guide. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go new file mode 100644 index 000000000..6103e57fd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +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/jsonrpc" +) + +// FMS provides the API operation methods for making requests to +// Firewall Management Service. See this package's package overview docs +// for details on the service. +// +// FMS methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type FMS 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 = "fms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "FMS" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the FMS client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a FMS client from just a session. +// svc := fms.New(mySession) +// +// // Create a FMS client with additional configuration +// svc := fms.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *FMS { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *FMS { + svc := &FMS{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-01-01", + JSONVersion: "1.1", + TargetPrefix: "AWSFMS_20180101", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a FMS operation and runs any +// custom request initialization. +func (c *FMS) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 7be875620..138c469c4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -509,16 +509,22 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -531,21 +537,11 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -1975,16 +1971,22 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -1997,21 +1999,11 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -2328,49 +2320,30 @@ func (c *GameLift) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) ( // in force and removes all record of it. To delete a scaling policy, specify // both the scaling policy name and the fleet ID it is associated with. // -// Fleet-related operations include: +// To temporarily suspend scaling policies, call StopFleetActions. This operation +// suspends all policies for the fleet. // -// * CreateFleet +// Operations related to fleet capacity scaling include: // -// * ListFleets +// * DescribeFleetCapacity // -// * Describe fleets: +// * UpdateFleetCapacity // -// DescribeFleetAttributes +// * DescribeEC2InstanceLimits // -// DescribeFleetPortSettings +// * Manage scaling policies: // -// DescribeFleetUtilization +// PutScalingPolicy (auto-scaling) // -// DescribeRuntimeConfiguration +// DescribeScalingPolicies (auto-scaling) // -// DescribeFleetEvents +// DeleteScalingPolicy (auto-scaling) // -// * Update fleets: +// * Manage fleet actions: // -// UpdateFleetAttributes +// StartFleetActions // -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -2915,16 +2888,22 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -2937,21 +2916,11 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3057,16 +3026,22 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3079,21 +3054,11 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3204,16 +3169,22 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3226,21 +3197,11 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3343,16 +3304,22 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3365,21 +3332,11 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3484,16 +3441,22 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3506,21 +3469,11 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3629,16 +3582,22 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3651,21 +3610,11 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -4805,16 +4754,22 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -4827,21 +4782,11 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -4940,49 +4885,32 @@ func (c *GameLift) DescribeScalingPoliciesRequest(input *DescribeScalingPolicies // Use the pagination parameters to retrieve results as a set of sequential // pages. If successful, set of ScalingPolicy objects is returned for the fleet. // -// Fleet-related operations include: +// A fleet may have all of its scaling policies suspended (StopFleetActions). +// This action does not affect the status of the scaling policies, which remains +// ACTIVE. To see whether a fleet's scaling policies are in force or suspended, +// call DescribeFleetAttributes and check the stopped actions. // -// * CreateFleet +// Operations related to fleet capacity scaling include: // -// * ListFleets +// * DescribeFleetCapacity // -// * Describe fleets: +// * UpdateFleetCapacity // -// DescribeFleetAttributes +// * DescribeEC2InstanceLimits // -// DescribeFleetPortSettings +// * Manage scaling policies: // -// DescribeFleetUtilization +// PutScalingPolicy (auto-scaling) // -// DescribeRuntimeConfiguration +// DescribeScalingPolicies (auto-scaling) // -// DescribeFleetEvents +// DeleteScalingPolicy (auto-scaling) // -// * Update fleets: +// * Manage fleet actions: // -// UpdateFleetAttributes +// StartFleetActions // -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -5742,16 +5670,22 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -5764,21 +5698,11 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -5870,72 +5794,102 @@ func (c *GameLift) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *r // PutScalingPolicy API operation for Amazon GameLift. // -// Creates or updates a scaling policy for a fleet. An active scaling policy -// prompts Amazon GameLift to track a certain metric for a fleet and automatically -// change the fleet's capacity in specific circumstances. Each scaling policy -// contains one rule statement. Fleets can have multiple scaling policies in -// force simultaneously. +// Creates or updates a scaling policy for a fleet. Scaling policies are used +// to automatically scale a fleet's hosting capacity to meet player demand. +// An active scaling policy instructs Amazon GameLift to track a fleet metric +// and automatically change the fleet's capacity when a certain threshold is +// reached. There are two types of scaling policies: target-based and rule-based. +// Use a target-based policy to quickly and efficiently manage fleet scaling; +// this option is the most commonly used. Use rule-based policies when you need +// to exert fine-grained control over auto-scaling. // -// A scaling policy rule statement has the following structure: +// Fleets can have multiple scaling policies of each type in force at the same +// time; you can have one target-based policy, one or multiple rule-based scaling +// policies, or both. We recommend caution, however, because multiple auto-scaling +// policies can have unintended consequences. +// +// You can temporarily suspend all scaling policies for a fleet by calling StopFleetActions +// with the fleet action AUTO_SCALING. To resume scaling policies, call StartFleetActions +// with the same fleet action. To stop just one scaling policy--or to permanently +// remove it, you must delete the policy with DeleteScalingPolicy. +// +// Learn more about how to work with auto-scaling in Set Up Fleet Automatic +// Scaling (http://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-autoscaling.html). +// +// Target-based policy +// +// A target-based policy tracks a single metric: PercentAvailableGameSessions. +// This metric tells us how much of a fleet's hosting capacity is ready to host +// game sessions but is not currently in use. This is the fleet's buffer; it +// measures the additional player demand that the fleet could handle at current +// capacity. With a target-based policy, you set your ideal buffer size and +// leave it to Amazon GameLift to take whatever action is needed to maintain +// that target. +// +// For example, you might choose to maintain a 10% buffer for a fleet that has +// the capacity to host 100 simultaneous game sessions. This policy tells Amazon +// GameLift to take action whenever the fleet's available capacity falls below +// or rises above 10 game sessions. Amazon GameLift will start new instances +// or stop unused instances in order to return to the 10% buffer. +// +// To create or update a target-based policy, specify a fleet ID and name, and +// set the policy type to "TargetBased". Specify the metric to track (PercentAvailableGameSessions) +// and reference a TargetConfiguration object with your desired buffer value. +// Exclude all other parameters. On a successful request, the policy name is +// returned. The scaling policy is automatically in force as soon as it's successfully +// created. If the fleet's auto-scaling actions are temporarily suspended, the +// new policy will be in force once the fleet actions are restarted. +// +// Rule-based policy +// +// A rule-based policy tracks specified fleet metric, sets a threshold value, +// and specifies the type of action to initiate when triggered. With a rule-based +// policy, you can select from several available fleet metrics. Each policy +// specifies whether to scale up or scale down (and by how much), so you need +// one policy for each type of action. +// +// For example, a policy may make the following statement: "If the percentage +// of idle instances is greater than 20% for more than 15 minutes, then reduce +// the fleet capacity by 10%." +// +// A policy's rule statement has the following structure: // // If [MetricName] is [ComparisonOperator][Threshold] for [EvaluationPeriods] // minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment]. // -// For example, this policy: "If the number of idle instances exceeds 20 for -// more than 15 minutes, then reduce the fleet capacity by 10 instances" could -// be implemented as the following rule statement: +// To implement the example, the rule statement would look like this: // -// If [IdleInstances] is [GreaterThanOrEqualToThreshold] [20] for [15] minutes, -// then [ChangeInCapacity] by [-10]. +// If [PercentIdleInstances] is [GreaterThanThreshold][20] for [15] minutes, +// then [PercentChangeInCapacity] to/by [10]. // // To create or update a scaling policy, specify a unique combination of name -// and fleet ID, and set the rule values. All parameters for this action are -// required. If successful, the policy name is returned. Scaling policies cannot -// be suspended or made inactive. To stop enforcing a scaling policy, call DeleteScalingPolicy. +// and fleet ID, and set the policy type to "RuleBased". Specify the parameter +// values for a policy rule statement. On a successful request, the policy name +// is returned. Scaling policies are automatically in force as soon as they're +// successfully created. If the fleet's auto-scaling actions are temporarily +// suspended, the new policy will be in force once the fleet actions are restarted. // -// Fleet-related operations include: +// Operations related to fleet capacity scaling include: // -// * CreateFleet +// * DescribeFleetCapacity // -// * ListFleets +// * UpdateFleetCapacity // -// * Describe fleets: +// * DescribeEC2InstanceLimits // -// DescribeFleetAttributes +// * Manage scaling policies: // -// DescribeFleetPortSettings +// PutScalingPolicy (auto-scaling) // -// DescribeFleetUtilization +// DescribeScalingPolicies (auto-scaling) // -// DescribeRuntimeConfiguration +// DeleteScalingPolicy (auto-scaling) // -// DescribeFleetEvents +// * Manage fleet actions: // -// * Update fleets: +// StartFleetActions // -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -6363,6 +6317,127 @@ func (c *GameLift) SearchGameSessionsWithContext(ctx aws.Context, input *SearchG return out, req.Send() } +const opStartFleetActions = "StartFleetActions" + +// StartFleetActionsRequest generates a "aws/request.Request" representing the +// client's request for the StartFleetActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 StartFleetActions for more information on using the StartFleetActions +// 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 StartFleetActionsRequest method. +// req, resp := client.StartFleetActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions +func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req *request.Request, output *StartFleetActionsOutput) { + op := &request.Operation{ + Name: opStartFleetActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartFleetActionsInput{} + } + + output = &StartFleetActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartFleetActions API operation for Amazon GameLift. +// +// Resumes activity on a fleet that was suspended with StopFleetActions. Currently, +// this operation is used to restart a fleet's auto-scaling activity. +// +// To start fleet actions, specify the fleet ID and the type of actions to restart. +// When auto-scaling fleet actions are restarted, Amazon GameLift once again +// initiates scaling events as triggered by the fleet's scaling policies. If +// actions on the fleet were never stopped, this operation will have no effect. +// You can view a fleet's stopped actions using DescribeFleetAttributes. +// +// Operations related to fleet capacity scaling include: +// +// * DescribeFleetCapacity +// +// * UpdateFleetCapacity +// +// * DescribeEC2InstanceLimits +// +// * Manage scaling policies: +// +// PutScalingPolicy (auto-scaling) +// +// DescribeScalingPolicies (auto-scaling) +// +// DeleteScalingPolicy (auto-scaling) +// +// * Manage fleet actions: +// +// StartFleetActions +// +// StopFleetActions +// +// 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 GameLift's +// API operation StartFleetActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions +func (c *GameLift) StartFleetActions(input *StartFleetActionsInput) (*StartFleetActionsOutput, error) { + req, out := c.StartFleetActionsRequest(input) + return out, req.Send() +} + +// StartFleetActionsWithContext is the same as StartFleetActions with the addition of +// the ability to pass a context and additional request options. +// +// See StartFleetActions 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 *GameLift) StartFleetActionsWithContext(ctx aws.Context, input *StartFleetActionsInput, opts ...request.Option) (*StartFleetActionsOutput, error) { + req, out := c.StartFleetActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartGameSessionPlacement = "StartGameSessionPlacement" // StartGameSessionPlacementRequest generates a "aws/request.Request" representing the @@ -6809,6 +6884,107 @@ func (c *GameLift) StartMatchmakingWithContext(ctx aws.Context, input *StartMatc return out, req.Send() } +const opStopFleetActions = "StopFleetActions" + +// StopFleetActionsRequest generates a "aws/request.Request" representing the +// client's request for the StopFleetActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 StopFleetActions for more information on using the StopFleetActions +// 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 StopFleetActionsRequest method. +// req, resp := client.StopFleetActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions +func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *request.Request, output *StopFleetActionsOutput) { + op := &request.Operation{ + Name: opStopFleetActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopFleetActionsInput{} + } + + output = &StopFleetActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopFleetActions API operation for Amazon GameLift. +// +// Suspends activity on a fleet. Currently, this operation is used to stop a +// fleet's auto-scaling activity. It is used to temporarily stop scaling events +// triggered by the fleet's scaling policies. The policies can be retained and +// auto-scaling activity can be restarted using StartFleetActions. You can view +// a fleet's stopped actions using DescribeFleetAttributes. +// +// To stop fleet actions, specify the fleet ID and the type of actions to suspend. +// When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates +// scaling events except to maintain the fleet's desired instances setting (FleetCapacity. +// Changes to the fleet's capacity must be done manually using UpdateFleetCapacity. +// +// 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 GameLift's +// API operation StopFleetActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions +func (c *GameLift) StopFleetActions(input *StopFleetActionsInput) (*StopFleetActionsOutput, error) { + req, out := c.StopFleetActionsRequest(input) + return out, req.Send() +} + +// StopFleetActionsWithContext is the same as StopFleetActions with the addition of +// the ability to pass a context and additional request options. +// +// See StopFleetActions 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 *GameLift) StopFleetActionsWithContext(ctx aws.Context, input *StopFleetActionsInput, opts ...request.Option) (*StopFleetActionsOutput, error) { + req, out := c.StopFleetActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopGameSessionPlacement = "StopGameSessionPlacement" // StopGameSessionPlacementRequest generates a "aws/request.Request" representing the @@ -7301,16 +7477,22 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7323,21 +7505,11 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -7448,9 +7620,10 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // this action, you may want to call DescribeEC2InstanceLimits to get the maximum // capacity based on the fleet's EC2 instance type. // -// If you're using autoscaling (see PutScalingPolicy), you may want to specify -// a minimum and/or maximum capacity. If you don't provide these, autoscaling -// can set capacity anywhere between zero and the service limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_gamelift). +// Specify minimum and maximum number of instances. Amazon GameLift will not +// change fleet capacity to values fall outside of this range. This is particularly +// important when using auto-scaling (see PutScalingPolicy) to allow capacity +// to adjust based on player demand while imposing limits on automatic adjustments. // // To update fleet capacity, specify the fleet ID and the number of instances // you want the fleet to host. If successful, Amazon GameLift starts or terminates @@ -7465,16 +7638,22 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7487,21 +7666,11 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -7620,16 +7789,22 @@ func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettings // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7642,21 +7817,11 @@ func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettings // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -8129,16 +8294,22 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -8151,21 +8322,11 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -8436,14 +8597,14 @@ type Alias struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Human-readable description of an alias. Description *string `type:"string"` // Time stamp indicating when this data object was last modified. Format is // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // Descriptive label that is associated with an alias. Alias names do not need // to be unique. @@ -8641,7 +8802,7 @@ type Build struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Descriptive label that is associated with a build. Build names do not need // to be unique. It can be set using CreateBuild or UpdateBuild. @@ -11115,7 +11276,7 @@ type DescribeFleetEventsInput struct { // Most recent date to retrieve event logs for. If no end time is specified, // this call returns entries from the specified start time up to the present. // Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057"). - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Unique identifier for a fleet to get event logs for. // @@ -11135,7 +11296,7 @@ type DescribeFleetEventsInput struct { // this call returns entries starting from when the fleet was created to the // specified end time. Format is a number expressed in Unix time as milliseconds // (ex: "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -12702,16 +12863,22 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -12724,21 +12891,11 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type EC2InstanceCounts struct { _ struct{} `type:"structure"` @@ -12974,7 +13131,7 @@ type Event struct { // Time stamp indicating when this event occurred. Format is a number expressed // in Unix time as milliseconds (for example "1469498468.057"). - EventTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EventTime *time.Time `type:"timestamp"` // Additional information related to the event. Message *string `min:"1" type:"string"` @@ -13042,16 +13199,22 @@ func (s *Event) SetResourceId(v string) *Event { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13064,21 +13227,11 @@ func (s *Event) SetResourceId(v string) *Event { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type FleetAttributes struct { _ struct{} `type:"structure"` @@ -13087,7 +13240,7 @@ type FleetAttributes struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Human-readable description of the fleet. Description *string `min:"1" type:"string"` @@ -13178,9 +13331,13 @@ type FleetAttributes struct { // * TERMINATED -- The fleet no longer exists. Status *string `type:"string" enum:"FleetStatus"` + // List of fleet actions that have been suspended using StopFleetActions. This + // includes auto-scaling. + StoppedActions []*string `min:"1" type:"list"` + // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13289,6 +13446,12 @@ func (s *FleetAttributes) SetStatus(v string) *FleetAttributes { return s } +// SetStoppedActions sets the StoppedActions field's value. +func (s *FleetAttributes) SetStoppedActions(v []*string) *FleetAttributes { + s.StoppedActions = v + return s +} + // SetTerminationTime sets the TerminationTime field's value. func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { s.TerminationTime = &v @@ -13306,16 +13469,22 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13328,21 +13497,11 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type FleetCapacity struct { _ struct{} `type:"structure"` @@ -13397,16 +13556,22 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13419,21 +13584,11 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type FleetUtilization struct { _ struct{} `type:"structure"` @@ -13591,7 +13746,7 @@ type GameSession struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a player. This ID is used to enforce a resource protection // policy (if one exists), that limits the number of game sessions a player @@ -13625,7 +13780,7 @@ type GameSession struct { IpAddress *string `type:"string"` // Information about the matchmaking process that was used to create the game - // session. It is in JSON syntax, formated as a string. In addition the matchmaking + // session. It is in JSON syntax, formatted as a string. In addition the matchmaking // configuration used, it contains data on all players assigned to the match, // including player attributes and team assignments. For more details on matchmaker // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). @@ -13659,7 +13814,7 @@ type GameSession struct { // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13883,7 +14038,7 @@ type GameSessionPlacement struct { // Time stamp indicating when this request was completed, canceled, or timed // out. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Set of custom properties for a game session, formatted as key:value pairs. // These properties are passed to a game server process in the GameSession object @@ -13924,7 +14079,7 @@ type GameSessionPlacement struct { IpAddress *string `type:"string"` // Information on the matchmaking process for this game. Data is in JSON syntax, - // formated as a string. It identifies the matchmaking configuration used to + // formatted as a string. It identifies the matchmaking configuration used to // create the match, and contains data on all players assigned to the match, // including player attributes and team assignments. For more details on matchmaker // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). @@ -13956,7 +14111,7 @@ type GameSessionPlacement struct { // Time stamp indicating when this request was placed in the queue. Format is // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Current status of the game session placement request. // @@ -14391,7 +14546,7 @@ type Instance struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a fleet that the instance is in. FleetId *string `type:"string"` @@ -15058,7 +15213,7 @@ type MatchmakingConfiguration struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Information to attached to all events related to the matchmaking configuration. CustomEventData *string `type:"string"` @@ -15232,7 +15387,7 @@ type MatchmakingRuleSet struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Collection of matchmaking rules, formatted as a JSON string. (Note that comments14 // are not allowed in JSON, but most elements support a description field.) @@ -15287,7 +15442,7 @@ type MatchmakingTicket struct { // Time stamp indicating when this matchmaking request stopped being processed // due to success, failure, or cancellation. Format is a number expressed in // Unix time as milliseconds (for example "1469498468.057"). - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Average amount of time (in seconds) that players are currently waiting for // a match. If there is not enough recent data, this property may be empty. @@ -15306,7 +15461,7 @@ type MatchmakingTicket struct { // Time stamp indicating when this matchmaking request was received. Format // is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Current status of the matchmaking request. // @@ -15710,7 +15865,7 @@ type PlayerSession struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a fleet that the player's game session is running on. FleetId *string `type:"string"` @@ -15755,7 +15910,7 @@ type PlayerSession struct { // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -15834,41 +15989,54 @@ type PutScalingPolicyInput struct { // Comparison operator to use when measuring the metric against the threshold // value. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperatorType"` + ComparisonOperator *string `type:"string" enum:"ComparisonOperatorType"` // Length of time (in minutes) the metric must be at or beyond the threshold // before a scaling event is triggered. - // - // EvaluationPeriods is a required field - EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` + EvaluationPeriods *int64 `min:"1" type:"integer"` - // Unique identifier for a fleet to apply this policy to. + // Unique identifier for a fleet to apply this policy to. The fleet cannot be + // in any of the following statuses: ERROR or DELETING. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Name of the Amazon GameLift-defined metric that is used to trigger an adjustment. + // Name of the Amazon GameLift-defined metric that is used to trigger a scaling + // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon + // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). // - // * ActivatingGameSessions -- number of game sessions in the process of - // being created (game session status = ACTIVATING). + // * ActivatingGameSessions -- Game sessions in the process of being created. // - // * ActiveGameSessions -- number of game sessions currently running (game - // session status = ACTIVE). + // * ActiveGameSessions -- Game sessions that are currently running. // - // * CurrentPlayerSessions -- number of active or reserved player sessions - // (player session status = ACTIVE or RESERVED). + // * ActiveInstances -- Fleet instances that are currently running at least + // one game session. // - // * AvailablePlayerSessions -- number of player session slots currently - // available in active game sessions across the fleet, calculated by subtracting - // a game session's current player session count from its maximum player - // session count. This number includes game sessions that are not currently - // accepting players (game session PlayerSessionCreationPolicy = DENY_ALL). + // * AvailableGameSessions -- Additional game sessions that fleet could host + // simultaneously, given current capacity. // - // * ActiveInstances -- number of instances currently running a game session. + // * AvailablePlayerSessions -- Empty player slots in currently active game + // sessions. This includes game sessions that are not currently accepting + // players. Reserved player slots are not included. // - // * IdleInstances -- number of instances not currently running a game session. + // * CurrentPlayerSessions -- Player slots in active game sessions that are + // being used by a player or are reserved for a player. + // + // * IdleInstances -- Active instances that are currently hosting zero game + // sessions. + // + // * PercentAvailableGameSessions -- Unused percentage of the total number + // of game sessions that a fleet could host simultaneously, given current + // capacity. Use this metric for a target-based scaling policy. + // + // * PercentIdleInstances -- Percentage of the total number of active instances + // that are hosting zero game sessions. + // + // * QueueDepth -- Pending game session placement requests, in any queue, + // where the current fleet is the top-priority destination. + // + // * WaitTime -- Current wait time for pending game session placement requests, + // in any queue, where the current fleet is the top-priority destination. // // MetricName is a required field MetricName *string `type:"string" required:"true" enum:"MetricName"` @@ -15880,10 +16048,14 @@ type PutScalingPolicyInput struct { // Name is a required field Name *string `min:"1" type:"string" required:"true"` + // Type of scaling policy to create. For a target-based policy, set the parameter + // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, + // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. + PolicyType *string `type:"string" enum:"PolicyType"` + // Amount of adjustment to make, based on the scaling adjustment type. - // - // ScalingAdjustment is a required field - ScalingAdjustment *int64 `type:"integer" required:"true"` + ScalingAdjustment *int64 `type:"integer"` // Type of adjustment to make to a fleet's instance count (see FleetCapacity): // @@ -15897,14 +16069,13 @@ type PutScalingPolicyInput struct { // by the scaling adjustment, read as a percentage. Positive values scale // up while negative values scale down; for example, a value of "-10" scales // the fleet down by 10%. - // - // ScalingAdjustmentType is a required field - ScalingAdjustmentType *string `type:"string" required:"true" enum:"ScalingAdjustmentType"` + ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` + + // Object that contains settings for a target-based scaling policy. + TargetConfiguration *TargetConfiguration `type:"structure"` // Metric value used to trigger a scaling event. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` + Threshold *float64 `type:"double"` } // String returns the string representation @@ -15920,12 +16091,6 @@ func (s PutScalingPolicyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutScalingPolicyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.EvaluationPeriods == nil { - invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods")) - } if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) } @@ -15941,14 +16106,10 @@ func (s *PutScalingPolicyInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } - if s.ScalingAdjustment == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) - } - if s.ScalingAdjustmentType == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustmentType")) - } - if s.Threshold == nil { - invalidParams.Add(request.NewErrParamRequired("Threshold")) + if s.TargetConfiguration != nil { + if err := s.TargetConfiguration.Validate(); err != nil { + invalidParams.AddNested("TargetConfiguration", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -15987,6 +16148,12 @@ func (s *PutScalingPolicyInput) SetName(v string) *PutScalingPolicyInput { return s } +// SetPolicyType sets the PolicyType field's value. +func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { + s.PolicyType = &v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput { s.ScalingAdjustment = &v @@ -15999,6 +16166,12 @@ func (s *PutScalingPolicyInput) SetScalingAdjustmentType(v string) *PutScalingPo return s } +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *PutScalingPolicyInput) SetTargetConfiguration(v *TargetConfiguration) *PutScalingPolicyInput { + s.TargetConfiguration = v + return s +} + // SetThreshold sets the Threshold field's value. func (s *PutScalingPolicyInput) SetThreshold(v float64) *PutScalingPolicyInput { s.Threshold = &v @@ -16219,16 +16392,22 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -16241,21 +16420,11 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type RoutingStrategy struct { _ struct{} `type:"structure"` @@ -16334,16 +16503,22 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -16356,21 +16531,11 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type RuntimeConfiguration struct { _ struct{} `type:"structure"` @@ -16514,49 +16679,27 @@ func (s *S3Location) SetRoleArn(v string) *S3Location { // Rule that controls how a fleet is scaled. Scaling policies are uniquely identified // by the combination of name and fleet ID. // -// Fleet-related operations include: +// Operations related to fleet capacity scaling include: // -// * CreateFleet +// * DescribeFleetCapacity // -// * ListFleets +// * UpdateFleetCapacity // -// * Describe fleets: +// * DescribeEC2InstanceLimits // -// DescribeFleetAttributes +// * Manage scaling policies: // -// DescribeFleetPortSettings +// PutScalingPolicy (auto-scaling) // -// DescribeFleetUtilization +// DescribeScalingPolicies (auto-scaling) // -// DescribeRuntimeConfiguration +// DeleteScalingPolicy (auto-scaling) // -// DescribeFleetEvents +// * Manage fleet actions: // -// * Update fleets: +// StartFleetActions // -// UpdateFleetAttributes -// -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type ScalingPolicy struct { _ struct{} `type:"structure"` @@ -16571,32 +16714,54 @@ type ScalingPolicy struct { // Unique identifier for a fleet that is associated with this scaling policy. FleetId *string `type:"string"` - // Name of the Amazon GameLift-defined metric that is used to trigger an adjustment. + // Name of the Amazon GameLift-defined metric that is used to trigger a scaling + // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon + // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). // - // * ActivatingGameSessions -- number of game sessions in the process of - // being created (game session status = ACTIVATING). + // * ActivatingGameSessions -- Game sessions in the process of being created. // - // * ActiveGameSessions -- number of game sessions currently running (game - // session status = ACTIVE). + // * ActiveGameSessions -- Game sessions that are currently running. // - // * CurrentPlayerSessions -- number of active or reserved player sessions - // (player session status = ACTIVE or RESERVED). + // * ActiveInstances -- Fleet instances that are currently running at least + // one game session. // - // * AvailablePlayerSessions -- number of player session slots currently - // available in active game sessions across the fleet, calculated by subtracting - // a game session's current player session count from its maximum player - // session count. This number does include game sessions that are not currently - // accepting players (game session PlayerSessionCreationPolicy = DENY_ALL). + // * AvailableGameSessions -- Additional game sessions that fleet could host + // simultaneously, given current capacity. // - // * ActiveInstances -- number of instances currently running a game session. + // * AvailablePlayerSessions -- Empty player slots in currently active game + // sessions. This includes game sessions that are not currently accepting + // players. Reserved player slots are not included. // - // * IdleInstances -- number of instances not currently running a game session. + // * CurrentPlayerSessions -- Player slots in active game sessions that are + // being used by a player or are reserved for a player. + // + // * IdleInstances -- Active instances that are currently hosting zero game + // sessions. + // + // * PercentAvailableGameSessions -- Unused percentage of the total number + // of game sessions that a fleet could host simultaneously, given current + // capacity. Use this metric for a target-based scaling policy. + // + // * PercentIdleInstances -- Percentage of the total number of active instances + // that are hosting zero game sessions. + // + // * QueueDepth -- Pending game session placement requests, in any queue, + // where the current fleet is the top-priority destination. + // + // * WaitTime -- Current wait time for pending game session placement requests, + // in any queue, where the current fleet is the top-priority destination. MetricName *string `type:"string" enum:"MetricName"` // Descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. Name *string `min:"1" type:"string"` + // Type of scaling policy to create. For a target-based policy, set the parameter + // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, + // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. + PolicyType *string `type:"string" enum:"PolicyType"` + // Amount of adjustment to make, based on the scaling adjustment type. ScalingAdjustment *int64 `type:"integer"` @@ -16613,10 +16778,12 @@ type ScalingPolicy struct { // up while negative values scale down. ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` - // Current status of the scaling policy. The scaling policy is only in force - // when in an ACTIVE status. + // Current status of the scaling policy. The scaling policy can be in force + // only when in an ACTIVE status. Scaling policies can be suspended for individual + // fleets (see StopFleetActions; if suspended for a fleet, the policy status + // does not change. View a fleet's stopped actions by calling DescribeFleetCapacity. // - // * ACTIVE -- The scaling policy is currently in force. + // * ACTIVE -- The scaling policy can be used for auto-scaling a fleet. // // * UPDATE_REQUESTED -- A request to update the scaling policy has been // received. @@ -16634,6 +16801,9 @@ type ScalingPolicy struct { // and recreated. Status *string `type:"string" enum:"ScalingStatusType"` + // Object that contains settings for a target-based scaling policy. + TargetConfiguration *TargetConfiguration `type:"structure"` + // Metric value used to trigger a scaling event. Threshold *float64 `type:"double"` } @@ -16678,6 +16848,12 @@ func (s *ScalingPolicy) SetName(v string) *ScalingPolicy { return s } +// SetPolicyType sets the PolicyType field's value. +func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { + s.PolicyType = &v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy { s.ScalingAdjustment = &v @@ -16696,6 +16872,12 @@ func (s *ScalingPolicy) SetStatus(v string) *ScalingPolicy { return s } +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *ScalingPolicy) SetTargetConfiguration(v *TargetConfiguration) *ScalingPolicy { + s.TargetConfiguration = v + return s +} + // SetThreshold sets the Threshold field's value. func (s *ScalingPolicy) SetThreshold(v float64) *ScalingPolicy { s.Threshold = &v @@ -16967,6 +17149,75 @@ func (s *ServerProcess) SetParameters(v string) *ServerProcess { return s } +type StartFleetActionsInput struct { + _ struct{} `type:"structure"` + + // List of actions to restart on the fleet. + // + // Actions is a required field + Actions []*string `min:"1" type:"list" required:"true"` + + // Unique identifier for a fleet + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartFleetActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFleetActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartFleetActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartFleetActionsInput"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Actions != nil && len(s.Actions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) + } + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *StartFleetActionsInput) SetActions(v []*string) *StartFleetActionsInput { + s.Actions = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *StartFleetActionsInput) SetFleetId(v string) *StartFleetActionsInput { + s.FleetId = &v + return s +} + +type StartFleetActionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartFleetActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFleetActionsOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type StartGameSessionPlacementInput struct { _ struct{} `type:"structure"` @@ -17410,6 +17661,75 @@ func (s *StartMatchmakingOutput) SetMatchmakingTicket(v *MatchmakingTicket) *Sta return s } +type StopFleetActionsInput struct { + _ struct{} `type:"structure"` + + // List of actions to suspend on the fleet. + // + // Actions is a required field + Actions []*string `min:"1" type:"list" required:"true"` + + // Unique identifier for a fleet + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopFleetActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFleetActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopFleetActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopFleetActionsInput"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Actions != nil && len(s.Actions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) + } + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *StopFleetActionsInput) SetActions(v []*string) *StopFleetActionsInput { + s.Actions = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *StopFleetActionsInput) SetFleetId(v string) *StopFleetActionsInput { + s.FleetId = &v + return s +} + +type StopFleetActionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopFleetActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFleetActionsOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type StopGameSessionPlacementInput struct { _ struct{} `type:"structure"` @@ -17533,6 +17853,76 @@ func (s StopMatchmakingOutput) GoString() string { return s.String() } +// Settings for a target-based scaling policy (see ScalingPolicy. A target-based +// policy tracks a particular fleet metric specifies a target value for the +// metric. As player usage changes, the policy triggers Amazon GameLift to adjust +// capacity so that the metric returns to the target value. The target configuration +// specifies settings as needed for the target based policy, including the target +// value. +// +// Operations related to fleet capacity scaling include: +// +// * DescribeFleetCapacity +// +// * UpdateFleetCapacity +// +// * DescribeEC2InstanceLimits +// +// * Manage scaling policies: +// +// PutScalingPolicy (auto-scaling) +// +// DescribeScalingPolicies (auto-scaling) +// +// DeleteScalingPolicy (auto-scaling) +// +// * Manage fleet actions: +// +// StartFleetActions +// +// StopFleetActions +type TargetConfiguration struct { + _ struct{} `type:"structure"` + + // Desired value to use with a target-based scaling policy. The value must be + // relevant for whatever metric the scaling policy is using. For example, in + // a policy using the metric PercentAvailableGameSessions, the target value + // should be the preferred size of the fleet's buffer (the percent of capacity + // that should be idle and ready for new game sessions). + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s TargetConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetConfiguration"} + if s.TargetValue == nil { + invalidParams.Add(request.NewErrParamRequired("TargetValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetValue sets the TargetValue field's value. +func (s *TargetConfiguration) SetTargetValue(v float64) *TargetConfiguration { + s.TargetValue = &v + return s +} + // Represents the input for a request action. type UpdateAliasInput struct { _ struct{} `type:"structure"` @@ -18660,11 +19050,11 @@ type VpcPeeringAuthorization struct { // Time stamp indicating when this authorization was issued. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Time stamp indicating when this authorization expires (24 hours after issuance). // Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - ExpirationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationTime *time.Time `type:"timestamp"` // Unique identifier for the AWS account that you use to manage your Amazon // GameLift fleet. You can find your Account ID in the AWS Management Console @@ -19090,6 +19480,11 @@ const ( EventCodeInstanceInterrupted = "INSTANCE_INTERRUPTED" ) +const ( + // FleetActionAutoScaling is a FleetAction enum value + FleetActionAutoScaling = "AUTO_SCALING" +) + const ( // FleetStatusNew is a FleetStatus enum value FleetStatusNew = "NEW" @@ -19273,6 +19668,14 @@ const ( PlayerSessionStatusTimedout = "TIMEDOUT" ) +const ( + // PolicyTypeRuleBased is a PolicyType enum value + PolicyTypeRuleBased = "RuleBased" + + // PolicyTypeTargetBased is a PolicyType enum value + PolicyTypeTargetBased = "TargetBased" +) + const ( // ProtectionPolicyNoProtection is a ProtectionPolicy enum value ProtectionPolicyNoProtection = "NoProtection" diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go index 0e2d3bdaa..def8e0510 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go @@ -17,7 +17,7 @@ // a game session. // // * Configure and manage game server resources -- Manage builds, fleets, -// queues, and aliases; set autoscaling policies; retrieve logs and metrics. +// queues, and aliases; set auto-scaling policies; retrieve logs and metrics. // // This reference guide describes the low-level service API for Amazon GameLift. // You can use the API functionality with these tools: @@ -188,16 +188,20 @@ // and the current number of instances in a fleet; adjust fleet capacity // settings to scale up or down. // -// Autoscale -- Manage autoscaling rules and apply them to a fleet. +// Autoscale -- Manage auto-scaling rules and apply them to a fleet. // -// PutScalingPolicy -- Create a new autoscaling policy, or update an existing +// PutScalingPolicy -- Create a new auto-scaling policy, or update an existing // one. // -// DescribeScalingPolicies -- Retrieve an existing autoscaling policy. +// DescribeScalingPolicies -- Retrieve an existing auto-scaling policy. // -// DeleteScalingPolicy -- Delete an autoscaling policy and stop it from affecting +// DeleteScalingPolicy -- Delete an auto-scaling policy and stop it from affecting // a fleet's capacity. // +// StartFleetActions -- Restart a fleet's auto-scaling policies. +// +// StopFleetActions -- Suspend a fleet's auto-scaling policies. +// // * Manage VPC peering connections for fleets // // CreateVpcPeeringAuthorization -- Authorize a peering connection to one of diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go index b79ac2047..a2361e476 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "gamelift" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "gamelift" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "GameLift" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the GameLift client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 177764b64..8087df5f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -1030,7 +1030,7 @@ func (c *Glacier) DeleteVaultNotificationsRequest(input *DeleteVaultNotification // AWS Identity and Access Management (IAM) users don't have any permissions // by default. You must grant them explicit permission to perform specific actions. // For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/latest/dev/using-iam-with-amazon-glacier.html). +// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). // // For conceptual information and underlying REST API, see Configuring Vault // Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go index b875f0faf..85e6e367b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "glacier" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "glacier" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Glacier" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Glacier client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index ba489115a..9f95a7710 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -583,7 +583,7 @@ func (c *Glue) BatchStopJobRunRequest(input *BatchStopJobRunInput) (req *request // BatchStopJobRun API operation for AWS Glue. // -// Stops one or more job runs for a specified Job. +// Stops one or more job runs for a specified job definition. // // 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 @@ -844,8 +844,8 @@ func (c *Glue) CreateCrawlerRequest(input *CreateCrawlerInput) (req *request.Req // CreateCrawler API operation for AWS Glue. // // Creates a new crawler with specified targets, role, configuration, and optional -// schedule. At least one crawl target must be specified, in either the s3Targets -// or the jdbcTargets field. +// schedule. At least one crawl target must be specified, in the s3Targets field, +// the jdbcTargets field, or the DynamoDBTargets field. // // 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 @@ -1124,7 +1124,7 @@ func (c *Glue) CreateJobRequest(input *CreateJobInput) (req *request.Request, ou // CreateJob API operation for AWS Glue. // -// Creates a new job. +// Creates a new job definition. // // 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 @@ -2114,7 +2114,8 @@ func (c *Glue) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, ou // DeleteJob API operation for AWS Glue. // -// Deletes a specified job. If the job is not found, no exception is thrown. +// Deletes a specified job definition. If the job definition is not found, no +// exception is thrown. // // 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 @@ -4239,7 +4240,7 @@ func (c *Glue) GetJobRunsRequest(input *GetJobRunsInput) (req *request.Request, // GetJobRuns API operation for AWS Glue. // -// Retrieves metadata for all runs of a given job. +// Retrieves metadata for all runs of a given job definition. // // 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 @@ -4383,7 +4384,7 @@ func (c *Glue) GetJobsRequest(input *GetJobsInput) (req *request.Request, output // GetJobs API operation for AWS Glue. // -// Retrieves all current jobs. +// Retrieves all current job definitions. // // 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 @@ -6026,7 +6027,7 @@ func (c *Glue) StartCrawlerRequest(input *StartCrawlerInput) (req *request.Reque // StartCrawler API operation for AWS Glue. // // Starts a crawl using the specified crawler, regardless of what is scheduled. -// If the crawler is already running, does nothing. +// If the crawler is already running, returns a CrawlerRunningException (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-exceptions.html#aws-glue-api-exceptions-CrawlerRunningException). // // 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 @@ -6203,7 +6204,7 @@ func (c *Glue) StartJobRunRequest(input *StartJobRunInput) (req *request.Request // StartJobRun API operation for AWS Glue. // -// Runs a job. +// Starts a job run using a job definition. // // 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 @@ -7618,12 +7619,18 @@ type Action struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` // The name of a job to be executed. JobName *string `min:"1" type:"string"` + + // Specifies configuration properties of a job run notification. + NotificationProperty *NotificationProperty `type:"structure"` + + // The job run timeout in minutes. It overrides the timeout value of the job. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -7642,6 +7649,14 @@ func (s *Action) Validate() error { if s.JobName != nil && len(*s.JobName) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.NotificationProperty != nil { + if err := s.NotificationProperty.Validate(); err != nil { + invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7661,6 +7676,18 @@ func (s *Action) SetJobName(v string) *Action { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *Action) SetNotificationProperty(v *NotificationProperty) *Action { + s.NotificationProperty = v + return s +} + +// SetTimeout sets the Timeout field's value. +func (s *Action) SetTimeout(v int64) *Action { + s.Timeout = &v + return s +} + type BatchCreatePartitionInput struct { _ struct{} `type:"structure"` @@ -8310,17 +8337,17 @@ func (s *BatchGetPartitionOutput) SetUnprocessedKeys(v []*PartitionValueList) *B return s } -// Records an error that occurred when attempting to stop a specified JobRun. +// Records an error that occurred when attempting to stop a specified job run. type BatchStopJobRunError struct { _ struct{} `type:"structure"` // Specifies details about the error that was encountered. ErrorDetail *ErrorDetail `type:"structure"` - // The name of the Job in question. + // The name of the job definition used in the job run in question. JobName *string `min:"1" type:"string"` - // The JobRunId of the JobRun in question. + // The JobRunId of the job run in question. JobRunId *string `min:"1" type:"string"` } @@ -8355,12 +8382,12 @@ func (s *BatchStopJobRunError) SetJobRunId(v string) *BatchStopJobRunError { type BatchStopJobRunInput struct { _ struct{} `type:"structure"` - // The name of the Job in question. + // The name of the job definition for which to stop job runs. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` - // A list of the JobRunIds that should be stopped for that Job. + // A list of the JobRunIds that should be stopped for that job definition. // // JobRunIds is a required field JobRunIds []*string `min:"1" type:"list" required:"true"` @@ -8447,10 +8474,10 @@ func (s *BatchStopJobRunOutput) SetSuccessfulSubmissions(v []*BatchStopJobRunSuc type BatchStopJobRunSuccessfulSubmission struct { _ struct{} `type:"structure"` - // The Name of the Job in question. + // The name of the job definition used in the job run that was stopped. JobName *string `min:"1" type:"string"` - // The JobRunId of the JobRun in question. + // The JobRunId of the job run that was stopped. JobRunId *string `min:"1" type:"string"` } @@ -8543,7 +8570,7 @@ type CatalogImportStatus struct { ImportCompleted *bool `type:"boolean"` // The time that the migration was started. - ImportTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ImportTime *time.Time `type:"timestamp"` // The name of the person who initiated the migration. ImportedBy *string `min:"1" type:"string"` @@ -8577,14 +8604,15 @@ func (s *CatalogImportStatus) SetImportedBy(v string) *CatalogImportStatus { return s } -// Classifiers are written in Python and triggered during a crawl task. You -// can write your own classifiers to best categorize your data sources and specify -// the appropriate schemas to use for them. A classifier checks whether a given -// file is in a format it can handle, and if it is, the classifier creates a -// schema in the form of a StructType object that matches that data format. +// Classifiers are triggered during a crawl task. A classifier checks whether +// a given file is in a format it can handle, and if it is, the classifier creates +// a schema in the form of a StructType object that matches that data format. // -// A classifier can be a grok classifier, an XML classifier, or a JSON classifier, -// asspecified in one of the fields in the Classifier object. +// You can use the standard classifiers that AWS Glue supplies, or you can write +// your own classifiers to best categorize your data sources and specify the +// appropriate schemas to use for them. A classifier can be a grok classifier, +// an XML classifier, or a JSON classifier, as specified in one of the fields +// in the Classifier object. type Classifier struct { _ struct{} `type:"structure"` @@ -8916,8 +8944,8 @@ type Condition struct { // A logical operator. LogicalOperator *string `type:"string" enum:"LogicalOperator"` - // The condition state. Currently, the values supported are SUCCEEDED, STOPPED - // and FAILED. + // The condition state. Currently, the values supported are SUCCEEDED, STOPPED, + // TIMEOUT and FAILED. State *string `type:"string" enum:"JobRunState"` } @@ -8974,7 +9002,7 @@ type Connection struct { ConnectionType *string `type:"string" enum:"ConnectionType"` // The time this connection definition was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Description of the connection. Description *string `type:"string"` @@ -8983,7 +9011,7 @@ type Connection struct { LastUpdatedBy *string `min:"1" type:"string"` // The last time this connection definition was updated. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // A list of criteria that can be used in selecting this connection. MatchCriteria []*string `type:"list"` @@ -9198,15 +9226,8 @@ type Crawler struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // If the crawler is running, contains the total time elapsed since the last @@ -9214,7 +9235,7 @@ type Crawler struct { CrawlElapsedTime *int64 `type:"long"` // The time when the crawler was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The database where metadata is written by this crawler. DatabaseName *string `type:"string"` @@ -9227,7 +9248,7 @@ type Crawler struct { LastCrawl *LastCrawlInfo `type:"structure"` // The time the crawler was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The crawler name. Name *string `min:"1" type:"string"` @@ -9453,6 +9474,9 @@ func (s *CrawlerMetrics) SetTimeLeftSeconds(v float64) *CrawlerMetrics { type CrawlerTargets struct { _ struct{} `type:"structure"` + // Specifies DynamoDB targets. + DynamoDBTargets []*DynamoDBTarget `type:"list"` + // Specifies JDBC targets. JdbcTargets []*JdbcTarget `type:"list"` @@ -9470,6 +9494,12 @@ func (s CrawlerTargets) GoString() string { return s.String() } +// SetDynamoDBTargets sets the DynamoDBTargets field's value. +func (s *CrawlerTargets) SetDynamoDBTargets(v []*DynamoDBTarget) *CrawlerTargets { + s.DynamoDBTargets = v + return s +} + // SetJdbcTargets sets the JdbcTargets field's value. func (s *CrawlerTargets) SetJdbcTargets(v []*JdbcTarget) *CrawlerTargets { s.JdbcTargets = v @@ -9636,20 +9666,13 @@ type CreateCrawlerInput struct { _ struct{} `type:"structure"` // A list of custom classifiers that the user has registered. By default, all - // AWS classifiers are included in a crawl, but these custom classifiers always - // override the default classifiers for a given classification. + // built-in classifiers are included in a crawl, but these custom classifiers + // always override the default classifiers for a given classification. Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The AWS Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*. @@ -9988,7 +10011,7 @@ type CreateDevEndpointOutput struct { AvailabilityZone *string `type:"string"` // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name assigned to the new DevEndpoint. EndpointName *string `type:"string"` @@ -10234,11 +10257,11 @@ type CreateJobInput struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of the job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed @@ -10251,15 +10274,21 @@ type CreateJobInput struct { // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` - // The name you assign to this job. It must be unique in your account. + // The name you assign to this job definition. It must be unique in your account. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // The name of the IAM role associated with this job. + // Specifies configuration properties of a job notification. + NotificationProperty *NotificationProperty `type:"structure"` + + // The name or ARN of the IAM role associated with this job. // // Role is a required field Role *string `type:"string" required:"true"` + + // The job timeout in minutes. The default is 2880 minutes (48 hours). + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -10287,6 +10316,14 @@ func (s *CreateJobInput) Validate() error { if s.Role == nil { invalidParams.Add(request.NewErrParamRequired("Role")) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.NotificationProperty != nil { + if err := s.NotificationProperty.Validate(); err != nil { + invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10348,16 +10385,28 @@ func (s *CreateJobInput) SetName(v string) *CreateJobInput { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *CreateJobInput) SetNotificationProperty(v *NotificationProperty) *CreateJobInput { + s.NotificationProperty = v + return s +} + // SetRole sets the Role field's value. func (s *CreateJobInput) SetRole(v string) *CreateJobInput { s.Role = &v return s } +// SetTimeout sets the Timeout field's value. +func (s *CreateJobInput) SetTimeout(v int64) *CreateJobInput { + s.Timeout = &v + return s +} + type CreateJobOutput struct { _ struct{} `type:"structure"` - // The unique name that was provided. + // The unique name that was provided for this job definition. Name *string `min:"1" type:"string"` } @@ -10759,6 +10808,10 @@ type CreateTriggerInput struct { // This field is required when the trigger type is SCHEDULED. Schedule *string `type:"string"` + // Set to true to start SCHEDULED and CONDITIONAL triggers when created. True + // not supported for ON_DEMAND triggers. + StartOnCreation *bool `type:"boolean"` + // The type of the new trigger. // // Type is a required field @@ -10842,6 +10895,12 @@ func (s *CreateTriggerInput) SetSchedule(v string) *CreateTriggerInput { return s } +// SetStartOnCreation sets the StartOnCreation field's value. +func (s *CreateTriggerInput) SetStartOnCreation(v bool) *CreateTriggerInput { + s.StartOnCreation = &v + return s +} + // SetType sets the Type field's value. func (s *CreateTriggerInput) SetType(v string) *CreateTriggerInput { s.Type = &v @@ -11033,7 +11092,7 @@ type Database struct { _ struct{} `type:"structure"` // The time at which the metadata database was created in the catalog. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // Description of the database. Description *string `type:"string"` @@ -11466,7 +11525,7 @@ func (s DeleteDevEndpointOutput) GoString() string { type DeleteJobInput struct { _ struct{} `type:"structure"` - // The name of the job to delete. + // The name of the job definition to delete. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -11507,7 +11566,7 @@ func (s *DeleteJobInput) SetJobName(v string) *DeleteJobInput { type DeleteJobOutput struct { _ struct{} `type:"structure"` - // The name of the job that was deleted. + // The name of the job definition that was deleted. JobName *string `min:"1" type:"string"` } @@ -11973,7 +12032,7 @@ type DevEndpoint struct { AvailabilityZone *string `type:"string"` // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the DevEndpoint. EndpointName *string `type:"string"` @@ -11998,7 +12057,7 @@ type DevEndpoint struct { FailureReason *string `type:"string"` // The point in time at which this DevEndpoint was last modified. - LastModifiedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimestamp *time.Time `type:"timestamp"` // The status of the last update. LastUpdateStatus *string `type:"string"` @@ -12204,6 +12263,30 @@ func (s *DevEndpointCustomLibraries) SetExtraPythonLibsS3Path(v string) *DevEndp return s } +// Specifies a DynamoDB table to crawl. +type DynamoDBTarget struct { + _ struct{} `type:"structure"` + + // The name of the DynamoDB table to crawl. + Path *string `type:"string"` +} + +// String returns the string representation +func (s DynamoDBTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DynamoDBTarget) GoString() string { + return s.String() +} + +// SetPath sets the Path field's value. +func (s *DynamoDBTarget) SetPath(v string) *DynamoDBTarget { + s.Path = &v + return s +} + // Contains details about an error. type ErrorDetail struct { _ struct{} `type:"structure"` @@ -12241,9 +12324,9 @@ func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail { type ExecutionProperty struct { _ struct{} `type:"structure"` - // The maximum number of concurrent runs allowed for a job. The default is 1. - // An error is returned when this threshold is reached. The maximum value you - // can specify is controlled by a service limit. + // The maximum number of concurrent runs allowed for the job. The default is + // 1. An error is returned when this threshold is reached. The maximum value + // you can specify is controlled by a service limit. MaxConcurrentRuns *int64 `type:"integer"` } @@ -13272,7 +13355,7 @@ func (s *GetDevEndpointsOutput) SetNextToken(v string) *GetDevEndpointsOutput { type GetJobInput struct { _ struct{} `type:"structure"` - // The name of the job to retrieve. + // The name of the job definition to retrieve. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13336,7 +13419,7 @@ func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { type GetJobRunInput struct { _ struct{} `type:"structure"` - // Name of the job being run. + // Name of the job definition being run. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13426,7 +13509,7 @@ func (s *GetJobRunOutput) SetJobRun(v *JobRun) *GetJobRunOutput { type GetJobRunsInput struct { _ struct{} `type:"structure"` - // The name of the job for which to retrieve all job runs. + // The name of the job definition for which to retrieve all job runs. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13565,10 +13648,10 @@ func (s *GetJobsInput) SetNextToken(v string) *GetJobsInput { type GetJobsOutput struct { _ struct{} `type:"structure"` - // A list of jobs. + // A list of job definitions. Jobs []*Job `type:"list"` - // A continuation token, if not all jobs have yet been returned. + // A continuation token, if not all job definitions have yet been returned. NextToken *string `type:"string"` } @@ -14915,7 +14998,7 @@ type GrokClassifier struct { Classification *string `type:"string" required:"true"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Optional custom grok patterns defined by this classifier. For more information, // see custom patterns in Writing Custom Classifers (http://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html). @@ -14928,7 +15011,7 @@ type GrokClassifier struct { GrokPattern *string `min:"1" type:"string" required:"true"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // @@ -15085,15 +15168,15 @@ func (s *JdbcTarget) SetPath(v string) *JdbcTarget { return s } -// Specifies a job. +// Specifies a job definition. type Job struct { _ struct{} `type:"structure"` - // The number of AWS Glue data processing units (DPUs) allocated to this Job. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). + // The number of AWS Glue data processing units (DPUs) allocated to runs of + // this job. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is + // a relative measure of processing power that consists of 4 vCPUs of compute + // capacity and 16 GB of memory. For more information, see the AWS Glue pricing + // page (https://aws.amazon.com/glue/pricing/). AllocatedCapacity *int64 `type:"integer"` // The JobCommand that executes this job. @@ -15102,8 +15185,8 @@ type Job struct { // The connections used for this job. Connections *ConnectionsList `type:"structure"` - // The time and date that this job specification was created. - CreatedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + // The time and date that this job definition was created. + CreatedOn *time.Time `type:"timestamp"` // The default arguments for this job, specified as name-value pairs. // @@ -15115,31 +15198,37 @@ type Job struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of this job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed // for this job. ExecutionProperty *ExecutionProperty `type:"structure"` - // The last point in time when this job specification was modified. - LastModifiedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + // The last point in time when this job definition was modified. + LastModifiedOn *time.Time `type:"timestamp"` // This field is reserved for future use. LogUri *string `type:"string"` - // The maximum number of times to retry this job if it fails. + // The maximum number of times to retry this job after a JobRun fails. MaxRetries *int64 `type:"integer"` - // The name you assign to this job. + // The name you assign to this job definition. Name *string `min:"1" type:"string"` - // The name of the IAM role associated with this job. + // Specifies configuration properties of a job notification. + NotificationProperty *NotificationProperty `type:"structure"` + + // The name or ARN of the IAM role associated with this job. Role *string `type:"string"` + + // The job timeout in minutes. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -15218,12 +15307,24 @@ func (s *Job) SetName(v string) *Job { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *Job) SetNotificationProperty(v *NotificationProperty) *Job { + s.NotificationProperty = v + return s +} + // SetRole sets the Role field's value. func (s *Job) SetRole(v string) *Job { s.Role = &v return s } +// SetTimeout sets the Timeout field's value. +func (s *Job) SetTimeout(v int64) *Job { + s.Timeout = &v + return s +} + // Defines a point which a job can resume processing. type JobBookmarkEntry struct { _ struct{} `type:"structure"` @@ -15284,7 +15385,7 @@ func (s *JobBookmarkEntry) SetVersion(v int64) *JobBookmarkEntry { return s } -// Specifies code that executes a job. +// Specifies code executed when a job is run. type JobCommand struct { _ struct{} `type:"structure"` @@ -15339,7 +15440,7 @@ type JobRun struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` @@ -15347,22 +15448,28 @@ type JobRun struct { Attempt *int64 `type:"integer"` // The date and time this job run completed. - CompletedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletedOn *time.Time `type:"timestamp"` // An error message associated with this job run. ErrorMessage *string `type:"string"` + // The amount of time (in seconds) that the job run consumed resources. + ExecutionTime *int64 `type:"integer"` + // The ID of this job run. Id *string `min:"1" type:"string"` - // The name of the job being run. + // The name of the job definition being used in this run. JobName *string `min:"1" type:"string"` // The current state of the job run. JobRunState *string `type:"string" enum:"JobRunState"` // The last time this job run was modified. - LastModifiedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedOn *time.Time `type:"timestamp"` + + // Specifies configuration properties of a job run notification. + NotificationProperty *NotificationProperty `type:"structure"` // A list of predecessors to this job run. PredecessorRuns []*Predecessor `type:"list"` @@ -15372,7 +15479,10 @@ type JobRun struct { PreviousRunId *string `min:"1" type:"string"` // The date and time at which this job run was started. - StartedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + StartedOn *time.Time `type:"timestamp"` + + // The job run timeout in minutes. + Timeout *int64 `min:"1" type:"integer"` // The name of the trigger that started this job run. TriggerName *string `min:"1" type:"string"` @@ -15418,6 +15528,12 @@ func (s *JobRun) SetErrorMessage(v string) *JobRun { return s } +// SetExecutionTime sets the ExecutionTime field's value. +func (s *JobRun) SetExecutionTime(v int64) *JobRun { + s.ExecutionTime = &v + return s +} + // SetId sets the Id field's value. func (s *JobRun) SetId(v string) *JobRun { s.Id = &v @@ -15442,6 +15558,12 @@ func (s *JobRun) SetLastModifiedOn(v time.Time) *JobRun { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *JobRun) SetNotificationProperty(v *NotificationProperty) *JobRun { + s.NotificationProperty = v + return s +} + // SetPredecessorRuns sets the PredecessorRuns field's value. func (s *JobRun) SetPredecessorRuns(v []*Predecessor) *JobRun { s.PredecessorRuns = v @@ -15460,14 +15582,20 @@ func (s *JobRun) SetStartedOn(v time.Time) *JobRun { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobRun) SetTimeout(v int64) *JobRun { + s.Timeout = &v + return s +} + // SetTriggerName sets the TriggerName field's value. func (s *JobRun) SetTriggerName(v string) *JobRun { s.TriggerName = &v return s } -// Specifies information used to update an existing job. Note that the previous -// job definition will be completely overwritten by this information. +// Specifies information used to update an existing job definition. Note that +// the previous job definition will be completely overwritten by this information. type JobUpdate struct { _ struct{} `type:"structure"` @@ -15494,11 +15622,11 @@ type JobUpdate struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of the job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed @@ -15511,8 +15639,14 @@ type JobUpdate struct { // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` - // The name of the IAM role associated with this job (required). + // Specifies configuration properties of a job notification. + NotificationProperty *NotificationProperty `type:"structure"` + + // The name or ARN of the IAM role associated with this job (required). Role *string `type:"string"` + + // The job timeout in minutes. The default is 2880 minutes (48 hours). + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -15525,6 +15659,24 @@ func (s JobUpdate) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *JobUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JobUpdate"} + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.NotificationProperty != nil { + if err := s.NotificationProperty.Validate(); err != nil { + invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAllocatedCapacity sets the AllocatedCapacity field's value. func (s *JobUpdate) SetAllocatedCapacity(v int64) *JobUpdate { s.AllocatedCapacity = &v @@ -15573,18 +15725,30 @@ func (s *JobUpdate) SetMaxRetries(v int64) *JobUpdate { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *JobUpdate) SetNotificationProperty(v *NotificationProperty) *JobUpdate { + s.NotificationProperty = v + return s +} + // SetRole sets the Role field's value. func (s *JobUpdate) SetRole(v string) *JobUpdate { s.Role = &v return s } +// SetTimeout sets the Timeout field's value. +func (s *JobUpdate) SetTimeout(v int64) *JobUpdate { + s.Timeout = &v + return s +} + // A classifier for JSON content. type JsonClassifier struct { _ struct{} `type:"structure"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // A JsonPath string defining the JSON data for the classifier to classify. // AWS Glue supports a subset of JsonPath, as described in Writing JsonPath @@ -15594,7 +15758,7 @@ type JsonClassifier struct { JsonPath *string `type:"string" required:"true"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // @@ -15662,7 +15826,7 @@ type LastCrawlInfo struct { MessagePrefix *string `min:"1" type:"string"` // The time at which the crawl started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Status of the last crawl. Status *string `type:"string" enum:"LastCrawlStatus"` @@ -15718,6 +15882,9 @@ func (s *LastCrawlInfo) SetStatus(v string) *LastCrawlInfo { type Location struct { _ struct{} `type:"structure"` + // A DynamoDB Table location. + DynamoDB []*CodeGenNodeArg `type:"list"` + // A JDBC location. Jdbc []*CodeGenNodeArg `type:"list"` @@ -15738,6 +15905,16 @@ func (s Location) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *Location) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Location"} + if s.DynamoDB != nil { + for i, v := range s.DynamoDB { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DynamoDB", i), err.(request.ErrInvalidParams)) + } + } + } if s.Jdbc != nil { for i, v := range s.Jdbc { if v == nil { @@ -15765,6 +15942,12 @@ func (s *Location) Validate() error { return nil } +// SetDynamoDB sets the DynamoDB field's value. +func (s *Location) SetDynamoDB(v []*CodeGenNodeArg) *Location { + s.DynamoDB = v + return s +} + // SetJdbc sets the Jdbc field's value. func (s *Location) SetJdbc(v []*CodeGenNodeArg) *Location { s.Jdbc = v @@ -15846,6 +16029,44 @@ func (s *MappingEntry) SetTargetType(v string) *MappingEntry { return s } +// Specifies configuration properties of a notification. +type NotificationProperty struct { + _ struct{} `type:"structure"` + + // After a job run starts, the number of minutes to wait before sending a job + // run delay notification. + NotifyDelayAfter *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s NotificationProperty) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotificationProperty) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotificationProperty) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotificationProperty"} + if s.NotifyDelayAfter != nil && *s.NotifyDelayAfter < 1 { + invalidParams.Add(request.NewErrParamMinValue("NotifyDelayAfter", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotifyDelayAfter sets the NotifyDelayAfter field's value. +func (s *NotificationProperty) SetNotifyDelayAfter(v int64) *NotificationProperty { + s.NotifyDelayAfter = &v + return s +} + // Specifies the sort order of a sorted column. type Order struct { _ struct{} `type:"structure"` @@ -15908,16 +16129,16 @@ type Partition struct { _ struct{} `type:"structure"` // The time at which the partition was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The name of the catalog database where the table in question is located. DatabaseName *string `min:"1" type:"string"` // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Partition parameters, in the form of a list of key-value pairs. Parameters map[string]*string `type:"map"` @@ -16028,10 +16249,10 @@ type PartitionInput struct { _ struct{} `type:"structure"` // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Partition parameters, in the form of a list of key-value pairs. Parameters map[string]*string `type:"map"` @@ -16200,7 +16421,7 @@ func (s *PhysicalConnectionRequirements) SetSubnetId(v string) *PhysicalConnecti type Predecessor struct { _ struct{} `type:"structure"` - // The name of the predecessor job. + // The name of the job definition used by the predecessor job run. JobName *string `min:"1" type:"string"` // The job-run ID of the predecessor job run. @@ -16236,7 +16457,8 @@ type Predicate struct { // A list of the conditions that determine when the trigger will fire. Conditions []*Condition `type:"list"` - // Currently "OR" is not supported. + // Optional field if only one condition is listed. If multiple conditions are + // listed, then this field is required. Logical *string `type:"string" enum:"Logical"` } @@ -16774,7 +16996,7 @@ type StartJobRunInput struct { AllocatedCapacity *int64 `type:"integer"` // The job arguments specifically for this run. They override the equivalent - // default arguments set for the job itself. + // default arguments set for in the job definition itself. // // You can specify arguments here that your own job-execution script consumes, // as well as arguments that AWS Glue itself consumes. @@ -16784,17 +17006,23 @@ type StartJobRunInput struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` - // The name of the job to start. + // The name of the job definition to use. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` // The ID of a previous JobRun to retry. JobRunId *string `min:"1" type:"string"` + + // Specifies configuration properties of a job run notification. + NotificationProperty *NotificationProperty `type:"structure"` + + // The job run timeout in minutes. It overrides the timeout value of the job. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -16819,6 +17047,14 @@ func (s *StartJobRunInput) Validate() error { if s.JobRunId != nil && len(*s.JobRunId) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobRunId", 1)) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + if s.NotificationProperty != nil { + if err := s.NotificationProperty.Validate(); err != nil { + invalidParams.AddNested("NotificationProperty", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -16850,6 +17086,18 @@ func (s *StartJobRunInput) SetJobRunId(v string) *StartJobRunInput { return s } +// SetNotificationProperty sets the NotificationProperty field's value. +func (s *StartJobRunInput) SetNotificationProperty(v *NotificationProperty) *StartJobRunInput { + s.NotificationProperty = v + return s +} + +// SetTimeout sets the Timeout field's value. +func (s *StartJobRunInput) SetTimeout(v int64) *StartJobRunInput { + s.Timeout = &v + return s +} + type StartJobRunOutput struct { _ struct{} `type:"structure"` @@ -17280,7 +17528,7 @@ type Table struct { _ struct{} `type:"structure"` // Time when the table definition was created in the Data Catalog. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // Person or entity who created the table. CreatedBy *string `min:"1" type:"string"` @@ -17294,10 +17542,10 @@ type Table struct { // Last time the table was accessed. This is usually taken from HDFS, and may // not be reliable. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Name of the table. For Hive compatibility, this must be entirely lowercase. // @@ -17325,7 +17573,7 @@ type Table struct { TableType *string `type:"string"` // Last time the table was updated. - UpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdateTime *time.Time `type:"timestamp"` // If the table is a view, the expanded text of the view; otherwise null. ViewExpandedText *string `type:"string"` @@ -17481,10 +17729,10 @@ type TableInput struct { Description *string `type:"string"` // Last time the table was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Name of the table. For Hive compatibility, this is folded to lowercase when // it is stored. @@ -18063,20 +18311,13 @@ type UpdateCrawlerInput struct { _ struct{} `type:"structure"` // A list of custom classifiers that the user has registered. By default, all - // classifiers are included in a crawl, but these custom classifiers always - // override the default classifiers for a given classification. + // built-in classifiers are included in a crawl, but these custom classifiers + // always override the default classifiers for a given classification. Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The AWS Glue database where results are stored, such as: arn:aws:daylight:us-east-1::database/sometable/*. @@ -18527,7 +18768,7 @@ type UpdateJobInput struct { // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` - // Specifies the values with which to update the job. + // Specifies the values with which to update the job definition. // // JobUpdate is a required field JobUpdate *JobUpdate `type:"structure" required:"true"` @@ -18555,6 +18796,11 @@ func (s *UpdateJobInput) Validate() error { if s.JobUpdate == nil { invalidParams.Add(request.NewErrParamRequired("JobUpdate")) } + if s.JobUpdate != nil { + if err := s.JobUpdate.Validate(); err != nil { + invalidParams.AddNested("JobUpdate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -18577,7 +18823,7 @@ func (s *UpdateJobInput) SetJobUpdate(v *JobUpdate) *UpdateJobInput { type UpdateJobOutput struct { _ struct{} `type:"structure"` - // Returns the name of the updated job. + // Returns the name of the updated job definition. JobName *string `min:"1" type:"string"` } @@ -19126,7 +19372,7 @@ type UserDefinedFunction struct { ClassName *string `min:"1" type:"string"` // The time at which the function was created. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // The name of the function. FunctionName *string `min:"1" type:"string"` @@ -19286,10 +19532,10 @@ type XMLClassifier struct { Classification *string `type:"string" required:"true"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // @@ -19436,6 +19682,9 @@ const ( // JobRunStateFailed is a JobRunState enum value JobRunStateFailed = "FAILED" + + // JobRunStateTimeout is a JobRunState enum value + JobRunStateTimeout = "TIMEOUT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go b/vendor/github.com/aws/aws-sdk-go/service/glue/service.go index 5e017698a..075b0a1df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "glue" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "glue" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Glue" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Glue client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index 0273d17d1..b8cc0dc00 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -3,6 +3,8 @@ package guardduty 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" @@ -256,6 +258,88 @@ func (c *GuardDuty) CreateDetectorWithContext(ctx aws.Context, input *CreateDete return out, req.Send() } +const opCreateFilter = "CreateFilter" + +// CreateFilterRequest generates a "aws/request.Request" representing the +// client's request for the CreateFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateFilter for more information on using the CreateFilter +// 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 CreateFilterRequest method. +// req, resp := client.CreateFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter +func (c *GuardDuty) CreateFilterRequest(input *CreateFilterInput) (req *request.Request, output *CreateFilterOutput) { + op := &request.Operation{ + Name: opCreateFilter, + HTTPMethod: "POST", + HTTPPath: "/detector/{detectorId}/filter", + } + + if input == nil { + input = &CreateFilterInput{} + } + + output = &CreateFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFilter API operation for Amazon GuardDuty. +// +// Creates a filter using the specified finding criteria. +// +// 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 GuardDuty's +// API operation CreateFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter +func (c *GuardDuty) CreateFilter(input *CreateFilterInput) (*CreateFilterOutput, error) { + req, out := c.CreateFilterRequest(input) + return out, req.Send() +} + +// CreateFilterWithContext is the same as CreateFilter with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFilter 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 *GuardDuty) CreateFilterWithContext(ctx aws.Context, input *CreateFilterInput, opts ...request.Option) (*CreateFilterOutput, error) { + req, out := c.CreateFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the @@ -755,6 +839,88 @@ func (c *GuardDuty) DeleteDetectorWithContext(ctx aws.Context, input *DeleteDete return out, req.Send() } +const opDeleteFilter = "DeleteFilter" + +// DeleteFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteFilter for more information on using the DeleteFilter +// 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 DeleteFilterRequest method. +// req, resp := client.DeleteFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter +func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request.Request, output *DeleteFilterOutput) { + op := &request.Operation{ + Name: opDeleteFilter, + HTTPMethod: "DELETE", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &DeleteFilterInput{} + } + + output = &DeleteFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFilter API operation for Amazon GuardDuty. +// +// Deletes the filter specified by the filter name. +// +// 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 GuardDuty's +// API operation DeleteFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter +func (c *GuardDuty) DeleteFilter(input *DeleteFilterInput) (*DeleteFilterOutput, error) { + req, out := c.DeleteFilterRequest(input) + return out, req.Send() +} + +// DeleteFilterWithContext is the same as DeleteFilter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFilter 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 *GuardDuty) DeleteFilterWithContext(ctx aws.Context, input *DeleteFilterInput, opts ...request.Option) (*DeleteFilterOutput, error) { + req, out := c.DeleteFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the @@ -1332,6 +1498,88 @@ func (c *GuardDuty) GetDetectorWithContext(ctx aws.Context, input *GetDetectorIn return out, req.Send() } +const opGetFilter = "GetFilter" + +// GetFilterRequest generates a "aws/request.Request" representing the +// client's request for the GetFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetFilter for more information on using the GetFilter +// 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 GetFilterRequest method. +// req, resp := client.GetFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter +func (c *GuardDuty) GetFilterRequest(input *GetFilterInput) (req *request.Request, output *GetFilterOutput) { + op := &request.Operation{ + Name: opGetFilter, + HTTPMethod: "GET", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &GetFilterInput{} + } + + output = &GetFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFilter API operation for Amazon GuardDuty. +// +// Returns the details of the filter specified by the filter name. +// +// 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 GuardDuty's +// API operation GetFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter +func (c *GuardDuty) GetFilter(input *GetFilterInput) (*GetFilterOutput, error) { + req, out := c.GetFilterRequest(input) + return out, req.Send() +} + +// GetFilterWithContext is the same as GetFilter with the addition of +// the ability to pass a context and additional request options. +// +// See GetFilter 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 *GuardDuty) GetFilterWithContext(ctx aws.Context, input *GetFilterInput, opts ...request.Option) (*GetFilterOutput, error) { + req, out := c.GetFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetFindings = "GetFindings" // GetFindingsRequest generates a "aws/request.Request" representing the @@ -2132,6 +2380,144 @@ func (c *GuardDuty) ListDetectorsPagesWithContext(ctx aws.Context, input *ListDe return p.Err() } +const opListFilters = "ListFilters" + +// ListFiltersRequest generates a "aws/request.Request" representing the +// client's request for the ListFilters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListFilters for more information on using the ListFilters +// 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 ListFiltersRequest method. +// req, resp := client.ListFiltersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters +func (c *GuardDuty) ListFiltersRequest(input *ListFiltersInput) (req *request.Request, output *ListFiltersOutput) { + op := &request.Operation{ + Name: opListFilters, + HTTPMethod: "GET", + HTTPPath: "/detector/{detectorId}/filter", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListFiltersInput{} + } + + output = &ListFiltersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFilters API operation for Amazon GuardDuty. +// +// Returns a paginated list of the current filters. +// +// 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 GuardDuty's +// API operation ListFilters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters +func (c *GuardDuty) ListFilters(input *ListFiltersInput) (*ListFiltersOutput, error) { + req, out := c.ListFiltersRequest(input) + return out, req.Send() +} + +// ListFiltersWithContext is the same as ListFilters with the addition of +// the ability to pass a context and additional request options. +// +// See ListFilters 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 *GuardDuty) ListFiltersWithContext(ctx aws.Context, input *ListFiltersInput, opts ...request.Option) (*ListFiltersOutput, error) { + req, out := c.ListFiltersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListFiltersPages iterates over the pages of a ListFilters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListFilters 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 ListFilters operation. +// pageNum := 0 +// err := client.ListFiltersPages(params, +// func(page *ListFiltersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *GuardDuty) ListFiltersPages(input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool) error { + return c.ListFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListFiltersPagesWithContext same as ListFiltersPages 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 *GuardDuty) ListFiltersPagesWithContext(ctx aws.Context, input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListFiltersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListFiltersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListFiltersOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the @@ -2955,7 +3341,7 @@ func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInp // // Disables GuardDuty from monitoring findings of the member accounts specified // by the account IDs. After running this command, a master GuardDuty account -// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members' +// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members’ // findings. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3158,6 +3544,88 @@ func (c *GuardDuty) UpdateDetectorWithContext(ctx aws.Context, input *UpdateDete return out, req.Send() } +const opUpdateFilter = "UpdateFilter" + +// UpdateFilterRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateFilter for more information on using the UpdateFilter +// 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 UpdateFilterRequest method. +// req, resp := client.UpdateFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter +func (c *GuardDuty) UpdateFilterRequest(input *UpdateFilterInput) (req *request.Request, output *UpdateFilterOutput) { + op := &request.Operation{ + Name: opUpdateFilter, + HTTPMethod: "POST", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &UpdateFilterInput{} + } + + output = &UpdateFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFilter API operation for Amazon GuardDuty. +// +// Updates the filter specified by the filter name. +// +// 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 GuardDuty's +// API operation UpdateFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter +func (c *GuardDuty) UpdateFilter(input *UpdateFilterInput) (*UpdateFilterOutput, error) { + req, out := c.UpdateFilterRequest(input) + return out, req.Send() +} + +// UpdateFilterWithContext is the same as UpdateFilter with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFilter 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 *GuardDuty) UpdateFilterWithContext(ctx aws.Context, input *UpdateFilterInput, opts ...request.Option) (*UpdateFilterOutput, error) { + req, out := c.UpdateFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateFindingsFeedback = "UpdateFindingsFeedback" // UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the @@ -3530,10 +3998,14 @@ type AccountDetail struct { _ struct{} `type:"structure"` // Member account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // Member account's email address. - Email *string `locationName:"email" type:"string"` + // + // Email is a required field + Email *string `locationName:"email" type:"string" required:"true"` } // String returns the string representation @@ -3546,6 +4018,22 @@ func (s AccountDetail) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccountDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccountDetail"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.Email == nil { + invalidParams.Add(request.NewErrParamRequired("Email")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountId sets the AccountId field's value. func (s *AccountDetail) SetAccountId(v string) *AccountDetail { s.AccountId = &v @@ -3919,6 +4407,123 @@ func (s *CreateDetectorOutput) SetDetectorId(v string) *CreateDetectorOutput { return s } +// CreateFilter request object. +type CreateFilterInput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s CreateFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *CreateFilterInput) SetAction(v string) *CreateFilterInput { + s.Action = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateFilterInput) SetClientToken(v string) *CreateFilterInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateFilterInput) SetDescription(v string) *CreateFilterInput { + s.Description = &v + return s +} + +// SetDetectorId sets the DetectorId field's value. +func (s *CreateFilterInput) SetDetectorId(v string) *CreateFilterInput { + s.DetectorId = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *CreateFilterInput) SetFindingCriteria(v *FindingCriteria) *CreateFilterInput { + s.FindingCriteria = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFilterInput) SetName(v string) *CreateFilterInput { + s.Name = &v + return s +} + +// SetRank sets the Rank field's value. +func (s *CreateFilterInput) SetRank(v int64) *CreateFilterInput { + s.Rank = &v + return s +} + +// CreateFilter response object. +type CreateFilterOutput struct { + _ struct{} `type:"structure"` + + // The name of the successfully created filter. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s CreateFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFilterOutput) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *CreateFilterOutput) SetName(v string) *CreateFilterOutput { + s.Name = &v + return s +} + // Create IP Set Request type CreateIPSetInput struct { _ struct{} `type:"structure"` @@ -4047,6 +4652,16 @@ func (s *CreateMembersInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.AccountDetails != nil { + for i, v := range s.AccountDetails { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountDetails", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4350,6 +4965,68 @@ func (s DeleteDetectorOutput) GoString() string { return s.String() } +type DeleteFilterInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *DeleteFilterInput) SetDetectorId(v string) *DeleteFilterInput { + s.DetectorId = &v + return s +} + +// SetFilterName sets the FilterName field's value. +func (s *DeleteFilterInput) SetFilterName(v string) *DeleteFilterInput { + s.FilterName = &v + return s +} + +type DeleteFilterOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFilterOutput) GoString() string { + return s.String() +} + type DeleteIPSetInput struct { _ struct{} `type:"structure"` @@ -4762,51 +5439,71 @@ type Finding struct { // AWS account ID where the activity occurred that prompted GuardDuty to generate // a finding. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // The ARN of a finding described by the action. - Arn *string `locationName:"arn" type:"string"` + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` // The confidence level of a finding. Confidence *float64 `locationName:"confidence" type:"double"` // The time stamp at which a finding was generated. - CreatedAt *string `locationName:"createdAt" type:"string"` + // + // CreatedAt is a required field + CreatedAt *string `locationName:"createdAt" type:"string" required:"true"` // The description of a finding. Description *string `locationName:"description" type:"string"` // The identifier that corresponds to a finding described by the action. - Id *string `locationName:"id" type:"string"` + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` // The AWS resource partition. Partition *string `locationName:"partition" type:"string"` // The AWS region where the activity occurred that prompted GuardDuty to generate // a finding. - Region *string `locationName:"region" type:"string"` + // + // Region is a required field + Region *string `locationName:"region" type:"string" required:"true"` // The AWS resource associated with the activity that prompted GuardDuty to // generate a finding. - Resource *Resource `locationName:"resource" type:"structure"` + // + // Resource is a required field + Resource *Resource `locationName:"resource" type:"structure" required:"true"` // Findings' schema version. - SchemaVersion *string `locationName:"schemaVersion" type:"string"` + // + // SchemaVersion is a required field + SchemaVersion *string `locationName:"schemaVersion" type:"string" required:"true"` // Additional information assigned to the generated finding by GuardDuty. Service *Service `locationName:"service" type:"structure"` // The severity of a finding. - Severity *float64 `locationName:"severity" type:"double"` + // + // Severity is a required field + Severity *float64 `locationName:"severity" type:"double" required:"true"` // The title of a finding. Title *string `locationName:"title" type:"string"` // The type of a finding described by the action. - Type *string `locationName:"type" type:"string"` + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true"` // The time stamp at which a finding was last updated. - UpdatedAt *string `locationName:"updatedAt" type:"string"` + // + // UpdatedAt is a required field + UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` } // String returns the string representation @@ -5078,6 +5775,116 @@ func (s *GetDetectorOutput) SetUpdatedAt(v string) *GetDetectorOutput { return s } +type GetFilterInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *GetFilterInput) SetDetectorId(v string) *GetFilterInput { + s.DetectorId = &v + return s +} + +// SetFilterName sets the FilterName field's value. +func (s *GetFilterInput) SetFilterName(v string) *GetFilterInput { + s.FilterName = &v + return s +} + +// GetFilter response object. +type GetFilterOutput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s GetFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFilterOutput) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *GetFilterOutput) SetAction(v string) *GetFilterOutput { + s.Action = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetFilterOutput) SetDescription(v string) *GetFilterOutput { + s.Description = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *GetFilterOutput) SetFindingCriteria(v *FindingCriteria) *GetFilterOutput { + s.FindingCriteria = v + return s +} + +// SetName sets the Name field's value. +func (s *GetFilterOutput) SetName(v string) *GetFilterOutput { + s.Name = &v + return s +} + +// SetRank sets the Rank field's value. +func (s *GetFilterOutput) SetRank(v int64) *GetFilterOutput { + s.Rank = &v + return s +} + // Get Findings Request type GetFindingsInput struct { _ struct{} `type:"structure"` @@ -5659,6 +6466,9 @@ type InstanceDetails struct { // The profile information of the EC2 instance. IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` + // The image description of the EC2 instance. + ImageDescription *string `locationName:"imageDescription" type:"string"` + // The image ID of the EC2 instance. ImageId *string `locationName:"imageId" type:"string"` @@ -5709,6 +6519,12 @@ func (s *InstanceDetails) SetIamInstanceProfile(v *IamInstanceProfile) *Instance return s } +// SetImageDescription sets the ImageDescription field's value. +func (s *InstanceDetails) SetImageDescription(v string) *InstanceDetails { + s.ImageDescription = &v + return s +} + // SetImageId sets the ImageId field's value. func (s *InstanceDetails) SetImageId(v string) *InstanceDetails { s.ImageId = &v @@ -5825,7 +6641,11 @@ type InviteMembersInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - // The invitation message that you want to send to the accounts that you're + // A boolean value that specifies whether you want to disable email notification + // to the accounts that you’re inviting to GuardDuty as members. + DisableEmailNotification *bool `locationName:"disableEmailNotification" type:"boolean"` + + // The invitation message that you want to send to the accounts that you’re // inviting to GuardDuty as members. Message *string `locationName:"message" type:"string"` } @@ -5865,6 +6685,12 @@ func (s *InviteMembersInput) SetDetectorId(v string) *InviteMembersInput { return s } +// SetDisableEmailNotification sets the DisableEmailNotification field's value. +func (s *InviteMembersInput) SetDisableEmailNotification(v bool) *InviteMembersInput { + s.DisableEmailNotification = &v + return s +} + // SetMessage sets the Message field's value. func (s *InviteMembersInput) SetMessage(v string) *InviteMembersInput { s.Message = &v @@ -5977,6 +6803,99 @@ func (s *ListDetectorsOutput) SetNextToken(v string) *ListDetectorsOutput { return s } +type ListFiltersInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // You can use this parameter to indicate the maximum number of items that you + // want in the response. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFiltersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFiltersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFiltersInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *ListFiltersInput) SetDetectorId(v string) *ListFiltersInput { + s.DetectorId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFiltersInput) SetMaxResults(v int64) *ListFiltersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFiltersInput) SetNextToken(v string) *ListFiltersInput { + s.NextToken = &v + return s +} + +// ListFilters response object. +type ListFiltersOutput struct { + _ struct{} `type:"structure"` + + // A list of filter names + FilterNames []*string `locationName:"filterNames" type:"list"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the list action. For subsequent calls + // to the action fill nextToken in the request with the value of NextToken from + // the previous response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFiltersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFiltersOutput) GoString() string { + return s.String() +} + +// SetFilterNames sets the FilterNames field's value. +func (s *ListFiltersOutput) SetFilterNames(v []*string) *ListFiltersOutput { + s.FilterNames = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFiltersOutput) SetNextToken(v string) *ListFiltersOutput { + s.NextToken = &v + return s +} + // List Findings Request type ListFindingsInput struct { _ struct{} `type:"structure"` @@ -6550,25 +7469,35 @@ type Member struct { _ struct{} `type:"structure"` // AWS account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // The unique identifier for a detector. DetectorId *string `locationName:"detectorId" type:"string"` // Member account's email address. - Email *string `locationName:"email" type:"string"` + // + // Email is a required field + Email *string `locationName:"email" type:"string" required:"true"` // Timestamp at which the invitation was sent InvitedAt *string `locationName:"invitedAt" type:"string"` // The master account ID. - MasterId *string `locationName:"masterId" type:"string"` + // + // MasterId is a required field + MasterId *string `locationName:"masterId" type:"string" required:"true"` // The status of the relationship between the member and the master. - RelationshipStatus *string `locationName:"relationshipStatus" type:"string"` + // + // RelationshipStatus is a required field + RelationshipStatus *string `locationName:"relationshipStatus" type:"string" required:"true"` // The first time a resource was created. The format will be ISO-8601. - UpdatedAt *string `locationName:"updatedAt" type:"string"` + // + // UpdatedAt is a required field + UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` } // String returns the string representation @@ -6699,6 +7628,9 @@ type NetworkInterface struct { // A list of EC2 instance IPv6 address information. Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` + // The ID of the network interface + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // Private DNS name of the EC2 instance. PrivateDnsName *string `locationName:"privateDnsName" type:"string"` @@ -6740,6 +7672,12 @@ func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { return s } +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { + s.NetworkInterfaceId = &v + return s +} + // SetPrivateDnsName sets the PrivateDnsName field's value. func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { s.PrivateDnsName = &v @@ -7517,10 +8455,14 @@ type UnprocessedAccount struct { _ struct{} `type:"structure"` // AWS Account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // A reason why the account hasn't been processed. - Result *string `locationName:"result" type:"string"` + // + // Result is a required field + Result *string `locationName:"result" type:"string" required:"true"` } // String returns the string representation @@ -7606,6 +8548,117 @@ func (s UpdateDetectorOutput) GoString() string { return s.String() } +// UpdateFilter request object. +type UpdateFilterInput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s UpdateFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *UpdateFilterInput) SetAction(v string) *UpdateFilterInput { + s.Action = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateFilterInput) SetDescription(v string) *UpdateFilterInput { + s.Description = &v + return s +} + +// SetDetectorId sets the DetectorId field's value. +func (s *UpdateFilterInput) SetDetectorId(v string) *UpdateFilterInput { + s.DetectorId = &v + return s +} + +// SetFilterName sets the FilterName field's value. +func (s *UpdateFilterInput) SetFilterName(v string) *UpdateFilterInput { + s.FilterName = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *UpdateFilterInput) SetFindingCriteria(v *FindingCriteria) *UpdateFilterInput { + s.FindingCriteria = v + return s +} + +// SetRank sets the Rank field's value. +func (s *UpdateFilterInput) SetRank(v int64) *UpdateFilterInput { + s.Rank = &v + return s +} + +// UpdateFilter response object. +type UpdateFilterOutput struct { + _ struct{} `type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s UpdateFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFilterOutput) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *UpdateFilterOutput) SetName(v string) *UpdateFilterOutput { + s.Name = &v + return s +} + // Update findings feedback body type UpdateFindingsFeedbackInput struct { _ struct{} `type:"structure"` @@ -7884,6 +8937,15 @@ const ( FeedbackNotUseful = "NOT_USEFUL" ) +// The action associated with a filter. +const ( + // FilterActionNoop is a FilterAction enum value + FilterActionNoop = "NOOP" + + // FilterActionArchive is a FilterAction enum value + FilterActionArchive = "ARCHIVE" +) + // The types of finding statistics. const ( // FindingStatisticTypeCountBySeverity is a FindingStatisticType enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go index 54c24d4f7..0ca09946c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "guardduty" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "guardduty" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "GuardDuty" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the GuardDuty client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 81bab06bf..875df512f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -3378,6 +3378,102 @@ func (c *IAM) DeleteRoleWithContext(ctx aws.Context, input *DeleteRoleInput, opt return out, req.Send() } +const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" + +// DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRolePermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteRolePermissionsBoundary for more information on using the DeleteRolePermissionsBoundary +// 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 DeleteRolePermissionsBoundaryRequest method. +// req, resp := client.DeleteRolePermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary +func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsBoundaryInput) (req *request.Request, output *DeleteRolePermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opDeleteRolePermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRolePermissionsBoundaryInput{} + } + + output = &DeleteRolePermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRolePermissionsBoundary API operation for AWS Identity and Access Management. +// +// Deletes the permissions boundary for the specified IAM role. +// +// Deleting the permissions boundary for a role might increase its permissions +// by allowing anyone who assumes the role to perform all the actions granted +// in its permissions policies. +// +// 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 Identity and Access Management's +// API operation DeleteRolePermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" +// The request was rejected because only the service that depends on the service-linked +// role can modify or delete the role on your behalf. The error message includes +// the name of the service that depends on this service-linked role. You must +// request the change through that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary +func (c *IAM) DeleteRolePermissionsBoundary(input *DeleteRolePermissionsBoundaryInput) (*DeleteRolePermissionsBoundaryOutput, error) { + req, out := c.DeleteRolePermissionsBoundaryRequest(input) + return out, req.Send() +} + +// DeleteRolePermissionsBoundaryWithContext is the same as DeleteRolePermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRolePermissionsBoundary 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 *IAM) DeleteRolePermissionsBoundaryWithContext(ctx aws.Context, input *DeleteRolePermissionsBoundaryInput, opts ...request.Option) (*DeleteRolePermissionsBoundaryOutput, error) { + req, out := c.DeleteRolePermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRolePolicy = "DeleteRolePolicy" // DeleteRolePolicyRequest generates a "aws/request.Request" representing the @@ -4158,6 +4254,96 @@ func (c *IAM) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opt return out, req.Send() } +const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" + +// DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteUserPermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteUserPermissionsBoundary for more information on using the DeleteUserPermissionsBoundary +// 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 DeleteUserPermissionsBoundaryRequest method. +// req, resp := client.DeleteUserPermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary +func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsBoundaryInput) (req *request.Request, output *DeleteUserPermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opDeleteUserPermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteUserPermissionsBoundaryInput{} + } + + output = &DeleteUserPermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteUserPermissionsBoundary API operation for AWS Identity and Access Management. +// +// Deletes the permissions boundary for the specified IAM user. +// +// Deleting the permissions boundary for a user might increase its permissions +// by allowing the user to perform all the actions granted in its permissions +// policies. +// +// 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 Identity and Access Management's +// API operation DeleteUserPermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary +func (c *IAM) DeleteUserPermissionsBoundary(input *DeleteUserPermissionsBoundaryInput) (*DeleteUserPermissionsBoundaryOutput, error) { + req, out := c.DeleteUserPermissionsBoundaryRequest(input) + return out, req.Send() +} + +// DeleteUserPermissionsBoundaryWithContext is the same as DeleteUserPermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUserPermissionsBoundary 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 *IAM) DeleteUserPermissionsBoundaryWithContext(ctx aws.Context, input *DeleteUserPermissionsBoundaryInput, opts ...request.Option) (*DeleteUserPermissionsBoundaryOutput, error) { + req, out := c.DeleteUserPermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteUserPolicy = "DeleteUserPolicy" // DeleteUserPolicyRequest generates a "aws/request.Request" representing the @@ -10572,6 +10758,118 @@ func (c *IAM) PutGroupPolicyWithContext(ctx aws.Context, input *PutGroupPolicyIn return out, req.Send() } +const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" + +// PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the PutRolePermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutRolePermissionsBoundary for more information on using the PutRolePermissionsBoundary +// 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 PutRolePermissionsBoundaryRequest method. +// req, resp := client.PutRolePermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary +func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundaryInput) (req *request.Request, output *PutRolePermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opPutRolePermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRolePermissionsBoundaryInput{} + } + + output = &PutRolePermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutRolePermissionsBoundary API operation for AWS Identity and Access Management. +// +// Adds or updates the policy that is specified as the IAM role's permissions +// boundary. You can use an AWS managed policy or a customer managed policy +// to set the boundary for a role. Use the boundary to control the maximum permissions +// that the role can have. Setting a permissions boundary is an advanced feature +// that can affect the permissions for the role. +// +// You cannot set the boundary for a service-linked role. +// +// Policies used as permissions boundaries do not provide permissions. You must +// also attach a permissions policy to the role. To learn how the effective +// permissions for a role are evaluated, see IAM JSON Policy Evaluation Logic +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User 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 AWS Identity and Access Management's +// API operation PutRolePermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" +// The request was rejected because only the service that depends on the service-linked +// role can modify or delete the role on your behalf. The error message includes +// the name of the service that depends on this service-linked role. You must +// request the change through that service. +// +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary +func (c *IAM) PutRolePermissionsBoundary(input *PutRolePermissionsBoundaryInput) (*PutRolePermissionsBoundaryOutput, error) { + req, out := c.PutRolePermissionsBoundaryRequest(input) + return out, req.Send() +} + +// PutRolePermissionsBoundaryWithContext is the same as PutRolePermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See PutRolePermissionsBoundary 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 *IAM) PutRolePermissionsBoundaryWithContext(ctx aws.Context, input *PutRolePermissionsBoundaryInput, opts ...request.Option) (*PutRolePermissionsBoundaryOutput, error) { + req, out := c.PutRolePermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutRolePolicy = "PutRolePolicy" // PutRolePolicyRequest generates a "aws/request.Request" representing the @@ -10694,6 +10992,110 @@ func (c *IAM) PutRolePolicyWithContext(ctx aws.Context, input *PutRolePolicyInpu return out, req.Send() } +const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" + +// PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the PutUserPermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutUserPermissionsBoundary for more information on using the PutUserPermissionsBoundary +// 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 PutUserPermissionsBoundaryRequest method. +// req, resp := client.PutUserPermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary +func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundaryInput) (req *request.Request, output *PutUserPermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opPutUserPermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutUserPermissionsBoundaryInput{} + } + + output = &PutUserPermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutUserPermissionsBoundary API operation for AWS Identity and Access Management. +// +// Adds or updates the policy that is specified as the IAM user's permissions +// boundary. You can use an AWS managed policy or a customer managed policy +// to set the boundary for a user. Use the boundary to control the maximum permissions +// that the user can have. Setting a permissions boundary is an advanced feature +// that can affect the permissions for the user. +// +// Policies that are used as permissions boundaries do not provide permissions. +// You must also attach a permissions policy to the user. To learn how the effective +// permissions for a user are evaluated, see IAM JSON Policy Evaluation Logic +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User 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 AWS Identity and Access Management's +// API operation PutUserPermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary +func (c *IAM) PutUserPermissionsBoundary(input *PutUserPermissionsBoundaryInput) (*PutUserPermissionsBoundaryOutput, error) { + req, out := c.PutUserPermissionsBoundaryRequest(input) + return out, req.Send() +} + +// PutUserPermissionsBoundaryWithContext is the same as PutUserPermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See PutUserPermissionsBoundary 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 *IAM) PutUserPermissionsBoundaryWithContext(ctx aws.Context, input *PutUserPermissionsBoundaryInput, opts ...request.Option) (*PutUserPermissionsBoundaryOutput, error) { + req, out := c.PutUserPermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutUserPolicy = "PutUserPolicy" // PutUserPolicyRequest generates a "aws/request.Request" representing the @@ -12855,7 +13257,7 @@ func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecifi // // Sets the status of a service-specific credential to Active or Inactive. Service-specific // credentials that are inactive cannot be used for authentication to the service. -// This operation can be used to disable a user’s service-specific credential +// This operation can be used to disable a user's service-specific credential // as part of a credential rotation work flow. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -13462,7 +13864,7 @@ type AccessKey struct { AccessKeyId *string `min:"16" type:"string" required:"true"` // The date when the access key was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The secret key used to sign requests. // @@ -13540,7 +13942,7 @@ type AccessKeyLastUsed struct { // * There is no sign-in data associated with the user // // LastUsedDate is a required field - LastUsedDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUsedDate *time.Time `type:"timestamp" required:"true"` // The AWS region where this access key was most recently used. This field is // displays "N/A" in the following situations: @@ -13610,7 +14012,7 @@ type AccessKeyMetadata struct { AccessKeyId *string `min:"16" type:"string"` // The date when the access key was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The status of the access key. Active means the key is valid for API calls; // Inactive means it is not. @@ -14129,6 +14531,49 @@ func (s AttachUserPolicyOutput) GoString() string { return s.String() } +// Contains information about an attached permissions boundary. +// +// An attached permissions boundary is a managed policy that has been attached +// to a user or role to set the permissions boundary. +// +// For more information about permissions boundaries, see Permissions Boundaries +// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// in the IAM User Guide. +type AttachedPermissionsBoundary struct { + _ struct{} `type:"structure"` + + // The ARN of the policy used to set the permissions boundary for the user or + // role. + PermissionsBoundaryArn *string `min:"20" type:"string"` + + // The permissions boundary usage type that indicates what type of IAM resource + // is used as the permissions boundary for an entity. This data type can only + // have a value of Policy. + PermissionsBoundaryType *string `type:"string" enum:"PermissionsBoundaryAttachmentType"` +} + +// String returns the string representation +func (s AttachedPermissionsBoundary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachedPermissionsBoundary) GoString() string { + return s.String() +} + +// SetPermissionsBoundaryArn sets the PermissionsBoundaryArn field's value. +func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryArn(v string) *AttachedPermissionsBoundary { + s.PermissionsBoundaryArn = &v + return s +} + +// SetPermissionsBoundaryType sets the PermissionsBoundaryType field's value. +func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryType(v string) *AttachedPermissionsBoundary { + s.PermissionsBoundaryType = &v + return s +} + // Contains information about an attached policy. // // An attached policy is a managed policy that has been attached to a user, @@ -15180,6 +15625,10 @@ type CreateRoleInput struct { // letters. Path *string `min:"1" type:"string"` + // The ARN of the policy that is used to set the permissions boundary for the + // role. + PermissionsBoundary *string `min:"20" type:"string"` + // The name of the role to create. // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) @@ -15218,6 +15667,9 @@ func (s *CreateRoleInput) Validate() error { if s.Path != nil && len(*s.Path) < 1 { invalidParams.Add(request.NewErrParamMinLen("Path", 1)) } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } if s.RoleName == nil { invalidParams.Add(request.NewErrParamRequired("RoleName")) } @@ -15255,6 +15707,12 @@ func (s *CreateRoleInput) SetPath(v string) *CreateRoleInput { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *CreateRoleInput) SetPermissionsBoundary(v string) *CreateRoleInput { + s.PermissionsBoundary = &v + return s +} + // SetRoleName sets the RoleName field's value. func (s *CreateRoleInput) SetRoleName(v string) *CreateRoleInput { s.RoleName = &v @@ -15579,6 +16037,10 @@ type CreateUserInput struct { // letters. Path *string `min:"1" type:"string"` + // The ARN of the policy that is used to set the permissions boundary for the + // user. + PermissionsBoundary *string `min:"20" type:"string"` + // The name of the user to create. // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) @@ -15607,6 +16069,9 @@ func (s *CreateUserInput) Validate() error { if s.Path != nil && len(*s.Path) < 1 { invalidParams.Add(request.NewErrParamMinLen("Path", 1)) } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } @@ -15626,6 +16091,12 @@ func (s *CreateUserInput) SetPath(v string) *CreateUserInput { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *CreateUserInput) SetPermissionsBoundary(v string) *CreateUserInput { + s.PermissionsBoundary = &v + return s +} + // SetUserName sets the UserName field's value. func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { s.UserName = &v @@ -16513,6 +16984,62 @@ func (s DeleteRoleOutput) GoString() string { return s.String() } +type DeleteRolePermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The name (friendly name, not ARN) of the IAM role from which you want to + // remove the permissions boundary. + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRolePermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRolePermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRolePermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRolePermissionsBoundaryInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRoleName sets the RoleName field's value. +func (s *DeleteRolePermissionsBoundaryInput) SetRoleName(v string) *DeleteRolePermissionsBoundaryInput { + s.RoleName = &v + return s +} + +type DeleteRolePermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRolePermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRolePermissionsBoundaryOutput) GoString() string { + return s.String() +} + type DeleteRolePolicyInput struct { _ struct{} `type:"structure"` @@ -17067,6 +17594,62 @@ func (s DeleteUserOutput) GoString() string { return s.String() } +type DeleteUserPermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The name (friendly name, not ARN) of the IAM user from which you want to + // remove the permissions boundary. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUserPermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserPermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserPermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserPermissionsBoundaryInput"} + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetUserName sets the UserName field's value. +func (s *DeleteUserPermissionsBoundaryInput) SetUserName(v string) *DeleteUserPermissionsBoundaryInput { + s.UserName = &v + return s +} + +type DeleteUserPermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteUserPermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserPermissionsBoundaryOutput) GoString() string { + return s.String() +} + type DeleteUserPolicyInput struct { _ struct{} `type:"structure"` @@ -18265,7 +18848,7 @@ type GetCredentialReportOutput struct { // The date and time when the credential report was created, in ISO 8601 date-time // format (http://www.iso.org/iso/iso8601). - GeneratedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + GeneratedTime *time.Time `type:"timestamp"` // The format (MIME type) of the credential report. ReportFormat *string `type:"string" enum:"ReportFormatType"` @@ -18753,7 +19336,7 @@ type GetOpenIDConnectProviderOutput struct { // The date and time when the IAM OIDC provider resource object was created // in the AWS account. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of certificate thumbprints that are associated with the specified // IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. @@ -19193,13 +19776,13 @@ type GetSAMLProviderOutput struct { _ struct{} `type:"structure"` // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The XML metadata document that includes information about an identity provider. SAMLMetadataDocument *string `min:"1000" type:"string"` // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -19530,6 +20113,23 @@ type GetUserOutput struct { // A structure containing details about the IAM user. // + // Due to a service issue, password last used data does not include password + // use from May 3rd 2018 22:50 PDT to May 23rd 2018 14:08 PDT. This affects + // last sign-in (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) + // dates shown in the IAM console and password last used dates in the IAM credential + // report (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html), + // and returned by this GetUser API. If users signed in during the affected + // time, the password last used date that is returned is the date the user last + // signed in before May 3rd 2018. For users that signed in after May 23rd 2018 + // 14:08 PDT, the returned password last used date is accurate. + // + // If you use password last used information to identify unused credentials + // for deletion, such as deleting users who did not sign in to AWS in the last + // 90 days, we recommend that you adjust your evaluation window to include dates + // after May 23rd 2018. Alternatively, if your users use access keys to access + // AWS programmatically you can refer to access key last used information because + // it is accurate for all dates. + // // User is a required field User *User `type:"structure" required:"true"` } @@ -19687,7 +20287,7 @@ type Group struct { // when the group was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The stable and unique string identifying the group. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -19768,7 +20368,7 @@ type GroupDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the group was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The stable and unique string identifying the group. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -19864,7 +20464,7 @@ type InstanceProfile struct { // The date when the instance profile was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The stable and unique string identifying the instance profile. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -20655,6 +21255,15 @@ type ListEntitiesForPolicyInput struct { // // PolicyArn is a required field PolicyArn *string `min:"20" type:"string" required:"true"` + + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. + // To list only the policies used to set permissions boundaries, set the value + // to PermissionsBoundary. + // + // This parameter is optional. If it is not included, all policies are returned. + PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` } // String returns the string representation @@ -20722,6 +21331,12 @@ func (s *ListEntitiesForPolicyInput) SetPolicyArn(v string) *ListEntitiesForPoli return s } +// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. +func (s *ListEntitiesForPolicyInput) SetPolicyUsageFilter(v string) *ListEntitiesForPolicyInput { + s.PolicyUsageFilter = &v + return s +} + // Contains the response to a successful ListEntitiesForPolicy request. type ListEntitiesForPolicyOutput struct { _ struct{} `type:"structure"` @@ -21642,6 +22257,15 @@ type ListPoliciesInput struct { // letters. PathPrefix *string `type:"string"` + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. + // To list only the policies used to set permissions boundaries, set the value + // to PermissionsBoundary. + // + // This parameter is optional. If it is not included, all policies are returned. + PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` + // The scope to use for filtering the results. // // To list only AWS managed policies, set Scope to AWS. To list only the customer @@ -21702,6 +22326,12 @@ func (s *ListPoliciesInput) SetPathPrefix(v string) *ListPoliciesInput { return s } +// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. +func (s *ListPoliciesInput) SetPolicyUsageFilter(v string) *ListPoliciesInput { + s.PolicyUsageFilter = &v + return s +} + // SetScope sets the Scope field's value. func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput { s.Scope = &v @@ -23032,7 +23662,7 @@ type LoginProfile struct { // The date when the password for the user was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // Specifies whether the user is required to set a new password on next sign-in. PasswordResetRequired *bool `type:"boolean"` @@ -23081,7 +23711,7 @@ type MFADevice struct { // The date when the MFA device was enabled for the user. // // EnableDate is a required field - EnableDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EnableDate *time.Time `type:"timestamp" required:"true"` // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the device ARN. @@ -23149,7 +23779,7 @@ type ManagedPolicyDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The identifier for the version of the policy that is set as the default (operative) // version. @@ -23171,6 +23801,14 @@ type ManagedPolicyDetail struct { // in the Using IAM guide. Path *string `type:"string"` + // The number of entities (users and roles) for which the policy is used as + // the permissions boundary. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int64 `type:"integer"` + // The stable and unique string identifying the policy. // // For more information about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -23190,7 +23828,7 @@ type ManagedPolicyDetail struct { // when the policy was created. When a policy has more than one version, this // field contains the date and time when the most recent policy version was // created. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -23245,6 +23883,12 @@ func (s *ManagedPolicyDetail) SetPath(v string) *ManagedPolicyDetail { return s } +// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. +func (s *ManagedPolicyDetail) SetPermissionsBoundaryUsageCount(v int64) *ManagedPolicyDetail { + s.PermissionsBoundaryUsageCount = &v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *ManagedPolicyDetail) SetPolicyId(v string) *ManagedPolicyDetail { s.PolicyId = &v @@ -23458,7 +24102,7 @@ type Policy struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The identifier for the version of the policy that is set as the default version. DefaultVersionId *string `type:"string"` @@ -23478,6 +24122,14 @@ type Policy struct { // in the Using IAM guide. Path *string `type:"string"` + // The number of entities (users and roles) for which the policy is used to + // set the permissions boundary. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int64 `type:"integer"` + // The stable and unique string identifying the policy. // // For more information about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -23494,7 +24146,7 @@ type Policy struct { // when the policy was created. When a policy has more than one version, this // field contains the date and time when the most recent policy version was // created. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -23549,6 +24201,12 @@ func (s *Policy) SetPath(v string) *Policy { return s } +// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. +func (s *Policy) SetPermissionsBoundaryUsageCount(v int64) *Policy { + s.PermissionsBoundaryUsageCount = &v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *Policy) SetPolicyId(v string) *Policy { s.PolicyId = &v @@ -23743,7 +24401,7 @@ type PolicyVersion struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy version was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The policy document. // @@ -23947,6 +24605,80 @@ func (s PutGroupPolicyOutput) GoString() string { return s.String() } +type PutRolePermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The ARN of the policy that is used to set the permissions boundary for the + // role. + // + // PermissionsBoundary is a required field + PermissionsBoundary *string `min:"20" type:"string" required:"true"` + + // The name (friendly name, not ARN) of the IAM role for which you want to set + // the permissions boundary. + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutRolePermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRolePermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRolePermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRolePermissionsBoundaryInput"} + if s.PermissionsBoundary == nil { + invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) + } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *PutRolePermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutRolePermissionsBoundaryInput { + s.PermissionsBoundary = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *PutRolePermissionsBoundaryInput) SetRoleName(v string) *PutRolePermissionsBoundaryInput { + s.RoleName = &v + return s +} + +type PutRolePermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutRolePermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRolePermissionsBoundaryOutput) GoString() string { + return s.String() +} + type PutRolePolicyInput struct { _ struct{} `type:"structure"` @@ -24056,6 +24788,80 @@ func (s PutRolePolicyOutput) GoString() string { return s.String() } +type PutUserPermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The ARN of the policy that is used to set the permissions boundary for the + // user. + // + // PermissionsBoundary is a required field + PermissionsBoundary *string `min:"20" type:"string" required:"true"` + + // The name (friendly name, not ARN) of the IAM user for which you want to set + // the permissions boundary. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutUserPermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutUserPermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutUserPermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutUserPermissionsBoundaryInput"} + if s.PermissionsBoundary == nil { + invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) + } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *PutUserPermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutUserPermissionsBoundaryInput { + s.PermissionsBoundary = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *PutUserPermissionsBoundaryInput) SetUserName(v string) *PutUserPermissionsBoundaryInput { + s.UserName = &v + return s +} + +type PutUserPermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutUserPermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutUserPermissionsBoundaryOutput) GoString() string { + return s.String() +} + type PutUserPolicyInput struct { _ struct{} `type:"structure"` @@ -24714,7 +25520,7 @@ type Role struct { // when the role was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // A description of the role that you provide. Description *string `type:"string"` @@ -24731,6 +25537,13 @@ type Role struct { // Path is a required field Path *string `min:"1" type:"string" required:"true"` + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the role. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -24790,6 +25603,12 @@ func (s *Role) SetPath(v string) *Role { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *Role) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *Role { + s.PermissionsBoundary = v + return s +} + // SetRoleId sets the RoleId field's value. func (s *Role) SetRoleId(v string) *Role { s.RoleId = &v @@ -24825,7 +25644,7 @@ type RoleDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the role was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of instance profiles that contain this role. InstanceProfileList []*InstanceProfile `type:"list"` @@ -24835,6 +25654,13 @@ type RoleDetail struct { // in the Using IAM guide. Path *string `min:"1" type:"string"` + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the role. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -24894,6 +25720,12 @@ func (s *RoleDetail) SetPath(v string) *RoleDetail { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *RoleDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *RoleDetail { + s.PermissionsBoundary = v + return s +} + // SetRoleId sets the RoleId field's value. func (s *RoleDetail) SetRoleId(v string) *RoleDetail { s.RoleId = &v @@ -24957,10 +25789,10 @@ type SAMLProviderListEntry struct { Arn *string `min:"20" type:"string"` // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -25022,7 +25854,7 @@ type SSHPublicKey struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the SSH public key was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` // The name of the IAM user associated with the SSH public key. // @@ -25098,7 +25930,7 @@ type SSHPublicKeyMetadata struct { // when the SSH public key was uploaded. // // UploadDate is a required field - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + UploadDate *time.Time `type:"timestamp" required:"true"` // The name of the IAM user associated with the SSH public key. // @@ -25207,7 +26039,7 @@ type ServerCertificateMetadata struct { Arn *string `min:"20" type:"string" required:"true"` // The date on which the certificate is set to expire. - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Expiration *time.Time `type:"timestamp"` // The path to the server certificate. For more information about paths, see // IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -25229,7 +26061,7 @@ type ServerCertificateMetadata struct { ServerCertificateName *string `min:"1" type:"string" required:"true"` // The date when the server certificate was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -25286,7 +26118,7 @@ type ServiceSpecificCredential struct { // when the service-specific credential were created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The name of the service associated with the service-specific credential. // @@ -25383,7 +26215,7 @@ type ServiceSpecificCredentialMetadata struct { // when the service-specific credential were created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The name of the service associated with the service-specific credential. // @@ -25560,7 +26392,7 @@ type SigningCertificate struct { Status *string `type:"string" required:"true" enum:"statusType"` // The date when the signing certificate was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` // The name of the user the signing certificate is associated with. // @@ -25733,15 +26565,19 @@ type SimulateCustomPolicyInput struct { // instance, image, security-group, network-interface, subnet, volume ResourceHandlingOption *string `min:"1" type:"string"` - // An AWS account ID that specifies the owner of any simulated resource that - // does not identify its owner in the resource ARN, such as an S3 bucket or - // object. If ResourceOwner is specified, it is also used as the account owner - // of any ResourcePolicy included in the simulation. If the ResourceOwner parameter - // is not specified, then the owner of the resources and the resource policy - // defaults to the account of the identity provided in CallerArn. This parameter - // is required only if you specify a resource-based policy and account that - // owns the resource is different from the account that owns the simulated calling - // user CallerArn. + // An ARN representing the AWS account ID that specifies the owner of any simulated + // resource that does not identify its owner in the resource ARN, such as an + // S3 bucket or object. If ResourceOwner is specified, it is also used as the + // account owner of any ResourcePolicy included in the simulation. If the ResourceOwner + // parameter is not specified, then the owner of the resources and the resource + // policy defaults to the account of the identity provided in CallerArn. This + // parameter is required only if you specify a resource-based policy and account + // that owns the resource is different from the account that owns the simulated + // calling user CallerArn. + // + // The ARN for an account uses the following syntax: arn:aws:iam::AWS-account-ID:root. + // For example, to represent the account with the 112233445566 ID, use the following + // ARN: arn:aws:iam::112233445566-ID:root. ResourceOwner *string `min:"1" type:"string"` // A resource-based policy to include in the simulation provided as a string. @@ -27623,7 +28459,9 @@ type UploadSSHPublicKeyInput struct { _ struct{} `type:"structure"` // The SSH public key. The public key must be encoded in ssh-rsa format or PEM - // format. + // format. The miminum bit-length of the public key is 2048 bits. For example, + // you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes + // long. // // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this // parameter is a string of characters consisting of the following: @@ -28017,7 +28855,7 @@ type User struct { // when the user was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the user's password was last used to sign in to an AWS website. For @@ -28038,7 +28876,7 @@ type User struct { // contains the date and time the most recent password was used. // // This value is returned only in the GetUser and ListUsers operations. - PasswordLastUsed *time.Time `type:"timestamp" timestampFormat:"iso8601"` + PasswordLastUsed *time.Time `type:"timestamp"` // The path to the user. For more information about paths, see IAM Identifiers // (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -28047,6 +28885,13 @@ type User struct { // Path is a required field Path *string `min:"1" type:"string" required:"true"` + // The ARN of the policy used to set the permissions boundary for the user. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -28094,6 +28939,12 @@ func (s *User) SetPath(v string) *User { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User { + s.PermissionsBoundary = v + return s +} + // SetUserId sets the UserId field's value. func (s *User) SetUserId(v string) *User { s.UserId = &v @@ -28126,7 +28977,7 @@ type UserDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the user was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of IAM groups that the user is in. GroupList []*string `type:"list"` @@ -28136,6 +28987,13 @@ type UserDetail struct { // in the Using IAM guide. Path *string `min:"1" type:"string"` + // The ARN of the policy used to set the permissions boundary for the user. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -28188,6 +29046,12 @@ func (s *UserDetail) SetPath(v string) *UserDetail { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *UserDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *UserDetail { + s.PermissionsBoundary = v + return s +} + // SetUserId sets the UserId field's value. func (s *UserDetail) SetUserId(v string) *UserDetail { s.UserId = &v @@ -28217,7 +29081,7 @@ type VirtualMFADevice struct { Base32StringSeed []byte `type:"blob"` // The date and time on which the virtual MFA device was enabled. - EnableDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EnableDate *time.Time `type:"timestamp"` // A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String // where $virtualMFADeviceName is one of the create call arguments, AccountName @@ -28345,6 +29209,11 @@ const ( EntityTypeAwsmanagedPolicy = "AWSManagedPolicy" ) +const ( + // PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy is a PermissionsBoundaryAttachmentType enum value + PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy = "PermissionsBoundaryPolicy" +) + const ( // PolicyEvaluationDecisionTypeAllowed is a PolicyEvaluationDecisionType enum value PolicyEvaluationDecisionTypeAllowed = "allowed" @@ -28379,6 +29248,20 @@ const ( PolicySourceTypeNone = "none" ) +// The policy usage type that indicates whether the policy is used as a permissions +// policy or as the permissions boundary for an entity. +// +// For more information about permissions boundaries, see Permissions Boundaries +// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// in the IAM User Guide. +const ( + // PolicyUsageTypePermissionsPolicy is a PolicyUsageType enum value + PolicyUsageTypePermissionsPolicy = "PermissionsPolicy" + + // PolicyUsageTypePermissionsBoundary is a PolicyUsageType enum value + PolicyUsageTypePermissionsBoundary = "PermissionsBoundary" +) + const ( // ReportFormatTypeTextCsv is a ReportFormatType enum value ReportFormatTypeTextCsv = "text/csv" diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go index 4f798c63d..940b4ce32 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "iam" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "iam" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "IAM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the IAM client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index b59beb031..98fe8c4f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -182,6 +182,10 @@ func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetI // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // +// * ErrCodeInvalidCrossAccountRoleException "InvalidCrossAccountRoleException" +// Amazon Inspector cannot assume the cross-account role that it needs to list +// your EC2 instances during the assessment run. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateAssessmentTarget func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) { req, out := c.CreateAssessmentTargetRequest(input) @@ -302,6 +306,102 @@ func (c *Inspector) CreateAssessmentTemplateWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateExclusionsPreview = "CreateExclusionsPreview" + +// CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the +// client's request for the CreateExclusionsPreview operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateExclusionsPreview for more information on using the CreateExclusionsPreview +// 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 CreateExclusionsPreviewRequest method. +// req, resp := client.CreateExclusionsPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview +func (c *Inspector) CreateExclusionsPreviewRequest(input *CreateExclusionsPreviewInput) (req *request.Request, output *CreateExclusionsPreviewOutput) { + op := &request.Operation{ + Name: opCreateExclusionsPreview, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateExclusionsPreviewInput{} + } + + output = &CreateExclusionsPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateExclusionsPreview API operation for Amazon Inspector. +// +// Starts the generation of an exclusions preview for the specified assessment +// template. The exclusions preview lists the potential exclusions (ExclusionPreview) +// that Inspector can detect before it runs the assessment. +// +// 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 Inspector's +// API operation CreateExclusionsPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodePreviewGenerationInProgressException "PreviewGenerationInProgressException" +// The request is rejected. The specified assessment template is currently generating +// an exclusions preview. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview +func (c *Inspector) CreateExclusionsPreview(input *CreateExclusionsPreviewInput) (*CreateExclusionsPreviewOutput, error) { + req, out := c.CreateExclusionsPreviewRequest(input) + return out, req.Send() +} + +// CreateExclusionsPreviewWithContext is the same as CreateExclusionsPreview with the addition of +// the ability to pass a context and additional request options. +// +// See CreateExclusionsPreview 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 *Inspector) CreateExclusionsPreviewWithContext(ctx aws.Context, input *CreateExclusionsPreviewInput, opts ...request.Option) (*CreateExclusionsPreviewOutput, error) { + req, out := c.CreateExclusionsPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateResourceGroup = "CreateResourceGroup" // CreateResourceGroupRequest generates a "aws/request.Request" representing the @@ -1017,6 +1117,89 @@ func (c *Inspector) DescribeCrossAccountAccessRoleWithContext(ctx aws.Context, i return out, req.Send() } +const opDescribeExclusions = "DescribeExclusions" + +// DescribeExclusionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExclusions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeExclusions for more information on using the DescribeExclusions +// 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 DescribeExclusionsRequest method. +// req, resp := client.DescribeExclusionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions +func (c *Inspector) DescribeExclusionsRequest(input *DescribeExclusionsInput) (req *request.Request, output *DescribeExclusionsOutput) { + op := &request.Operation{ + Name: opDescribeExclusions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeExclusionsInput{} + } + + output = &DescribeExclusionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeExclusions API operation for Amazon Inspector. +// +// Describes the exclusions that are specified by the exclusions' ARNs. +// +// 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 Inspector's +// API operation DescribeExclusions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions +func (c *Inspector) DescribeExclusions(input *DescribeExclusionsInput) (*DescribeExclusionsOutput, error) { + req, out := c.DescribeExclusionsRequest(input) + return out, req.Send() +} + +// DescribeExclusionsWithContext is the same as DescribeExclusions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeExclusions 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 *Inspector) DescribeExclusionsWithContext(ctx aws.Context, input *DescribeExclusionsInput, opts ...request.Option) (*DescribeExclusionsOutput, error) { + req, out := c.DescribeExclusionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeFindings = "DescribeFindings" // DescribeFindingsRequest generates a "aws/request.Request" representing the @@ -1370,6 +1553,154 @@ func (c *Inspector) GetAssessmentReportWithContext(ctx aws.Context, input *GetAs return out, req.Send() } +const opGetExclusionsPreview = "GetExclusionsPreview" + +// GetExclusionsPreviewRequest generates a "aws/request.Request" representing the +// client's request for the GetExclusionsPreview operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetExclusionsPreview for more information on using the GetExclusionsPreview +// 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 GetExclusionsPreviewRequest method. +// req, resp := client.GetExclusionsPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview +func (c *Inspector) GetExclusionsPreviewRequest(input *GetExclusionsPreviewInput) (req *request.Request, output *GetExclusionsPreviewOutput) { + op := &request.Operation{ + Name: opGetExclusionsPreview, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetExclusionsPreviewInput{} + } + + output = &GetExclusionsPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExclusionsPreview API operation for Amazon Inspector. +// +// Retrieves the exclusions preview (a list of ExclusionPreview objects) specified +// by the preview token. You can obtain the preview token by running the CreateExclusionsPreview +// API. +// +// 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 Inspector's +// API operation GetExclusionsPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview +func (c *Inspector) GetExclusionsPreview(input *GetExclusionsPreviewInput) (*GetExclusionsPreviewOutput, error) { + req, out := c.GetExclusionsPreviewRequest(input) + return out, req.Send() +} + +// GetExclusionsPreviewWithContext is the same as GetExclusionsPreview with the addition of +// the ability to pass a context and additional request options. +// +// See GetExclusionsPreview 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 *Inspector) GetExclusionsPreviewWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, opts ...request.Option) (*GetExclusionsPreviewOutput, error) { + req, out := c.GetExclusionsPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetExclusionsPreviewPages iterates over the pages of a GetExclusionsPreview operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetExclusionsPreview 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 GetExclusionsPreview operation. +// pageNum := 0 +// err := client.GetExclusionsPreviewPages(params, +// func(page *GetExclusionsPreviewOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Inspector) GetExclusionsPreviewPages(input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool) error { + return c.GetExclusionsPreviewPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetExclusionsPreviewPagesWithContext same as GetExclusionsPreviewPages 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 *Inspector) GetExclusionsPreviewPagesWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetExclusionsPreviewInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetExclusionsPreviewRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage()) + } + return p.Err() +} + const opGetTelemetryMetadata = "GetTelemetryMetadata" // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the @@ -2194,6 +2525,152 @@ func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, inpu return p.Err() } +const opListExclusions = "ListExclusions" + +// ListExclusionsRequest generates a "aws/request.Request" representing the +// client's request for the ListExclusions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListExclusions for more information on using the ListExclusions +// 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 ListExclusionsRequest method. +// req, resp := client.ListExclusionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions +func (c *Inspector) ListExclusionsRequest(input *ListExclusionsInput) (req *request.Request, output *ListExclusionsOutput) { + op := &request.Operation{ + Name: opListExclusions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListExclusionsInput{} + } + + output = &ListExclusionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListExclusions API operation for Amazon Inspector. +// +// List exclusions that are generated by the assessment run. +// +// 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 Inspector's +// API operation ListExclusions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions +func (c *Inspector) ListExclusions(input *ListExclusionsInput) (*ListExclusionsOutput, error) { + req, out := c.ListExclusionsRequest(input) + return out, req.Send() +} + +// ListExclusionsWithContext is the same as ListExclusions with the addition of +// the ability to pass a context and additional request options. +// +// See ListExclusions 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 *Inspector) ListExclusionsWithContext(ctx aws.Context, input *ListExclusionsInput, opts ...request.Option) (*ListExclusionsOutput, error) { + req, out := c.ListExclusionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListExclusionsPages iterates over the pages of a ListExclusions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListExclusions 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 ListExclusions operation. +// pageNum := 0 +// err := client.ListExclusionsPages(params, +// func(page *ListExclusionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Inspector) ListExclusionsPages(input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool) error { + return c.ListExclusionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListExclusionsPagesWithContext same as ListExclusionsPages 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 *Inspector) ListExclusionsPagesWithContext(ctx aws.Context, input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListExclusionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListExclusionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the @@ -3779,12 +4256,12 @@ type AssessmentRun struct { // The assessment run completion time that corresponds to the rules packages // evaluation completion time or failure. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time when StartAssessmentRun was called. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // A Boolean value (true or false) that specifies whether the process of collecting // data from the agents is completed. @@ -3819,7 +4296,7 @@ type AssessmentRun struct { RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` // The time when StartAssessmentRun was called. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The state of the assessment run. // @@ -3829,7 +4306,7 @@ type AssessmentRun struct { // The last time when the assessment run's state changed. // // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` // A list of the assessment run state changes. // @@ -4151,7 +4628,7 @@ type AssessmentRunNotification struct { // The date of the notification. // // Date is a required field - Date *time.Time `locationName:"date" type:"timestamp" timestampFormat:"unix" required:"true"` + Date *time.Time `locationName:"date" type:"timestamp" required:"true"` // The Boolean value that specifies whether the notification represents an error. // @@ -4231,7 +4708,7 @@ type AssessmentRunStateChange struct { // The last time the assessment run state changed. // // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -4269,7 +4746,7 @@ type AssessmentTarget struct { // The time at which the assessment target is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The name of the Amazon Inspector assessment target. // @@ -4278,14 +4755,12 @@ type AssessmentTarget struct { // The ARN that specifies the resource group that is associated with the assessment // target. - // - // ResourceGroupArn is a required field - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` + ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` // The time at which UpdateAssessmentTarget is called. // // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -4392,9 +4867,9 @@ type AssessmentTemplate struct { // The time at which the assessment template is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` - // The duration in seconds specified for this assessment tempate. The default + // The duration in seconds specified for this assessment template. The default // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one // day). // @@ -4403,7 +4878,7 @@ type AssessmentTemplate struct { // The Amazon Resource Name (ARN) of the most recent assessment run associated // with this assessment template. This value exists only when the value of assessmentRunCount - // is greater than zero. + // is greaterpa than zero. LastAssessmentRunArn *string `locationName:"lastAssessmentRunArn" min:"1" type:"string"` // The name of the assessment template. @@ -4692,9 +5167,7 @@ type CreateAssessmentTargetInput struct { // The ARN that specifies the resource group that is used to create the assessment // target. - // - // ResourceGroupArn is a required field - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` + ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` } // String returns the string representation @@ -4716,9 +5189,6 @@ func (s *CreateAssessmentTargetInput) Validate() error { if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) } - if s.ResourceGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn")) - } if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) } @@ -4908,6 +5378,75 @@ func (s *CreateAssessmentTemplateOutput) SetAssessmentTemplateArn(v string) *Cre return s } +type CreateExclusionsPreviewInput struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the assessment template for which you want to create + // an exclusions preview. + // + // AssessmentTemplateArn is a required field + AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateExclusionsPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExclusionsPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExclusionsPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExclusionsPreviewInput"} + if s.AssessmentTemplateArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) + } + if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. +func (s *CreateExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *CreateExclusionsPreviewInput { + s.AssessmentTemplateArn = &v + return s +} + +type CreateExclusionsPreviewOutput struct { + _ struct{} `type:"structure"` + + // Specifies the unique identifier of the requested exclusions preview. You + // can use the unique identifier to retrieve the exclusions preview when running + // the GetExclusionsPreview API. + // + // PreviewToken is a required field + PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateExclusionsPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExclusionsPreviewOutput) GoString() string { + return s.String() +} + +// SetPreviewToken sets the PreviewToken field's value. +func (s *CreateExclusionsPreviewOutput) SetPreviewToken(v string) *CreateExclusionsPreviewOutput { + s.PreviewToken = &v + return s +} + type CreateResourceGroupInput struct { _ struct{} `type:"structure"` @@ -5403,7 +5942,7 @@ type DescribeCrossAccountAccessRoleOutput struct { // The date when the cross-account access role was registered. // // RegisteredAt is a required field - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix" required:"true"` + RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" required:"true"` // The ARN that specifies the IAM role that Amazon Inspector uses to access // your AWS account. @@ -5446,6 +5985,94 @@ func (s *DescribeCrossAccountAccessRoleOutput) SetValid(v bool) *DescribeCrossAc return s } +type DescribeExclusionsInput struct { + _ struct{} `type:"structure"` + + // The list of ARNs that specify the exclusions that you want to describe. + // + // ExclusionArns is a required field + ExclusionArns []*string `locationName:"exclusionArns" min:"1" type:"list" required:"true"` + + // The locale into which you want to translate the exclusion's title, description, + // and recommendation. + Locale *string `locationName:"locale" type:"string" enum:"Locale"` +} + +// String returns the string representation +func (s DescribeExclusionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExclusionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeExclusionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExclusionsInput"} + if s.ExclusionArns == nil { + invalidParams.Add(request.NewErrParamRequired("ExclusionArns")) + } + if s.ExclusionArns != nil && len(s.ExclusionArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusionArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExclusionArns sets the ExclusionArns field's value. +func (s *DescribeExclusionsInput) SetExclusionArns(v []*string) *DescribeExclusionsInput { + s.ExclusionArns = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeExclusionsInput) SetLocale(v string) *DescribeExclusionsInput { + s.Locale = &v + return s +} + +type DescribeExclusionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the exclusions. + // + // Exclusions is a required field + Exclusions map[string]*Exclusion `locationName:"exclusions" min:"1" type:"map" required:"true"` + + // Exclusion details that cannot be described. An error code is provided for + // each failed item. + // + // FailedItems is a required field + FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` +} + +// String returns the string representation +func (s DescribeExclusionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExclusionsOutput) GoString() string { + return s.String() +} + +// SetExclusions sets the Exclusions field's value. +func (s *DescribeExclusionsOutput) SetExclusions(v map[string]*Exclusion) *DescribeExclusionsOutput { + s.Exclusions = v + return s +} + +// SetFailedItems sets the FailedItems field's value. +func (s *DescribeExclusionsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeExclusionsOutput { + s.FailedItems = v + return s +} + type DescribeFindingsInput struct { _ struct{} `type:"structure"` @@ -5762,7 +6389,7 @@ type EventSubscription struct { // The time at which SubscribeToEvent is called. // // SubscribedAt is a required field - SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -5787,6 +6414,154 @@ func (s *EventSubscription) SetSubscribedAt(v time.Time) *EventSubscription { return s } +// Contains information about what was excluded from an assessment run. +type Exclusion struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the exclusion. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` + + // The system-defined attributes for the exclusion. + Attributes []*Attribute `locationName:"attributes" type:"list"` + + // The description of the exclusion. + // + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + // The recommendation for the exclusion. + // + // Recommendation is a required field + Recommendation *string `locationName:"recommendation" type:"string" required:"true"` + + // The AWS resources for which the exclusion pertains. + // + // Scopes is a required field + Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` + + // The name of the exclusion. + // + // Title is a required field + Title *string `locationName:"title" type:"string" required:"true"` +} + +// String returns the string representation +func (s Exclusion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Exclusion) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Exclusion) SetArn(v string) *Exclusion { + s.Arn = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *Exclusion) SetAttributes(v []*Attribute) *Exclusion { + s.Attributes = v + return s +} + +// SetDescription sets the Description field's value. +func (s *Exclusion) SetDescription(v string) *Exclusion { + s.Description = &v + return s +} + +// SetRecommendation sets the Recommendation field's value. +func (s *Exclusion) SetRecommendation(v string) *Exclusion { + s.Recommendation = &v + return s +} + +// SetScopes sets the Scopes field's value. +func (s *Exclusion) SetScopes(v []*Scope) *Exclusion { + s.Scopes = v + return s +} + +// SetTitle sets the Title field's value. +func (s *Exclusion) SetTitle(v string) *Exclusion { + s.Title = &v + return s +} + +// Contains information about what is excluded from an assessment run given +// the current state of the assessment template. +type ExclusionPreview struct { + _ struct{} `type:"structure"` + + // The system-defined attributes for the exclusion preview. + Attributes []*Attribute `locationName:"attributes" type:"list"` + + // The description of the exclusion preview. + // + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + // The recommendation for the exclusion preview. + // + // Recommendation is a required field + Recommendation *string `locationName:"recommendation" type:"string" required:"true"` + + // The AWS resources for which the exclusion preview pertains. + // + // Scopes is a required field + Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` + + // The name of the exclusion preview. + // + // Title is a required field + Title *string `locationName:"title" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExclusionPreview) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExclusionPreview) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *ExclusionPreview) SetAttributes(v []*Attribute) *ExclusionPreview { + s.Attributes = v + return s +} + +// SetDescription sets the Description field's value. +func (s *ExclusionPreview) SetDescription(v string) *ExclusionPreview { + s.Description = &v + return s +} + +// SetRecommendation sets the Recommendation field's value. +func (s *ExclusionPreview) SetRecommendation(v string) *ExclusionPreview { + s.Recommendation = &v + return s +} + +// SetScopes sets the Scopes field's value. +func (s *ExclusionPreview) SetScopes(v []*Scope) *ExclusionPreview { + s.Scopes = v + return s +} + +// SetTitle sets the Title field's value. +func (s *ExclusionPreview) SetTitle(v string) *ExclusionPreview { + s.Title = &v + return s +} + // Includes details about the failed items. type FailedItemDetails struct { _ struct{} `type:"structure"` @@ -5852,7 +6627,7 @@ type Finding struct { // The time when the finding was generated. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The description of the finding. Description *string `locationName:"description" type:"string"` @@ -5887,7 +6662,7 @@ type Finding struct { // The time when AddAttributesToFindings is called. // // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` // The user-defined attributes that are assigned to the finding. // @@ -6252,6 +7027,143 @@ func (s *GetAssessmentReportOutput) SetUrl(v string) *GetAssessmentReportOutput return s } +type GetExclusionsPreviewInput struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the assessment template for which the exclusions preview + // was requested. + // + // AssessmentTemplateArn is a required field + AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` + + // The locale into which you want to translate the exclusion's title, description, + // and recommendation. + Locale *string `locationName:"locale" type:"string" enum:"Locale"` + + // You can use this parameter to indicate the maximum number of items you want + // in the response. The default value is 100. The maximum value is 500. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the GetExclusionsPreviewRequest action. + // Subsequent calls to the action fill nextToken in the request with the value + // of nextToken from the previous response to continue listing data. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The unique identifier associated of the exclusions preview. + // + // PreviewToken is a required field + PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetExclusionsPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExclusionsPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExclusionsPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExclusionsPreviewInput"} + if s.AssessmentTemplateArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) + } + if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.PreviewToken == nil { + invalidParams.Add(request.NewErrParamRequired("PreviewToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. +func (s *GetExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *GetExclusionsPreviewInput { + s.AssessmentTemplateArn = &v + return s +} + +// SetLocale sets the Locale field's value. +func (s *GetExclusionsPreviewInput) SetLocale(v string) *GetExclusionsPreviewInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetExclusionsPreviewInput) SetMaxResults(v int64) *GetExclusionsPreviewInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetExclusionsPreviewInput) SetNextToken(v string) *GetExclusionsPreviewInput { + s.NextToken = &v + return s +} + +// SetPreviewToken sets the PreviewToken field's value. +func (s *GetExclusionsPreviewInput) SetPreviewToken(v string) *GetExclusionsPreviewInput { + s.PreviewToken = &v + return s +} + +type GetExclusionsPreviewOutput struct { + _ struct{} `type:"structure"` + + // Information about the exclusions included in the preview. + ExclusionPreviews []*ExclusionPreview `locationName:"exclusionPreviews" type:"list"` + + // When a response is generated, if there is more data to be listed, this parameters + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Specifies the status of the request to generate an exclusions preview. + // + // PreviewStatus is a required field + PreviewStatus *string `locationName:"previewStatus" type:"string" required:"true" enum:"PreviewStatus"` +} + +// String returns the string representation +func (s GetExclusionsPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExclusionsPreviewOutput) GoString() string { + return s.String() +} + +// SetExclusionPreviews sets the ExclusionPreviews field's value. +func (s *GetExclusionsPreviewOutput) SetExclusionPreviews(v []*ExclusionPreview) *GetExclusionsPreviewOutput { + s.ExclusionPreviews = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetExclusionsPreviewOutput) SetNextToken(v string) *GetExclusionsPreviewOutput { + s.NextToken = &v + return s +} + +// SetPreviewStatus sets the PreviewStatus field's value. +func (s *GetExclusionsPreviewOutput) SetPreviewStatus(v string) *GetExclusionsPreviewOutput { + s.PreviewStatus = &v + return s +} + type GetTelemetryMetadataInput struct { _ struct{} `type:"structure"` @@ -6877,6 +7789,110 @@ func (s *ListEventSubscriptionsOutput) SetSubscriptions(v []*Subscription) *List return s } +type ListExclusionsInput struct { + _ struct{} `type:"structure"` + + // The ARN of the assessment run that generated the exclusions that you want + // to list. + // + // AssessmentRunArn is a required field + AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` + + // You can use this parameter to indicate the maximum number of items you want + // in the response. The default value is 100. The maximum value is 500. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the ListExclusionsRequest action. + // Subsequent calls to the action fill nextToken in the request with the value + // of nextToken from the previous response to continue listing data. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListExclusionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListExclusionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListExclusionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListExclusionsInput"} + if s.AssessmentRunArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) + } + if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentRunArn sets the AssessmentRunArn field's value. +func (s *ListExclusionsInput) SetAssessmentRunArn(v string) *ListExclusionsInput { + s.AssessmentRunArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListExclusionsInput) SetMaxResults(v int64) *ListExclusionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListExclusionsInput) SetNextToken(v string) *ListExclusionsInput { + s.NextToken = &v + return s +} + +type ListExclusionsOutput struct { + _ struct{} `type:"structure"` + + // A list of exclusions' ARNs returned by the action. + // + // ExclusionArns is a required field + ExclusionArns []*string `locationName:"exclusionArns" type:"list" required:"true"` + + // When a response is generated, if there is more data to be listed, this parameters + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListExclusionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListExclusionsOutput) GoString() string { + return s.String() +} + +// SetExclusionArns sets the ExclusionArns field's value. +func (s *ListExclusionsOutput) SetExclusionArns(v []*string) *ListExclusionsOutput { + s.ExclusionArns = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListExclusionsOutput) SetNextToken(v string) *ListExclusionsOutput { + s.NextToken = &v + return s +} + type ListFindingsInput struct { _ struct{} `type:"structure"` @@ -7399,7 +8415,7 @@ type ResourceGroup struct { // The time at which resource group is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The tags (key and value pairs) of the resource group. This data type property // is used in the CreateResourceGroup action. @@ -7559,6 +8575,39 @@ func (s *RulesPackage) SetVersion(v string) *RulesPackage { return s } +// This data type contains key-value pairs that identify various Amazon resources. +type Scope struct { + _ struct{} `type:"structure"` + + // The type of the scope. + Key *string `locationName:"key" type:"string" enum:"ScopeType"` + + // The resource identifier for the specified scope type. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Scope) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scope) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Scope) SetKey(v string) *Scope { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Scope) SetValue(v string) *Scope { + s.Value = &v + return s +} + // This data type is used in the Finding data type. type ServiceAttributes struct { _ struct{} `type:"structure"` @@ -8073,10 +9122,10 @@ type TimestampRange struct { _ struct{} `type:"structure"` // The minimum value of the timestamp range. - BeginDate *time.Time `locationName:"beginDate" type:"timestamp" timestampFormat:"unix"` + BeginDate *time.Time `locationName:"beginDate" type:"timestamp"` // The maximum value of the timestamp range. - EndDate *time.Time `locationName:"endDate" type:"timestamp" timestampFormat:"unix"` + EndDate *time.Time `locationName:"endDate" type:"timestamp"` } // String returns the string representation @@ -8203,9 +9252,7 @@ type UpdateAssessmentTargetInput struct { // The ARN of the resource group that is used to specify the new resource group // to associate with the assessment target. - // - // ResourceGroupArn is a required field - ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"` + ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string"` } // String returns the string representation @@ -8233,9 +9280,6 @@ func (s *UpdateAssessmentTargetInput) Validate() error { if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1)) } - if s.ResourceGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn")) - } if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1)) } @@ -8652,6 +9696,14 @@ const ( NoSuchEntityErrorCodeIamRoleDoesNotExist = "IAM_ROLE_DOES_NOT_EXIST" ) +const ( + // PreviewStatusWorkInProgress is a PreviewStatus enum value + PreviewStatusWorkInProgress = "WORK_IN_PROGRESS" + + // PreviewStatusCompleted is a PreviewStatus enum value + PreviewStatusCompleted = "COMPLETED" +) + const ( // ReportFileFormatHtml is a ReportFileFormat enum value ReportFileFormatHtml = "HTML" @@ -8679,6 +9731,14 @@ const ( ReportTypeFull = "FULL" ) +const ( + // ScopeTypeInstanceId is a ScopeType enum value + ScopeTypeInstanceId = "INSTANCE_ID" + + // ScopeTypeRulesPackageArn is a ScopeType enum value + ScopeTypeRulesPackageArn = "RULES_PACKAGE_ARN" +) + const ( // SeverityLow is a Severity enum value SeverityLow = "Low" diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go index abdadcccb..8d532b03e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go @@ -58,6 +58,13 @@ const ( // The error code describes the entity. ErrCodeNoSuchEntityException = "NoSuchEntityException" + // ErrCodePreviewGenerationInProgressException for service response error code + // "PreviewGenerationInProgressException". + // + // The request is rejected. The specified assessment template is currently generating + // an exclusions preview. + ErrCodePreviewGenerationInProgressException = "PreviewGenerationInProgressException" + // ErrCodeUnsupportedFeatureException for service response error code // "UnsupportedFeatureException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go index 1d65f0707..2e68b4e4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "inspector" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "inspector" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Inspector" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Inspector client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index ef322f6b9..e5e5aa6fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -266,7 +266,7 @@ func (c *IoT) AssociateTargetsWithJobRequest(input *AssociateTargetsWithJobInput // The specified resource does not exist. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -368,7 +368,7 @@ func (c *IoT) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Reques // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) { req, out := c.AttachPolicyRequest(input) @@ -470,7 +470,7 @@ func (c *IoT) AttachPrincipalPolicyRequest(input *AttachPrincipalPolicyInput) (r // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) (*AttachPrincipalPolicyOutput, error) { req, out := c.AttachPrincipalPolicyRequest(input) @@ -775,6 +775,102 @@ func (c *IoT) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts return out, req.Send() } +const opCancelJobExecution = "CancelJobExecution" + +// CancelJobExecutionRequest generates a "aws/request.Request" representing the +// client's request for the CancelJobExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CancelJobExecution for more information on using the CancelJobExecution +// 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 CancelJobExecutionRequest method. +// req, resp := client.CancelJobExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CancelJobExecutionRequest(input *CancelJobExecutionInput) (req *request.Request, output *CancelJobExecutionOutput) { + op := &request.Operation{ + Name: opCancelJobExecution, + HTTPMethod: "PUT", + HTTPPath: "/things/{thingName}/jobs/{jobId}/cancel", + } + + if input == nil { + input = &CancelJobExecutionInput{} + } + + output = &CancelJobExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// CancelJobExecution API operation for AWS IoT. +// +// Cancels the execution of a job for a given thing. +// +// 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 IoT's +// API operation CancelJobExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// An attempt was made to change to an invalid state, for example by deleting +// a job or a job execution which is "IN_PROGRESS" without setting the force +// parameter. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is temporarily unavailable. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +func (c *IoT) CancelJobExecution(input *CancelJobExecutionInput) (*CancelJobExecutionOutput, error) { + req, out := c.CancelJobExecutionRequest(input) + return out, req.Send() +} + +// CancelJobExecutionWithContext is the same as CancelJobExecution with the addition of +// the ability to pass a context and additional request options. +// +// See CancelJobExecution 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 *IoT) CancelJobExecutionWithContext(ctx aws.Context, input *CancelJobExecutionInput, opts ...request.Option) (*CancelJobExecutionOutput, error) { + req, out := c.CancelJobExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opClearDefaultAuthorizer = "ClearDefaultAuthorizer" // ClearDefaultAuthorizerRequest generates a "aws/request.Request" representing the @@ -925,7 +1021,7 @@ func (c *IoT) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *reques // The request is not valid. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -1151,7 +1247,7 @@ func (c *IoT) CreateJobRequest(input *CreateJobInput) (req *request.Request, out // The resource already exists. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -1627,7 +1723,7 @@ func (c *IoT) CreateRoleAliasRequest(input *CreateRoleAliasInput) (req *request. // The request is not valid. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -1804,7 +1900,7 @@ func (c *IoT) CreateThingRequest(input *CreateThingInput) (req *request.Request, // CreateThing API operation for AWS IoT. // -// Creates a thing record in the thing registry. +// Creates a thing record in the registry. // // 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 @@ -2416,6 +2512,202 @@ func (c *IoT) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertifi return out, req.Send() } +const opDeleteJob = "DeleteJob" + +// DeleteJobRequest generates a "aws/request.Request" representing the +// client's request for the DeleteJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteJob for more information on using the DeleteJob +// 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 DeleteJobRequest method. +// req, resp := client.DeleteJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, output *DeleteJobOutput) { + op := &request.Operation{ + Name: opDeleteJob, + HTTPMethod: "DELETE", + HTTPPath: "/jobs/{jobId}", + } + + if input == nil { + input = &DeleteJobInput{} + } + + output = &DeleteJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteJob API operation for AWS IoT. +// +// Deletes a job and its related job executions. +// +// Deleting a job may take time, depending on the number of job executions created +// for the job and various other factors. While the job is being deleted, the +// status of the job will be shown as "DELETION_IN_PROGRESS". Attempting to +// delete or cancel a job whose status is already "DELETION_IN_PROGRESS" will +// result in an error. +// +// Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or +// a LimitExceededException will occur. +// +// 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 IoT's +// API operation DeleteJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// An attempt was made to change to an invalid state, for example by deleting +// a job or a job execution which is "IN_PROGRESS" without setting the force +// parameter. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is temporarily unavailable. +// +func (c *IoT) DeleteJob(input *DeleteJobInput) (*DeleteJobOutput, error) { + req, out := c.DeleteJobRequest(input) + return out, req.Send() +} + +// DeleteJobWithContext is the same as DeleteJob with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteJob 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 *IoT) DeleteJobWithContext(ctx aws.Context, input *DeleteJobInput, opts ...request.Option) (*DeleteJobOutput, error) { + req, out := c.DeleteJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteJobExecution = "DeleteJobExecution" + +// DeleteJobExecutionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteJobExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteJobExecution for more information on using the DeleteJobExecution +// 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 DeleteJobExecutionRequest method. +// req, resp := client.DeleteJobExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteJobExecutionRequest(input *DeleteJobExecutionInput) (req *request.Request, output *DeleteJobExecutionOutput) { + op := &request.Operation{ + Name: opDeleteJobExecution, + HTTPMethod: "DELETE", + HTTPPath: "/things/{thingName}/jobs/{jobId}/executionNumber/{executionNumber}", + } + + if input == nil { + input = &DeleteJobExecutionInput{} + } + + output = &DeleteJobExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteJobExecution API operation for AWS IoT. +// +// Deletes a job execution. +// +// 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 IoT's +// API operation DeleteJobExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// An attempt was made to change to an invalid state, for example by deleting +// a job or a job execution which is "IN_PROGRESS" without setting the force +// parameter. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is temporarily unavailable. +// +func (c *IoT) DeleteJobExecution(input *DeleteJobExecutionInput) (*DeleteJobExecutionOutput, error) { + req, out := c.DeleteJobExecutionRequest(input) + return out, req.Send() +} + +// DeleteJobExecutionWithContext is the same as DeleteJobExecution with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteJobExecution 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 *IoT) DeleteJobExecutionWithContext(ctx aws.Context, input *DeleteJobExecutionInput, opts ...request.Option) (*DeleteJobExecutionOutput, error) { + req, out := c.DeleteJobExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteOTAUpdate = "DeleteOTAUpdate" // DeleteOTAUpdateRequest generates a "aws/request.Request" representing the @@ -3044,8 +3336,8 @@ func (c *IoT) DeleteThingRequest(input *DeleteThingInput) (req *request.Request, // The specified resource does not exist. // // * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of a thing passed to a command is different -// than the version specified with the --version parameter. +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. // // * ErrCodeInvalidRequestException "InvalidRequestException" // The request is not valid. @@ -3139,8 +3431,8 @@ func (c *IoT) DeleteThingGroupRequest(input *DeleteThingGroupInput) (req *reques // The request is not valid. // // * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of a thing passed to a command is different -// than the version specified with the --version parameter. +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -4923,7 +5215,7 @@ func (c *IoT) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Reques // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) { req, out := c.DetachPolicyRequest(input) @@ -5351,7 +5643,8 @@ func (c *IoT) GetEffectivePoliciesRequest(input *GetEffectivePoliciesInput) (req // GetEffectivePolicies API operation for AWS IoT. // -// Gets effective policies. +// Gets a list of the policies that have an effect on the authorization behavior +// of the specified device when it connects to the AWS IoT device gateway. // // 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 @@ -5380,7 +5673,7 @@ func (c *IoT) GetEffectivePoliciesRequest(input *GetEffectivePoliciesInput) (req // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) GetEffectivePolicies(input *GetEffectivePoliciesInput) (*GetEffectivePoliciesOutput, error) { req, out := c.GetEffectivePoliciesRequest(input) @@ -6258,7 +6551,7 @@ func (c *IoT) ListAttachedPoliciesRequest(input *ListAttachedPoliciesInput) (req // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) ListAttachedPolicies(input *ListAttachedPoliciesInput) (*ListAttachedPoliciesOutput, error) { req, out := c.ListAttachedPoliciesRequest(input) @@ -7868,7 +8161,7 @@ func (c *IoT) ListTargetsForPolicyRequest(input *ListTargetsForPolicyInput) (req // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) { req, out := c.ListTargetsForPolicyRequest(input) @@ -8818,7 +9111,7 @@ func (c *IoT) RegisterCACertificateRequest(input *RegisterCACertificateInput) (r // The rate exceeds the limit. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -10089,7 +10382,9 @@ func (c *IoT) TestAuthorizationRequest(input *TestAuthorizationInput) (req *requ // TestAuthorization API operation for AWS IoT. // -// Test custom authorization. +// Tests if a specified principal is authorized to perform an AWS IoT action +// on a specified resource. Use this to test and debug the authorization behavior +// of devices that connect to the AWS IoT device gateway. // // 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 @@ -10118,7 +10413,7 @@ func (c *IoT) TestAuthorizationRequest(input *TestAuthorizationInput) (req *requ // An unexpected error has occurred. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // func (c *IoT) TestAuthorization(input *TestAuthorizationInput) (*TestAuthorizationOutput, error) { req, out := c.TestAuthorizationRequest(input) @@ -10183,7 +10478,9 @@ func (c *IoT) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInput) (req // TestInvokeAuthorizer API operation for AWS IoT. // -// Invoke the specified custom authorizer for testing purposes. +// Tests a custom authorization behavior by invoking a specified custom authorizer. +// Use this to test and debug the custom authorization behavior of devices that +// connect to the AWS IoT device gateway. // // 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 @@ -10403,7 +10700,7 @@ func (c *IoT) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *reques // The request is not valid. // // * ErrCodeLimitExceededException "LimitExceededException" -// The number of attached entities exceeds the limit. +// A limit has been exceeded. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -11041,8 +11338,8 @@ func (c *IoT) UpdateThingRequest(input *UpdateThingInput) (req *request.Request, // The request is not valid. // // * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of a thing passed to a command is different -// than the version specified with the --version parameter. +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -11136,8 +11433,8 @@ func (c *IoT) UpdateThingGroupRequest(input *UpdateThingGroupInput) (req *reques // The request is not valid. // // * ErrCodeVersionConflictException "VersionConflictException" -// An exception thrown when the version of a thing passed to a command is different -// than the version specified with the --version parameter. +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. // // * ErrCodeThrottlingException "ThrottlingException" // The rate exceeds the limit. @@ -11258,7 +11555,8 @@ func (c *IoT) UpdateThingGroupsForThingWithContext(ctx aws.Context, input *Updat type AcceptCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -11343,6 +11641,9 @@ type Action struct { // Write to an Amazon Kinesis Firehose stream. Firehose *FirehoseAction `locationName:"firehose" type:"structure"` + // Sends message data to an AWS IoT Analytics channel. + IotAnalytics *IotAnalyticsAction `locationName:"iotAnalytics" type:"structure"` + // Write data to an Amazon Kinesis stream. Kinesis *KinesisAction `locationName:"kinesis" type:"structure"` @@ -11486,6 +11787,12 @@ func (s *Action) SetFirehose(v *FirehoseAction) *Action { return s } +// SetIotAnalytics sets the IotAnalytics field's value. +func (s *Action) SetIotAnalytics(v *IotAnalyticsAction) *Action { + s.IotAnalytics = v + return s +} + // SetKinesis sets the Kinesis field's value. func (s *Action) SetKinesis(v *KinesisAction) *Action { s.Kinesis = v @@ -12103,10 +12410,10 @@ type AuthorizerDescription struct { AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` // The UNIX timestamp of when the authorizer was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The UNIX timestamp of when the authorizer was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The status of the authorizer. Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` @@ -12221,7 +12528,7 @@ type CACertificate struct { CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The status of the CA certificate. // @@ -12281,13 +12588,16 @@ type CACertificateDescription struct { CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + // The customer version of the CA certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` + // The generation ID of the CA certificate. GenerationId *string `locationName:"generationId" type:"string"` - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + // The date the CA certificate was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The owner of the CA certificate. OwnedBy *string `locationName:"ownedBy" type:"string"` @@ -12370,7 +12680,8 @@ func (s *CACertificateDescription) SetStatus(v string) *CACertificateDescription type CancelCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -12422,12 +12733,137 @@ func (s CancelCertificateTransferOutput) GoString() string { return s.String() } +type CancelJobExecutionInput struct { + _ struct{} `type:"structure"` + + // (Optional) The expected current version of the job execution. Each time you + // update the job execution, its version is incremented. If the version of the + // job execution stored in Jobs does not match, the update is rejected with + // a VersionMismatch error, and an ErrorResponse that contains the current job + // execution status data is returned. (This makes it unnecessary to perform + // a separate DescribeJobExecution request in order to obtain the job execution + // status data.) + ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` + + // (Optional) If true the job execution will be canceled if it has status IN_PROGRESS + // or QUEUED, otherwise the job execution will be canceled only if it has status + // QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and + // you do not set force to true, then an InvalidStateTransitionException will + // be thrown. The default is false. + // + // Canceling a job execution which is "IN_PROGRESS", will cause the device to + // be unable to update the job execution status. Use caution and ensure that + // the device is able to recover to a valid state. + Force *bool `location:"querystring" locationName:"force" type:"boolean"` + + // The ID of the job to be canceled. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` + + // A collection of name/value pairs that describe the status of the job execution. + // If not specified, the statusDetails are unchanged. You can specify at most + // 10 name/value pairs. + StatusDetails map[string]*string `locationName:"statusDetails" type:"map"` + + // The name of the thing whose execution of the job will be canceled. + // + // ThingName is a required field + ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelJobExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelJobExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelJobExecutionInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.ThingName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingName")) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *CancelJobExecutionInput) SetExpectedVersion(v int64) *CancelJobExecutionInput { + s.ExpectedVersion = &v + return s +} + +// SetForce sets the Force field's value. +func (s *CancelJobExecutionInput) SetForce(v bool) *CancelJobExecutionInput { + s.Force = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *CancelJobExecutionInput) SetJobId(v string) *CancelJobExecutionInput { + s.JobId = &v + return s +} + +// SetStatusDetails sets the StatusDetails field's value. +func (s *CancelJobExecutionInput) SetStatusDetails(v map[string]*string) *CancelJobExecutionInput { + s.StatusDetails = v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *CancelJobExecutionInput) SetThingName(v string) *CancelJobExecutionInput { + s.ThingName = &v + return s +} + +type CancelJobExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CancelJobExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobExecutionOutput) GoString() string { + return s.String() +} + type CancelJobInput struct { _ struct{} `type:"structure"` // An optional comment string describing why the job was canceled. Comment *string `locationName:"comment" type:"string"` + // (Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" + // are canceled, otherwise only job executions with status "QUEUED" are canceled. + // The default is false. + // + // Canceling a job which is "IN_PROGRESS", will cause a device which is executing + // the job to be unable to update the job execution status. Use caution and + // ensure that each device executing a job which is canceled is able to recover + // to a valid state. + Force *bool `location:"querystring" locationName:"force" type:"boolean"` + // The unique identifier you assigned to this job when it was created. // // JobId is a required field @@ -12466,6 +12902,12 @@ func (s *CancelJobInput) SetComment(v string) *CancelJobInput { return s } +// SetForce sets the Force field's value. +func (s *CancelJobInput) SetForce(v bool) *CancelJobInput { + s.Force = &v + return s +} + // SetJobId sets the JobId field's value. func (s *CancelJobInput) SetJobId(v string) *CancelJobInput { s.JobId = &v @@ -12520,11 +12962,12 @@ type Certificate struct { // The ARN of the certificate. CertificateArn *string `locationName:"certificateArn" type:"string"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The status of the certificate. // @@ -12583,14 +13026,16 @@ type CertificateDescription struct { CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + // The customer version of the certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` + // The generation ID of the certificate. GenerationId *string `locationName:"generationId" type:"string"` // The date and time the certificate was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The ID of the AWS account that owns the certificate. OwnedBy *string `locationName:"ownedBy" type:"string"` @@ -14739,7 +15184,8 @@ func (s DeleteAuthorizerOutput) GoString() string { type DeleteCACertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate to delete. + // The ID of the certificate to delete. (The last part of the certificate ARN + // contains the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` @@ -14796,7 +15242,8 @@ func (s DeleteCACertificateOutput) GoString() string { type DeleteCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -14857,6 +15304,187 @@ func (s DeleteCertificateOutput) GoString() string { return s.String() } +type DeleteJobExecutionInput struct { + _ struct{} `type:"structure"` + + // The ID of the job execution to be deleted. The executionNumber refers to + // the execution of a particular job on a particular device. + // + // Note that once a job execution is deleted, the executionNumber may be reused + // by IoT, so be sure you get and use the correct value here. + // + // ExecutionNumber is a required field + ExecutionNumber *int64 `location:"uri" locationName:"executionNumber" type:"long" required:"true"` + + // (Optional) When true, you can delete a job execution which is "IN_PROGRESS". + // Otherwise, you can only delete a job execution which is in a terminal state + // ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception + // will occur. The default is false. + // + // Deleting a job execution which is "IN_PROGRESS", will cause the device to + // be unable to access job information or update the job execution status. Use + // caution and ensure that the device is able to recover to a valid state. + Force *bool `location:"querystring" locationName:"force" type:"boolean"` + + // The ID of the job whose execution on a particular device will be deleted. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` + + // The name of the thing whose job execution will be deleted. + // + // ThingName is a required field + ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteJobExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteJobExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteJobExecutionInput"} + if s.ExecutionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionNumber")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.ThingName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingName")) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExecutionNumber sets the ExecutionNumber field's value. +func (s *DeleteJobExecutionInput) SetExecutionNumber(v int64) *DeleteJobExecutionInput { + s.ExecutionNumber = &v + return s +} + +// SetForce sets the Force field's value. +func (s *DeleteJobExecutionInput) SetForce(v bool) *DeleteJobExecutionInput { + s.Force = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *DeleteJobExecutionInput) SetJobId(v string) *DeleteJobExecutionInput { + s.JobId = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *DeleteJobExecutionInput) SetThingName(v string) *DeleteJobExecutionInput { + s.ThingName = &v + return s +} + +type DeleteJobExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteJobExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobExecutionOutput) GoString() string { + return s.String() +} + +type DeleteJobInput struct { + _ struct{} `type:"structure"` + + // (Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, + // you can only delete a job which is in a terminal state ("COMPLETED" or "CANCELED") + // or an exception will occur. The default is false. + // + // Deleting a job which is "IN_PROGRESS", will cause a device which is executing + // the job to be unable to access job information or update the job execution + // status. Use caution and ensure that each device executing a job which is + // deleted is able to recover to a valid state. + Force *bool `location:"querystring" locationName:"force" type:"boolean"` + + // The ID of the job to be deleted. + // + // After a job deletion is completed, you may reuse this jobId when you create + // a new job. However, this is not recommended, and you must ensure that your + // devices are not using the jobId to refer to the deleted job. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForce sets the Force field's value. +func (s *DeleteJobInput) SetForce(v bool) *DeleteJobInput { + s.Force = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *DeleteJobInput) SetJobId(v string) *DeleteJobInput { + s.JobId = &v + return s +} + +type DeleteJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobOutput) GoString() string { + return s.String() +} + type DeleteOTAUpdateInput struct { _ struct{} `type:"structure"` @@ -15734,7 +16362,8 @@ func (s *DescribeCACertificateOutput) SetRegistrationConfig(v *RegistrationConfi type DescribeCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -15899,13 +16528,13 @@ type DescribeEventConfigurationsOutput struct { _ struct{} `type:"structure"` // The creation date of the event configuration. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The event configurations. EventConfigurations map[string]*Configuration `locationName:"eventConfigurations" type:"map"` // The date the event configurations were last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` } // String returns the string representation @@ -16590,7 +17219,7 @@ type DescribeThingRegistrationTaskOutput struct { _ struct{} `type:"structure"` // The task creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The number of things that failed to be provisioned. FailureCount *int64 `locationName:"failureCount" type:"integer"` @@ -16602,7 +17231,7 @@ type DescribeThingRegistrationTaskOutput struct { InputFileKey *string `locationName:"inputFileKey" min:"1" type:"string"` // The date when the task was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The message. Message *string `locationName:"message" type:"string"` @@ -17945,14 +18574,17 @@ func (s *GetPolicyInput) SetPolicyName(v string) *GetPolicyInput { type GetPolicyOutput struct { _ struct{} `type:"structure"` - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + // The date the policy was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The default policy version ID. DefaultVersionId *string `locationName:"defaultVersionId" type:"string"` + // The generation ID of the policy. GenerationId *string `locationName:"generationId" type:"string"` - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + // The date the policy was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The policy ARN. PolicyArn *string `locationName:"policyArn" type:"string"` @@ -18076,14 +18708,17 @@ func (s *GetPolicyVersionInput) SetPolicyVersionId(v string) *GetPolicyVersionIn type GetPolicyVersionOutput struct { _ struct{} `type:"structure"` - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + // The date the policy version was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + // The generation ID of the policy version. GenerationId *string `locationName:"generationId" type:"string"` // Specifies whether the policy version is the default. IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + // The date the policy version was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The policy ARN. PolicyArn *string `locationName:"policyArn" type:"string"` @@ -18384,6 +19019,50 @@ func (s *ImplicitDeny) SetPolicies(v []*Policy) *ImplicitDeny { return s } +// Sends messge data to an AWS IoT Analytics channel. +type IotAnalyticsAction struct { + _ struct{} `type:"structure"` + + // (deprecated) The ARN of the IoT Analytics channel to which message data will + // be sent. + ChannelArn *string `locationName:"channelArn" type:"string"` + + // The name of the IoT Analytics channel to which message data will be sent. + ChannelName *string `locationName:"channelName" type:"string"` + + // The ARN of the role which has a policy that grants IoT Analytics permission + // to send message data via IoT Analytics (iotanalytics:BatchPutMessage). + RoleArn *string `locationName:"roleArn" type:"string"` +} + +// String returns the string representation +func (s IotAnalyticsAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IotAnalyticsAction) GoString() string { + return s.String() +} + +// SetChannelArn sets the ChannelArn field's value. +func (s *IotAnalyticsAction) SetChannelArn(v string) *IotAnalyticsAction { + s.ChannelArn = &v + return s +} + +// SetChannelName sets the ChannelName field's value. +func (s *IotAnalyticsAction) SetChannelName(v string) *IotAnalyticsAction { + s.ChannelName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *IotAnalyticsAction) SetRoleArn(v string) *IotAnalyticsAction { + s.RoleArn = &v + return s +} + // The Job object contains details about a job. type Job struct { _ struct{} `type:"structure"` @@ -18392,10 +19071,10 @@ type Job struct { Comment *string `locationName:"comment" type:"string"` // The time, in milliseconds since the epoch, when the job was completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // A short text description of the job. Description *string `locationName:"description" type:"string"` @@ -18403,6 +19082,10 @@ type Job struct { // The parameters specified for the job document. DocumentParameters map[string]*string `locationName:"documentParameters" type:"map"` + // Will be true if the job was canceled with the optional force parameter set + // to true. + ForceCanceled *bool `locationName:"forceCanceled" type:"boolean"` + // An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". JobArn *string `locationName:"jobArn" type:"string"` @@ -18416,7 +19099,7 @@ type Job struct { JobProcessDetails *JobProcessDetails `locationName:"jobProcessDetails" type:"structure"` // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // Configuration for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` @@ -18476,6 +19159,12 @@ func (s *Job) SetDocumentParameters(v map[string]*string) *Job { return s } +// SetForceCanceled sets the ForceCanceled field's value. +func (s *Job) SetForceCanceled(v bool) *Job { + s.ForceCanceled = &v + return s +} + // SetJobArn sets the JobArn field's value. func (s *Job) SetJobArn(v string) *Job { s.JobArn = &v @@ -18540,18 +19229,22 @@ type JobExecution struct { // which return or update job execution information. ExecutionNumber *int64 `locationName:"executionNumber" type:"long"` + // Will be true if the job execution was canceled with the optional force parameter + // set to true. + ForceCanceled *bool `locationName:"forceCanceled" type:"boolean"` + // The unique identifier you assigned to the job when it was created. JobId *string `locationName:"jobId" min:"1" type:"string"` // The time, in milliseconds since the epoch, when the job execution was last // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp" timestampFormat:"unix"` + QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCESS, CANCELED, // or REJECTED). @@ -18562,6 +19255,10 @@ type JobExecution struct { // The ARN of the thing on which the job execution is running. ThingArn *string `locationName:"thingArn" type:"string"` + + // The version of the job execution. Job execution versions are incremented + // each time they are updated by a device. + VersionNumber *int64 `locationName:"versionNumber" type:"long"` } // String returns the string representation @@ -18580,6 +19277,12 @@ func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution { return s } +// SetForceCanceled sets the ForceCanceled field's value. +func (s *JobExecution) SetForceCanceled(v bool) *JobExecution { + s.ForceCanceled = &v + return s +} + // SetJobId sets the JobId field's value. func (s *JobExecution) SetJobId(v string) *JobExecution { s.JobId = &v @@ -18622,6 +19325,12 @@ func (s *JobExecution) SetThingArn(v string) *JobExecution { return s } +// SetVersionNumber sets the VersionNumber field's value. +func (s *JobExecution) SetVersionNumber(v int64) *JobExecution { + s.VersionNumber = &v + return s +} + // Details of the job execution status. type JobExecutionStatusDetails struct { _ struct{} `type:"structure"` @@ -18657,13 +19366,13 @@ type JobExecutionSummary struct { // The time, in milliseconds since the epoch, when the job execution was last // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp" timestampFormat:"unix"` + QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The status of the job execution. Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` @@ -18840,7 +19549,9 @@ type JobProcessDetails struct { // The number of things which successfully completed the job. NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" type:"integer"` - // The devices on which the job is executing. + // The target devices to which the job execution is being rolled out. This value + // will be null after the job execution has finished rolling out to all the + // target devices. ProcessingTargets []*string `locationName:"processingTargets" type:"list"` } @@ -18907,10 +19618,10 @@ type JobSummary struct { _ struct{} `type:"structure"` // The time, in milliseconds since the epoch, when the job completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The job ARN. JobArn *string `locationName:"jobArn" type:"string"` @@ -18919,7 +19630,7 @@ type JobSummary struct { JobId *string `locationName:"jobId" min:"1" type:"string"` // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The job summary status. Status *string `locationName:"status" type:"string" enum:"JobStatus"` @@ -20030,7 +20741,7 @@ type ListOTAUpdatesInput struct { // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // A token used to retreive the next set of results. + // A token used to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The OTA update job status. @@ -22120,7 +22831,7 @@ type OTAUpdateInfo struct { AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // A description of the OTA update. Description *string `locationName:"description" type:"string"` @@ -22129,7 +22840,7 @@ type OTAUpdateInfo struct { ErrorInfo *ErrorInfo `locationName:"errorInfo" type:"structure"` // The date when the OTA update was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The OTA update ARN. OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` @@ -22248,7 +22959,7 @@ type OTAUpdateSummary struct { _ struct{} `type:"structure"` // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The OTA update ARN. OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` @@ -22296,10 +23007,10 @@ type OutgoingCertificate struct { CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The certificate creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The date the transfer was initiated. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp" timestampFormat:"unix"` + TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` // The transfer message. TransferMessage *string `locationName:"transferMessage" type:"string"` @@ -22392,7 +23103,7 @@ type PolicyVersion struct { _ struct{} `type:"structure"` // The date and time the policy was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // Specifies whether the policy version is the default. IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` @@ -22754,10 +23465,12 @@ func (s *RegisterCertificateOutput) SetCertificateId(v string) *RegisterCertific type RegisterThingInput struct { _ struct{} `type:"structure"` - // The parameters for provisioning a thing. + // The parameters for provisioning a thing. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // for more information. Parameters map[string]*string `locationName:"parameters" type:"map"` - // The provisioning template. + // The provisioning template. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // for more information. // // TemplateBody is a required field TemplateBody *string `locationName:"templateBody" type:"string" required:"true"` @@ -22880,7 +23593,8 @@ func (s *RegistrationConfig) SetTemplateBody(v string) *RegistrationConfig { type RejectCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -23154,13 +23868,13 @@ type RoleAliasDescription struct { _ struct{} `type:"structure"` // The UNIX timestamp of when the role alias was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The number of seconds for which the credential is valid. CredentialDurationSeconds *int64 `locationName:"credentialDurationSeconds" min:"900" type:"integer"` // The UNIX timestamp of when the role alias was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The role alias owner. Owner *string `locationName:"owner" type:"string"` @@ -23168,6 +23882,7 @@ type RoleAliasDescription struct { // The role alias. RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` + // The ARN of the role alias. RoleAliasArn *string `locationName:"roleAliasArn" type:"string"` // The role ARN. @@ -23878,9 +24593,9 @@ func (s SetV2LoggingOptionsOutput) GoString() string { type SnsAction struct { _ struct{} `type:"structure"` - // The message format of the message to publish. Optional. Accepted values are - // "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this - // setting to determine if the payload should be parsed and relevant platform-specific + // (Optional) The message format of the message to publish. Accepted values + // are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses + // this setting to determine if the payload should be parsed and relevant platform-specific // bits of the payload should be extracted. To read more about SNS message formats, // see http://docs.aws.amazon.com/sns/latest/dg/json-formats.html (http://docs.aws.amazon.com/sns/latest/dg/json-formats.html) // refer to their official documentation. @@ -24268,7 +24983,7 @@ type StreamInfo struct { _ struct{} `type:"structure"` // The date when the stream was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The description of the stream. Description *string `locationName:"description" type:"string"` @@ -24277,7 +24992,7 @@ type StreamInfo struct { Files []*StreamFile `locationName:"files" min:"1" type:"list"` // The date when the stream was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // An IAM role AWS IoT assumes to access your S3 files. RoleArn *string `locationName:"roleArn" min:"20" type:"string"` @@ -24716,7 +25431,7 @@ type ThingDocument struct { // The attributes. Attributes map[string]*string `locationName:"attributes" type:"map"` - // The thing shadow. + // The shadow. Shadow *string `locationName:"shadow" type:"string"` // Thing group names. @@ -24783,7 +25498,7 @@ type ThingGroupMetadata struct { _ struct{} `type:"structure"` // The UNIX timestamp of when the thing group was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The parent thing group name. ParentGroupName *string `locationName:"parentGroupName" min:"1" type:"string"` @@ -24944,14 +25659,14 @@ type ThingTypeMetadata struct { _ struct{} `type:"structure"` // The date and time when the thing type was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // Whether the thing type is deprecated. If true, no new things could be associated // with this type. Deprecated *bool `locationName:"deprecated" type:"boolean"` // The date and time when the thing type was deprecated. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp" timestampFormat:"unix"` + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` } // String returns the string representation @@ -25027,7 +25742,7 @@ type TopicRule struct { AwsIotSqlVersion *string `locationName:"awsIotSqlVersion" type:"string"` // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The description of the rule. Description *string `locationName:"description" type:"string"` @@ -25109,7 +25824,7 @@ type TopicRuleListItem struct { _ struct{} `type:"structure"` // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The rule ARN. RuleArn *string `locationName:"ruleArn" type:"string"` @@ -25274,7 +25989,8 @@ func (s *TopicRulePayload) SetSql(v string) *TopicRulePayload { type TransferCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -25364,16 +26080,16 @@ type TransferData struct { _ struct{} `type:"structure"` // The date the transfer was accepted. - AcceptDate *time.Time `locationName:"acceptDate" type:"timestamp" timestampFormat:"unix"` + AcceptDate *time.Time `locationName:"acceptDate" type:"timestamp"` // The date the transfer was rejected. - RejectDate *time.Time `locationName:"rejectDate" type:"timestamp" timestampFormat:"unix"` + RejectDate *time.Time `locationName:"rejectDate" type:"timestamp"` // The reason why the transfer was rejected. RejectReason *string `locationName:"rejectReason" type:"string"` // The date the transfer took place. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp" timestampFormat:"unix"` + TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` // The transfer message. TransferMessage *string `locationName:"transferMessage" type:"string"` @@ -25636,7 +26352,8 @@ func (s UpdateCACertificateOutput) GoString() string { type UpdateCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -26446,6 +27163,9 @@ const ( // JobStatusCompleted is a JobStatus enum value JobStatusCompleted = "COMPLETED" + + // JobStatusDeletionInProgress is a JobStatus enum value + JobStatusDeletionInProgress = "DELETION_IN_PROGRESS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go index 92337e2e6..c07210185 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go @@ -4,11 +4,11 @@ // requests to AWS IoT. // // AWS IoT provides secure, bi-directional communication between Internet-connected -// things (such as sensors, actuators, embedded devices, or smart appliances) +// devices (such as sensors, actuators, embedded devices, or smart appliances) // and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate // with, configure rules for data processing and integration with other services, -// organize resources associated with each thing (Thing Registry), configure -// logging, and create and manage policies and credentials to authenticate things. +// organize resources associated with each device (Registry), configure logging, +// and create and manage policies and credentials to authenticate devices. // // For more information about how AWS IoT works, see the Developer Guide (http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html). // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go index 6edb10706..8320d782b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/errors.go @@ -73,10 +73,18 @@ const ( // The response is invalid. ErrCodeInvalidResponseException = "InvalidResponseException" + // ErrCodeInvalidStateTransitionException for service response error code + // "InvalidStateTransitionException". + // + // An attempt was made to change to an invalid state, for example by deleting + // a job or a job execution which is "IN_PROGRESS" without setting the force + // parameter. + ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // The number of attached entities exceeds the limit. + // A limit has been exceeded. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeMalformedPolicyException for service response error code @@ -156,8 +164,8 @@ const ( // ErrCodeVersionConflictException for service response error code // "VersionConflictException". // - // An exception thrown when the version of a thing passed to a command is different - // than the version specified with the --version parameter. + // An exception thrown when the version of an entity specified with the expectedVersion + // parameter does not match the latest version in the system. ErrCodeVersionConflictException = "VersionConflictException" // ErrCodeVersionsLimitExceededException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go index 1f03372ac..10a95d560 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "iot" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "iot" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "IoT" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the IoT client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index b99202f13..b13e6f677 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -3687,7 +3687,7 @@ type GetShardIteratorInput struct { // iterator returned is for the next (later) record. If the time stamp is older // than the current trim horizon, the iterator returned is for the oldest untrimmed // data record (TRIM_HORIZON). - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -3941,7 +3941,7 @@ type ListShardsInput struct { // for. // // You cannot specify this parameter if you specify the NextToken parameter. - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + StreamCreationTimestamp *time.Time `type:"timestamp"` // The name of the data stream whose shards you want to list. // @@ -4769,7 +4769,7 @@ type Record struct { _ struct{} `type:"structure"` // The approximate time that the record was inserted into the stream. - ApproximateArrivalTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ApproximateArrivalTimestamp *time.Time `type:"timestamp"` // The data blob. The data in the blob is both opaque and immutable to Kinesis // Data Streams, which does not inspect, interpret, or change the data in the @@ -5368,7 +5368,7 @@ type StreamDescription struct { // The approximate time that the stream was created. // // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` // The name of the stream being described. // @@ -5516,7 +5516,7 @@ type StreamDescriptionSummary struct { // The approximate time that the stream was created. // // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` // The name of the stream being described. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go index 17a59119a..2d55ac957 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "kinesis" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "kinesis" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Kinesis" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Kinesis client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index eae393011..2c321f04e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -85,11 +85,11 @@ func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *requ // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -212,7 +212,7 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // * ErrCodeInvalidAliasNameException "InvalidAliasNameException" // The request was rejected because the specified alias name is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -221,7 +221,7 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) // in the AWS Key Management Service Developer Guide. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -326,7 +326,7 @@ func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, // * ErrCodeInvalidArnException "InvalidArnException" // The request was rejected because a specified ARN was not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -338,7 +338,7 @@ func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, // see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) // in the AWS Key Management Service Developer Guide. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -449,7 +449,7 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // The request was rejected because a specified parameter is not supported or // a specified resource is not valid for this operation. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -576,11 +576,11 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -684,11 +684,11 @@ func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -799,11 +799,11 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -901,7 +901,7 @@ func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -1000,11 +1000,11 @@ func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, o // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1106,11 +1106,11 @@ func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *re // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1213,7 +1213,7 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -1222,7 +1222,7 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out // see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) // in the AWS Key Management Service Developer Guide. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1324,11 +1324,11 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1459,11 +1459,11 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1613,11 +1613,11 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1739,11 +1739,11 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -1835,7 +1835,7 @@ func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Re // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -1927,11 +1927,11 @@ func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Reques // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2030,11 +2030,11 @@ func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2153,11 +2153,11 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2291,11 +2291,11 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2419,7 +2419,7 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // The request was rejected because the marker that specifies where pagination // should next begin is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -2573,11 +2573,11 @@ func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, o // * ErrCodeInvalidArnException "InvalidArnException" // The request was rejected because a specified ARN was not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2731,11 +2731,11 @@ func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request. // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -2880,7 +2880,7 @@ func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, outpu // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3016,7 +3016,7 @@ func (c *KMS) ListResourceTagsRequest(input *ListResourceTagsInput) (req *reques // API operation ListResourceTags for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3126,7 +3126,7 @@ func (c *KMS) ListRetirableGrantsRequest(input *ListRetirableGrantsInput) (req * // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3231,7 +3231,7 @@ func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Reques // The request was rejected because a specified parameter is not supported or // a specified resource is not valid for this operation. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3240,7 +3240,7 @@ func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Reques // see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html) // in the AWS Key Management Service Developer Guide. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3363,11 +3363,11 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // * ErrCodeInvalidGrantTokenException "InvalidGrantTokenException" // The request was rejected because the specified grant token is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3485,11 +3485,11 @@ func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3593,11 +3593,11 @@ func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, // * ErrCodeInvalidGrantIdException "InvalidGrantIdException" // The request was rejected because the specified GrantId is not valid. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3709,11 +3709,11 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3813,7 +3813,7 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // API operation TagResource for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3824,7 +3824,7 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // * ErrCodeInvalidArnException "InvalidArnException" // The request was rejected because a specified ARN was not valid. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -3923,7 +3923,7 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // API operation UntagResource for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // @@ -3934,7 +3934,7 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // * ErrCodeInvalidArnException "InvalidArnException" // The request was rejected because a specified ARN was not valid. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -4050,11 +4050,11 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, // The request was rejected because the specified entity or resource could not // be found. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -4154,11 +4154,11 @@ func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req // The system timed out while trying to fulfill the request. The request can // be retried. // -// * ErrCodeInternalException "InternalException" +// * ErrCodeInternalException "KMSInternalException" // The request was rejected because an internal exception occurred. The request // can be retried. // -// * ErrCodeInvalidStateException "InvalidStateException" +// * ErrCodeInvalidStateException "KMSInvalidStateException" // The request was rejected because the state of the specified resource is not // valid for this request. // @@ -6096,7 +6096,7 @@ type GetParametersForImportOutput struct { // The time at which the import token and public key are no longer valid. After // this time, you cannot use them to make an ImportKeyMaterial request and you // must send another GetParametersForImport request to get new ones. - ParametersValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ParametersValidTo *time.Time `type:"timestamp"` // The public key to use to encrypt the key material before importing it with // ImportKeyMaterial. @@ -6200,7 +6200,7 @@ type GrantListEntry struct { Constraints *GrantConstraints `type:"structure"` // The date and time when the grant was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The unique identifier for the grant. GrantId *string `min:"1" type:"string"` @@ -6336,7 +6336,7 @@ type ImportKeyMaterialInput struct { // expires, AWS KMS deletes the key material and the CMK becomes unusable. You // must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. // Otherwise it is required. - ValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidTo *time.Time `type:"timestamp"` } // String returns the string representation @@ -6470,11 +6470,11 @@ type KeyMetadata struct { Arn *string `min:"20" type:"string"` // The date and time when the CMK was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The date and time after which AWS KMS deletes the CMK. This value is present // only when KeyState is PendingDeletion, otherwise this value is omitted. - DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionDate *time.Time `type:"timestamp"` // The description of the CMK. Description *string `type:"string"` @@ -6519,7 +6519,7 @@ type KeyMetadata struct { // expires, AWS KMS deletes the key material and the CMK becomes unusable. This // value is present only for CMKs whose Origin is EXTERNAL and whose ExpirationModel // is KEY_MATERIAL_EXPIRES, otherwise this value is omitted. - ValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidTo *time.Time `type:"timestamp"` } // String returns the string representation @@ -7803,7 +7803,7 @@ type ScheduleKeyDeletionOutput struct { _ struct{} `type:"structure"` // The date and time after which AWS KMS deletes the customer master key (CMK). - DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionDate *time.Time `type:"timestamp"` // The unique identifier of the customer master key (CMK) for which deletion // is scheduled. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go index d79e4321b..2a6511da9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go @@ -41,11 +41,11 @@ const ( ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException" // ErrCodeInternalException for service response error code - // "InternalException". + // "KMSInternalException". // // The request was rejected because an internal exception occurred. The request // can be retried. - ErrCodeInternalException = "InternalException" + ErrCodeInternalException = "KMSInternalException" // ErrCodeInvalidAliasNameException for service response error code // "InvalidAliasNameException". @@ -100,7 +100,7 @@ const ( ErrCodeInvalidMarkerException = "InvalidMarkerException" // ErrCodeInvalidStateException for service response error code - // "InvalidStateException". + // "KMSInvalidStateException". // // The request was rejected because the state of the specified resource is not // valid for this request. @@ -108,7 +108,7 @@ const ( // For more information about how key state affects the use of a CMK, see How // Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. - ErrCodeInvalidStateException = "InvalidStateException" + ErrCodeInvalidStateException = "KMSInvalidStateException" // ErrCodeKeyUnavailableException for service response error code // "KeyUnavailableException". diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go index 3ff65de5e..6d062f32f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "kms" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "kms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "KMS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the KMS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 8024623fe..cd81e4790 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -269,19 +269,21 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // CreateEventSourceMapping API operation for AWS Lambda. // -// Identifies a stream as an event source for a Lambda function. It can be either -// an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes -// the specified function when records are posted to the stream. +// Identifies a poll-based event source for a Lambda function. It can be either +// an Amazon Kinesis or DynamoDB stream, or an Amazon SQS queue. AWS Lambda +// invokes the specified function when records are posted to the event source. // -// This association between a stream source and a Lambda function is called +// This association between a poll-based source and a Lambda function is called // the event source mapping. // -// You provide mapping information (for example, which stream to read from and -// which Lambda function to invoke) in the request body. +// You provide mapping information (for example, which stream or SQS queue to +// read from and which Lambda function to invoke) in the request body. // -// Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be -// associated with multiple AWS Lambda functions. A given Lambda function can -// be associated with multiple AWS event sources. +// Amazon Kinesis or DynamoDB stream event sources can be associated with multiple +// AWS Lambda functions and a given Lambda function can be associated with multiple +// AWS event sources. For Amazon SQS, you can configure multiple queues as event +// sources for a single Lambda function, but an SQS queue can be mapped only +// to a single Lambda function. // // If you are using versioning, you can specify a specific function version // or an alias via the function name parameter. For more information about versioning, @@ -605,6 +607,11 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to update an EventSoure Mapping in CREATING, or tried to delete +// a EventSoure mapping currently in the UPDATING state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.DeleteEventSourceMappingRequest(input) @@ -2935,6 +2942,11 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to update an EventSoure Mapping in CREATING, or tried to delete +// a EventSoure mapping currently in the UPDATING state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.UpdateEventSourceMappingRequest(input) @@ -3684,18 +3696,18 @@ type CreateEventSourceMappingInput struct { // The largest number of records that AWS Lambda will retrieve from your event // source at the time of invoking your function. Your function receives an event - // with all the retrieved records. The default is 100 records. + // with all the retrieved records. The default for Amazon Kinesis and Amazon + // DynamoDB is 100 records. For SQS, the default is 1. BatchSize *int64 `min:"1" type:"integer"` // Indicates whether AWS Lambda should begin polling the event source. By default, // Enabled is true. Enabled *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB - // stream that is the event source. Any record added to this stream could cause - // AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS - // Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda - // function as JSON. + // The Amazon Resource Name (ARN) of the event source. Any record added to this + // source could cause AWS Lambda to invoke your Lambda function, it depends + // on the BatchSize. AWS Lambda POSTs the event's records to your Lambda function + // as JSON. // // EventSourceArn is a required field EventSourceArn *string `type:"string" required:"true"` @@ -3724,9 +3736,7 @@ type CreateEventSourceMappingInput struct { // in the Amazon Kinesis API Reference Guide or GetShardIterator (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) // in the Amazon DynamoDB API Reference Guide. The AT_TIMESTAMP value is supported // only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). - // - // StartingPosition is a required field - StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"` + StartingPosition *string `type:"string" enum:"EventSourcePosition"` // The timestamp of the data record from which to start reading. Used with shard // iterator type (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) @@ -3734,7 +3744,7 @@ type CreateEventSourceMappingInput struct { // returned is for the next (later) record. If the timestamp is older than the // current trim horizon, the iterator returned is for the oldest untrimmed data // record (TRIM_HORIZON). Valid only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). - StartingPositionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + StartingPositionTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -3762,9 +3772,6 @@ func (s *CreateEventSourceMappingInput) Validate() error { if s.FunctionName != nil && len(*s.FunctionName) < 1 { invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) } - if s.StartingPosition == nil { - invalidParams.Add(request.NewErrParamRequired("StartingPosition")) - } if invalidParams.Len() > 0 { return invalidParams @@ -4422,7 +4429,8 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } -// Describes mapping between an Amazon Kinesis stream and a Lambda function. +// Describes mapping between an Amazon Kinesis or DynamoDB stream or an Amazon +// SQS queue and a Lambda function. type EventSourceMappingConfiguration struct { _ struct{} `type:"structure"` @@ -4431,15 +4439,16 @@ type EventSourceMappingConfiguration struct { // with all the retrieved records. BatchSize *int64 `min:"1" type:"integer"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source - // of events. + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream or + // the SQS queue that is the source of events. EventSourceArn *string `type:"string"` - // The Lambda function to invoke when AWS Lambda detects an event on the stream. + // The Lambda function to invoke when AWS Lambda detects an event on the poll-based + // source. FunctionArn *string `type:"string"` // The UTC time string indicating the last time the event mapping was updated. - LastModified *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModified *time.Time `type:"timestamp"` // The result of the last AWS Lambda invocation of your Lambda function. LastProcessingResult *string `type:"string"` @@ -5648,8 +5657,8 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream. (This parameter - // is optional.) + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream, + // or an SQS queue. (This parameter is optional.) EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"` // The name of the Lambda function. @@ -7161,6 +7170,9 @@ const ( // RuntimeDotnetcore20 is a Runtime enum value RuntimeDotnetcore20 = "dotnetcore2.0" + // RuntimeDotnetcore21 is a Runtime enum value + RuntimeDotnetcore21 = "dotnetcore2.1" + // RuntimeNodejs43Edge is a Runtime enum value RuntimeNodejs43Edge = "nodejs4.3-edge" diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go index 57daa1c34..447b49ed1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go @@ -130,6 +130,14 @@ const ( // The resource already exists. ErrCodeResourceConflictException = "ResourceConflictException" + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // The operation conflicts with the resource's availability. For example, you + // attempted to update an EventSoure Mapping in CREATING, or tried to delete + // a EventSoure mapping currently in the UPDATING state. + ErrCodeResourceInUseException = "ResourceInUseException" + // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go index 83c5e3094..1cccdda08 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "lambda" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "lambda" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lambda" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Lambda client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index c396a9b78..f38a19571 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -4249,14 +4249,14 @@ type BotAliasMetadata struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -4334,7 +4334,7 @@ type BotChannelAssociation struct { // The date that the association between the Amazon Lex bot and the channel // was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A text description of the association you are creating. Description *string `locationName:"description" type:"string"` @@ -4430,14 +4430,14 @@ type BotMetadata struct { _ struct{} `type:"structure"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` // The date that the bot was updated. When you create a bot, the creation date // and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot. Name *string `locationName:"name" min:"2" type:"string"` @@ -4745,7 +4745,7 @@ type CreateBotVersionOutput struct { ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` // The date when the bot version was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -4762,7 +4762,7 @@ type CreateBotVersionOutput struct { Intents []*Intent `locationName:"intents" type:"list"` // The date when the $LATEST version of this bot was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // Specifies the target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -4954,7 +4954,7 @@ type CreateIntentVersionOutput struct { ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -4970,7 +4970,7 @@ type CreateIntentVersionOutput struct { FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` // The date that the intent was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -5155,7 +5155,7 @@ type CreateSlotTypeVersionOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -5166,7 +5166,7 @@ type CreateSlotTypeVersionOutput struct { // The date that the slot type was updated. When you create a resource, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -6128,14 +6128,14 @@ type GetBotAliasOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -6400,7 +6400,7 @@ type GetBotChannelAssociationOutput struct { BotName *string `locationName:"botName" min:"2" type:"string"` // The date that the association between the bot and the channel was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the association between the bot and the channel. Description *string `locationName:"description" type:"string"` @@ -6721,7 +6721,7 @@ type GetBotOutput struct { ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -6738,7 +6738,7 @@ type GetBotOutput struct { // The date that the bot was updated. When you create a resource, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -7562,7 +7562,7 @@ type GetImportOutput struct { _ struct{} `type:"structure"` // A timestamp for the date and time that the import job was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A string that describes why an import job failed to complete. FailureReason []*string `locationName:"failureReason" type:"list"` @@ -7710,7 +7710,7 @@ type GetIntentOutput struct { ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -7728,7 +7728,7 @@ type GetIntentOutput struct { // The date that the intent was updated. When you create a resource, the creation // date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -8112,7 +8112,7 @@ type GetSlotTypeOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -8123,7 +8123,7 @@ type GetSlotTypeOutput struct { // The date that the slot type was updated. When you create a resource, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -8565,14 +8565,14 @@ type IntentMetadata struct { _ struct{} `type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` // The date that the intent was updated. When you create an intent, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -8893,14 +8893,14 @@ type PutBotAliasOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -9251,7 +9251,7 @@ type PutBotOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -9269,7 +9269,7 @@ type PutBotOutput struct { // The date that the bot was updated. When you create a resource, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -9683,7 +9683,7 @@ type PutIntentOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -9703,7 +9703,7 @@ type PutIntentOutput struct { // The date that the intent was updated. When you create a resource, the creation // date and last update dates are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -9973,7 +9973,7 @@ type PutSlotTypeOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -9984,7 +9984,7 @@ type PutSlotTypeOutput struct { // The date that the slot type was updated. When you create a slot type, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -10248,14 +10248,14 @@ type SlotTypeMetadata struct { _ struct{} `type:"structure"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` // The date that the slot type was updated. When you create a resource, the // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -10393,7 +10393,7 @@ type StartImportOutput struct { _ struct{} `type:"structure"` // A timestamp for the date and time that the import job was requested. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The identifier for the specific import job. ImportId *string `locationName:"importId" type:"string"` @@ -10537,10 +10537,10 @@ type UtteranceData struct { DistinctUsers *int64 `locationName:"distinctUsers" type:"integer"` // The date that the utterance was first recorded. - FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp" timestampFormat:"unix"` + FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp"` // The date that the utterance was last recorded. - LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp" timestampFormat:"unix"` + LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp"` // The text that was entered by the user or the text representation of an audio // clip. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go index cc122d1a2..86d1a44d2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "models.lex" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "models.lex" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lex Model Building Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the LexModelBuildingService client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 0feedda0a..8178113cf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -10166,7 +10166,7 @@ type Disk struct { AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` // The date when the disk was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // (Deprecated) The number of GB in use by the disk. // @@ -10349,7 +10349,7 @@ type DiskSnapshot struct { Arn *string `locationName:"arn" type:"string"` // The date when the disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The Amazon Resource Name (ARN) of the source disk from which you are creating // the disk snapshot. @@ -10466,7 +10466,7 @@ type Domain struct { Arn *string `locationName:"arn" type:"string"` // The date when the domain recordset was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // An array of key-value pairs containing information about the domain entries. DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` @@ -11325,7 +11325,7 @@ type GetInstanceMetricDataInput struct { // The end time of the time period. // // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` // The name of the instance for which you want to get metrics data. // @@ -11345,7 +11345,7 @@ type GetInstanceMetricDataInput struct { // The start time of the time period. // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` // The instance statistics. // @@ -11961,7 +11961,7 @@ type GetLoadBalancerMetricDataInput struct { // The end time of the period. // // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` // The name of the load balancer. // @@ -12061,7 +12061,7 @@ type GetLoadBalancerMetricDataInput struct { // The start time of the period. // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` // An array of statistics that you want to request metrics for. Valid values // are listed below. @@ -12906,7 +12906,7 @@ type Instance struct { BundleId *string `locationName:"bundleId" type:"string"` // The timestamp when the instance was created (e.g., 1479734909.17). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The size of the vCPU and the amount of RAM for the instance. Hardware *InstanceHardware `locationName:"hardware" type:"structure"` @@ -13080,7 +13080,7 @@ type InstanceAccessDetails struct { CertKey *string `locationName:"certKey" type:"string"` // For SSH access, the date on which the temporary keys expire. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"` + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` // The name of this Amazon Lightsail instance. InstanceName *string `locationName:"instanceName" type:"string"` @@ -13519,7 +13519,7 @@ type InstanceSnapshot struct { Arn *string `locationName:"arn" type:"string"` // The timestamp when the snapshot was created (e.g., 1479907467.024). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // An array of disk objects containing information about all block storage disks. FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` @@ -13735,7 +13735,7 @@ type KeyPair struct { Arn *string `locationName:"arn" type:"string"` // The timestamp when the key pair was created (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The RSA fingerprint of the key pair. Fingerprint *string `locationName:"fingerprint" type:"string"` @@ -13819,7 +13819,7 @@ type LoadBalancer struct { ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` // The date when your load balancer was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The DNS name of your Lightsail load balancer. DnsName *string `locationName:"dnsName" type:"string"` @@ -13979,7 +13979,7 @@ type LoadBalancerTlsCertificate struct { Arn *string `locationName:"arn" type:"string"` // The time when you created your SSL/TLS certificate. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The domain name for your SSL/TLS certificate. DomainName *string `locationName:"domainName" type:"string"` @@ -13995,7 +13995,7 @@ type LoadBalancerTlsCertificate struct { IsAttached *bool `locationName:"isAttached" type:"boolean"` // The time when the SSL/TLS certificate was issued. - IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp" timestampFormat:"unix"` + IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` // The issuer of the certificate. Issuer *string `locationName:"issuer" type:"string"` @@ -14014,10 +14014,10 @@ type LoadBalancerTlsCertificate struct { Name *string `locationName:"name" type:"string"` // The timestamp when the SSL/TLS certificate expires. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"unix"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The timestamp when the SSL/TLS certificate is first valid. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"unix"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` // An object containing information about the status of Lightsail's managed // renewal for the certificate. @@ -14051,7 +14051,7 @@ type LoadBalancerTlsCertificate struct { RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` // The timestamp when the SSL/TLS certificate was revoked. - RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp" timestampFormat:"unix"` + RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` // The serial number of the certificate. Serial *string `locationName:"serial" type:"string"` @@ -14418,7 +14418,7 @@ type MetricDatapoint struct { Sum *float64 `locationName:"sum" type:"double"` // The timestamp (e.g., 1479816991.349). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` // The unit. Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` @@ -14581,7 +14581,7 @@ type Operation struct { _ struct{} `type:"structure"` // The timestamp when the operation was initialized (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The error code. ErrorCode *string `locationName:"errorCode" type:"string"` @@ -14614,7 +14614,7 @@ type Operation struct { Status *string `locationName:"status" type:"string" enum:"OperationStatus"` // The timestamp when the status was changed (e.g., 1479816991.349). - StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp" timestampFormat:"unix"` + StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` } // String returns the string representation @@ -15194,7 +15194,7 @@ type StaticIp struct { AttachedTo *string `locationName:"attachedTo" type:"string"` // The timestamp when the static IP was created (e.g., 1479735304.222). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The static IP address. IpAddress *string `locationName:"ipAddress" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go index a76cf79e0..b9f97faa8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "lightsail" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "lightsail" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lightsail" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Lightsail client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go new file mode 100644 index 000000000..62a12b0c1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go @@ -0,0 +1,1611 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +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" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAssociateMemberAccount = "AssociateMemberAccount" + +// AssociateMemberAccountRequest generates a "aws/request.Request" representing the +// client's request for the AssociateMemberAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AssociateMemberAccount for more information on using the AssociateMemberAccount +// 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 AssociateMemberAccountRequest method. +// req, resp := client.AssociateMemberAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount +func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) { + op := &request.Operation{ + Name: opAssociateMemberAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateMemberAccountInput{} + } + + output = &AssociateMemberAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateMemberAccount API operation for Amazon Macie. +// +// Associates a specified AWS account with Amazon Macie as a member 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 Macie's +// API operation AssociateMemberAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount +func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) { + req, out := c.AssociateMemberAccountRequest(input) + return out, req.Send() +} + +// AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateMemberAccount 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 *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) { + req, out := c.AssociateMemberAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateS3Resources = "AssociateS3Resources" + +// AssociateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the AssociateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AssociateS3Resources for more information on using the AssociateS3Resources +// 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 AssociateS3ResourcesRequest method. +// req, resp := client.AssociateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources +func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) { + op := &request.Operation{ + Name: opAssociateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateS3ResourcesInput{} + } + + output = &AssociateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateS3Resources API operation for Amazon Macie. +// +// Associates specified S3 resources with Amazon Macie for monitoring and data +// classification. If memberAccountId isn't specified, the action associates +// specified S3 resources with Macie for the current master account. If memberAccountId +// is specified, the action associates specified S3 resources with Macie for +// the specified member 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 Macie's +// API operation AssociateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources +func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) { + req, out := c.AssociateS3ResourcesRequest(input) + return out, req.Send() +} + +// AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateS3Resources 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 *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) { + req, out := c.AssociateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateMemberAccount = "DisassociateMemberAccount" + +// DisassociateMemberAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateMemberAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DisassociateMemberAccount for more information on using the DisassociateMemberAccount +// 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 DisassociateMemberAccountRequest method. +// req, resp := client.DisassociateMemberAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount +func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) { + op := &request.Operation{ + Name: opDisassociateMemberAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateMemberAccountInput{} + } + + output = &DisassociateMemberAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateMemberAccount API operation for Amazon Macie. +// +// Removes the specified member account from Amazon Macie. +// +// 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 Macie's +// API operation DisassociateMemberAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount +func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) { + req, out := c.DisassociateMemberAccountRequest(input) + return out, req.Send() +} + +// DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateMemberAccount 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 *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) { + req, out := c.DisassociateMemberAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateS3Resources = "DisassociateS3Resources" + +// DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DisassociateS3Resources for more information on using the DisassociateS3Resources +// 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 DisassociateS3ResourcesRequest method. +// req, resp := client.DisassociateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources +func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) { + op := &request.Operation{ + Name: opDisassociateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateS3ResourcesInput{} + } + + output = &DisassociateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateS3Resources API operation for Amazon Macie. +// +// Removes specified S3 resources from being monitored by Amazon Macie. If memberAccountId +// isn't specified, the action removes specified S3 resources from Macie for +// the current master account. If memberAccountId is specified, the action removes +// specified S3 resources from Macie for the specified member 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 Macie's +// API operation DisassociateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources +func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) { + req, out := c.DisassociateS3ResourcesRequest(input) + return out, req.Send() +} + +// DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateS3Resources 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 *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) { + req, out := c.DisassociateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListMemberAccounts = "ListMemberAccounts" + +// ListMemberAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListMemberAccounts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListMemberAccounts for more information on using the ListMemberAccounts +// 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 ListMemberAccountsRequest method. +// req, resp := client.ListMemberAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts +func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { + op := &request.Operation{ + Name: opListMemberAccounts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListMemberAccountsInput{} + } + + output = &ListMemberAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMemberAccounts API operation for Amazon Macie. +// +// Lists all Amazon Macie member accounts for the current Amazon Macie master +// 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 Macie's +// API operation ListMemberAccounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts +func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + return out, req.Send() +} + +// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListMemberAccounts 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 *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMemberAccounts 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 ListMemberAccounts operation. +// pageNum := 0 +// err := client.ListMemberAccountsPages(params, +// func(page *ListMemberAccountsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error { + return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMemberAccountsPagesWithContext same as ListMemberAccountsPages 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 *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMemberAccountsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMemberAccountsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListS3Resources = "ListS3Resources" + +// ListS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListS3Resources for more information on using the ListS3Resources +// 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 ListS3ResourcesRequest method. +// req, resp := client.ListS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources +func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) { + op := &request.Operation{ + Name: opListS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListS3ResourcesInput{} + } + + output = &ListS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListS3Resources API operation for Amazon Macie. +// +// Lists all the S3 resources associated with Amazon Macie. If memberAccountId +// isn't specified, the action lists the S3 resources associated with Amazon +// Macie for the current master account. If memberAccountId is specified, the +// action lists the S3 resources associated with Amazon Macie for the specified +// member 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 Macie's +// API operation ListS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources +func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) { + req, out := c.ListS3ResourcesRequest(input) + return out, req.Send() +} + +// ListS3ResourcesWithContext is the same as ListS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See ListS3Resources 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 *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) { + req, out := c.ListS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListS3ResourcesPages iterates over the pages of a ListS3Resources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListS3Resources 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 ListS3Resources operation. +// pageNum := 0 +// err := client.ListS3ResourcesPages(params, +// func(page *ListS3ResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error { + return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListS3ResourcesPagesWithContext same as ListS3ResourcesPages 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 *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListS3ResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListS3ResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opUpdateS3Resources = "UpdateS3Resources" + +// UpdateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateS3Resources for more information on using the UpdateS3Resources +// 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 UpdateS3ResourcesRequest method. +// req, resp := client.UpdateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources +func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) { + op := &request.Operation{ + Name: opUpdateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateS3ResourcesInput{} + } + + output = &UpdateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateS3Resources API operation for Amazon Macie. +// +// Updates the classification types for the specified S3 resources. If memberAccountId +// isn't specified, the action updates the classification types of the S3 resources +// associated with Amazon Macie for the current master account. If memberAccountId +// is specified, the action updates the classification types of the S3 resources +// associated with Amazon Macie for the specified member 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 Macie's +// API operation UpdateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources +func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) { + req, out := c.UpdateS3ResourcesRequest(input) + return out, req.Send() +} + +// UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateS3Resources 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 *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) { + req, out := c.UpdateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateMemberAccountInput struct { + _ struct{} `type:"structure"` + + // The ID of the AWS account that you want to associate with Amazon Macie as + // a member account. + // + // MemberAccountId is a required field + MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateMemberAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateMemberAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateMemberAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"} + if s.MemberAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput { + s.MemberAccountId = &v + return s +} + +type AssociateMemberAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateMemberAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateMemberAccountOutput) GoString() string { + return s.String() +} + +type AssociateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The ID of the Amazon Macie member account whose resources you want to associate + // with Macie. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // The S3 resources that you want to associate with Amazon Macie for monitoring + // and data classification. + // + // S3Resources is a required field + S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"` +} + +// String returns the string representation +func (s AssociateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"} + if s.S3Resources == nil { + invalidParams.Add(request.NewErrParamRequired("S3Resources")) + } + if s.S3Resources != nil { + for i, v := range s.S3Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetS3Resources sets the S3Resources field's value. +func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput { + s.S3Resources = v + return s +} + +type AssociateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // S3 resources that couldn't be associated with Amazon Macie. An error code + // and an error message are provided for each failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s AssociateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +// The classification type that Amazon Macie applies to the associated S3 resources. +type ClassificationType struct { + _ struct{} `type:"structure"` + + // A continuous classification of the objects that are added to a specified + // S3 bucket. Amazon Macie begins performing continuous classification after + // a bucket is successfully associated with Amazon Macie. + // + // Continuous is a required field + Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"` + + // A one-time classification of all of the existing objects in a specified S3 + // bucket. + // + // OneTime is a required field + OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"` +} + +// String returns the string representation +func (s ClassificationType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassificationType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClassificationType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClassificationType"} + if s.Continuous == nil { + invalidParams.Add(request.NewErrParamRequired("Continuous")) + } + if s.OneTime == nil { + invalidParams.Add(request.NewErrParamRequired("OneTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContinuous sets the Continuous field's value. +func (s *ClassificationType) SetContinuous(v string) *ClassificationType { + s.Continuous = &v + return s +} + +// SetOneTime sets the OneTime field's value. +func (s *ClassificationType) SetOneTime(v string) *ClassificationType { + s.OneTime = &v + return s +} + +// The classification type that Amazon Macie applies to the associated S3 resources. +// At least one of the classification types (oneTime or continuous) must be +// specified. +type ClassificationTypeUpdate struct { + _ struct{} `type:"structure"` + + // A continuous classification of the objects that are added to a specified + // S3 bucket. Amazon Macie begins performing continuous classification after + // a bucket is successfully associated with Amazon Macie. + Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"` + + // A one-time classification of all of the existing objects in a specified S3 + // bucket. + OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"` +} + +// String returns the string representation +func (s ClassificationTypeUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassificationTypeUpdate) GoString() string { + return s.String() +} + +// SetContinuous sets the Continuous field's value. +func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate { + s.Continuous = &v + return s +} + +// SetOneTime sets the OneTime field's value. +func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate { + s.OneTime = &v + return s +} + +type DisassociateMemberAccountInput struct { + _ struct{} `type:"structure"` + + // The ID of the member account that you want to remove from Amazon Macie. + // + // MemberAccountId is a required field + MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateMemberAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMemberAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateMemberAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"} + if s.MemberAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput { + s.MemberAccountId = &v + return s +} + +type DisassociateMemberAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateMemberAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMemberAccountOutput) GoString() string { + return s.String() +} + +type DisassociateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The S3 resources (buckets or prefixes) that you want to remove from being + // monitored and classified by Amazon Macie. + // + // AssociatedS3Resources is a required field + AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"` + + // The ID of the Amazon Macie member account whose resources you want to remove + // from being monitored by Amazon Macie. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` +} + +// String returns the string representation +func (s DisassociateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"} + if s.AssociatedS3Resources == nil { + invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources")) + } + if s.AssociatedS3Resources != nil { + for i, v := range s.AssociatedS3Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociatedS3Resources sets the AssociatedS3Resources field's value. +func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput { + s.AssociatedS3Resources = v + return s +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +type DisassociateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // S3 resources that couldn't be removed from being monitored and classified + // by Amazon Macie. An error code and an error message are provided for each + // failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s DisassociateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +// Includes details about the failed S3 resources. +type FailedS3Resource struct { + _ struct{} `type:"structure"` + + // The status code of a failed item. + ErrorCode *string `locationName:"errorCode" type:"string"` + + // The error message of a failed item. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The failed S3 resources. + FailedItem *S3Resource `locationName:"failedItem" type:"structure"` +} + +// String returns the string representation +func (s FailedS3Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedS3Resource) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource { + s.ErrorMessage = &v + return s +} + +// SetFailedItem sets the FailedItem field's value. +func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { + s.FailedItem = v + return s +} + +type ListMemberAccountsInput struct { + _ struct{} `type:"structure"` + + // Use this parameter to indicate the maximum number of items that you want + // in the response. The default value is 250. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // Use this parameter when paginating results. Set the value of this parameter + // to null on your first call to the ListMemberAccounts action. Subsequent calls + // to the action fill nextToken in the request with the value of nextToken from + // the previous response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { + s.NextToken = &v + return s +} + +type ListMemberAccountsOutput struct { + _ struct{} `type:"structure"` + + // A list of the Amazon Macie member accounts returned by the action. The current + // master account is also included in this list. + MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"` + + // When a response is generated, if there is more data to be listed, this parameter + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsOutput) GoString() string { + return s.String() +} + +// SetMemberAccounts sets the MemberAccounts field's value. +func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput { + s.MemberAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { + s.NextToken = &v + return s +} + +type ListS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // Use this parameter to indicate the maximum number of items that you want + // in the response. The default value is 250. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The Amazon Macie member account ID whose associated S3 resources you want + // to list. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // Use this parameter when paginating results. Set its value to null on your + // first call to the ListS3Resources action. Subsequent calls to the action + // fill nextToken in the request with the value of nextToken from the previous + // response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListS3ResourcesInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput { + s.MaxResults = &v + return s +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput { + s.NextToken = &v + return s +} + +type ListS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // When a response is generated, if there is more data to be listed, this parameter + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of the associated S3 resources returned by the action. + S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"` +} + +// String returns the string representation +func (s ListS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput { + s.NextToken = &v + return s +} + +// SetS3Resources sets the S3Resources field's value. +func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput { + s.S3Resources = v + return s +} + +// Contains information about the Amazon Macie member account. +type MemberAccount struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the Amazon Macie member account. + AccountId *string `locationName:"accountId" type:"string"` +} + +// String returns the string representation +func (s MemberAccount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MemberAccount) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *MemberAccount) SetAccountId(v string) *MemberAccount { + s.AccountId = &v + return s +} + +// Contains information about the S3 resource. This data type is used as a request +// parameter in the DisassociateS3Resources action and can be used as a response +// parameter in the AssociateS3Resources and UpdateS3Resources actions. +type S3Resource struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The prefix of the S3 bucket. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Resource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Resource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Resource"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3Resource) SetBucketName(v string) *S3Resource { + s.BucketName = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3Resource) SetPrefix(v string) *S3Resource { + s.Prefix = &v + return s +} + +// The S3 resources that you want to associate with Amazon Macie for monitoring +// and data classification. This data type is used as a request parameter in +// the AssociateS3Resources action and a response parameter in the ListS3Resources +// action. +type S3ResourceClassification struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket that you want to associate with Amazon Macie. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The classification type that you want to specify for the resource associated + // with Amazon Macie. + // + // ClassificationType is a required field + ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"` + + // The prefix of the S3 bucket that you want to associate with Amazon Macie. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3ResourceClassification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ResourceClassification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ResourceClassification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.ClassificationType == nil { + invalidParams.Add(request.NewErrParamRequired("ClassificationType")) + } + if s.ClassificationType != nil { + if err := s.ClassificationType.Validate(); err != nil { + invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification { + s.BucketName = &v + return s +} + +// SetClassificationType sets the ClassificationType field's value. +func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification { + s.ClassificationType = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification { + s.Prefix = &v + return s +} + +// The S3 resources whose classification types you want to update. This data +// type is used as a request parameter in the UpdateS3Resources action. +type S3ResourceClassificationUpdate struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket whose classification types you want to update. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The classification type that you want to update for the resource associated + // with Amazon Macie. + // + // ClassificationTypeUpdate is a required field + ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"` + + // The prefix of the S3 bucket whose classification types you want to update. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3ResourceClassificationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ResourceClassificationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ResourceClassificationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.ClassificationTypeUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate { + s.BucketName = &v + return s +} + +// SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value. +func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate { + s.ClassificationTypeUpdate = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate { + s.Prefix = &v + return s +} + +type UpdateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The AWS ID of the Amazon Macie member account whose S3 resources' classification + // types you want to update. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // The S3 resources whose classification types you want to update. + // + // S3ResourcesUpdate is a required field + S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"} + if s.S3ResourcesUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate")) + } + if s.S3ResourcesUpdate != nil { + for i, v := range s.S3ResourcesUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value. +func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput { + s.S3ResourcesUpdate = v + return s +} + +type UpdateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // The S3 resources whose classification types can't be updated. An error code + // and an error message are provided for each failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s UpdateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +const ( + // S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value + S3ContinuousClassificationTypeFull = "FULL" +) + +const ( + // S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value + S3OneTimeClassificationTypeFull = "FULL" + + // S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value + S3OneTimeClassificationTypeNone = "NONE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go b/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go new file mode 100644 index 000000000..1b8f9632f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package macie provides the client and types for making API +// requests to Amazon Macie. +// +// Amazon Macie is a security service that uses machine learning to automatically +// discover, classify, and protect sensitive data in AWS. Macie recognizes sensitive +// data such as personally identifiable information (PII) or intellectual property, +// and provides you with dashboards and alerts that give visibility into how +// this data is being accessed or moved. For more information, see the Macie +// User Guide (https://docs.aws.amazon.com/macie/latest/userguide/what-is-macie.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19 for more information on this service. +// +// See macie package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/ +// +// Using the Client +// +// To contact Amazon Macie 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 Macie client Macie for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/#New +package macie diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go b/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go new file mode 100644 index 000000000..77768d52e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go @@ -0,0 +1,32 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have required permissions to access the requested resource. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeInternalException for service response error code + // "InternalException". + // + // Internal server error. + ErrCodeInternalException = "InternalException" + + // ErrCodeInvalidInputException for service response error code + // "InvalidInputException". + // + // The request was rejected because an invalid or out-of-range value was supplied + // for an input parameter. + ErrCodeInvalidInputException = "InvalidInputException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request was rejected because it attempted to create resources beyond + // the current AWS account limits. The error code describes the limit exceeded. + ErrCodeLimitExceededException = "LimitExceededException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/service.go b/vendor/github.com/aws/aws-sdk-go/service/macie/service.go new file mode 100644 index 000000000..0b38598f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +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/jsonrpc" +) + +// Macie provides the API operation methods for making requests to +// Amazon Macie. See this package's package overview docs +// for details on the service. +// +// Macie methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Macie 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 = "Macie" // Name of service. + EndpointsID = "macie" // ID to lookup a service endpoint with. + ServiceID = "Macie" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Macie client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Macie client from just a session. +// svc := macie.New(mySession) +// +// // Create a Macie client with additional configuration +// svc := macie.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Macie { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Macie { + svc := &Macie{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-12-19", + JSONVersion: "1.1", + TargetPrefix: "MacieService", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Macie operation and runs any +// custom request initialization. +func (c *Macie) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go index 172f138eb..5d6baf7ed 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go @@ -923,7 +923,7 @@ type Container struct { ARN *string `min:"1" type:"string"` // Unix timestamp. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The DNS endpoint of the container. Use the endpoint to identify the specific // container when sending requests to the data plane. The service assigns this diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go index 23ce93615..492b3bf04 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mediastore" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "mediastore" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaStore" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaStore client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go index 455e3622f..1ebb5aeca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mq" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "mq" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "mq" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MQ client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go new file mode 100644 index 000000000..fc722da8e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -0,0 +1,16693 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package neptune + +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/query" +) + +const opAddRoleToDBCluster = "AddRoleToDBCluster" + +// AddRoleToDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the AddRoleToDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AddRoleToDBCluster for more information on using the AddRoleToDBCluster +// 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 AddRoleToDBClusterRequest method. +// req, resp := client.AddRoleToDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddRoleToDBCluster +func (c *Neptune) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *request.Request, output *AddRoleToDBClusterOutput) { + op := &request.Operation{ + Name: opAddRoleToDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddRoleToDBClusterInput{} + } + + output = &AddRoleToDBClusterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddRoleToDBCluster API operation for Amazon Neptune. +// +// Associates an Identity and Access Management (IAM) role from an Neptune DB +// 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 Amazon Neptune's +// API operation AddRoleToDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeDBClusterRoleAlreadyExistsFault "DBClusterRoleAlreadyExists" +// The specified IAM role Amazon Resource Name (ARN) is already associated with +// the specified DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" +// You have exceeded the maximum number of IAM roles that can be associated +// with the specified DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddRoleToDBCluster +func (c *Neptune) AddRoleToDBCluster(input *AddRoleToDBClusterInput) (*AddRoleToDBClusterOutput, error) { + req, out := c.AddRoleToDBClusterRequest(input) + return out, req.Send() +} + +// AddRoleToDBClusterWithContext is the same as AddRoleToDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See AddRoleToDBCluster 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 *Neptune) AddRoleToDBClusterWithContext(ctx aws.Context, input *AddRoleToDBClusterInput, opts ...request.Option) (*AddRoleToDBClusterOutput, error) { + req, out := c.AddRoleToDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" + +// AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the AddSourceIdentifierToSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AddSourceIdentifierToSubscription for more information on using the AddSourceIdentifierToSubscription +// 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 AddSourceIdentifierToSubscriptionRequest method. +// req, resp := client.AddSourceIdentifierToSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddSourceIdentifierToSubscription +func (c *Neptune) AddSourceIdentifierToSubscriptionRequest(input *AddSourceIdentifierToSubscriptionInput) (req *request.Request, output *AddSourceIdentifierToSubscriptionOutput) { + op := &request.Operation{ + Name: opAddSourceIdentifierToSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddSourceIdentifierToSubscriptionInput{} + } + + output = &AddSourceIdentifierToSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddSourceIdentifierToSubscription API operation for Amazon Neptune. +// +// Adds a source identifier to an existing event notification subscription. +// +// 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 Neptune's +// API operation AddSourceIdentifierToSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" +// +// * ErrCodeSourceNotFoundFault "SourceNotFound" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddSourceIdentifierToSubscription +func (c *Neptune) AddSourceIdentifierToSubscription(input *AddSourceIdentifierToSubscriptionInput) (*AddSourceIdentifierToSubscriptionOutput, error) { + req, out := c.AddSourceIdentifierToSubscriptionRequest(input) + return out, req.Send() +} + +// AddSourceIdentifierToSubscriptionWithContext is the same as AddSourceIdentifierToSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See AddSourceIdentifierToSubscription 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 *Neptune) AddSourceIdentifierToSubscriptionWithContext(ctx aws.Context, input *AddSourceIdentifierToSubscriptionInput, opts ...request.Option) (*AddSourceIdentifierToSubscriptionOutput, error) { + req, out := c.AddSourceIdentifierToSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfuly. +// +// 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/neptune-2014-10-31/AddTagsToResource +func (c *Neptune) 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) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddTagsToResource API operation for Amazon Neptune. +// +// Adds metadata tags to an Amazon Neptune resource. These tags can also be +// used with cost allocation reporting to track cost associated with Amazon +// Neptune resources, or used in a Condition statement in an IAM policy for +// Amazon Neptune. +// +// 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 Neptune's +// API operation AddTagsToResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/AddTagsToResource +func (c *Neptune) 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 *Neptune) 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 opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" + +// ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the +// client's request for the ApplyPendingMaintenanceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ApplyPendingMaintenanceAction for more information on using the ApplyPendingMaintenanceAction +// 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 ApplyPendingMaintenanceActionRequest method. +// req, resp := client.ApplyPendingMaintenanceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ApplyPendingMaintenanceAction +func (c *Neptune) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanceActionInput) (req *request.Request, output *ApplyPendingMaintenanceActionOutput) { + op := &request.Operation{ + Name: opApplyPendingMaintenanceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ApplyPendingMaintenanceActionInput{} + } + + output = &ApplyPendingMaintenanceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ApplyPendingMaintenanceAction API operation for Amazon Neptune. +// +// Applies a pending maintenance action to a resource (for example, to a DB +// 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 Amazon Neptune's +// API operation ApplyPendingMaintenanceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" +// The specified resource ID was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ApplyPendingMaintenanceAction +func (c *Neptune) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { + req, out := c.ApplyPendingMaintenanceActionRequest(input) + return out, req.Send() +} + +// ApplyPendingMaintenanceActionWithContext is the same as ApplyPendingMaintenanceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ApplyPendingMaintenanceAction 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 *Neptune) ApplyPendingMaintenanceActionWithContext(ctx aws.Context, input *ApplyPendingMaintenanceActionInput, opts ...request.Option) (*ApplyPendingMaintenanceActionOutput, error) { + req, out := c.ApplyPendingMaintenanceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" + +// CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CopyDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CopyDBClusterParameterGroup for more information on using the CopyDBClusterParameterGroup +// 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 CopyDBClusterParameterGroupRequest method. +// req, resp := client.CopyDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterParameterGroup +func (c *Neptune) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGroupInput) (req *request.Request, output *CopyDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opCopyDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyDBClusterParameterGroupInput{} + } + + output = &CopyDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyDBClusterParameterGroup API operation for Amazon Neptune. +// +// Copies the specified DB cluster parameter 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 Neptune's +// API operation CopyDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// Request would result in user exceeding the allowed number of DB parameter +// groups. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterParameterGroup +func (c *Neptune) CopyDBClusterParameterGroup(input *CopyDBClusterParameterGroupInput) (*CopyDBClusterParameterGroupOutput, error) { + req, out := c.CopyDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// CopyDBClusterParameterGroupWithContext is the same as CopyDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CopyDBClusterParameterGroup 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 *Neptune) CopyDBClusterParameterGroupWithContext(ctx aws.Context, input *CopyDBClusterParameterGroupInput, opts ...request.Option) (*CopyDBClusterParameterGroupOutput, error) { + req, out := c.CopyDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" + +// CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CopyDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CopyDBClusterSnapshot for more information on using the CopyDBClusterSnapshot +// 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 CopyDBClusterSnapshotRequest method. +// req, resp := client.CopyDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterSnapshot +func (c *Neptune) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (req *request.Request, output *CopyDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opCopyDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyDBClusterSnapshotInput{} + } + + output = &CopyDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyDBClusterSnapshot API operation for Amazon Neptune. +// +// Copies a snapshot of a DB cluster. +// +// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier +// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. +// +// You can copy an encrypted DB cluster snapshot from another AWS Region. In +// that case, the AWS Region where you call the CopyDBClusterSnapshot action +// is the destination AWS Region for the encrypted DB cluster snapshot to be +// copied to. To copy an encrypted DB cluster snapshot from another AWS Region, +// you must provide the following values: +// +// * KmsKeyId - The AWS Key Management System (AWS KMS) key identifier for +// the key to use to encrypt the copy of the DB cluster snapshot in the destination +// AWS Region. +// +// * PreSignedUrl - A URL that contains a Signature Version 4 signed request +// for the CopyDBClusterSnapshot action to be called in the source AWS Region +// where the DB cluster snapshot is copied from. The pre-signed URL must +// be a valid request for the CopyDBClusterSnapshot API action that can be +// executed in the source AWS Region that contains the encrypted DB cluster +// snapshot to be copied. +// +// The pre-signed URL request must contain the following parameter values: +// +// KmsKeyId - The KMS key identifier for the key to use to encrypt the copy +// of the DB cluster snapshot in the destination AWS Region. This is the +// same identifier for both the CopyDBClusterSnapshot action that is called +// in the destination AWS Region, and the action contained in the pre-signed +// URL. +// +// DestinationRegion - The name of the AWS Region that the DB cluster snapshot +// will be created in. +// +// SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier for +// the encrypted DB cluster snapshot to be copied. This identifier must be +// in the Amazon Resource Name (ARN) format for the source AWS Region. For +// example, if you are copying an encrypted DB cluster snapshot from the +// us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier looks +// like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:neptune-cluster1-snapshot-20161115. +// +// To learn how to generate a Signature Version 4 signed request, see Authenticating +// Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) +// and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). +// +// * TargetDBClusterSnapshotIdentifier - The identifier for the new copy +// of the DB cluster snapshot in the destination AWS Region. +// +// * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier +// for the encrypted DB cluster snapshot to be copied. This identifier must +// be in the ARN format for the source AWS Region and is the same value as +// the SourceDBClusterSnapshotIdentifier in the pre-signed URL. +// +// To cancel the copy operation once it is in progress, delete the target DB +// cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that +// DB cluster snapshot is in "copying" status. +// +// 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 Neptune's +// API operation CopyDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// User already has a DB cluster snapshot with the given identifier. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// Request would result in user exceeding the allowed number of DB snapshots. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBClusterSnapshot +func (c *Neptune) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { + req, out := c.CopyDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// CopyDBClusterSnapshotWithContext is the same as CopyDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CopyDBClusterSnapshot 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 *Neptune) CopyDBClusterSnapshotWithContext(ctx aws.Context, input *CopyDBClusterSnapshotInput, opts ...request.Option) (*CopyDBClusterSnapshotOutput, error) { + req, out := c.CopyDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyDBParameterGroup = "CopyDBParameterGroup" + +// CopyDBParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CopyDBParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CopyDBParameterGroup for more information on using the CopyDBParameterGroup +// 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 CopyDBParameterGroupRequest method. +// req, resp := client.CopyDBParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBParameterGroup +func (c *Neptune) CopyDBParameterGroupRequest(input *CopyDBParameterGroupInput) (req *request.Request, output *CopyDBParameterGroupOutput) { + op := &request.Operation{ + Name: opCopyDBParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyDBParameterGroupInput{} + } + + output = &CopyDBParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyDBParameterGroup API operation for Amazon Neptune. +// +// Copies the specified DB parameter 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 Neptune's +// API operation CopyDBParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name exists. +// +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// Request would result in user exceeding the allowed number of DB parameter +// groups. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CopyDBParameterGroup +func (c *Neptune) CopyDBParameterGroup(input *CopyDBParameterGroupInput) (*CopyDBParameterGroupOutput, error) { + req, out := c.CopyDBParameterGroupRequest(input) + return out, req.Send() +} + +// CopyDBParameterGroupWithContext is the same as CopyDBParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CopyDBParameterGroup 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 *Neptune) CopyDBParameterGroupWithContext(ctx aws.Context, input *CopyDBParameterGroupInput, opts ...request.Option) (*CopyDBParameterGroupOutput, error) { + req, out := c.CopyDBParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBCluster = "CreateDBCluster" + +// CreateDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBCluster for more information on using the CreateDBCluster +// 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 CreateDBClusterRequest method. +// req, resp := client.CreateDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBCluster +func (c *Neptune) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request.Request, output *CreateDBClusterOutput) { + op := &request.Operation{ + Name: opCreateDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterInput{} + } + + output = &CreateDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBCluster API operation for Amazon Neptune. +// +// Creates a new Amazon Neptune DB cluster. +// +// You can use the ReplicationSourceIdentifier parameter to create the DB cluster +// as a Read Replica of another DB cluster or Amazon Neptune DB instance. For +// cross-region replication where the DB cluster identified by ReplicationSourceIdentifier +// is encrypted, you must also specify the PreSignedUrl parameter. +// +// 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 Neptune's +// API operation CreateDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// User already has a DB cluster with the given identifier. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is insufficient storage available for the current action. You may be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// User attempted to create a new DB cluster and the user has already reached +// the maximum allowed DB cluster quota. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group cannot be deleted because it is in use. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// group. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBCluster +func (c *Neptune) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { + req, out := c.CreateDBClusterRequest(input) + return out, req.Send() +} + +// CreateDBClusterWithContext is the same as CreateDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBCluster 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 *Neptune) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBClusterInput, opts ...request.Option) (*CreateDBClusterOutput, error) { + req, out := c.CreateDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" + +// CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBClusterParameterGroup for more information on using the CreateDBClusterParameterGroup +// 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 CreateDBClusterParameterGroupRequest method. +// req, resp := client.CreateDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterParameterGroup +func (c *Neptune) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParameterGroupInput) (req *request.Request, output *CreateDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opCreateDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterParameterGroupInput{} + } + + output = &CreateDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBClusterParameterGroup API operation for Amazon Neptune. +// +// Creates a new DB cluster parameter group. +// +// Parameters in a DB cluster parameter group apply to all of the instances +// in a DB cluster. +// +// A DB cluster parameter group is initially created with the default parameters +// for the database engine used by instances in the DB cluster. To provide custom +// values for any of the parameters, you must modify the group after creating +// it using ModifyDBClusterParameterGroup. Once you've created a DB cluster +// parameter group, you need to associate it with your DB cluster using ModifyDBCluster. +// When you associate a new DB cluster parameter group with a running DB cluster, +// you need to reboot the DB instances in the DB cluster without failover for +// the new DB cluster parameter group and associated settings to take effect. +// +// After you create a DB cluster parameter group, you should wait at least 5 +// minutes before creating your first DB cluster that uses that DB cluster parameter +// group as the default parameter group. This allows Amazon Neptune to fully +// complete the create action before the DB cluster parameter group is used +// as the default for a new DB cluster. This is especially important for parameters +// that are critical when creating the default database for a DB cluster, such +// as the character set for the default database defined by the character_set_database +// parameter. You can use the Parameter Groups option of the Amazon Neptune +// console (https://console.aws.amazon.com/rds/) or the DescribeDBClusterParameters +// command to verify that your DB cluster parameter group has been created or +// modified. +// +// 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 Neptune's +// API operation CreateDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// Request would result in user exceeding the allowed number of DB parameter +// groups. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterParameterGroup +func (c *Neptune) CreateDBClusterParameterGroup(input *CreateDBClusterParameterGroupInput) (*CreateDBClusterParameterGroupOutput, error) { + req, out := c.CreateDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// CreateDBClusterParameterGroupWithContext is the same as CreateDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBClusterParameterGroup 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 *Neptune) CreateDBClusterParameterGroupWithContext(ctx aws.Context, input *CreateDBClusterParameterGroupInput, opts ...request.Option) (*CreateDBClusterParameterGroupOutput, error) { + req, out := c.CreateDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" + +// CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBClusterSnapshot for more information on using the CreateDBClusterSnapshot +// 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 CreateDBClusterSnapshotRequest method. +// req, resp := client.CreateDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterSnapshot +func (c *Neptune) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput) (req *request.Request, output *CreateDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opCreateDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterSnapshotInput{} + } + + output = &CreateDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBClusterSnapshot API operation for Amazon Neptune. +// +// Creates a snapshot of a DB 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 Amazon Neptune's +// API operation CreateDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// User already has a DB cluster snapshot with the given identifier. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// Request would result in user exceeding the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBClusterSnapshot +func (c *Neptune) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { + req, out := c.CreateDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// CreateDBClusterSnapshotWithContext is the same as CreateDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBClusterSnapshot 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 *Neptune) CreateDBClusterSnapshotWithContext(ctx aws.Context, input *CreateDBClusterSnapshotInput, opts ...request.Option) (*CreateDBClusterSnapshotOutput, error) { + req, out := c.CreateDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBInstance = "CreateDBInstance" + +// CreateDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBInstance for more information on using the CreateDBInstance +// 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 CreateDBInstanceRequest method. +// req, resp := client.CreateDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBInstance +func (c *Neptune) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *request.Request, output *CreateDBInstanceOutput) { + op := &request.Operation{ + Name: opCreateDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBInstanceInput{} + } + + output = &CreateDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBInstance API operation for Amazon Neptune. +// +// Creates a new DB 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 Amazon Neptune's +// API operation CreateDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" +// User already has a DB instance with the given identifier. +// +// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" +// Specified DB instance class is not available in the specified Availability +// Zone. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" +// DBSecurityGroupName does not refer to an existing DB security group. +// +// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" +// Request would result in user exceeding the allowed number of DB instances. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" +// Provisioned IOPS not available in the specified Availability Zone. +// +// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" +// StorageType specified cannot be associated with the DB Instance. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// Specified CIDRIP or EC2 security group is not authorized for the specified +// DB security group. +// +// Neptune may not also be authorized via IAM to perform necessary actions on +// your behalf. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" +// Domain does not refer to an existing Active Directory Domain. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBInstance +func (c *Neptune) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { + req, out := c.CreateDBInstanceRequest(input) + return out, req.Send() +} + +// CreateDBInstanceWithContext is the same as CreateDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBInstance 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 *Neptune) CreateDBInstanceWithContext(ctx aws.Context, input *CreateDBInstanceInput, opts ...request.Option) (*CreateDBInstanceOutput, error) { + req, out := c.CreateDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBParameterGroup = "CreateDBParameterGroup" + +// CreateDBParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBParameterGroup for more information on using the CreateDBParameterGroup +// 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 CreateDBParameterGroupRequest method. +// req, resp := client.CreateDBParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBParameterGroup +func (c *Neptune) CreateDBParameterGroupRequest(input *CreateDBParameterGroupInput) (req *request.Request, output *CreateDBParameterGroupOutput) { + op := &request.Operation{ + Name: opCreateDBParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBParameterGroupInput{} + } + + output = &CreateDBParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBParameterGroup API operation for Amazon Neptune. +// +// Creates a new DB parameter group. +// +// A DB parameter group is initially created with the default parameters for +// the database engine used by the DB instance. To provide custom values for +// any of the parameters, you must modify the group after creating it using +// ModifyDBParameterGroup. Once you've created a DB parameter group, you need +// to associate it with your DB instance using ModifyDBInstance. When you associate +// a new DB parameter group with a running DB instance, you need to reboot the +// DB instance without failover for the new DB parameter group and associated +// settings to take effect. +// +// After you create a DB parameter group, you should wait at least 5 minutes +// before creating your first DB instance that uses that DB parameter group +// as the default parameter group. This allows Amazon Neptune to fully complete +// the create action before the parameter group is used as the default for a +// new DB instance. This is especially important for parameters that are critical +// when creating the default database for a DB instance, such as the character +// set for the default database defined by the character_set_database parameter. +// You can use the Parameter Groups option of the Amazon Neptune console or +// the DescribeDBParameters command to verify that your DB parameter group has +// been created or modified. +// +// 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 Neptune's +// API operation CreateDBParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// Request would result in user exceeding the allowed number of DB parameter +// groups. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBParameterGroup +func (c *Neptune) CreateDBParameterGroup(input *CreateDBParameterGroupInput) (*CreateDBParameterGroupOutput, error) { + req, out := c.CreateDBParameterGroupRequest(input) + return out, req.Send() +} + +// CreateDBParameterGroupWithContext is the same as CreateDBParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBParameterGroup 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 *Neptune) CreateDBParameterGroupWithContext(ctx aws.Context, input *CreateDBParameterGroupInput, opts ...request.Option) (*CreateDBParameterGroupOutput, error) { + req, out := c.CreateDBParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBSubnetGroup = "CreateDBSubnetGroup" + +// CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateDBSubnetGroup for more information on using the CreateDBSubnetGroup +// 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 CreateDBSubnetGroupRequest method. +// req, resp := client.CreateDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup +func (c *Neptune) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req *request.Request, output *CreateDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opCreateDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBSubnetGroupInput{} + } + + output = &CreateDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBSubnetGroup API operation for Amazon Neptune. +// +// Creates a new DB subnet group. DB subnet groups must contain at least one +// subnet in at least two AZs in the AWS 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 Amazon Neptune's +// API operation CreateDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupAlreadyExistsFault "DBSubnetGroupAlreadyExists" +// DBSubnetGroupName is already used by an existing DB subnet group. +// +// * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" +// Request would result in user exceeding the allowed number of DB subnet groups. +// +// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" +// Request would result in user exceeding the allowed number of subnets in a +// DB subnet groups. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup +func (c *Neptune) CreateDBSubnetGroup(input *CreateDBSubnetGroupInput) (*CreateDBSubnetGroupOutput, error) { + req, out := c.CreateDBSubnetGroupRequest(input) + return out, req.Send() +} + +// CreateDBSubnetGroupWithContext is the same as CreateDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBSubnetGroup 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 *Neptune) CreateDBSubnetGroupWithContext(ctx aws.Context, input *CreateDBSubnetGroupInput, opts ...request.Option) (*CreateDBSubnetGroupOutput, error) { + req, out := c.CreateDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateEventSubscription = "CreateEventSubscription" + +// CreateEventSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the CreateEventSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateEventSubscription for more information on using the CreateEventSubscription +// 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 CreateEventSubscriptionRequest method. +// req, resp := client.CreateEventSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateEventSubscription +func (c *Neptune) CreateEventSubscriptionRequest(input *CreateEventSubscriptionInput) (req *request.Request, output *CreateEventSubscriptionOutput) { + op := &request.Operation{ + Name: opCreateEventSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateEventSubscriptionInput{} + } + + output = &CreateEventSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateEventSubscription API operation for Amazon Neptune. +// +// Creates an event notification subscription. This action requires a topic +// ARN (Amazon Resource Name) created by either the Neptune console, the SNS +// console, or the SNS API. To obtain an ARN with SNS, you must create a topic +// in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS +// console. +// +// You can specify the type of source (SourceType) you want to be notified of, +// provide a list of Neptune sources (SourceIds) that triggers the events, and +// provide a list of event categories (EventCategories) for events you want +// to be notified of. For example, you can specify SourceType = db-instance, +// SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, +// Backup. +// +// If you specify both the SourceType and SourceIds, such as SourceType = db-instance +// and SourceIdentifier = myDBInstance1, you are notified of all the db-instance +// events for the specified source. If you specify a SourceType but do not specify +// a SourceIdentifier, you receive notice of the events for that source type +// for all your Neptune sources. If you do not specify either the SourceType +// nor the SourceIdentifier, you are notified of events generated from all Neptune +// sources belonging to your customer 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 Neptune's +// API operation CreateEventSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" +// +// * ErrCodeSubscriptionAlreadyExistFault "SubscriptionAlreadyExist" +// +// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" +// +// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" +// +// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" +// +// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" +// +// * ErrCodeSourceNotFoundFault "SourceNotFound" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateEventSubscription +func (c *Neptune) CreateEventSubscription(input *CreateEventSubscriptionInput) (*CreateEventSubscriptionOutput, error) { + req, out := c.CreateEventSubscriptionRequest(input) + return out, req.Send() +} + +// CreateEventSubscriptionWithContext is the same as CreateEventSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See CreateEventSubscription 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 *Neptune) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateEventSubscriptionInput, opts ...request.Option) (*CreateEventSubscriptionOutput, error) { + req, out := c.CreateEventSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBCluster = "DeleteDBCluster" + +// DeleteDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBCluster for more information on using the DeleteDBCluster +// 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 DeleteDBClusterRequest method. +// req, resp := client.DeleteDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBCluster +func (c *Neptune) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request.Request, output *DeleteDBClusterOutput) { + op := &request.Operation{ + Name: opDeleteDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterInput{} + } + + output = &DeleteDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBCluster API operation for Amazon Neptune. +// +// The DeleteDBCluster action deletes a previously provisioned DB cluster. When +// you delete a DB cluster, all automated backups for that DB cluster are deleted +// and can't be recovered. Manual DB cluster snapshots of the specified DB cluster +// are not deleted. +// +// 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 Neptune's +// API operation DeleteDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// User already has a DB cluster snapshot with the given identifier. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// Request would result in user exceeding the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBCluster +func (c *Neptune) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { + req, out := c.DeleteDBClusterRequest(input) + return out, req.Send() +} + +// DeleteDBClusterWithContext is the same as DeleteDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBCluster 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 *Neptune) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBClusterInput, opts ...request.Option) (*DeleteDBClusterOutput, error) { + req, out := c.DeleteDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" + +// DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBClusterParameterGroup for more information on using the DeleteDBClusterParameterGroup +// 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 DeleteDBClusterParameterGroupRequest method. +// req, resp := client.DeleteDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterParameterGroup +func (c *Neptune) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParameterGroupInput) (req *request.Request, output *DeleteDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opDeleteDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterParameterGroupInput{} + } + + output = &DeleteDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDBClusterParameterGroup API operation for Amazon Neptune. +// +// Deletes a specified DB cluster parameter group. The DB cluster parameter +// group to be deleted can't be associated with any DB clusters. +// +// 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 Neptune's +// API operation DeleteDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterParameterGroup +func (c *Neptune) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { + req, out := c.DeleteDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// DeleteDBClusterParameterGroupWithContext is the same as DeleteDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBClusterParameterGroup 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 *Neptune) DeleteDBClusterParameterGroupWithContext(ctx aws.Context, input *DeleteDBClusterParameterGroupInput, opts ...request.Option) (*DeleteDBClusterParameterGroupOutput, error) { + req, out := c.DeleteDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" + +// DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBClusterSnapshot for more information on using the DeleteDBClusterSnapshot +// 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 DeleteDBClusterSnapshotRequest method. +// req, resp := client.DeleteDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterSnapshot +func (c *Neptune) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput) (req *request.Request, output *DeleteDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterSnapshotInput{} + } + + output = &DeleteDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBClusterSnapshot API operation for Amazon Neptune. +// +// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy +// operation is terminated. +// +// The DB cluster snapshot must be in the available state to be deleted. +// +// 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 Neptune's +// API operation DeleteDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBClusterSnapshot +func (c *Neptune) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { + req, out := c.DeleteDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// DeleteDBClusterSnapshotWithContext is the same as DeleteDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBClusterSnapshot 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 *Neptune) DeleteDBClusterSnapshotWithContext(ctx aws.Context, input *DeleteDBClusterSnapshotInput, opts ...request.Option) (*DeleteDBClusterSnapshotOutput, error) { + req, out := c.DeleteDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBInstance = "DeleteDBInstance" + +// DeleteDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBInstance for more information on using the DeleteDBInstance +// 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 DeleteDBInstanceRequest method. +// req, resp := client.DeleteDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBInstance +func (c *Neptune) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *request.Request, output *DeleteDBInstanceOutput) { + op := &request.Operation{ + Name: opDeleteDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBInstanceInput{} + } + + output = &DeleteDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBInstance API operation for Amazon Neptune. +// +// The DeleteDBInstance action deletes a previously provisioned DB instance. +// When you delete a DB instance, all automated backups for that instance are +// deleted and can't be recovered. Manual DB snapshots of the DB instance to +// be deleted by DeleteDBInstance are not deleted. +// +// If you request a final DB snapshot the status of the Amazon Neptune DB instance +// is deleting until the DB snapshot is created. The API action DescribeDBInstance +// is used to monitor the status of this operation. The action can't be canceled +// or reverted once submitted. +// +// Note that when a DB instance is in a failure state and has a status of failed, +// incompatible-restore, or incompatible-network, you can only delete it when +// the SkipFinalSnapshot parameter is set to true. +// +// If the specified DB instance is part of a DB cluster, you can't delete the +// DB instance if both of the following conditions are true: +// +// * The DB cluster is a Read Replica of another DB cluster. +// +// * The DB instance is the only instance in the DB cluster. +// +// To delete a DB instance in this case, first call the PromoteReadReplicaDBCluster +// API action to promote the DB cluster so it's no longer a Read Replica. After +// the promotion completes, then call the DeleteDBInstance API action to delete +// the final instance in the DB 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 Amazon Neptune's +// API operation DeleteDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" +// DBSnapshotIdentifier is already used by an existing snapshot. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// Request would result in user exceeding the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBInstance +func (c *Neptune) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { + req, out := c.DeleteDBInstanceRequest(input) + return out, req.Send() +} + +// DeleteDBInstanceWithContext is the same as DeleteDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBInstance 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 *Neptune) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstanceInput, opts ...request.Option) (*DeleteDBInstanceOutput, error) { + req, out := c.DeleteDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBParameterGroup = "DeleteDBParameterGroup" + +// DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBParameterGroup for more information on using the DeleteDBParameterGroup +// 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 DeleteDBParameterGroupRequest method. +// req, resp := client.DeleteDBParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBParameterGroup +func (c *Neptune) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) (req *request.Request, output *DeleteDBParameterGroupOutput) { + op := &request.Operation{ + Name: opDeleteDBParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBParameterGroupInput{} + } + + output = &DeleteDBParameterGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDBParameterGroup API operation for Amazon Neptune. +// +// Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted +// can't be associated with any DB instances. +// +// 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 Neptune's +// API operation DeleteDBParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBParameterGroup +func (c *Neptune) DeleteDBParameterGroup(input *DeleteDBParameterGroupInput) (*DeleteDBParameterGroupOutput, error) { + req, out := c.DeleteDBParameterGroupRequest(input) + return out, req.Send() +} + +// DeleteDBParameterGroupWithContext is the same as DeleteDBParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBParameterGroup 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 *Neptune) DeleteDBParameterGroupWithContext(ctx aws.Context, input *DeleteDBParameterGroupInput, opts ...request.Option) (*DeleteDBParameterGroupOutput, error) { + req, out := c.DeleteDBParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" + +// DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteDBSubnetGroup for more information on using the DeleteDBSubnetGroup +// 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 DeleteDBSubnetGroupRequest method. +// req, resp := client.DeleteDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBSubnetGroup +func (c *Neptune) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req *request.Request, output *DeleteDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opDeleteDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBSubnetGroupInput{} + } + + output = &DeleteDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDBSubnetGroup API operation for Amazon Neptune. +// +// Deletes a DB subnet group. +// +// The specified database subnet group must not be associated with any DB instances. +// +// 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 Neptune's +// API operation DeleteDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group cannot be deleted because it is in use. +// +// * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" +// The DB subnet is not in the available state. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteDBSubnetGroup +func (c *Neptune) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { + req, out := c.DeleteDBSubnetGroupRequest(input) + return out, req.Send() +} + +// DeleteDBSubnetGroupWithContext is the same as DeleteDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBSubnetGroup 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 *Neptune) DeleteDBSubnetGroupWithContext(ctx aws.Context, input *DeleteDBSubnetGroupInput, opts ...request.Option) (*DeleteDBSubnetGroupOutput, error) { + req, out := c.DeleteDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEventSubscription = "DeleteEventSubscription" + +// DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEventSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteEventSubscription for more information on using the DeleteEventSubscription +// 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 DeleteEventSubscriptionRequest method. +// req, resp := client.DeleteEventSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteEventSubscription +func (c *Neptune) DeleteEventSubscriptionRequest(input *DeleteEventSubscriptionInput) (req *request.Request, output *DeleteEventSubscriptionOutput) { + op := &request.Operation{ + Name: opDeleteEventSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteEventSubscriptionInput{} + } + + output = &DeleteEventSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEventSubscription API operation for Amazon Neptune. +// +// Deletes an event notification subscription. +// +// 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 Neptune's +// API operation DeleteEventSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" +// +// * ErrCodeInvalidEventSubscriptionStateFault "InvalidEventSubscriptionState" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DeleteEventSubscription +func (c *Neptune) DeleteEventSubscription(input *DeleteEventSubscriptionInput) (*DeleteEventSubscriptionOutput, error) { + req, out := c.DeleteEventSubscriptionRequest(input) + return out, req.Send() +} + +// DeleteEventSubscriptionWithContext is the same as DeleteEventSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEventSubscription 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 *Neptune) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteEventSubscriptionInput, opts ...request.Option) (*DeleteEventSubscriptionOutput, error) { + req, out := c.DeleteEventSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" + +// DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterParameterGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusterParameterGroups for more information on using the DescribeDBClusterParameterGroups +// 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 DescribeDBClusterParameterGroupsRequest method. +// req, resp := client.DescribeDBClusterParameterGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameterGroups +func (c *Neptune) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterParameterGroupsInput) (req *request.Request, output *DescribeDBClusterParameterGroupsOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterParameterGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterParameterGroupsInput{} + } + + output = &DescribeDBClusterParameterGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterParameterGroups API operation for Amazon Neptune. +// +// Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName +// parameter is specified, the list will contain only the description of the +// specified DB cluster parameter 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 Neptune's +// API operation DescribeDBClusterParameterGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameterGroups +func (c *Neptune) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { + req, out := c.DescribeDBClusterParameterGroupsRequest(input) + return out, req.Send() +} + +// DescribeDBClusterParameterGroupsWithContext is the same as DescribeDBClusterParameterGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterParameterGroups 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 *Neptune) DescribeDBClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeDBClusterParameterGroupsInput, opts ...request.Option) (*DescribeDBClusterParameterGroupsOutput, error) { + req, out := c.DescribeDBClusterParameterGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterParameters = "DescribeDBClusterParameters" + +// DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusterParameters for more information on using the DescribeDBClusterParameters +// 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 DescribeDBClusterParametersRequest method. +// req, resp := client.DescribeDBClusterParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameters +func (c *Neptune) DescribeDBClusterParametersRequest(input *DescribeDBClusterParametersInput) (req *request.Request, output *DescribeDBClusterParametersOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterParametersInput{} + } + + output = &DescribeDBClusterParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterParameters API operation for Amazon Neptune. +// +// Returns the detailed parameter list for a particular DB cluster parameter +// 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 Neptune's +// API operation DescribeDBClusterParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterParameters +func (c *Neptune) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { + req, out := c.DescribeDBClusterParametersRequest(input) + return out, req.Send() +} + +// DescribeDBClusterParametersWithContext is the same as DescribeDBClusterParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterParameters 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 *Neptune) DescribeDBClusterParametersWithContext(ctx aws.Context, input *DescribeDBClusterParametersInput, opts ...request.Option) (*DescribeDBClusterParametersOutput, error) { + req, out := c.DescribeDBClusterParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttributes" + +// DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusterSnapshotAttributes for more information on using the DescribeDBClusterSnapshotAttributes +// 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 DescribeDBClusterSnapshotAttributesRequest method. +// req, resp := client.DescribeDBClusterSnapshotAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshotAttributes +func (c *Neptune) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBClusterSnapshotAttributesInput) (req *request.Request, output *DescribeDBClusterSnapshotAttributesOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterSnapshotAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterSnapshotAttributesInput{} + } + + output = &DescribeDBClusterSnapshotAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterSnapshotAttributes API operation for Amazon Neptune. +// +// Returns a list of DB cluster snapshot attribute names and values for a manual +// DB cluster snapshot. +// +// When sharing snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes +// returns the restore attribute and a list of IDs for the AWS accounts that +// are authorized to copy or restore the manual DB cluster snapshot. If all +// is included in the list of values for the restore attribute, then the manual +// DB cluster snapshot is public and can be copied or restored by all AWS accounts. +// +// To add or remove access for an AWS account to copy or restore a manual DB +// cluster snapshot, or to make the manual DB cluster snapshot public or private, +// use the ModifyDBClusterSnapshotAttribute API action. +// +// 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 Neptune's +// API operation DescribeDBClusterSnapshotAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshotAttributes +func (c *Neptune) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { + req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) + return out, req.Send() +} + +// DescribeDBClusterSnapshotAttributesWithContext is the same as DescribeDBClusterSnapshotAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterSnapshotAttributes 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 *Neptune) DescribeDBClusterSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotAttributesInput, opts ...request.Option) (*DescribeDBClusterSnapshotAttributesOutput, error) { + req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" + +// DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterSnapshots operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusterSnapshots for more information on using the DescribeDBClusterSnapshots +// 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 DescribeDBClusterSnapshotsRequest method. +// req, resp := client.DescribeDBClusterSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshots +func (c *Neptune) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshotsInput) (req *request.Request, output *DescribeDBClusterSnapshotsOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterSnapshotsInput{} + } + + output = &DescribeDBClusterSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterSnapshots API operation for Amazon Neptune. +// +// Returns information about DB cluster snapshots. This API action supports +// pagination. +// +// 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 Neptune's +// API operation DescribeDBClusterSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusterSnapshots +func (c *Neptune) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { + req, out := c.DescribeDBClusterSnapshotsRequest(input) + return out, req.Send() +} + +// DescribeDBClusterSnapshotsWithContext is the same as DescribeDBClusterSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterSnapshots 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 *Neptune) DescribeDBClusterSnapshotsWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotsInput, opts ...request.Option) (*DescribeDBClusterSnapshotsOutput, error) { + req, out := c.DescribeDBClusterSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusters = "DescribeDBClusters" + +// DescribeDBClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusters for more information on using the DescribeDBClusters +// 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 DescribeDBClustersRequest method. +// req, resp := client.DescribeDBClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusters +func (c *Neptune) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *request.Request, output *DescribeDBClustersOutput) { + op := &request.Operation{ + Name: opDescribeDBClusters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClustersInput{} + } + + output = &DescribeDBClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusters API operation for Amazon Neptune. +// +// Returns information about provisioned DB clusters. This API supports pagination. +// +// 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 Neptune's +// API operation DescribeDBClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBClusters +func (c *Neptune) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { + req, out := c.DescribeDBClustersRequest(input) + return out, req.Send() +} + +// DescribeDBClustersWithContext is the same as DescribeDBClusters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusters 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 *Neptune) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBClustersInput, opts ...request.Option) (*DescribeDBClustersOutput, error) { + req, out := c.DescribeDBClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBEngineVersions = "DescribeDBEngineVersions" + +// DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBEngineVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBEngineVersions for more information on using the DescribeDBEngineVersions +// 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 DescribeDBEngineVersionsRequest method. +// req, resp := client.DescribeDBEngineVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBEngineVersions +func (c *Neptune) DescribeDBEngineVersionsRequest(input *DescribeDBEngineVersionsInput) (req *request.Request, output *DescribeDBEngineVersionsOutput) { + op := &request.Operation{ + Name: opDescribeDBEngineVersions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBEngineVersionsInput{} + } + + output = &DescribeDBEngineVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBEngineVersions API operation for Amazon Neptune. +// +// Returns a list of the available DB engines. +// +// 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 Neptune's +// API operation DescribeDBEngineVersions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBEngineVersions +func (c *Neptune) DescribeDBEngineVersions(input *DescribeDBEngineVersionsInput) (*DescribeDBEngineVersionsOutput, error) { + req, out := c.DescribeDBEngineVersionsRequest(input) + return out, req.Send() +} + +// DescribeDBEngineVersionsWithContext is the same as DescribeDBEngineVersions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBEngineVersions 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 *Neptune) DescribeDBEngineVersionsWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, opts ...request.Option) (*DescribeDBEngineVersionsOutput, error) { + req, out := c.DescribeDBEngineVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBEngineVersionsPages iterates over the pages of a DescribeDBEngineVersions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBEngineVersions 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 DescribeDBEngineVersions operation. +// pageNum := 0 +// err := client.DescribeDBEngineVersionsPages(params, +// func(page *DescribeDBEngineVersionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeDBEngineVersionsPages(input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool) error { + return c.DescribeDBEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBEngineVersionsPagesWithContext same as DescribeDBEngineVersionsPages 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 *Neptune) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBEngineVersionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBEngineVersionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBInstances = "DescribeDBInstances" + +// DescribeDBInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBInstances for more information on using the DescribeDBInstances +// 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 DescribeDBInstancesRequest method. +// req, resp := client.DescribeDBInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBInstances +func (c *Neptune) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req *request.Request, output *DescribeDBInstancesOutput) { + op := &request.Operation{ + Name: opDescribeDBInstances, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBInstancesInput{} + } + + output = &DescribeDBInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBInstances API operation for Amazon Neptune. +// +// Returns information about provisioned instances. This API supports pagination. +// +// 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 Neptune's +// API operation DescribeDBInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBInstances +func (c *Neptune) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { + req, out := c.DescribeDBInstancesRequest(input) + return out, req.Send() +} + +// DescribeDBInstancesWithContext is the same as DescribeDBInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBInstances 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 *Neptune) DescribeDBInstancesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.Option) (*DescribeDBInstancesOutput, error) { + req, out := c.DescribeDBInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBInstancesPages iterates over the pages of a DescribeDBInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBInstances 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 DescribeDBInstances operation. +// pageNum := 0 +// err := client.DescribeDBInstancesPages(params, +// func(page *DescribeDBInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeDBInstancesPages(input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool) error { + return c.DescribeDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBInstancesPagesWithContext same as DescribeDBInstancesPages 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 *Neptune) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBParameterGroups = "DescribeDBParameterGroups" + +// DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBParameterGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBParameterGroups for more information on using the DescribeDBParameterGroups +// 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 DescribeDBParameterGroupsRequest method. +// req, resp := client.DescribeDBParameterGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameterGroups +func (c *Neptune) DescribeDBParameterGroupsRequest(input *DescribeDBParameterGroupsInput) (req *request.Request, output *DescribeDBParameterGroupsOutput) { + op := &request.Operation{ + Name: opDescribeDBParameterGroups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBParameterGroupsInput{} + } + + output = &DescribeDBParameterGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBParameterGroups API operation for Amazon Neptune. +// +// Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName +// is specified, the list will contain only the description of the specified +// DB parameter 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 Neptune's +// API operation DescribeDBParameterGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameterGroups +func (c *Neptune) DescribeDBParameterGroups(input *DescribeDBParameterGroupsInput) (*DescribeDBParameterGroupsOutput, error) { + req, out := c.DescribeDBParameterGroupsRequest(input) + return out, req.Send() +} + +// DescribeDBParameterGroupsWithContext is the same as DescribeDBParameterGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBParameterGroups 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 *Neptune) DescribeDBParameterGroupsWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, opts ...request.Option) (*DescribeDBParameterGroupsOutput, error) { + req, out := c.DescribeDBParameterGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBParameterGroupsPages iterates over the pages of a DescribeDBParameterGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBParameterGroups 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 DescribeDBParameterGroups operation. +// pageNum := 0 +// err := client.DescribeDBParameterGroupsPages(params, +// func(page *DescribeDBParameterGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeDBParameterGroupsPages(input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool) error { + return c.DescribeDBParameterGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBParameterGroupsPagesWithContext same as DescribeDBParameterGroupsPages 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 *Neptune) DescribeDBParameterGroupsPagesWithContext(ctx aws.Context, input *DescribeDBParameterGroupsInput, fn func(*DescribeDBParameterGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBParameterGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBParameterGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBParameterGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBParameters = "DescribeDBParameters" + +// DescribeDBParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBParameters for more information on using the DescribeDBParameters +// 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 DescribeDBParametersRequest method. +// req, resp := client.DescribeDBParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameters +func (c *Neptune) DescribeDBParametersRequest(input *DescribeDBParametersInput) (req *request.Request, output *DescribeDBParametersOutput) { + op := &request.Operation{ + Name: opDescribeDBParameters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBParametersInput{} + } + + output = &DescribeDBParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBParameters API operation for Amazon Neptune. +// +// Returns the detailed parameter list for a particular DB parameter 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 Neptune's +// API operation DescribeDBParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBParameters +func (c *Neptune) DescribeDBParameters(input *DescribeDBParametersInput) (*DescribeDBParametersOutput, error) { + req, out := c.DescribeDBParametersRequest(input) + return out, req.Send() +} + +// DescribeDBParametersWithContext is the same as DescribeDBParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBParameters 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 *Neptune) DescribeDBParametersWithContext(ctx aws.Context, input *DescribeDBParametersInput, opts ...request.Option) (*DescribeDBParametersOutput, error) { + req, out := c.DescribeDBParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBParametersPages iterates over the pages of a DescribeDBParameters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBParameters 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 DescribeDBParameters operation. +// pageNum := 0 +// err := client.DescribeDBParametersPages(params, +// func(page *DescribeDBParametersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeDBParametersPages(input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool) error { + return c.DescribeDBParametersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBParametersPagesWithContext same as DescribeDBParametersPages 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 *Neptune) DescribeDBParametersPagesWithContext(ctx aws.Context, input *DescribeDBParametersInput, fn func(*DescribeDBParametersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBParametersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBParametersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBParametersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" + +// DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBSubnetGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBSubnetGroups for more information on using the DescribeDBSubnetGroups +// 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 DescribeDBSubnetGroupsRequest method. +// req, resp := client.DescribeDBSubnetGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBSubnetGroups +func (c *Neptune) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) (req *request.Request, output *DescribeDBSubnetGroupsOutput) { + op := &request.Operation{ + Name: opDescribeDBSubnetGroups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBSubnetGroupsInput{} + } + + output = &DescribeDBSubnetGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBSubnetGroups API operation for Amazon Neptune. +// +// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, +// the list will contain only the descriptions of the specified DBSubnetGroup. +// +// For an overview of CIDR ranges, go to the Wikipedia Tutorial (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// +// 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 Neptune's +// API operation DescribeDBSubnetGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeDBSubnetGroups +func (c *Neptune) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { + req, out := c.DescribeDBSubnetGroupsRequest(input) + return out, req.Send() +} + +// DescribeDBSubnetGroupsWithContext is the same as DescribeDBSubnetGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBSubnetGroups 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 *Neptune) DescribeDBSubnetGroupsWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, opts ...request.Option) (*DescribeDBSubnetGroupsOutput, error) { + req, out := c.DescribeDBSubnetGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBSubnetGroupsPages iterates over the pages of a DescribeDBSubnetGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBSubnetGroups 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 DescribeDBSubnetGroups operation. +// pageNum := 0 +// err := client.DescribeDBSubnetGroupsPages(params, +// func(page *DescribeDBSubnetGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeDBSubnetGroupsPages(input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool) error { + return c.DescribeDBSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBSubnetGroupsPagesWithContext same as DescribeDBSubnetGroupsPages 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 *Neptune) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBSubnetGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBSubnetGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterParameters" + +// DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeEngineDefaultClusterParameters for more information on using the DescribeEngineDefaultClusterParameters +// 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 DescribeEngineDefaultClusterParametersRequest method. +// req, resp := client.DescribeEngineDefaultClusterParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultClusterParameters +func (c *Neptune) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngineDefaultClusterParametersInput) (req *request.Request, output *DescribeEngineDefaultClusterParametersOutput) { + op := &request.Operation{ + Name: opDescribeEngineDefaultClusterParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEngineDefaultClusterParametersInput{} + } + + output = &DescribeEngineDefaultClusterParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEngineDefaultClusterParameters API operation for Amazon Neptune. +// +// Returns the default engine and system parameter information for the cluster +// database engine. +// +// 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 Neptune's +// API operation DescribeEngineDefaultClusterParameters for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultClusterParameters +func (c *Neptune) DescribeEngineDefaultClusterParameters(input *DescribeEngineDefaultClusterParametersInput) (*DescribeEngineDefaultClusterParametersOutput, error) { + req, out := c.DescribeEngineDefaultClusterParametersRequest(input) + return out, req.Send() +} + +// DescribeEngineDefaultClusterParametersWithContext is the same as DescribeEngineDefaultClusterParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEngineDefaultClusterParameters 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 *Neptune) DescribeEngineDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultClusterParametersInput, opts ...request.Option) (*DescribeEngineDefaultClusterParametersOutput, error) { + req, out := c.DescribeEngineDefaultClusterParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" + +// DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEngineDefaultParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeEngineDefaultParameters for more information on using the DescribeEngineDefaultParameters +// 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 DescribeEngineDefaultParametersRequest method. +// req, resp := client.DescribeEngineDefaultParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultParameters +func (c *Neptune) DescribeEngineDefaultParametersRequest(input *DescribeEngineDefaultParametersInput) (req *request.Request, output *DescribeEngineDefaultParametersOutput) { + op := &request.Operation{ + Name: opDescribeEngineDefaultParameters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"EngineDefaults.Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEngineDefaultParametersInput{} + } + + output = &DescribeEngineDefaultParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEngineDefaultParameters API operation for Amazon Neptune. +// +// Returns the default engine and system parameter information for the specified +// database engine. +// +// 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 Neptune's +// API operation DescribeEngineDefaultParameters for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEngineDefaultParameters +func (c *Neptune) DescribeEngineDefaultParameters(input *DescribeEngineDefaultParametersInput) (*DescribeEngineDefaultParametersOutput, error) { + req, out := c.DescribeEngineDefaultParametersRequest(input) + return out, req.Send() +} + +// DescribeEngineDefaultParametersWithContext is the same as DescribeEngineDefaultParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEngineDefaultParameters 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 *Neptune) DescribeEngineDefaultParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, opts ...request.Option) (*DescribeEngineDefaultParametersOutput, error) { + req, out := c.DescribeEngineDefaultParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEngineDefaultParametersPages iterates over the pages of a DescribeEngineDefaultParameters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEngineDefaultParameters 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 DescribeEngineDefaultParameters operation. +// pageNum := 0 +// err := client.DescribeEngineDefaultParametersPages(params, +// func(page *DescribeEngineDefaultParametersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeEngineDefaultParametersPages(input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool) error { + return c.DescribeEngineDefaultParametersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEngineDefaultParametersPagesWithContext same as DescribeEngineDefaultParametersPages 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 *Neptune) DescribeEngineDefaultParametersPagesWithContext(ctx aws.Context, input *DescribeEngineDefaultParametersInput, fn func(*DescribeEngineDefaultParametersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEngineDefaultParametersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEngineDefaultParametersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEngineDefaultParametersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeEventCategories = "DescribeEventCategories" + +// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventCategories operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeEventCategories for more information on using the DescribeEventCategories +// 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 DescribeEventCategoriesRequest method. +// req, resp := client.DescribeEventCategoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventCategories +func (c *Neptune) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { + op := &request.Operation{ + Name: opDescribeEventCategories, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEventCategoriesInput{} + } + + output = &DescribeEventCategoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventCategories API operation for Amazon Neptune. +// +// Displays a list of categories for all event source types, or, if specified, +// for a specified source type. +// +// 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 Neptune's +// API operation DescribeEventCategories for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventCategories +func (c *Neptune) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { + req, out := c.DescribeEventCategoriesRequest(input) + return out, req.Send() +} + +// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventCategories 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 *Neptune) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { + req, out := c.DescribeEventCategoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEventSubscriptions = "DescribeEventSubscriptions" + +// DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventSubscriptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeEventSubscriptions for more information on using the DescribeEventSubscriptions +// 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 DescribeEventSubscriptionsRequest method. +// req, resp := client.DescribeEventSubscriptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventSubscriptions +func (c *Neptune) DescribeEventSubscriptionsRequest(input *DescribeEventSubscriptionsInput) (req *request.Request, output *DescribeEventSubscriptionsOutput) { + op := &request.Operation{ + Name: opDescribeEventSubscriptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEventSubscriptionsInput{} + } + + output = &DescribeEventSubscriptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventSubscriptions API operation for Amazon Neptune. +// +// Lists all the subscription descriptions for a customer account. The description +// for a subscription includes SubscriptionName, SNSTopicARN, CustomerID, SourceType, +// SourceID, CreationTime, and Status. +// +// If you specify a SubscriptionName, lists the description for that subscription. +// +// 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 Neptune's +// API operation DescribeEventSubscriptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEventSubscriptions +func (c *Neptune) DescribeEventSubscriptions(input *DescribeEventSubscriptionsInput) (*DescribeEventSubscriptionsOutput, error) { + req, out := c.DescribeEventSubscriptionsRequest(input) + return out, req.Send() +} + +// DescribeEventSubscriptionsWithContext is the same as DescribeEventSubscriptions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventSubscriptions 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 *Neptune) DescribeEventSubscriptionsWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, opts ...request.Option) (*DescribeEventSubscriptionsOutput, error) { + req, out := c.DescribeEventSubscriptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEventSubscriptionsPages iterates over the pages of a DescribeEventSubscriptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEventSubscriptions 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 DescribeEventSubscriptions operation. +// pageNum := 0 +// err := client.DescribeEventSubscriptionsPages(params, +// func(page *DescribeEventSubscriptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeEventSubscriptionsPages(input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool) error { + return c.DescribeEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEventSubscriptionsPagesWithContext same as DescribeEventSubscriptionsPages 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 *Neptune) DescribeEventSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeEventSubscriptionsInput, fn func(*DescribeEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEventSubscriptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEventSubscriptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEventSubscriptionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeEvents = "DescribeEvents" + +// DescribeEventsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeEvents for more information on using the DescribeEvents +// 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 DescribeEventsRequest method. +// req, resp := client.DescribeEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEvents +func (c *Neptune) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { + op := &request.Operation{ + Name: opDescribeEvents, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEventsInput{} + } + + output = &DescribeEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEvents API operation for Amazon Neptune. +// +// Returns events related to DB instances, DB security groups, DB snapshots, +// and DB parameter groups for the past 14 days. Events specific to a particular +// DB instance, DB security group, database snapshot, or DB parameter group +// can be obtained by providing the name as a parameter. By default, the past +// hour of events are returned. +// +// 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 Neptune's +// API operation DescribeEvents for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeEvents +func (c *Neptune) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + return out, req.Send() +} + +// DescribeEventsWithContext is the same as DescribeEvents with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEvents 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 *Neptune) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEventsPages iterates over the pages of a DescribeEvents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEvents 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 DescribeEvents operation. +// pageNum := 0 +// err := client.DescribeEventsPages(params, +// func(page *DescribeEventsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { + return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEventsPagesWithContext same as DescribeEventsPages 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 *Neptune) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEventsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEventsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions" + +// DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeOrderableDBInstanceOptions for more information on using the DescribeOrderableDBInstanceOptions +// 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 DescribeOrderableDBInstanceOptionsRequest method. +// req, resp := client.DescribeOrderableDBInstanceOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeOrderableDBInstanceOptions +func (c *Neptune) DescribeOrderableDBInstanceOptionsRequest(input *DescribeOrderableDBInstanceOptionsInput) (req *request.Request, output *DescribeOrderableDBInstanceOptionsOutput) { + op := &request.Operation{ + Name: opDescribeOrderableDBInstanceOptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeOrderableDBInstanceOptionsInput{} + } + + output = &DescribeOrderableDBInstanceOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOrderableDBInstanceOptions API operation for Amazon Neptune. +// +// Returns a list of orderable DB instance options for the specified engine. +// +// 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 Neptune's +// API operation DescribeOrderableDBInstanceOptions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeOrderableDBInstanceOptions +func (c *Neptune) DescribeOrderableDBInstanceOptions(input *DescribeOrderableDBInstanceOptionsInput) (*DescribeOrderableDBInstanceOptionsOutput, error) { + req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) + return out, req.Send() +} + +// DescribeOrderableDBInstanceOptionsWithContext is the same as DescribeOrderableDBInstanceOptions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOrderableDBInstanceOptions 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 *Neptune) DescribeOrderableDBInstanceOptionsWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, opts ...request.Option) (*DescribeOrderableDBInstanceOptionsOutput, error) { + req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeOrderableDBInstanceOptionsPages iterates over the pages of a DescribeOrderableDBInstanceOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeOrderableDBInstanceOptions 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 DescribeOrderableDBInstanceOptions operation. +// pageNum := 0 +// err := client.DescribeOrderableDBInstanceOptionsPages(params, +// func(page *DescribeOrderableDBInstanceOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Neptune) DescribeOrderableDBInstanceOptionsPages(input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool) error { + return c.DescribeOrderableDBInstanceOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeOrderableDBInstanceOptionsPagesWithContext same as DescribeOrderableDBInstanceOptionsPages 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 *Neptune) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeOrderableDBInstanceOptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeOrderableDBInstanceOptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" + +// DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribePendingMaintenanceActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribePendingMaintenanceActions for more information on using the DescribePendingMaintenanceActions +// 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 DescribePendingMaintenanceActionsRequest method. +// req, resp := client.DescribePendingMaintenanceActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribePendingMaintenanceActions +func (c *Neptune) DescribePendingMaintenanceActionsRequest(input *DescribePendingMaintenanceActionsInput) (req *request.Request, output *DescribePendingMaintenanceActionsOutput) { + op := &request.Operation{ + Name: opDescribePendingMaintenanceActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePendingMaintenanceActionsInput{} + } + + output = &DescribePendingMaintenanceActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePendingMaintenanceActions API operation for Amazon Neptune. +// +// Returns a list of resources (for example, DB instances) that have at least +// one pending maintenance action. +// +// 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 Neptune's +// API operation DescribePendingMaintenanceActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" +// The specified resource ID was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribePendingMaintenanceActions +func (c *Neptune) DescribePendingMaintenanceActions(input *DescribePendingMaintenanceActionsInput) (*DescribePendingMaintenanceActionsOutput, error) { + req, out := c.DescribePendingMaintenanceActionsRequest(input) + return out, req.Send() +} + +// DescribePendingMaintenanceActionsWithContext is the same as DescribePendingMaintenanceActions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePendingMaintenanceActions 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 *Neptune) DescribePendingMaintenanceActionsWithContext(ctx aws.Context, input *DescribePendingMaintenanceActionsInput, opts ...request.Option) (*DescribePendingMaintenanceActionsOutput, error) { + req, out := c.DescribePendingMaintenanceActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModifications" + +// DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeValidDBInstanceModifications operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeValidDBInstanceModifications for more information on using the DescribeValidDBInstanceModifications +// 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 DescribeValidDBInstanceModificationsRequest method. +// req, resp := client.DescribeValidDBInstanceModificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeValidDBInstanceModifications +func (c *Neptune) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDBInstanceModificationsInput) (req *request.Request, output *DescribeValidDBInstanceModificationsOutput) { + op := &request.Operation{ + Name: opDescribeValidDBInstanceModifications, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeValidDBInstanceModificationsInput{} + } + + output = &DescribeValidDBInstanceModificationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeValidDBInstanceModifications API operation for Amazon Neptune. +// +// You can call DescribeValidDBInstanceModifications to learn what modifications +// you can make to your DB instance. You can use this information when you call +// ModifyDBInstance. +// +// 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 Neptune's +// API operation DescribeValidDBInstanceModifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/DescribeValidDBInstanceModifications +func (c *Neptune) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { + req, out := c.DescribeValidDBInstanceModificationsRequest(input) + return out, req.Send() +} + +// DescribeValidDBInstanceModificationsWithContext is the same as DescribeValidDBInstanceModifications with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeValidDBInstanceModifications 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 *Neptune) DescribeValidDBInstanceModificationsWithContext(ctx aws.Context, input *DescribeValidDBInstanceModificationsInput, opts ...request.Option) (*DescribeValidDBInstanceModificationsOutput, error) { + req, out := c.DescribeValidDBInstanceModificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opFailoverDBCluster = "FailoverDBCluster" + +// FailoverDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the FailoverDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 FailoverDBCluster for more information on using the FailoverDBCluster +// 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 FailoverDBClusterRequest method. +// req, resp := client.FailoverDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/FailoverDBCluster +func (c *Neptune) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *request.Request, output *FailoverDBClusterOutput) { + op := &request.Operation{ + Name: opFailoverDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &FailoverDBClusterInput{} + } + + output = &FailoverDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// FailoverDBCluster API operation for Amazon Neptune. +// +// Forces a failover for a DB cluster. +// +// A failover for a DB cluster promotes one of the Read Replicas (read-only +// instances) in the DB cluster to be the primary instance (the cluster writer). +// +// Amazon Neptune will automatically fail over to a Read Replica, if one exists, +// when the primary instance fails. You can force a failover when you want to +// simulate a failure of a primary instance for testing. Because each instance +// in a DB cluster has its own endpoint address, you will need to clean up and +// re-establish any existing connections that use those endpoint addresses when +// the failover is complete. +// +// 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 Neptune's +// API operation FailoverDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/FailoverDBCluster +func (c *Neptune) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { + req, out := c.FailoverDBClusterRequest(input) + return out, req.Send() +} + +// FailoverDBClusterWithContext is the same as FailoverDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See FailoverDBCluster 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 *Neptune) FailoverDBClusterWithContext(ctx aws.Context, input *FailoverDBClusterInput, opts ...request.Option) (*FailoverDBClusterOutput, error) { + req, out := c.FailoverDBClusterRequest(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 +// successfuly. +// +// 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/neptune-2014-10-31/ListTagsForResource +func (c *Neptune) 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 Neptune. +// +// Lists all tags on an Amazon Neptune 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 Neptune's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ListTagsForResource +func (c *Neptune) 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 *Neptune) 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 opModifyDBCluster = "ModifyDBCluster" + +// ModifyDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBCluster for more information on using the ModifyDBCluster +// 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 ModifyDBClusterRequest method. +// req, resp := client.ModifyDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBCluster +func (c *Neptune) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request.Request, output *ModifyDBClusterOutput) { + op := &request.Operation{ + Name: opModifyDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterInput{} + } + + output = &ModifyDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBCluster API operation for Amazon Neptune. +// +// Modify a setting for a DB cluster. You can change one or more database configuration +// parameters by specifying these parameters and the new values in the request. +// +// 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 Neptune's +// API operation ModifyDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group cannot be deleted because it is in use. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// group. +// +// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" +// The state of the DB security group does not allow deletion. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// User already has a DB cluster with the given identifier. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBCluster +func (c *Neptune) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { + req, out := c.ModifyDBClusterRequest(input) + return out, req.Send() +} + +// ModifyDBClusterWithContext is the same as ModifyDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBCluster 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 *Neptune) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBClusterInput, opts ...request.Option) (*ModifyDBClusterOutput, error) { + req, out := c.ModifyDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" + +// ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBClusterParameterGroup for more information on using the ModifyDBClusterParameterGroup +// 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 ModifyDBClusterParameterGroupRequest method. +// req, resp := client.ModifyDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterParameterGroup +func (c *Neptune) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opModifyDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterParameterGroupInput{} + } + + output = &ResetDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBClusterParameterGroup API operation for Amazon Neptune. +// +// Modifies the parameters of a DB cluster parameter group. To modify more than +// one parameter, submit a list of the following: ParameterName, ParameterValue, +// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. +// +// Changes to dynamic parameters are applied immediately. Changes to static +// parameters require a reboot without failover to the DB cluster associated +// with the parameter group before the change can take effect. +// +// After you create a DB cluster parameter group, you should wait at least 5 +// minutes before creating your first DB cluster that uses that DB cluster parameter +// group as the default parameter group. This allows Amazon Neptune to fully +// complete the create action before the parameter group is used as the default +// for a new DB cluster. This is especially important for parameters that are +// critical when creating the default database for a DB cluster, such as the +// character set for the default database defined by the character_set_database +// parameter. You can use the Parameter Groups option of the Amazon Neptune +// console or the DescribeDBClusterParameters command to verify that your DB +// cluster parameter group has been created or modified. +// +// 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 Neptune's +// API operation ModifyDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterParameterGroup +func (c *Neptune) ModifyDBClusterParameterGroup(input *ModifyDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ModifyDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// ModifyDBClusterParameterGroupWithContext is the same as ModifyDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBClusterParameterGroup 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 *Neptune) ModifyDBClusterParameterGroupWithContext(ctx aws.Context, input *ModifyDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ModifyDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" + +// ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBClusterSnapshotAttribute for more information on using the ModifyDBClusterSnapshotAttribute +// 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 ModifyDBClusterSnapshotAttributeRequest method. +// req, resp := client.ModifyDBClusterSnapshotAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterSnapshotAttribute +func (c *Neptune) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnapshotAttributeInput) (req *request.Request, output *ModifyDBClusterSnapshotAttributeOutput) { + op := &request.Operation{ + Name: opModifyDBClusterSnapshotAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterSnapshotAttributeInput{} + } + + output = &ModifyDBClusterSnapshotAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBClusterSnapshotAttribute API operation for Amazon Neptune. +// +// Adds an attribute and values to, or removes an attribute and values from, +// a manual DB cluster snapshot. +// +// To share a manual DB cluster snapshot with other AWS accounts, specify restore +// as the AttributeName and use the ValuesToAdd parameter to add a list of IDs +// of the AWS accounts that are authorized to restore the manual DB cluster +// snapshot. Use the value all to make the manual DB cluster snapshot public, +// which means that it can be copied or restored by all AWS accounts. Do not +// add the all value for any manual DB cluster snapshots that contain private +// information that you don't want available to all AWS accounts. If a manual +// DB cluster snapshot is encrypted, it can be shared, but only by specifying +// a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't +// use all as a value for that parameter in this case. +// +// To view which AWS accounts have access to copy or restore a manual DB cluster +// snapshot, or whether a manual DB cluster snapshot public or private, use +// the DescribeDBClusterSnapshotAttributes API action. +// +// 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 Neptune's +// API operation ModifyDBClusterSnapshotAttribute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" +// You have exceeded the maximum number of accounts that you can share a manual +// DB snapshot with. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBClusterSnapshotAttribute +func (c *Neptune) ModifyDBClusterSnapshotAttribute(input *ModifyDBClusterSnapshotAttributeInput) (*ModifyDBClusterSnapshotAttributeOutput, error) { + req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) + return out, req.Send() +} + +// ModifyDBClusterSnapshotAttributeWithContext is the same as ModifyDBClusterSnapshotAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBClusterSnapshotAttribute 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 *Neptune) ModifyDBClusterSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBClusterSnapshotAttributeInput, opts ...request.Option) (*ModifyDBClusterSnapshotAttributeOutput, error) { + req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBInstance = "ModifyDBInstance" + +// ModifyDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBInstance for more information on using the ModifyDBInstance +// 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 ModifyDBInstanceRequest method. +// req, resp := client.ModifyDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBInstance +func (c *Neptune) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *request.Request, output *ModifyDBInstanceOutput) { + op := &request.Operation{ + Name: opModifyDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBInstanceInput{} + } + + output = &ModifyDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBInstance API operation for Amazon Neptune. +// +// Modifies settings for a DB instance. You can change one or more database +// configuration parameters by specifying these parameters and the new values +// in the request. To learn what modifications you can make to your DB instance, +// call DescribeValidDBInstanceModifications before you call ModifyDBInstance. +// +// 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 Neptune's +// API operation ModifyDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" +// The state of the DB security group does not allow deletion. +// +// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" +// User already has a DB instance with the given identifier. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" +// DBSecurityGroupName does not refer to an existing DB security group. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" +// Specified DB instance class is not available in the specified Availability +// Zone. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" +// Provisioned IOPS not available in the specified Availability Zone. +// +// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" +// +// * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" +// The DB upgrade failed because a resource the DB depends on could not be modified. +// +// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" +// StorageType specified cannot be associated with the DB Instance. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// Specified CIDRIP or EC2 security group is not authorized for the specified +// DB security group. +// +// Neptune may not also be authorized via IAM to perform necessary actions on +// your behalf. +// +// * ErrCodeCertificateNotFoundFault "CertificateNotFound" +// CertificateIdentifier does not refer to an existing certificate. +// +// * ErrCodeDomainNotFoundFault "DomainNotFoundFault" +// Domain does not refer to an existing Active Directory Domain. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBInstance +func (c *Neptune) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { + req, out := c.ModifyDBInstanceRequest(input) + return out, req.Send() +} + +// ModifyDBInstanceWithContext is the same as ModifyDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBInstance 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 *Neptune) ModifyDBInstanceWithContext(ctx aws.Context, input *ModifyDBInstanceInput, opts ...request.Option) (*ModifyDBInstanceOutput, error) { + req, out := c.ModifyDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBParameterGroup = "ModifyDBParameterGroup" + +// ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBParameterGroup for more information on using the ModifyDBParameterGroup +// 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 ModifyDBParameterGroupRequest method. +// req, resp := client.ModifyDBParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBParameterGroup +func (c *Neptune) ModifyDBParameterGroupRequest(input *ModifyDBParameterGroupInput) (req *request.Request, output *ResetDBParameterGroupOutput) { + op := &request.Operation{ + Name: opModifyDBParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBParameterGroupInput{} + } + + output = &ResetDBParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBParameterGroup API operation for Amazon Neptune. +// +// Modifies the parameters of a DB parameter group. To modify more than one +// parameter, submit a list of the following: ParameterName, ParameterValue, +// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. +// +// Changes to dynamic parameters are applied immediately. Changes to static +// parameters require a reboot without failover to the DB instance associated +// with the parameter group before the change can take effect. +// +// After you modify a DB parameter group, you should wait at least 5 minutes +// before creating your first DB instance that uses that DB parameter group +// as the default parameter group. This allows Amazon Neptune to fully complete +// the modify action before the parameter group is used as the default for a +// new DB instance. This is especially important for parameters that are critical +// when creating the default database for a DB instance, such as the character +// set for the default database defined by the character_set_database parameter. +// You can use the Parameter Groups option of the Amazon Neptune console or +// the DescribeDBParameters command to verify that your DB parameter group has +// been created or modified. +// +// 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 Neptune's +// API operation ModifyDBParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBParameterGroup +func (c *Neptune) ModifyDBParameterGroup(input *ModifyDBParameterGroupInput) (*ResetDBParameterGroupOutput, error) { + req, out := c.ModifyDBParameterGroupRequest(input) + return out, req.Send() +} + +// ModifyDBParameterGroupWithContext is the same as ModifyDBParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBParameterGroup 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 *Neptune) ModifyDBParameterGroupWithContext(ctx aws.Context, input *ModifyDBParameterGroupInput, opts ...request.Option) (*ResetDBParameterGroupOutput, error) { + req, out := c.ModifyDBParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" + +// ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyDBSubnetGroup for more information on using the ModifyDBSubnetGroup +// 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 ModifyDBSubnetGroupRequest method. +// req, resp := client.ModifyDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBSubnetGroup +func (c *Neptune) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req *request.Request, output *ModifyDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opModifyDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBSubnetGroupInput{} + } + + output = &ModifyDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBSubnetGroup API operation for Amazon Neptune. +// +// Modifies an existing DB subnet group. DB subnet groups must contain at least +// one subnet in at least two AZs in the AWS 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 Amazon Neptune's +// API operation ModifyDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" +// Request would result in user exceeding the allowed number of subnets in a +// DB subnet groups. +// +// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" +// The DB subnet is already in use in the Availability Zone. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyDBSubnetGroup +func (c *Neptune) ModifyDBSubnetGroup(input *ModifyDBSubnetGroupInput) (*ModifyDBSubnetGroupOutput, error) { + req, out := c.ModifyDBSubnetGroupRequest(input) + return out, req.Send() +} + +// ModifyDBSubnetGroupWithContext is the same as ModifyDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBSubnetGroup 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 *Neptune) ModifyDBSubnetGroupWithContext(ctx aws.Context, input *ModifyDBSubnetGroupInput, opts ...request.Option) (*ModifyDBSubnetGroupOutput, error) { + req, out := c.ModifyDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyEventSubscription = "ModifyEventSubscription" + +// ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the ModifyEventSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyEventSubscription for more information on using the ModifyEventSubscription +// 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 ModifyEventSubscriptionRequest method. +// req, resp := client.ModifyEventSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyEventSubscription +func (c *Neptune) ModifyEventSubscriptionRequest(input *ModifyEventSubscriptionInput) (req *request.Request, output *ModifyEventSubscriptionOutput) { + op := &request.Operation{ + Name: opModifyEventSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyEventSubscriptionInput{} + } + + output = &ModifyEventSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyEventSubscription API operation for Amazon Neptune. +// +// Modifies an existing event notification subscription. Note that you can't +// modify the source identifiers using this call; to change source identifiers +// for a subscription, use the AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription +// calls. +// +// You can see a list of the event categories for a given SourceType by using +// the DescribeEventCategories action. +// +// 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 Neptune's +// API operation ModifyEventSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEventSubscriptionQuotaExceededFault "EventSubscriptionQuotaExceeded" +// +// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" +// +// * ErrCodeSNSInvalidTopicFault "SNSInvalidTopic" +// +// * ErrCodeSNSNoAuthorizationFault "SNSNoAuthorization" +// +// * ErrCodeSNSTopicArnNotFoundFault "SNSTopicArnNotFound" +// +// * ErrCodeSubscriptionCategoryNotFoundFault "SubscriptionCategoryNotFound" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ModifyEventSubscription +func (c *Neptune) ModifyEventSubscription(input *ModifyEventSubscriptionInput) (*ModifyEventSubscriptionOutput, error) { + req, out := c.ModifyEventSubscriptionRequest(input) + return out, req.Send() +} + +// ModifyEventSubscriptionWithContext is the same as ModifyEventSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyEventSubscription 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 *Neptune) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyEventSubscriptionInput, opts ...request.Option) (*ModifyEventSubscriptionOutput, error) { + req, out := c.ModifyEventSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" + +// PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the PromoteReadReplicaDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PromoteReadReplicaDBCluster for more information on using the PromoteReadReplicaDBCluster +// 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 PromoteReadReplicaDBClusterRequest method. +// req, resp := client.PromoteReadReplicaDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/PromoteReadReplicaDBCluster +func (c *Neptune) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClusterInput) (req *request.Request, output *PromoteReadReplicaDBClusterOutput) { + op := &request.Operation{ + Name: opPromoteReadReplicaDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PromoteReadReplicaDBClusterInput{} + } + + output = &PromoteReadReplicaDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// PromoteReadReplicaDBCluster API operation for Amazon Neptune. +// +// Promotes a Read Replica DB cluster to a standalone DB 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 Amazon Neptune's +// API operation PromoteReadReplicaDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/PromoteReadReplicaDBCluster +func (c *Neptune) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { + req, out := c.PromoteReadReplicaDBClusterRequest(input) + return out, req.Send() +} + +// PromoteReadReplicaDBClusterWithContext is the same as PromoteReadReplicaDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See PromoteReadReplicaDBCluster 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 *Neptune) PromoteReadReplicaDBClusterWithContext(ctx aws.Context, input *PromoteReadReplicaDBClusterInput, opts ...request.Option) (*PromoteReadReplicaDBClusterOutput, error) { + req, out := c.PromoteReadReplicaDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootDBInstance = "RebootDBInstance" + +// RebootDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RebootDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RebootDBInstance for more information on using the RebootDBInstance +// 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 RebootDBInstanceRequest method. +// req, resp := client.RebootDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RebootDBInstance +func (c *Neptune) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *request.Request, output *RebootDBInstanceOutput) { + op := &request.Operation{ + Name: opRebootDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootDBInstanceInput{} + } + + output = &RebootDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootDBInstance API operation for Amazon Neptune. +// +// You might need to reboot your DB instance, usually for maintenance reasons. +// For example, if you make certain modifications, or if you change the DB parameter +// group associated with the DB instance, you must reboot the instance for the +// changes to take effect. +// +// Rebooting a DB instance restarts the database engine service. Rebooting a +// DB instance results in a momentary outage, during which the DB instance status +// is set to rebooting. +// +// 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 Neptune's +// API operation RebootDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance is not in the available state. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RebootDBInstance +func (c *Neptune) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { + req, out := c.RebootDBInstanceRequest(input) + return out, req.Send() +} + +// RebootDBInstanceWithContext is the same as RebootDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See RebootDBInstance 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 *Neptune) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstanceInput, opts ...request.Option) (*RebootDBInstanceOutput, error) { + req, out := c.RebootDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" + +// RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the RemoveRoleFromDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RemoveRoleFromDBCluster for more information on using the RemoveRoleFromDBCluster +// 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 RemoveRoleFromDBClusterRequest method. +// req, resp := client.RemoveRoleFromDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveRoleFromDBCluster +func (c *Neptune) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput) (req *request.Request, output *RemoveRoleFromDBClusterOutput) { + op := &request.Operation{ + Name: opRemoveRoleFromDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveRoleFromDBClusterInput{} + } + + output = &RemoveRoleFromDBClusterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveRoleFromDBCluster API operation for Amazon Neptune. +// +// Disassociates an Identity and Access Management (IAM) role from a DB 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 Amazon Neptune's +// API operation RemoveRoleFromDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeDBClusterRoleNotFoundFault "DBClusterRoleNotFound" +// The specified IAM role Amazon Resource Name (ARN) is not associated with +// the specified DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveRoleFromDBCluster +func (c *Neptune) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { + req, out := c.RemoveRoleFromDBClusterRequest(input) + return out, req.Send() +} + +// RemoveRoleFromDBClusterWithContext is the same as RemoveRoleFromDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveRoleFromDBCluster 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 *Neptune) RemoveRoleFromDBClusterWithContext(ctx aws.Context, input *RemoveRoleFromDBClusterInput, opts ...request.Option) (*RemoveRoleFromDBClusterOutput, error) { + req, out := c.RemoveRoleFromDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubscription" + +// RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RemoveSourceIdentifierFromSubscription for more information on using the RemoveSourceIdentifierFromSubscription +// 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 RemoveSourceIdentifierFromSubscriptionRequest method. +// req, resp := client.RemoveSourceIdentifierFromSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveSourceIdentifierFromSubscription +func (c *Neptune) RemoveSourceIdentifierFromSubscriptionRequest(input *RemoveSourceIdentifierFromSubscriptionInput) (req *request.Request, output *RemoveSourceIdentifierFromSubscriptionOutput) { + op := &request.Operation{ + Name: opRemoveSourceIdentifierFromSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveSourceIdentifierFromSubscriptionInput{} + } + + output = &RemoveSourceIdentifierFromSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveSourceIdentifierFromSubscription API operation for Amazon Neptune. +// +// Removes a source identifier from an existing event notification subscription. +// +// 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 Neptune's +// API operation RemoveSourceIdentifierFromSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSubscriptionNotFoundFault "SubscriptionNotFound" +// +// * ErrCodeSourceNotFoundFault "SourceNotFound" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveSourceIdentifierFromSubscription +func (c *Neptune) RemoveSourceIdentifierFromSubscription(input *RemoveSourceIdentifierFromSubscriptionInput) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { + req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(input) + return out, req.Send() +} + +// RemoveSourceIdentifierFromSubscriptionWithContext is the same as RemoveSourceIdentifierFromSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveSourceIdentifierFromSubscription 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 *Neptune) RemoveSourceIdentifierFromSubscriptionWithContext(ctx aws.Context, input *RemoveSourceIdentifierFromSubscriptionInput, opts ...request.Option) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { + req, out := c.RemoveSourceIdentifierFromSubscriptionRequest(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 +// successfuly. +// +// 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/neptune-2014-10-31/RemoveTagsFromResource +func (c *Neptune) 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) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveTagsFromResource API operation for Amazon Neptune. +// +// Removes metadata tags from an Amazon Neptune 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 Neptune's +// API operation RemoveTagsFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier does not refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RemoveTagsFromResource +func (c *Neptune) 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 *Neptune) 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() +} + +const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" + +// ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ResetDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ResetDBClusterParameterGroup for more information on using the ResetDBClusterParameterGroup +// 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 ResetDBClusterParameterGroupRequest method. +// req, resp := client.ResetDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBClusterParameterGroup +func (c *Neptune) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opResetDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetDBClusterParameterGroupInput{} + } + + output = &ResetDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetDBClusterParameterGroup API operation for Amazon Neptune. +// +// Modifies the parameters of a DB cluster parameter group to the default value. +// To reset specific parameters submit a list of the following: ParameterName +// and ApplyMethod. To reset the entire DB cluster parameter group, specify +// the DBClusterParameterGroupName and ResetAllParameters parameters. +// +// When resetting the entire group, dynamic parameters are updated immediately +// and static parameters are set to pending-reboot to take effect on the next +// DB instance restart or RebootDBInstance request. You must call RebootDBInstance +// for every DB instance in your DB cluster that you want the updated static +// parameter to apply to. +// +// 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 Neptune's +// API operation ResetDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBClusterParameterGroup +func (c *Neptune) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ResetDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// ResetDBClusterParameterGroupWithContext is the same as ResetDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ResetDBClusterParameterGroup 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 *Neptune) ResetDBClusterParameterGroupWithContext(ctx aws.Context, input *ResetDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ResetDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opResetDBParameterGroup = "ResetDBParameterGroup" + +// ResetDBParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ResetDBParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ResetDBParameterGroup for more information on using the ResetDBParameterGroup +// 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 ResetDBParameterGroupRequest method. +// req, resp := client.ResetDBParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBParameterGroup +func (c *Neptune) ResetDBParameterGroupRequest(input *ResetDBParameterGroupInput) (req *request.Request, output *ResetDBParameterGroupOutput) { + op := &request.Operation{ + Name: opResetDBParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetDBParameterGroupInput{} + } + + output = &ResetDBParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetDBParameterGroup API operation for Amazon Neptune. +// +// Modifies the parameters of a DB parameter group to the engine/system default +// value. To reset specific parameters, provide a list of the following: ParameterName +// and ApplyMethod. To reset the entire DB parameter group, specify the DBParameterGroup +// name and ResetAllParameters parameters. When resetting the entire group, +// dynamic parameters are updated immediately and static parameters are set +// to pending-reboot to take effect on the next DB instance restart or RebootDBInstance +// request. +// +// 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 Neptune's +// API operation ResetDBParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use or is in an invalid state. If you are attempting +// to delete the parameter group, you cannot delete it when the parameter group +// is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName does not refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/ResetDBParameterGroup +func (c *Neptune) ResetDBParameterGroup(input *ResetDBParameterGroupInput) (*ResetDBParameterGroupOutput, error) { + req, out := c.ResetDBParameterGroupRequest(input) + return out, req.Send() +} + +// ResetDBParameterGroupWithContext is the same as ResetDBParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ResetDBParameterGroup 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 *Neptune) ResetDBParameterGroupWithContext(ctx aws.Context, input *ResetDBParameterGroupInput, opts ...request.Option) (*ResetDBParameterGroupOutput, error) { + req, out := c.ResetDBParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" + +// RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the RestoreDBClusterFromSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RestoreDBClusterFromSnapshot for more information on using the RestoreDBClusterFromSnapshot +// 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 RestoreDBClusterFromSnapshotRequest method. +// req, resp := client.RestoreDBClusterFromSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterFromSnapshot +func (c *Neptune) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSnapshotInput) (req *request.Request, output *RestoreDBClusterFromSnapshotOutput) { + op := &request.Operation{ + Name: opRestoreDBClusterFromSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreDBClusterFromSnapshotInput{} + } + + output = &RestoreDBClusterFromSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreDBClusterFromSnapshot API operation for Amazon Neptune. +// +// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. +// +// If a DB snapshot is specified, the target DB cluster is created from the +// source DB snapshot with a default configuration and default security group. +// +// If a DB cluster snapshot is specified, the target DB cluster is created from +// the source DB cluster restore point with the same configuration as the original +// source DB cluster, except that the new DB cluster is created with the default +// security group. +// +// 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 Neptune's +// API operation RestoreDBClusterFromSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// User already has a DB cluster with the given identifier. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// User attempted to create a new DB cluster and the user has already reached +// the maximum allowed DB cluster quota. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" +// The DB cluster does not have enough capacity for the current operation. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is insufficient storage available for the current action. You may be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" +// The state of the DB snapshot does not allow deletion. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" +// Cannot restore from vpc backup to non-vpc DB instance. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterFromSnapshot +func (c *Neptune) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { + req, out := c.RestoreDBClusterFromSnapshotRequest(input) + return out, req.Send() +} + +// RestoreDBClusterFromSnapshotWithContext is the same as RestoreDBClusterFromSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreDBClusterFromSnapshot 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 *Neptune) RestoreDBClusterFromSnapshotWithContext(ctx aws.Context, input *RestoreDBClusterFromSnapshotInput, opts ...request.Option) (*RestoreDBClusterFromSnapshotOutput, error) { + req, out := c.RestoreDBClusterFromSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" + +// RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the +// client's request for the RestoreDBClusterToPointInTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RestoreDBClusterToPointInTime for more information on using the RestoreDBClusterToPointInTime +// 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 RestoreDBClusterToPointInTimeRequest method. +// req, resp := client.RestoreDBClusterToPointInTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterToPointInTime +func (c *Neptune) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPointInTimeInput) (req *request.Request, output *RestoreDBClusterToPointInTimeOutput) { + op := &request.Operation{ + Name: opRestoreDBClusterToPointInTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreDBClusterToPointInTimeInput{} + } + + output = &RestoreDBClusterToPointInTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreDBClusterToPointInTime API operation for Amazon Neptune. +// +// Restores a DB cluster to an arbitrary point in time. Users can restore to +// any point in time before LatestRestorableTime for up to BackupRetentionPeriod +// days. The target DB cluster is created from the source DB cluster with the +// same configuration as the original DB cluster, except that the new DB cluster +// is created with the default DB security group. +// +// This action only restores the DB cluster, not the DB instances for that DB +// cluster. You must invoke the CreateDBInstance action to create DB instances +// for the restored DB cluster, specifying the identifier of the restored DB +// cluster in DBClusterIdentifier. You can create DB instances only after the +// RestoreDBClusterToPointInTime action has completed and the DB cluster is +// available. +// +// 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 Neptune's +// API operation RestoreDBClusterToPointInTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// User already has a DB cluster with the given identifier. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier does not refer to an existing DB cluster. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// User attempted to create a new DB cluster and the user has already reached +// the maximum allowed DB cluster quota. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName does not refer to an existing DB subnet group. +// +// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" +// The DB cluster does not have enough capacity for the current operation. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is insufficient storage available for the current action. You may be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The supplied value is not a valid DB cluster snapshot state. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster is not in a valid state. +// +// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" +// The state of the DB snapshot does not allow deletion. +// +// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" +// Cannot restore from vpc backup to non-vpc DB instance. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is invalid, or multiple subnets were requested that +// are not all in a common VPC. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// DB subnet group does not cover all Availability Zones after it is created +// because users' change. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// Error accessing KMS key. +// +// * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// Request would result in user exceeding the allowed amount of storage available +// across all DB instances. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/RestoreDBClusterToPointInTime +func (c *Neptune) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { + req, out := c.RestoreDBClusterToPointInTimeRequest(input) + return out, req.Send() +} + +// RestoreDBClusterToPointInTimeWithContext is the same as RestoreDBClusterToPointInTime with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreDBClusterToPointInTime 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 *Neptune) RestoreDBClusterToPointInTimeWithContext(ctx aws.Context, input *RestoreDBClusterToPointInTimeInput, opts ...request.Option) (*RestoreDBClusterToPointInTimeOutput, error) { + req, out := c.RestoreDBClusterToPointInTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AddRoleToDBClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster to associate the IAM role with. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role to associate with the Neptune + // DB cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AddRoleToDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddRoleToDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddRoleToDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddRoleToDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *AddRoleToDBClusterInput) SetDBClusterIdentifier(v string) *AddRoleToDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AddRoleToDBClusterInput) SetRoleArn(v string) *AddRoleToDBClusterInput { + s.RoleArn = &v + return s +} + +type AddRoleToDBClusterOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddRoleToDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddRoleToDBClusterOutput) GoString() string { + return s.String() +} + +type AddSourceIdentifierToSubscriptionInput struct { + _ struct{} `type:"structure"` + + // The identifier of the event source to be added. + // + // Constraints: + // + // * If the source type is a DB instance, then a DBInstanceIdentifier must + // be supplied. + // + // * If the source type is a DB security group, a DBSecurityGroupName must + // be supplied. + // + // * If the source type is a DB parameter group, a DBParameterGroupName must + // be supplied. + // + // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be + // supplied. + // + // SourceIdentifier is a required field + SourceIdentifier *string `type:"string" required:"true"` + + // The name of the event notification subscription you want to add a source + // identifier to. + // + // SubscriptionName is a required field + SubscriptionName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AddSourceIdentifierToSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddSourceIdentifierToSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddSourceIdentifierToSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddSourceIdentifierToSubscriptionInput"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *AddSourceIdentifierToSubscriptionInput) SetSourceIdentifier(v string) *AddSourceIdentifierToSubscriptionInput { + s.SourceIdentifier = &v + return s +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *AddSourceIdentifierToSubscriptionInput) SetSubscriptionName(v string) *AddSourceIdentifierToSubscriptionInput { + s.SubscriptionName = &v + return s +} + +type AddSourceIdentifierToSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful invocation of the DescribeEventSubscriptions + // action. + EventSubscription *EventSubscription `type:"structure"` +} + +// String returns the string representation +func (s AddSourceIdentifierToSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddSourceIdentifierToSubscriptionOutput) GoString() string { + return s.String() +} + +// SetEventSubscription sets the EventSubscription field's value. +func (s *AddSourceIdentifierToSubscriptionOutput) SetEventSubscription(v *EventSubscription) *AddSourceIdentifierToSubscriptionOutput { + s.EventSubscription = v + return s +} + +type AddTagsToResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Neptune resource that the tags are added to. This value is an + // Amazon Resource Name (ARN). For information about creating an ARN, see Constructing + // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // The tags to be assigned to the Amazon Neptune resource. + // + // Tags is a required field + Tags []*Tag `locationNameList:"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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { + s.ResourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { + s.Tags = v + return s +} + +type AddTagsToResourceOutput struct { + _ struct{} `type:"structure"` +} + +// 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() +} + +type ApplyPendingMaintenanceActionInput struct { + _ struct{} `type:"structure"` + + // The pending maintenance action to apply to this resource. + // + // Valid values: system-update, db-upgrade + // + // ApplyAction is a required field + ApplyAction *string `type:"string" required:"true"` + + // A value that specifies the type of opt-in request, or undoes an opt-in request. + // An opt-in request of type immediate can't be undone. + // + // Valid values: + // + // * immediate - Apply the maintenance action immediately. + // + // * next-maintenance - Apply the maintenance action during the next maintenance + // window for the resource. + // + // * undo-opt-in - Cancel any existing next-maintenance opt-in requests. + // + // OptInType is a required field + OptInType *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the resource that the pending maintenance + // action applies to. For information about creating an ARN, see Constructing + // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // ResourceIdentifier is a required field + ResourceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ApplyPendingMaintenanceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyPendingMaintenanceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplyPendingMaintenanceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} + if s.ApplyAction == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyAction")) + } + if s.OptInType == nil { + invalidParams.Add(request.NewErrParamRequired("OptInType")) + } + if s.ResourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyAction sets the ApplyAction field's value. +func (s *ApplyPendingMaintenanceActionInput) SetApplyAction(v string) *ApplyPendingMaintenanceActionInput { + s.ApplyAction = &v + return s +} + +// SetOptInType sets the OptInType field's value. +func (s *ApplyPendingMaintenanceActionInput) SetOptInType(v string) *ApplyPendingMaintenanceActionInput { + s.OptInType = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput { + s.ResourceIdentifier = &v + return s +} + +type ApplyPendingMaintenanceActionOutput struct { + _ struct{} `type:"structure"` + + // Describes the pending maintenance actions for a resource. + ResourcePendingMaintenanceActions *ResourcePendingMaintenanceActions `type:"structure"` +} + +// String returns the string representation +func (s ApplyPendingMaintenanceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyPendingMaintenanceActionOutput) GoString() string { + return s.String() +} + +// SetResourcePendingMaintenanceActions sets the ResourcePendingMaintenanceActions field's value. +func (s *ApplyPendingMaintenanceActionOutput) SetResourcePendingMaintenanceActions(v *ResourcePendingMaintenanceActions) *ApplyPendingMaintenanceActionOutput { + s.ResourcePendingMaintenanceActions = v + return s +} + +// Contains Availability Zone information. +// +// This data type is used as an element in the following data type: +// +// * OrderableDBInstanceOption +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The name of the availability zone. + Name *string `type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { + s.Name = &v + return s +} + +// This data type is used as a response element in the action DescribeDBEngineVersions. +type CharacterSet struct { + _ struct{} `type:"structure"` + + // The description of the character set. + CharacterSetDescription *string `type:"string"` + + // The name of the character set. + CharacterSetName *string `type:"string"` +} + +// String returns the string representation +func (s CharacterSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CharacterSet) GoString() string { + return s.String() +} + +// SetCharacterSetDescription sets the CharacterSetDescription field's value. +func (s *CharacterSet) SetCharacterSetDescription(v string) *CharacterSet { + s.CharacterSetDescription = &v + return s +} + +// SetCharacterSetName sets the CharacterSetName field's value. +func (s *CharacterSet) SetCharacterSetName(v string) *CharacterSet { + s.CharacterSetName = &v + return s +} + +// The configuration setting for the log types to be enabled for export to CloudWatch +// Logs for a specific DB instance or DB cluster. +type CloudwatchLogsExportConfiguration struct { + _ struct{} `type:"structure"` + + // The list of log types to disable. + DisableLogTypes []*string `type:"list"` + + // The list of log types to enable. + EnableLogTypes []*string `type:"list"` +} + +// String returns the string representation +func (s CloudwatchLogsExportConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudwatchLogsExportConfiguration) GoString() string { + return s.String() +} + +// SetDisableLogTypes sets the DisableLogTypes field's value. +func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { + s.DisableLogTypes = v + return s +} + +// SetEnableLogTypes sets the EnableLogTypes field's value. +func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { + s.EnableLogTypes = v + return s +} + +type CopyDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter + // group. For information about creating an ARN, see Constructing an Amazon + // Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // Constraints: + // + // * Must specify a valid DB cluster parameter group. + // + // * If the source DB cluster parameter group is in the same AWS Region as + // the copy, specify a valid DB parameter group identifier, for example my-db-cluster-param-group, + // or a valid ARN. + // + // * If the source DB parameter group is in a different AWS Region than the + // copy, specify a valid DB cluster parameter group ARN, for example arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1. + // + // SourceDBClusterParameterGroupIdentifier is a required field + SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A description for the copied DB cluster parameter group. + // + // TargetDBClusterParameterGroupDescription is a required field + TargetDBClusterParameterGroupDescription *string `type:"string" required:"true"` + + // The identifier for the copied DB cluster parameter group. + // + // Constraints: + // + // * Cannot be null, empty, or blank + // + // * Must contain from 1 to 255 letters, numbers, or hyphens + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // Example: my-cluster-param-group1 + // + // TargetDBClusterParameterGroupIdentifier is a required field + TargetDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterParameterGroupInput"} + if s.SourceDBClusterParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) + } + if s.TargetDBClusterParameterGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) + } + if s.TargetDBClusterParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceDBClusterParameterGroupIdentifier sets the SourceDBClusterParameterGroupIdentifier field's value. +func (s *CopyDBClusterParameterGroupInput) SetSourceDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { + s.SourceDBClusterParameterGroupIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CopyDBClusterParameterGroupInput) SetTags(v []*Tag) *CopyDBClusterParameterGroupInput { + s.Tags = v + return s +} + +// SetTargetDBClusterParameterGroupDescription sets the TargetDBClusterParameterGroupDescription field's value. +func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupDescription(v string) *CopyDBClusterParameterGroupInput { + s.TargetDBClusterParameterGroupDescription = &v + return s +} + +// SetTargetDBClusterParameterGroupIdentifier sets the TargetDBClusterParameterGroupIdentifier field's value. +func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { + s.TargetDBClusterParameterGroupIdentifier = &v + return s +} + +type CopyDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster parameter group. + // + // This data type is used as a response element in the DescribeDBClusterParameterGroups + // action. + DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CopyDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *CopyDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CopyDBClusterParameterGroupOutput { + s.DBClusterParameterGroup = v + return s +} + +type CopyDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // True to copy all tags from the source DB cluster snapshot to the target DB + // cluster snapshot, and otherwise false. The default is false. + CopyTags *bool `type:"boolean"` + + // The AWS AWS KMS key ID for an encrypted DB cluster snapshot. The KMS key + // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key + // alias for the KMS encryption key. + // + // If you copy an unencrypted DB cluster snapshot and specify a value for the + // KmsKeyId parameter, Amazon Neptune encrypts the target DB cluster snapshot + // using the specified KMS encryption key. + // + // If you copy an encrypted DB cluster snapshot from your AWS account, you can + // specify a value for KmsKeyId to encrypt the copy with a new KMS encryption + // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster + // snapshot is encrypted with the same KMS key as the source DB cluster snapshot. + // + // If you copy an encrypted DB cluster snapshot that is shared from another + // AWS account, then you must specify a value for KmsKeyId. + // + // To copy an encrypted DB cluster snapshot to another AWS Region, you must + // set KmsKeyId to the KMS key ID you want to use to encrypt the copy of the + // DB cluster snapshot in the destination AWS Region. KMS encryption keys are + // specific to the AWS Region that they are created in, and you can't use encryption + // keys from one AWS Region in another AWS Region. + KmsKeyId *string `type:"string"` + + // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot + // API action in the AWS Region that contains the source DB cluster snapshot + // to copy. The PreSignedUrl parameter must be used when copying an encrypted + // DB cluster snapshot from another AWS Region. + // + // The pre-signed URL must be a valid request for the CopyDBSClusterSnapshot + // API action that can be executed in the source AWS Region that contains the + // encrypted DB cluster snapshot to be copied. The pre-signed URL request must + // contain the following parameter values: + // + // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt + // the copy of the DB cluster snapshot in the destination AWS Region. This + // is the same identifier for both the CopyDBClusterSnapshot action that + // is called in the destination AWS Region, and the action contained in the + // pre-signed URL. + // + // * DestinationRegion - The name of the AWS Region that the DB cluster snapshot + // will be created in. + // + // * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier + // for the encrypted DB cluster snapshot to be copied. This identifier must + // be in the Amazon Resource Name (ARN) format for the source AWS Region. + // For example, if you are copying an encrypted DB cluster snapshot from + // the us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier + // looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:neptune-cluster1-snapshot-20161115. + // + // To learn how to generate a Signature Version 4 signed request, see Authenticating + // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) + // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). + PreSignedUrl *string `type:"string"` + + // The identifier of the DB cluster snapshot to copy. This parameter is not + // case-sensitive. + // + // You can't copy an encrypted, shared DB cluster snapshot from one AWS Region + // to another. + // + // Constraints: + // + // * Must specify a valid system snapshot in the "available" state. + // + // * If the source snapshot is in the same AWS Region as the copy, specify + // a valid DB snapshot identifier. + // + // * If the source snapshot is in a different AWS Region than the copy, specify + // a valid DB cluster snapshot ARN. + // + // Example: my-cluster-snapshot1 + // + // SourceDBClusterSnapshotIdentifier is a required field + SourceDBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The identifier of the new DB cluster snapshot to create from the source DB + // cluster snapshot. This parameter is not case-sensitive. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster-snapshot2 + // + // TargetDBClusterSnapshotIdentifier is a required field + TargetDBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} + if s.SourceDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) + } + if s.TargetDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCopyTags sets the CopyTags field's value. +func (s *CopyDBClusterSnapshotInput) SetCopyTags(v bool) *CopyDBClusterSnapshotInput { + s.CopyTags = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CopyDBClusterSnapshotInput) SetKmsKeyId(v string) *CopyDBClusterSnapshotInput { + s.KmsKeyId = &v + return s +} + +// SetPreSignedUrl sets the PreSignedUrl field's value. +func (s *CopyDBClusterSnapshotInput) SetPreSignedUrl(v string) *CopyDBClusterSnapshotInput { + s.PreSignedUrl = &v + return s +} + +// SetSourceDBClusterSnapshotIdentifier sets the SourceDBClusterSnapshotIdentifier field's value. +func (s *CopyDBClusterSnapshotInput) SetSourceDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { + s.SourceDBClusterSnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CopyDBClusterSnapshotInput) SetTags(v []*Tag) *CopyDBClusterSnapshotInput { + s.Tags = v + return s +} + +// SetTargetDBClusterSnapshotIdentifier sets the TargetDBClusterSnapshotIdentifier field's value. +func (s *CopyDBClusterSnapshotInput) SetTargetDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { + s.TargetDBClusterSnapshotIdentifier = &v + return s +} + +type CopyDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Contains the details for an Amazon Neptune DB cluster snapshot + // + // This data type is used as a response element in the DescribeDBClusterSnapshots + // action. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s CopyDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *CopyDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CopyDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +type CopyDBParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The identifier or ARN for the source DB parameter group. For information + // about creating an ARN, see Constructing an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // Constraints: + // + // * Must specify a valid DB parameter group. + // + // * Must specify a valid DB parameter group identifier, for example my-db-param-group, + // or a valid ARN. + // + // SourceDBParameterGroupIdentifier is a required field + SourceDBParameterGroupIdentifier *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A description for the copied DB parameter group. + // + // TargetDBParameterGroupDescription is a required field + TargetDBParameterGroupDescription *string `type:"string" required:"true"` + + // The identifier for the copied DB parameter group. + // + // Constraints: + // + // * Cannot be null, empty, or blank + // + // * Must contain from 1 to 255 letters, numbers, or hyphens + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // Example: my-db-parameter-group + // + // TargetDBParameterGroupIdentifier is a required field + TargetDBParameterGroupIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyDBParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBParameterGroupInput"} + if s.SourceDBParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBParameterGroupIdentifier")) + } + if s.TargetDBParameterGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupDescription")) + } + if s.TargetDBParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBParameterGroupIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceDBParameterGroupIdentifier sets the SourceDBParameterGroupIdentifier field's value. +func (s *CopyDBParameterGroupInput) SetSourceDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { + s.SourceDBParameterGroupIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CopyDBParameterGroupInput) SetTags(v []*Tag) *CopyDBParameterGroupInput { + s.Tags = v + return s +} + +// SetTargetDBParameterGroupDescription sets the TargetDBParameterGroupDescription field's value. +func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupDescription(v string) *CopyDBParameterGroupInput { + s.TargetDBParameterGroupDescription = &v + return s +} + +// SetTargetDBParameterGroupIdentifier sets the TargetDBParameterGroupIdentifier field's value. +func (s *CopyDBParameterGroupInput) SetTargetDBParameterGroupIdentifier(v string) *CopyDBParameterGroupInput { + s.TargetDBParameterGroupIdentifier = &v + return s +} + +type CopyDBParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB parameter group. + // + // This data type is used as a response element in the DescribeDBParameterGroups + // action. + DBParameterGroup *DBParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CopyDBParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBParameterGroup sets the DBParameterGroup field's value. +func (s *CopyDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CopyDBParameterGroupOutput { + s.DBParameterGroup = v + return s +} + +type CreateDBClusterInput struct { + _ struct{} `type:"structure"` + + // A list of EC2 Availability Zones that instances in the DB cluster can be + // created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // The number of days for which automated backups are retained. You must specify + // a minimum value of 1. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 1 to 35 + BackupRetentionPeriod *int64 `type:"integer"` + + // A value that indicates that the DB cluster should be associated with the + // specified CharacterSet. + CharacterSetName *string `type:"string"` + + // The DB cluster identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, the default is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBClusterParameterGroup. + DBClusterParameterGroupName *string `type:"string"` + + // A DB subnet group to associate with this DB cluster. + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // The name for your database of up to 64 alpha-numeric characters. If you do + // not provide a name, Amazon Neptune will not create a database in the DB cluster + // you are creating. + DatabaseName *string `type:"string"` + + // True to enable mapping of AWS Identity and Access Management (IAM) accounts + // to database accounts, and otherwise false. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // The name of the database engine to be used for this DB cluster. + // + // Valid Values: neptune + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The version number of the database engine to use. + // + // Example: 1.0.1 + EngineVersion *string `type:"string"` + + // The AWS KMS key identifier for an encrypted DB cluster. + // + // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption + // key. If you are creating a DB cluster with the same AWS account that owns + // the KMS encryption key used to encrypt the new DB cluster, then you can use + // the KMS key alias instead of the ARN for the KMS encryption key. + // + // If an encryption key is not specified in KmsKeyId: + // + // * If ReplicationSourceIdentifier identifies an encrypted source, then + // Amazon Neptune will use the encryption key used to encrypt the source. + // Otherwise, Amazon Neptune will use your default encryption key. + // + // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier + // is not specified, then Amazon Neptune will use your default encryption + // key. + // + // AWS KMS creates the default encryption key for your AWS account. Your AWS + // account has a different default encryption key for each AWS Region. + // + // If you create a Read Replica of an encrypted DB cluster in another AWS Region, + // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS + // Region. This key is used to encrypt the Read Replica in that AWS Region. + KmsKeyId *string `type:"string"` + + // The password for the master database user. This password can contain any + // printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain from 8 to 41 characters. + MasterUserPassword *string `type:"string"` + + // The name of the master user for the DB cluster. + // + // Constraints: + // + // * Must be 1 to 16 letters or numbers. + // + // * First character must be a letter. + // + // * Cannot be a reserved word for the chosen database engine. + MasterUsername *string `type:"string"` + + // A value that indicates that the DB cluster should be associated with the + // specified option group. + // + // Permanent options can't be removed from an option group. The option group + // can't be removed from a DB cluster once it is associated with a DB cluster. + OptionGroupName *string `type:"string"` + + // The port number on which the instances in the DB cluster accept connections. + // + // Default: 8182 + Port *int64 `type:"integer"` + + // A URL that contains a Signature Version 4 signed request for the CreateDBCluster + // action to be called in the source AWS Region where the DB cluster is replicated + // from. You only need to specify PreSignedUrl when you are performing cross-region + // replication from an encrypted DB cluster. + // + // The pre-signed URL must be a valid request for the CreateDBCluster API action + // that can be executed in the source AWS Region that contains the encrypted + // DB cluster to be copied. + // + // The pre-signed URL request must contain the following parameter values: + // + // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt + // the copy of the DB cluster in the destination AWS Region. This should + // refer to the same KMS key for both the CreateDBCluster action that is + // called in the destination AWS Region, and the action contained in the + // pre-signed URL. + // + // * DestinationRegion - The name of the AWS Region that Read Replica will + // be created in. + // + // * ReplicationSourceIdentifier - The DB cluster identifier for the encrypted + // DB cluster to be copied. This identifier must be in the Amazon Resource + // Name (ARN) format for the source AWS Region. For example, if you are copying + // an encrypted DB cluster from the us-west-2 AWS Region, then your ReplicationSourceIdentifier + // would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:neptune-cluster1. + // + // To learn how to generate a Signature Version 4 signed request, see Authenticating + // Requests: Using Query Parameters (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) + // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). + PreSignedUrl *string `type:"string"` + + // The daily time range during which automated backups are created if automated + // backups are enabled using the BackupRetentionPeriod parameter. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. To see the time blocks available, see Adjusting + // the Preferred Maintenance Window (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) + // in the Amazon Neptune User Guide. + // + // Constraints: + // + // * Must be in the format hh24:mi-hh24:mi. + // + // * Must be in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `type:"string"` + + // The weekly time range during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. To see + // the time blocks available, see Adjusting the Preferred Maintenance Window + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html) + // in the Amazon Neptune User Guide. + // + // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if + // this DB cluster is created as a Read Replica. + ReplicationSourceIdentifier *string `type:"string"` + + // Specifies whether the DB cluster is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A list of EC2 VPC security groups to associate with this DB cluster. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput { + s.AvailabilityZones = v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetCharacterSetName sets the CharacterSetName field's value. +func (s *CreateDBClusterInput) SetCharacterSetName(v string) *CreateDBClusterInput { + s.CharacterSetName = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterInput) SetDBClusterIdentifier(v string) *CreateDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *CreateDBClusterInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *CreateDBClusterInput) SetDBSubnetGroupName(v string) *CreateDBClusterInput { + s.DBSubnetGroupName = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *CreateDBClusterInput) SetDatabaseName(v string) *CreateDBClusterInput { + s.DatabaseName = &v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *CreateDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBClusterInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { + s.EngineVersion = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { + s.KmsKeyId = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *CreateDBClusterInput) SetMasterUserPassword(v string) *CreateDBClusterInput { + s.MasterUserPassword = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *CreateDBClusterInput) SetMasterUsername(v string) *CreateDBClusterInput { + s.MasterUsername = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *CreateDBClusterInput) SetOptionGroupName(v string) *CreateDBClusterInput { + s.OptionGroupName = &v + return s +} + +// SetPort sets the Port field's value. +func (s *CreateDBClusterInput) SetPort(v int64) *CreateDBClusterInput { + s.Port = &v + return s +} + +// SetPreSignedUrl sets the PreSignedUrl field's value. +func (s *CreateDBClusterInput) SetPreSignedUrl(v string) *CreateDBClusterInput { + s.PreSignedUrl = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *CreateDBClusterInput) SetPreferredBackupWindow(v string) *CreateDBClusterInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateDBClusterInput) SetPreferredMaintenanceWindow(v string) *CreateDBClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. +func (s *CreateDBClusterInput) SetReplicationSourceIdentifier(v string) *CreateDBClusterInput { + s.ReplicationSourceIdentifier = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *CreateDBClusterInput) SetStorageEncrypted(v bool) *CreateDBClusterInput { + s.StorageEncrypted = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterInput) SetTags(v []*Tag) *CreateDBClusterInput { + s.Tags = v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClusterInput { + s.VpcSecurityGroupIds = v + return s +} + +type CreateDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *CreateDBClusterOutput) SetDBCluster(v *DBCluster) *CreateDBClusterOutput { + s.DBCluster = v + return s +} + +type CreateDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group. + // + // Constraints: + // + // * Must match the name of an existing DBClusterParameterGroup. + // + // This value is stored as a lowercase string. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // The DB cluster parameter group family name. A DB cluster parameter group + // can be associated with one and only one DB cluster parameter group family, + // and can be applied only to a DB cluster running a database engine and engine + // version compatible with that DB cluster parameter group family. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // The description for the DB cluster parameter group. + // + // Description is a required field + Description *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *CreateDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *CreateDBClusterParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBClusterParameterGroupInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDBClusterParameterGroupInput) SetDescription(v string) *CreateDBClusterParameterGroupInput { + s.Description = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterParameterGroupInput) SetTags(v []*Tag) *CreateDBClusterParameterGroupInput { + s.Tags = v + return s +} + +type CreateDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster parameter group. + // + // This data type is used as a response element in the DescribeDBClusterParameterGroups + // action. + DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *CreateDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CreateDBClusterParameterGroupOutput { + s.DBClusterParameterGroup = v + return s +} + +type CreateDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // The identifier of the DB cluster to create a snapshot for. This parameter + // is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The identifier of the DB cluster snapshot. This parameter is stored as a + // lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1-snapshot1 + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the DB cluster snapshot. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterSnapshotInput) SetDBClusterIdentifier(v string) *CreateDBClusterSnapshotInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *CreateDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *CreateDBClusterSnapshotInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterSnapshotInput) SetTags(v []*Tag) *CreateDBClusterSnapshotInput { + s.Tags = v + return s +} + +type CreateDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Contains the details for an Amazon Neptune DB cluster snapshot + // + // This data type is used as a response element in the DescribeDBClusterSnapshots + // action. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *CreateDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CreateDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +type CreateDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The amount of storage (in gibibytes) to allocate for the DB instance. + // + // Type: Integer + // + // Not applicable. Neptune cluster volumes automatically grow as the amount + // of data in your database increases, though you are only charged for the space + // that you use in a Neptune cluster volume. + AllocatedStorage *int64 `type:"integer"` + + // Indicates that minor engine upgrades are applied automatically to the DB + // instance during the maintenance window. + // + // Default: true + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The EC2 Availability Zone that the DB instance is created in. + // + // Default: A random, system-chosen Availability Zone in the endpoint's AWS + // Region. + // + // Example: us-east-1d + // + // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ + // parameter is set to true. The specified Availability Zone must be in the + // same AWS Region as the current endpoint. + AvailabilityZone *string `type:"string"` + + // The number of days for which automated backups are retained. + // + // Not applicable. The retention period for automated backups is managed by + // the DB cluster. For more information, see CreateDBCluster. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 0 to 35 + // + // * Cannot be set to 0 if the DB instance is a source to Read Replicas + BackupRetentionPeriod *int64 `type:"integer"` + + // Indicates that the DB instance should be associated with the specified CharacterSet. + // + // Not applicable. The character set is managed by the DB cluster. For more + // information, see CreateDBCluster. + CharacterSetName *string `type:"string"` + + // True to copy all tags from the DB instance to snapshots of the DB instance, + // and otherwise false. The default is false. + CopyTagsToSnapshot *bool `type:"boolean"` + + // The identifier of the DB cluster that the instance will belong to. + // + // For information on creating a DB cluster, see CreateDBCluster. + // + // Type: String + DBClusterIdentifier *string `type:"string"` + + // The compute and memory capacity of the DB instance, for example, db.m4.large. + // Not all DB instance classes are available in all AWS Regions. + // + // DBInstanceClass is a required field + DBInstanceClass *string `type:"string" required:"true"` + + // The DB instance identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: mydbinstance + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The database name. + // + // Type: String + DBName *string `type:"string"` + + // The name of the DB parameter group to associate with this DB instance. If + // this argument is omitted, the default DBParameterGroup for the specified + // engine is used. + // + // Constraints: + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + DBParameterGroupName *string `type:"string"` + + // A list of DB security groups to associate with this DB instance. + // + // Default: The default DB security group for the database engine. + DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` + + // A DB subnet group to associate with this DB instance. + // + // If there is no DB subnet group, then it is a non-VPC DB instance. + DBSubnetGroupName *string `type:"string"` + + // Specify the Active Directory Domain to create the instance in. + Domain *string `type:"string"` + + // Specify the name of the IAM role to be used when making API calls to the + // Directory Service. + DomainIAMRoleName *string `type:"string"` + + // The list of log types that need to be enabled for exporting to CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + + // True to enable AWS Identity and Access Management (IAM) authentication for + // Neptune. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // True to enable Performance Insights for the DB instance, and otherwise false. + EnablePerformanceInsights *bool `type:"boolean"` + + // The name of the database engine to be used for this instance. + // + // Valid Values: neptune + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The version number of the database engine to use. + EngineVersion *string `type:"string"` + + // The amount of Provisioned IOPS (input/output operations per second) to be + // initially allocated for the DB instance. + Iops *int64 `type:"integer"` + + // The AWS KMS key identifier for an encrypted DB instance. + // + // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption + // key. If you are creating a DB instance with the same AWS account that owns + // the KMS encryption key used to encrypt the new DB instance, then you can + // use the KMS key alias instead of the ARN for the KM encryption key. + // + // Not applicable. The KMS key identifier is managed by the DB cluster. For + // more information, see CreateDBCluster. + // + // If the StorageEncrypted parameter is true, and you do not specify a value + // for the KmsKeyId parameter, then Amazon Neptune will use your default encryption + // key. AWS KMS creates the default encryption key for your AWS account. Your + // AWS account has a different default encryption key for each AWS Region. + KmsKeyId *string `type:"string"` + + // License model information for this DB instance. + // + // Valid values: license-included | bring-your-own-license | general-public-license + LicenseModel *string `type:"string"` + + // The password for the master user. The password can include any printable + // ASCII character except "/", """, or "@". + // + // Not used. + MasterUserPassword *string `type:"string"` + + // The name for the master user. Not used. + MasterUsername *string `type:"string"` + + // The interval, in seconds, between points when Enhanced Monitoring metrics + // are collected for the DB instance. To disable collecting Enhanced Monitoring + // metrics, specify 0. The default is 0. + // + // If MonitoringRoleArn is specified, then you must also set MonitoringInterval + // to a value other than 0. + // + // Valid Values: 0, 1, 5, 10, 15, 30, 60 + MonitoringInterval *int64 `type:"integer"` + + // The ARN for the IAM role that permits Neptune to send enhanced monitoring + // metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. + // + // If MonitoringInterval is set to a value other than 0, then you must supply + // a MonitoringRoleArn value. + MonitoringRoleArn *string `type:"string"` + + // Specifies if the DB instance is a Multi-AZ deployment. You can't set the + // AvailabilityZone parameter if the MultiAZ parameter is set to true. + MultiAZ *bool `type:"boolean"` + + // Indicates that the DB instance should be associated with the specified option + // group. + // + // Permanent options, such as the TDE option for Oracle Advanced Security TDE, + // can't be removed from an option group, and that option group can't be removed + // from a DB instance once it is associated with a DB instance + OptionGroupName *string `type:"string"` + + // The AWS KMS key identifier for encryption of Performance Insights data. The + // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the + // KMS key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + + // The port number on which the database accepts connections. + // + // Not applicable. The port is managed by the DB cluster. For more information, + // see CreateDBCluster. + // + // Default: 8182 + // + // Type: Integer + Port *int64 `type:"integer"` + + // The daily time range during which automated backups are created. + // + // Not applicable. The daily time range for creating automated backups is managed + // by the DB cluster. For more information, see CreateDBCluster. + PreferredBackupWindow *string `type:"string"` + + // The time range each week during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which an Read Replica is promoted to + // the primary instance after a failure of the existing primary instance. + // + // Default: 1 + // + // Valid Values: 0 - 15 + PromotionTier *int64 `type:"integer"` + + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` + + // Specifies whether the DB instance is encrypted. + // + // Not applicable. The encryption for DB instances is managed by the DB cluster. + // For more information, see CreateDBCluster. + // + // Default: false + StorageEncrypted *bool `type:"boolean"` + + // Specifies the storage type to be associated with the DB instance. + // + // Not applicable. Storage is managed by the DB Cluster. + StorageType *string `type:"string"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The ARN from the key store with which to associate the instance for TDE encryption. + TdeCredentialArn *string `type:"string"` + + // The password for the given ARN from the key store in order to access the + // device. + TdeCredentialPassword *string `type:"string"` + + // The time zone of the DB instance. + Timezone *string `type:"string"` + + // A list of EC2 VPC security groups to associate with this DB instance. + // + // Not applicable. The associated list of EC2 VPC security groups is managed + // by the DB cluster. For more information, see CreateDBCluster. + // + // Default: The default EC2 VPC security group for the DB subnet group's VPC. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s CreateDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} + if s.DBInstanceClass == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) + } + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *CreateDBInstanceInput) SetAllocatedStorage(v int64) *CreateDBInstanceInput { + s.AllocatedStorage = &v + return s +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *CreateDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceInput { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDBInstanceInput) SetAvailabilityZone(v string) *CreateDBInstanceInput { + s.AvailabilityZone = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *CreateDBInstanceInput) SetBackupRetentionPeriod(v int64) *CreateDBInstanceInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetCharacterSetName sets the CharacterSetName field's value. +func (s *CreateDBInstanceInput) SetCharacterSetName(v string) *CreateDBInstanceInput { + s.CharacterSetName = &v + return s +} + +// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. +func (s *CreateDBInstanceInput) SetCopyTagsToSnapshot(v bool) *CreateDBInstanceInput { + s.CopyTagsToSnapshot = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBInstanceInput) SetDBClusterIdentifier(v string) *CreateDBInstanceInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *CreateDBInstanceInput) SetDBInstanceClass(v string) *CreateDBInstanceInput { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *CreateDBInstanceInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBName sets the DBName field's value. +func (s *CreateDBInstanceInput) SetDBName(v string) *CreateDBInstanceInput { + s.DBName = &v + return s +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *CreateDBInstanceInput) SetDBParameterGroupName(v string) *CreateDBInstanceInput { + s.DBParameterGroupName = &v + return s +} + +// SetDBSecurityGroups sets the DBSecurityGroups field's value. +func (s *CreateDBInstanceInput) SetDBSecurityGroups(v []*string) *CreateDBInstanceInput { + s.DBSecurityGroups = v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *CreateDBInstanceInput) SetDBSubnetGroupName(v string) *CreateDBInstanceInput { + s.DBSubnetGroupName = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput { + s.Domain = &v + return s +} + +// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. +func (s *CreateDBInstanceInput) SetDomainIAMRoleName(v string) *CreateDBInstanceInput { + s.DomainIAMRoleName = &v + return s +} + +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *CreateDBInstanceInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBInstanceInput { + s.EnableCloudwatchLogsExports = v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *CreateDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBInstanceInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. +func (s *CreateDBInstanceInput) SetEnablePerformanceInsights(v bool) *CreateDBInstanceInput { + s.EnablePerformanceInsights = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *CreateDBInstanceInput) SetEngineVersion(v string) *CreateDBInstanceInput { + s.EngineVersion = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *CreateDBInstanceInput) SetIops(v int64) *CreateDBInstanceInput { + s.Iops = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateDBInstanceInput) SetKmsKeyId(v string) *CreateDBInstanceInput { + s.KmsKeyId = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *CreateDBInstanceInput) SetLicenseModel(v string) *CreateDBInstanceInput { + s.LicenseModel = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *CreateDBInstanceInput) SetMasterUserPassword(v string) *CreateDBInstanceInput { + s.MasterUserPassword = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *CreateDBInstanceInput) SetMasterUsername(v string) *CreateDBInstanceInput { + s.MasterUsername = &v + return s +} + +// SetMonitoringInterval sets the MonitoringInterval field's value. +func (s *CreateDBInstanceInput) SetMonitoringInterval(v int64) *CreateDBInstanceInput { + s.MonitoringInterval = &v + return s +} + +// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. +func (s *CreateDBInstanceInput) SetMonitoringRoleArn(v string) *CreateDBInstanceInput { + s.MonitoringRoleArn = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *CreateDBInstanceInput) SetMultiAZ(v bool) *CreateDBInstanceInput { + s.MultiAZ = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *CreateDBInstanceInput) SetOptionGroupName(v string) *CreateDBInstanceInput { + s.OptionGroupName = &v + return s +} + +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *CreateDBInstanceInput { + s.PerformanceInsightsKMSKeyId = &v + return s +} + +// SetPort sets the Port field's value. +func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *CreateDBInstanceInput) SetPreferredBackupWindow(v string) *CreateDBInstanceInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateDBInstanceInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { + s.PromotionTier = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *CreateDBInstanceInput) SetPubliclyAccessible(v bool) *CreateDBInstanceInput { + s.PubliclyAccessible = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *CreateDBInstanceInput) SetStorageEncrypted(v bool) *CreateDBInstanceInput { + s.StorageEncrypted = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *CreateDBInstanceInput) SetStorageType(v string) *CreateDBInstanceInput { + s.StorageType = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBInstanceInput) SetTags(v []*Tag) *CreateDBInstanceInput { + s.Tags = v + return s +} + +// SetTdeCredentialArn sets the TdeCredentialArn field's value. +func (s *CreateDBInstanceInput) SetTdeCredentialArn(v string) *CreateDBInstanceInput { + s.TdeCredentialArn = &v + return s +} + +// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. +func (s *CreateDBInstanceInput) SetTdeCredentialPassword(v string) *CreateDBInstanceInput { + s.TdeCredentialPassword = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *CreateDBInstanceInput) SetTimezone(v string) *CreateDBInstanceInput { + s.Timezone = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *CreateDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *CreateDBInstanceInput { + s.VpcSecurityGroupIds = v + return s +} + +type CreateDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB instance. + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s CreateDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceOutput { + s.DBInstance = v + return s +} + +type CreateDBParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The DB parameter group family name. A DB parameter group can be associated + // with one and only one DB parameter group family, and can be applied only + // to a DB instance running a database engine and engine version compatible + // with that DB parameter group family. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // The name of the DB parameter group. + // + // Constraints: + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // This value is stored as a lowercase string. + // + // DBParameterGroupName is a required field + DBParameterGroupName *string `type:"string" required:"true"` + + // The description for the DB parameter group. + // + // Description is a required field + Description *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBParameterGroupInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *CreateDBParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBParameterGroupInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *CreateDBParameterGroupInput) SetDBParameterGroupName(v string) *CreateDBParameterGroupInput { + s.DBParameterGroupName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDBParameterGroupInput) SetDescription(v string) *CreateDBParameterGroupInput { + s.Description = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBParameterGroupInput) SetTags(v []*Tag) *CreateDBParameterGroupInput { + s.Tags = v + return s +} + +type CreateDBParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB parameter group. + // + // This data type is used as a response element in the DescribeDBParameterGroups + // action. + DBParameterGroup *DBParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateDBParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBParameterGroup sets the DBParameterGroup field's value. +func (s *CreateDBParameterGroupOutput) SetDBParameterGroup(v *DBParameterGroup) *CreateDBParameterGroupOutput { + s.DBParameterGroup = v + return s +} + +type CreateDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The description for the DB subnet group. + // + // DBSubnetGroupDescription is a required field + DBSubnetGroupDescription *string `type:"string" required:"true"` + + // The name for the DB subnet group. This value is stored as a lowercase string. + // + // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, + // spaces, or hyphens. Must not be default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` + + // The EC2 Subnet IDs for the DB subnet group. + // + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} + if s.DBSubnetGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) + } + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *CreateDBSubnetGroupInput { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupName(v string) *CreateDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateDBSubnetGroupInput) SetSubnetIds(v []*string) *CreateDBSubnetGroupInput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBSubnetGroupInput) SetTags(v []*Tag) *CreateDBSubnetGroupInput { + s.Tags = v + return s +} + +type CreateDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB subnet group. + // + // This data type is used as a response element in the DescribeDBSubnetGroups + // action. + DBSubnetGroup *DBSubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *CreateDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *CreateDBSubnetGroupOutput { + s.DBSubnetGroup = v + return s +} + +type CreateEventSubscriptionInput struct { + _ struct{} `type:"structure"` + + // A Boolean value; set to true to activate the subscription, set to false to + // create the subscription but not active it. + Enabled *bool `type:"boolean"` + + // A list of event categories for a SourceType that you want to subscribe to. + // You can see a list of the categories for a given SourceType by using the + // DescribeEventCategories action. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // The Amazon Resource Name (ARN) of the SNS topic created for event notification. + // The ARN is created by Amazon SNS when you create a topic and subscribe to + // it. + // + // SnsTopicArn is a required field + SnsTopicArn *string `type:"string" required:"true"` + + // The list of identifiers of the event sources for which events are returned. + // If not specified, then all sources are included in the response. An identifier + // must begin with a letter and must contain only ASCII letters, digits, and + // hyphens; it can't end with a hyphen or contain two consecutive hyphens. + // + // Constraints: + // + // * If SourceIds are supplied, SourceType must also be provided. + // + // * If the source type is a DB instance, then a DBInstanceIdentifier must + // be supplied. + // + // * If the source type is a DB security group, a DBSecurityGroupName must + // be supplied. + // + // * If the source type is a DB parameter group, a DBParameterGroupName must + // be supplied. + // + // * If the source type is a DB snapshot, a DBSnapshotIdentifier must be + // supplied. + SourceIds []*string `locationNameList:"SourceId" type:"list"` + + // The type of source that is generating the events. For example, if you want + // to be notified of events generated by a DB instance, you would set this parameter + // to db-instance. if this value is not specified, all events are returned. + // + // Valid values: db-instance | db-cluster | db-parameter-group | db-security-group + // | db-snapshot | db-cluster-snapshot + SourceType *string `type:"string"` + + // The name of the subscription. + // + // Constraints: The name must be less than 255 characters. + // + // SubscriptionName is a required field + SubscriptionName *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateEventSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventSubscriptionInput"} + if s.SnsTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *CreateEventSubscriptionInput) SetEnabled(v bool) *CreateEventSubscriptionInput { + s.Enabled = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *CreateEventSubscriptionInput) SetEventCategories(v []*string) *CreateEventSubscriptionInput { + s.EventCategories = v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *CreateEventSubscriptionInput) SetSnsTopicArn(v string) *CreateEventSubscriptionInput { + s.SnsTopicArn = &v + return s +} + +// SetSourceIds sets the SourceIds field's value. +func (s *CreateEventSubscriptionInput) SetSourceIds(v []*string) *CreateEventSubscriptionInput { + s.SourceIds = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *CreateEventSubscriptionInput) SetSourceType(v string) *CreateEventSubscriptionInput { + s.SourceType = &v + return s +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *CreateEventSubscriptionInput) SetSubscriptionName(v string) *CreateEventSubscriptionInput { + s.SubscriptionName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateEventSubscriptionInput) SetTags(v []*Tag) *CreateEventSubscriptionInput { + s.Tags = v + return s +} + +type CreateEventSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful invocation of the DescribeEventSubscriptions + // action. + EventSubscription *EventSubscription `type:"structure"` +} + +// String returns the string representation +func (s CreateEventSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventSubscriptionOutput) GoString() string { + return s.String() +} + +// SetEventSubscription sets the EventSubscription field's value. +func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *CreateEventSubscriptionOutput { + s.EventSubscription = v + return s +} + +// Contains the details of an Amazon Neptune DB cluster. +// +// This data type is used as a response element in the DescribeDBClusters action. +type DBCluster struct { + _ struct{} `type:"structure"` + + // AllocatedStorage always returns 1, because Neptune DB cluster storage size + // is not fixed, but instead automatically adjusts as needed. + AllocatedStorage *int64 `type:"integer"` + + // Provides a list of the AWS Identity and Access Management (IAM) roles that + // are associated with the DB cluster. IAM roles that are associated with a + // DB cluster grant permission for the DB cluster to access other AWS services + // on your behalf. + AssociatedRoles []*DBClusterRole `locationNameList:"DBClusterRole" type:"list"` + + // Provides the list of EC2 Availability Zones that instances in the DB cluster + // can be created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // Specifies the number of days for which automatic DB snapshots are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // If present, specifies the name of the character set that this cluster is + // associated with. + CharacterSetName *string `type:"string"` + + // Identifies the clone group to which the DB cluster is associated. + CloneGroupId *string `type:"string"` + + // Specifies the time when the DB cluster was created, in Universal Coordinated + // Time (UTC). + ClusterCreateTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) for the DB cluster. + DBClusterArn *string `type:"string"` + + // Contains a user-supplied DB cluster identifier. This identifier is the unique + // key that identifies a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // Provides the list of instances that make up the DB cluster. + DBClusterMembers []*DBClusterMember `locationNameList:"DBClusterMember" type:"list"` + + // Provides the list of option group memberships for this DB cluster. + DBClusterOptionGroupMemberships []*DBClusterOptionGroupStatus `locationNameList:"DBClusterOptionGroup" type:"list"` + + // Specifies the name of the DB cluster parameter group for the DB cluster. + DBClusterParameterGroup *string `type:"string"` + + // Specifies information on the subnet group associated with the DB cluster, + // including the name, description, and subnets in the subnet group. + DBSubnetGroup *string `type:"string"` + + // Contains the name of the initial database of this DB cluster that was provided + // at create time, if one was specified when the DB cluster was created. This + // same name is returned for the life of the DB cluster. + DatabaseName *string `type:"string"` + + // The AWS Region-unique, immutable identifier for the DB cluster. This identifier + // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB + // cluster is accessed. + DbClusterResourceId *string `type:"string"` + + // Specifies the earliest time to which a database can be restored with point-in-time + // restore. + EarliestRestorableTime *time.Time `type:"timestamp"` + + // Specifies the connection endpoint for the primary instance of the DB cluster. + Endpoint *string `type:"string"` + + // Provides the name of the database engine to be used for this DB cluster. + Engine *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. + HostedZoneId *string `type:"string"` + + // True if mapping of AWS Identity and Access Management (IAM) accounts to database + // accounts is enabled, and otherwise false. + IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB cluster. + KmsKeyId *string `type:"string"` + + // Specifies the latest time to which a database can be restored with point-in-time + // restore. + LatestRestorableTime *time.Time `type:"timestamp"` + + // Contains the master username for the DB cluster. + MasterUsername *string `type:"string"` + + // Specifies whether the DB cluster has instances in multiple Availability Zones. + MultiAZ *bool `type:"boolean"` + + // Specifies the progress of the operation as a percentage. + PercentProgress *string `type:"string"` + + // Specifies the port that the database engine is listening on. + Port *int64 `type:"integer"` + + // Specifies the daily time range during which automated backups are created + // if automated backups are enabled, as determined by the BackupRetentionPeriod. + PreferredBackupWindow *string `type:"string"` + + // Specifies the weekly time range during which system maintenance can occur, + // in Universal Coordinated Time (UTC). + PreferredMaintenanceWindow *string `type:"string"` + + // Contains one or more identifiers of the Read Replicas associated with this + // DB cluster. + ReadReplicaIdentifiers []*string `locationNameList:"ReadReplicaIdentifier" type:"list"` + + // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster + // load-balances connections across the Read Replicas that are available in + // a DB cluster. As clients request new connections to the reader endpoint, + // Neptune distributes the connection requests among the Read Replicas in the + // DB cluster. This functionality can help balance your read workload across + // multiple Read Replicas in your DB cluster. + // + // If a failover occurs, and the Read Replica that you are connected to is promoted + // to be the primary instance, your connection is dropped. To continue sending + // your read workload to other Read Replicas in the cluster, you can then reconnect + // to the reader endpoint. + ReaderEndpoint *string `type:"string"` + + // Contains the identifier of the source DB cluster if this DB cluster is a + // Read Replica. + ReplicationSourceIdentifier *string `type:"string"` + + // Specifies the current state of this DB cluster. + Status *string `type:"string"` + + // Specifies whether the DB cluster is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Provides a list of VPC security groups that the DB cluster belongs to. + VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` +} + +// String returns the string representation +func (s DBCluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBCluster) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *DBCluster) SetAllocatedStorage(v int64) *DBCluster { + s.AllocatedStorage = &v + return s +} + +// SetAssociatedRoles sets the AssociatedRoles field's value. +func (s *DBCluster) SetAssociatedRoles(v []*DBClusterRole) *DBCluster { + s.AssociatedRoles = v + return s +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { + s.AvailabilityZones = v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { + s.BackupRetentionPeriod = &v + return s +} + +// SetCharacterSetName sets the CharacterSetName field's value. +func (s *DBCluster) SetCharacterSetName(v string) *DBCluster { + s.CharacterSetName = &v + return s +} + +// SetCloneGroupId sets the CloneGroupId field's value. +func (s *DBCluster) SetCloneGroupId(v string) *DBCluster { + s.CloneGroupId = &v + return s +} + +// SetClusterCreateTime sets the ClusterCreateTime field's value. +func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { + s.ClusterCreateTime = &v + return s +} + +// SetDBClusterArn sets the DBClusterArn field's value. +func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { + s.DBClusterArn = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBCluster) SetDBClusterIdentifier(v string) *DBCluster { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterMembers sets the DBClusterMembers field's value. +func (s *DBCluster) SetDBClusterMembers(v []*DBClusterMember) *DBCluster { + s.DBClusterMembers = v + return s +} + +// SetDBClusterOptionGroupMemberships sets the DBClusterOptionGroupMemberships field's value. +func (s *DBCluster) SetDBClusterOptionGroupMemberships(v []*DBClusterOptionGroupStatus) *DBCluster { + s.DBClusterOptionGroupMemberships = v + return s +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *DBCluster) SetDBClusterParameterGroup(v string) *DBCluster { + s.DBClusterParameterGroup = &v + return s +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *DBCluster) SetDBSubnetGroup(v string) *DBCluster { + s.DBSubnetGroup = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *DBCluster) SetDatabaseName(v string) *DBCluster { + s.DatabaseName = &v + return s +} + +// SetDbClusterResourceId sets the DbClusterResourceId field's value. +func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { + s.DbClusterResourceId = &v + return s +} + +// SetEarliestRestorableTime sets the EarliestRestorableTime field's value. +func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { + s.EarliestRestorableTime = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DBCluster) SetEndpoint(v string) *DBCluster { + s.Endpoint = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBCluster) SetEngine(v string) *DBCluster { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBCluster) SetEngineVersion(v string) *DBCluster { + s.EngineVersion = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { + s.HostedZoneId = &v + return s +} + +// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. +func (s *DBCluster) SetIAMDatabaseAuthenticationEnabled(v bool) *DBCluster { + s.IAMDatabaseAuthenticationEnabled = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBCluster) SetKmsKeyId(v string) *DBCluster { + s.KmsKeyId = &v + return s +} + +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *DBCluster) SetLatestRestorableTime(v time.Time) *DBCluster { + s.LatestRestorableTime = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBCluster) SetMasterUsername(v string) *DBCluster { + s.MasterUsername = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *DBCluster) SetMultiAZ(v bool) *DBCluster { + s.MultiAZ = &v + return s +} + +// SetPercentProgress sets the PercentProgress field's value. +func (s *DBCluster) SetPercentProgress(v string) *DBCluster { + s.PercentProgress = &v + return s +} + +// SetPort sets the Port field's value. +func (s *DBCluster) SetPort(v int64) *DBCluster { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *DBCluster) SetPreferredBackupWindow(v string) *DBCluster { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *DBCluster) SetPreferredMaintenanceWindow(v string) *DBCluster { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetReadReplicaIdentifiers sets the ReadReplicaIdentifiers field's value. +func (s *DBCluster) SetReadReplicaIdentifiers(v []*string) *DBCluster { + s.ReadReplicaIdentifiers = v + return s +} + +// SetReaderEndpoint sets the ReaderEndpoint field's value. +func (s *DBCluster) SetReaderEndpoint(v string) *DBCluster { + s.ReaderEndpoint = &v + return s +} + +// SetReplicationSourceIdentifier sets the ReplicationSourceIdentifier field's value. +func (s *DBCluster) SetReplicationSourceIdentifier(v string) *DBCluster { + s.ReplicationSourceIdentifier = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBCluster) SetStatus(v string) *DBCluster { + s.Status = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBCluster) SetStorageEncrypted(v bool) *DBCluster { + s.StorageEncrypted = &v + return s +} + +// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. +func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBCluster { + s.VpcSecurityGroups = v + return s +} + +// Contains information about an instance that is part of a DB cluster. +type DBClusterMember struct { + _ struct{} `type:"structure"` + + // Specifies the status of the DB cluster parameter group for this member of + // the DB cluster. + DBClusterParameterGroupStatus *string `type:"string"` + + // Specifies the instance identifier for this member of the DB cluster. + DBInstanceIdentifier *string `type:"string"` + + // Value that is true if the cluster member is the primary instance for the + // DB cluster and false otherwise. + IsClusterWriter *bool `type:"boolean"` + + // A value that specifies the order in which a Read Replica is promoted to the + // primary instance after a failure of the existing primary instance. + PromotionTier *int64 `type:"integer"` +} + +// String returns the string representation +func (s DBClusterMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterMember) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupStatus sets the DBClusterParameterGroupStatus field's value. +func (s *DBClusterMember) SetDBClusterParameterGroupStatus(v string) *DBClusterMember { + s.DBClusterParameterGroupStatus = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DBClusterMember) SetDBInstanceIdentifier(v string) *DBClusterMember { + s.DBInstanceIdentifier = &v + return s +} + +// SetIsClusterWriter sets the IsClusterWriter field's value. +func (s *DBClusterMember) SetIsClusterWriter(v bool) *DBClusterMember { + s.IsClusterWriter = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *DBClusterMember) SetPromotionTier(v int64) *DBClusterMember { + s.PromotionTier = &v + return s +} + +// Contains status information for a DB cluster option group. +type DBClusterOptionGroupStatus struct { + _ struct{} `type:"structure"` + + // Specifies the name of the DB cluster option group. + DBClusterOptionGroupName *string `type:"string"` + + // Specifies the status of the DB cluster option group. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterOptionGroupStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterOptionGroupStatus) GoString() string { + return s.String() +} + +// SetDBClusterOptionGroupName sets the DBClusterOptionGroupName field's value. +func (s *DBClusterOptionGroupStatus) SetDBClusterOptionGroupName(v string) *DBClusterOptionGroupStatus { + s.DBClusterOptionGroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterOptionGroupStatus) SetStatus(v string) *DBClusterOptionGroupStatus { + s.Status = &v + return s +} + +// Contains the details of an Amazon Neptune DB cluster parameter group. +// +// This data type is used as a response element in the DescribeDBClusterParameterGroups +// action. +type DBClusterParameterGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the DB cluster parameter group. + DBClusterParameterGroupArn *string `type:"string"` + + // Provides the name of the DB cluster parameter group. + DBClusterParameterGroupName *string `type:"string"` + + // Provides the name of the DB parameter group family that this DB cluster parameter + // group is compatible with. + DBParameterGroupFamily *string `type:"string"` + + // Provides the customer-specified description for this DB cluster parameter + // group. + Description *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterParameterGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterParameterGroup) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupArn sets the DBClusterParameterGroupArn field's value. +func (s *DBClusterParameterGroup) SetDBClusterParameterGroupArn(v string) *DBClusterParameterGroup { + s.DBClusterParameterGroupArn = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DBClusterParameterGroup) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroup { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DBClusterParameterGroup) SetDBParameterGroupFamily(v string) *DBClusterParameterGroup { + s.DBParameterGroupFamily = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DBClusterParameterGroup) SetDescription(v string) *DBClusterParameterGroup { + s.Description = &v + return s +} + +// Describes an AWS Identity and Access Management (IAM) role that is associated +// with a DB cluster. +type DBClusterRole struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that is associated with the + // DB cluster. + RoleArn *string `type:"string"` + + // Describes the state of association between the IAM role and the DB cluster. + // The Status property returns one of the following values: + // + // * ACTIVE - the IAM role ARN is associated with the DB cluster and can + // be used to access other AWS services on your behalf. + // + // * PENDING - the IAM role ARN is being associated with the DB cluster. + // + // * INVALID - the IAM role ARN is associated with the DB cluster, but the + // DB cluster is unable to assume the IAM role in order to access other AWS + // services on your behalf. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterRole) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterRole) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterRole) SetStatus(v string) *DBClusterRole { + s.Status = &v + return s +} + +// Contains the details for an Amazon Neptune DB cluster snapshot +// +// This data type is used as a response element in the DescribeDBClusterSnapshots +// action. +type DBClusterSnapshot struct { + _ struct{} `type:"structure"` + + // Specifies the allocated storage size in gibibytes (GiB). + AllocatedStorage *int64 `type:"integer"` + + // Provides the list of EC2 Availability Zones that instances in the DB cluster + // snapshot can be restored in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // Specifies the time when the DB cluster was created, in Universal Coordinated + // Time (UTC). + ClusterCreateTime *time.Time `type:"timestamp"` + + // Specifies the DB cluster identifier of the DB cluster that this DB cluster + // snapshot was created from. + DBClusterIdentifier *string `type:"string"` + + // The Amazon Resource Name (ARN) for the DB cluster snapshot. + DBClusterSnapshotArn *string `type:"string"` + + // Specifies the identifier for the DB cluster snapshot. + DBClusterSnapshotIdentifier *string `type:"string"` + + // Specifies the name of the database engine. + Engine *string `type:"string"` + + // Provides the version of the database engine for this DB cluster snapshot. + EngineVersion *string `type:"string"` + + // True if mapping of AWS Identity and Access Management (IAM) accounts to database + // accounts is enabled, and otherwise false. + IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB cluster snapshot. + KmsKeyId *string `type:"string"` + + // Provides the license model information for this DB cluster snapshot. + LicenseModel *string `type:"string"` + + // Provides the master username for the DB cluster snapshot. + MasterUsername *string `type:"string"` + + // Specifies the percentage of the estimated data that has been transferred. + PercentProgress *int64 `type:"integer"` + + // Specifies the port that the DB cluster was listening on at the time of the + // snapshot. + Port *int64 `type:"integer"` + + // Provides the time when the snapshot was taken, in Universal Coordinated Time + // (UTC). + SnapshotCreateTime *time.Time `type:"timestamp"` + + // Provides the type of the DB cluster snapshot. + SnapshotType *string `type:"string"` + + // If the DB cluster snapshot was copied from a source DB cluster snapshot, + // the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, + // a null value. + SourceDBClusterSnapshotArn *string `type:"string"` + + // Specifies the status of this DB cluster snapshot. + Status *string `type:"string"` + + // Specifies whether the DB cluster snapshot is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Provides the VPC ID associated with the DB cluster snapshot. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterSnapshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshot) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *DBClusterSnapshot) SetAllocatedStorage(v int64) *DBClusterSnapshot { + s.AllocatedStorage = &v + return s +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DBClusterSnapshot) SetAvailabilityZones(v []*string) *DBClusterSnapshot { + s.AvailabilityZones = v + return s +} + +// SetClusterCreateTime sets the ClusterCreateTime field's value. +func (s *DBClusterSnapshot) SetClusterCreateTime(v time.Time) *DBClusterSnapshot { + s.ClusterCreateTime = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBClusterSnapshot) SetDBClusterIdentifier(v string) *DBClusterSnapshot { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotArn sets the DBClusterSnapshotArn field's value. +func (s *DBClusterSnapshot) SetDBClusterSnapshotArn(v string) *DBClusterSnapshot { + s.DBClusterSnapshotArn = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DBClusterSnapshot) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshot { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBClusterSnapshot) SetEngine(v string) *DBClusterSnapshot { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBClusterSnapshot) SetEngineVersion(v string) *DBClusterSnapshot { + s.EngineVersion = &v + return s +} + +// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. +func (s *DBClusterSnapshot) SetIAMDatabaseAuthenticationEnabled(v bool) *DBClusterSnapshot { + s.IAMDatabaseAuthenticationEnabled = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBClusterSnapshot) SetKmsKeyId(v string) *DBClusterSnapshot { + s.KmsKeyId = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *DBClusterSnapshot) SetLicenseModel(v string) *DBClusterSnapshot { + s.LicenseModel = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBClusterSnapshot) SetMasterUsername(v string) *DBClusterSnapshot { + s.MasterUsername = &v + return s +} + +// SetPercentProgress sets the PercentProgress field's value. +func (s *DBClusterSnapshot) SetPercentProgress(v int64) *DBClusterSnapshot { + s.PercentProgress = &v + return s +} + +// SetPort sets the Port field's value. +func (s *DBClusterSnapshot) SetPort(v int64) *DBClusterSnapshot { + s.Port = &v + return s +} + +// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. +func (s *DBClusterSnapshot) SetSnapshotCreateTime(v time.Time) *DBClusterSnapshot { + s.SnapshotCreateTime = &v + return s +} + +// SetSnapshotType sets the SnapshotType field's value. +func (s *DBClusterSnapshot) SetSnapshotType(v string) *DBClusterSnapshot { + s.SnapshotType = &v + return s +} + +// SetSourceDBClusterSnapshotArn sets the SourceDBClusterSnapshotArn field's value. +func (s *DBClusterSnapshot) SetSourceDBClusterSnapshotArn(v string) *DBClusterSnapshot { + s.SourceDBClusterSnapshotArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterSnapshot) SetStatus(v string) *DBClusterSnapshot { + s.Status = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBClusterSnapshot) SetStorageEncrypted(v bool) *DBClusterSnapshot { + s.StorageEncrypted = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DBClusterSnapshot) SetVpcId(v string) *DBClusterSnapshot { + s.VpcId = &v + return s +} + +// Contains the name and values of a manual DB cluster snapshot attribute. +// +// Manual DB cluster snapshot attributes are used to authorize other AWS accounts +// to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute +// API action. +type DBClusterSnapshotAttribute struct { + _ struct{} `type:"structure"` + + // The name of the manual DB cluster snapshot attribute. + // + // The attribute named restore refers to the list of AWS accounts that have + // permission to copy or restore the manual DB cluster snapshot. For more information, + // see the ModifyDBClusterSnapshotAttribute API action. + AttributeName *string `type:"string"` + + // The value(s) for the manual DB cluster snapshot attribute. + // + // If the AttributeName field is set to restore, then this element returns a + // list of IDs of the AWS accounts that are authorized to copy or restore the + // manual DB cluster snapshot. If a value of all is in the list, then the manual + // DB cluster snapshot is public and available for any AWS account to copy or + // restore. + AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` +} + +// String returns the string representation +func (s DBClusterSnapshotAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshotAttribute) GoString() string { + return s.String() +} + +// SetAttributeName sets the AttributeName field's value. +func (s *DBClusterSnapshotAttribute) SetAttributeName(v string) *DBClusterSnapshotAttribute { + s.AttributeName = &v + return s +} + +// SetAttributeValues sets the AttributeValues field's value. +func (s *DBClusterSnapshotAttribute) SetAttributeValues(v []*string) *DBClusterSnapshotAttribute { + s.AttributeValues = v + return s +} + +// Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes +// API action. +// +// Manual DB cluster snapshot attributes are used to authorize other AWS accounts +// to copy or restore a manual DB cluster snapshot. For more information, see +// the ModifyDBClusterSnapshotAttribute API action. +type DBClusterSnapshotAttributesResult struct { + _ struct{} `type:"structure"` + + // The list of attributes and values for the manual DB cluster snapshot. + DBClusterSnapshotAttributes []*DBClusterSnapshotAttribute `locationNameList:"DBClusterSnapshotAttribute" type:"list"` + + // The identifier of the manual DB cluster snapshot that the attributes apply + // to. + DBClusterSnapshotIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterSnapshotAttributesResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshotAttributesResult) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributes sets the DBClusterSnapshotAttributes field's value. +func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotAttributes(v []*DBClusterSnapshotAttribute) *DBClusterSnapshotAttributesResult { + s.DBClusterSnapshotAttributes = v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshotAttributesResult { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// This data type is used as a response element in the action DescribeDBEngineVersions. +type DBEngineVersion struct { + _ struct{} `type:"structure"` + + // The description of the database engine. + DBEngineDescription *string `type:"string"` + + // The description of the database engine version. + DBEngineVersionDescription *string `type:"string"` + + // The name of the DB parameter group family for the database engine. + DBParameterGroupFamily *string `type:"string"` + + // The default character set for new instances of this engine version, if the + // CharacterSetName parameter of the CreateDBInstance API is not specified. + DefaultCharacterSet *CharacterSet `type:"structure"` + + // The name of the database engine. + Engine *string `type:"string"` + + // The version number of the database engine. + EngineVersion *string `type:"string"` + + // The types of logs that the database engine has available for export to CloudWatch + // Logs. + ExportableLogTypes []*string `type:"list"` + + // A list of the character sets supported by this engine for the CharacterSetName + // parameter of the CreateDBInstance action. + SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"` + + // A list of the time zones supported by this engine for the Timezone parameter + // of the CreateDBInstance action. + SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"` + + // A value that indicates whether the engine version supports exporting the + // log types specified by ExportableLogTypes to CloudWatch Logs. + SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` + + // Indicates whether the database engine version supports read replicas. + SupportsReadReplica *bool `type:"boolean"` + + // A list of engine versions that this database engine version can be upgraded + // to. + ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"` +} + +// String returns the string representation +func (s DBEngineVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBEngineVersion) GoString() string { + return s.String() +} + +// SetDBEngineDescription sets the DBEngineDescription field's value. +func (s *DBEngineVersion) SetDBEngineDescription(v string) *DBEngineVersion { + s.DBEngineDescription = &v + return s +} + +// SetDBEngineVersionDescription sets the DBEngineVersionDescription field's value. +func (s *DBEngineVersion) SetDBEngineVersionDescription(v string) *DBEngineVersion { + s.DBEngineVersionDescription = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DBEngineVersion) SetDBParameterGroupFamily(v string) *DBEngineVersion { + s.DBParameterGroupFamily = &v + return s +} + +// SetDefaultCharacterSet sets the DefaultCharacterSet field's value. +func (s *DBEngineVersion) SetDefaultCharacterSet(v *CharacterSet) *DBEngineVersion { + s.DefaultCharacterSet = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion { + s.EngineVersion = &v + return s +} + +// SetExportableLogTypes sets the ExportableLogTypes field's value. +func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion { + s.ExportableLogTypes = v + return s +} + +// SetSupportedCharacterSets sets the SupportedCharacterSets field's value. +func (s *DBEngineVersion) SetSupportedCharacterSets(v []*CharacterSet) *DBEngineVersion { + s.SupportedCharacterSets = v + return s +} + +// SetSupportedTimezones sets the SupportedTimezones field's value. +func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion { + s.SupportedTimezones = v + return s +} + +// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value. +func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion { + s.SupportsLogExportsToCloudwatchLogs = &v + return s +} + +// SetSupportsReadReplica sets the SupportsReadReplica field's value. +func (s *DBEngineVersion) SetSupportsReadReplica(v bool) *DBEngineVersion { + s.SupportsReadReplica = &v + return s +} + +// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value. +func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion { + s.ValidUpgradeTarget = v + return s +} + +// Contains the details of an Amazon Neptune DB instance. +// +// This data type is used as a response element in the DescribeDBInstances action. +type DBInstance struct { + _ struct{} `type:"structure"` + + // Specifies the allocated storage size specified in gibibytes. + AllocatedStorage *int64 `type:"integer"` + + // Indicates that minor version patches are applied automatically. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // Specifies the name of the Availability Zone the DB instance is located in. + AvailabilityZone *string `type:"string"` + + // Specifies the number of days for which automatic DB snapshots are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // The identifier of the CA certificate for this DB instance. + CACertificateIdentifier *string `type:"string"` + + // If present, specifies the name of the character set that this instance is + // associated with. + CharacterSetName *string `type:"string"` + + // Specifies whether tags are copied from the DB instance to snapshots of the + // DB instance. + CopyTagsToSnapshot *bool `type:"boolean"` + + // If the DB instance is a member of a DB cluster, contains the name of the + // DB cluster that the DB instance is a member of. + DBClusterIdentifier *string `type:"string"` + + // The Amazon Resource Name (ARN) for the DB instance. + DBInstanceArn *string `type:"string"` + + // Contains the name of the compute and memory capacity class of the DB instance. + DBInstanceClass *string `type:"string"` + + // Contains a user-supplied database identifier. This identifier is the unique + // key that identifies a DB instance. + DBInstanceIdentifier *string `type:"string"` + + // Specifies the current state of this database. + DBInstanceStatus *string `type:"string"` + + // The database name. + DBName *string `type:"string"` + + // Provides the list of DB parameter groups applied to this DB instance. + DBParameterGroups []*DBParameterGroupStatus `locationNameList:"DBParameterGroup" type:"list"` + + // Provides List of DB security group elements containing only DBSecurityGroup.Name + // and DBSecurityGroup.Status subelements. + DBSecurityGroups []*DBSecurityGroupMembership `locationNameList:"DBSecurityGroup" type:"list"` + + // Specifies information on the subnet group associated with the DB instance, + // including the name, description, and subnets in the subnet group. + DBSubnetGroup *DBSubnetGroup `type:"structure"` + + // Specifies the port that the DB instance listens on. If the DB instance is + // part of a DB cluster, this can be a different port than the DB cluster port. + DbInstancePort *int64 `type:"integer"` + + // The AWS Region-unique, immutable identifier for the DB instance. This identifier + // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB + // instance is accessed. + DbiResourceId *string `type:"string"` + + // Not supported + DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"` + + // A list of log types that this DB instance is configured to export to CloudWatch + // Logs. + EnabledCloudwatchLogsExports []*string `type:"list"` + + // Specifies the connection endpoint. + Endpoint *Endpoint `type:"structure"` + + // Provides the name of the database engine to be used for this DB instance. + Engine *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that + // receives the Enhanced Monitoring metrics data for the DB instance. + EnhancedMonitoringResourceArn *string `type:"string"` + + // True if AWS Identity and Access Management (IAM) authentication is enabled, + // and otherwise false. + IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` + + // Provides the date and time the DB instance was created. + InstanceCreateTime *time.Time `type:"timestamp"` + + // Specifies the Provisioned IOPS (I/O operations per second) value. + Iops *int64 `type:"integer"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB instance. + KmsKeyId *string `type:"string"` + + // Specifies the latest time to which a database can be restored with point-in-time + // restore. + LatestRestorableTime *time.Time `type:"timestamp"` + + // License model information for this DB instance. + LicenseModel *string `type:"string"` + + // Contains the master username for the DB instance. + MasterUsername *string `type:"string"` + + // The interval, in seconds, between points when Enhanced Monitoring metrics + // are collected for the DB instance. + MonitoringInterval *int64 `type:"integer"` + + // The ARN for the IAM role that permits Neptune to send Enhanced Monitoring + // metrics to Amazon CloudWatch Logs. + MonitoringRoleArn *string `type:"string"` + + // Specifies if the DB instance is a Multi-AZ deployment. + MultiAZ *bool `type:"boolean"` + + // Provides the list of option group memberships for this DB instance. + OptionGroupMemberships []*OptionGroupMembership `locationNameList:"OptionGroupMembership" type:"list"` + + // Specifies that changes to the DB instance are pending. This element is only + // included when changes are pending. Specific changes are identified by subelements. + PendingModifiedValues *PendingModifiedValues `type:"structure"` + + // True if Performance Insights is enabled for the DB instance, and otherwise + // false. + PerformanceInsightsEnabled *bool `type:"boolean"` + + // The AWS KMS key identifier for encryption of Performance Insights data. The + // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the + // KMS key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + + // Specifies the daily time range during which automated backups are created + // if automated backups are enabled, as determined by the BackupRetentionPeriod. + PreferredBackupWindow *string `type:"string"` + + // Specifies the weekly time range during which system maintenance can occur, + // in Universal Coordinated Time (UTC). + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which a Read Replica is promoted to the + // primary instance after a failure of the existing primary instance. + PromotionTier *int64 `type:"integer"` + + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` + + // Contains one or more identifiers of DB clusters that are Read Replicas of + // this DB instance. + ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` + + // Contains one or more identifiers of the Read Replicas associated with this + // DB instance. + ReadReplicaDBInstanceIdentifiers []*string `locationNameList:"ReadReplicaDBInstanceIdentifier" type:"list"` + + // Contains the identifier of the source DB instance if this DB instance is + // a Read Replica. + ReadReplicaSourceDBInstanceIdentifier *string `type:"string"` + + // If present, specifies the name of the secondary Availability Zone for a DB + // instance with multi-AZ support. + SecondaryAvailabilityZone *string `type:"string"` + + // The status of a Read Replica. If the instance is not a Read Replica, this + // is blank. + StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` + + // Specifies whether the DB instance is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Specifies the storage type associated with DB instance. + StorageType *string `type:"string"` + + // The ARN from the key store with which the instance is associated for TDE + // encryption. + TdeCredentialArn *string `type:"string"` + + // Not supported. + Timezone *string `type:"string"` + + // Provides a list of VPC security group elements that the DB instance belongs + // to. + VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` +} + +// String returns the string representation +func (s DBInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstance) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *DBInstance) SetAllocatedStorage(v int64) *DBInstance { + s.AllocatedStorage = &v + return s +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance { + s.AvailabilityZone = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *DBInstance) SetBackupRetentionPeriod(v int64) *DBInstance { + s.BackupRetentionPeriod = &v + return s +} + +// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. +func (s *DBInstance) SetCACertificateIdentifier(v string) *DBInstance { + s.CACertificateIdentifier = &v + return s +} + +// SetCharacterSetName sets the CharacterSetName field's value. +func (s *DBInstance) SetCharacterSetName(v string) *DBInstance { + s.CharacterSetName = &v + return s +} + +// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. +func (s *DBInstance) SetCopyTagsToSnapshot(v bool) *DBInstance { + s.CopyTagsToSnapshot = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBInstance) SetDBClusterIdentifier(v string) *DBInstance { + s.DBClusterIdentifier = &v + return s +} + +// SetDBInstanceArn sets the DBInstanceArn field's value. +func (s *DBInstance) SetDBInstanceArn(v string) *DBInstance { + s.DBInstanceArn = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *DBInstance) SetDBInstanceClass(v string) *DBInstance { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DBInstance) SetDBInstanceIdentifier(v string) *DBInstance { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBInstanceStatus sets the DBInstanceStatus field's value. +func (s *DBInstance) SetDBInstanceStatus(v string) *DBInstance { + s.DBInstanceStatus = &v + return s +} + +// SetDBName sets the DBName field's value. +func (s *DBInstance) SetDBName(v string) *DBInstance { + s.DBName = &v + return s +} + +// SetDBParameterGroups sets the DBParameterGroups field's value. +func (s *DBInstance) SetDBParameterGroups(v []*DBParameterGroupStatus) *DBInstance { + s.DBParameterGroups = v + return s +} + +// SetDBSecurityGroups sets the DBSecurityGroups field's value. +func (s *DBInstance) SetDBSecurityGroups(v []*DBSecurityGroupMembership) *DBInstance { + s.DBSecurityGroups = v + return s +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *DBInstance) SetDBSubnetGroup(v *DBSubnetGroup) *DBInstance { + s.DBSubnetGroup = v + return s +} + +// SetDbInstancePort sets the DbInstancePort field's value. +func (s *DBInstance) SetDbInstancePort(v int64) *DBInstance { + s.DbInstancePort = &v + return s +} + +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { + s.DbiResourceId = &v + return s +} + +// SetDomainMemberships sets the DomainMemberships field's value. +func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance { + s.DomainMemberships = v + return s +} + +// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. +func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance { + s.EnabledCloudwatchLogsExports = v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance { + s.Endpoint = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBInstance) SetEngine(v string) *DBInstance { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBInstance) SetEngineVersion(v string) *DBInstance { + s.EngineVersion = &v + return s +} + +// SetEnhancedMonitoringResourceArn sets the EnhancedMonitoringResourceArn field's value. +func (s *DBInstance) SetEnhancedMonitoringResourceArn(v string) *DBInstance { + s.EnhancedMonitoringResourceArn = &v + return s +} + +// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. +func (s *DBInstance) SetIAMDatabaseAuthenticationEnabled(v bool) *DBInstance { + s.IAMDatabaseAuthenticationEnabled = &v + return s +} + +// SetInstanceCreateTime sets the InstanceCreateTime field's value. +func (s *DBInstance) SetInstanceCreateTime(v time.Time) *DBInstance { + s.InstanceCreateTime = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *DBInstance) SetIops(v int64) *DBInstance { + s.Iops = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBInstance) SetKmsKeyId(v string) *DBInstance { + s.KmsKeyId = &v + return s +} + +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *DBInstance) SetLatestRestorableTime(v time.Time) *DBInstance { + s.LatestRestorableTime = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *DBInstance) SetLicenseModel(v string) *DBInstance { + s.LicenseModel = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBInstance) SetMasterUsername(v string) *DBInstance { + s.MasterUsername = &v + return s +} + +// SetMonitoringInterval sets the MonitoringInterval field's value. +func (s *DBInstance) SetMonitoringInterval(v int64) *DBInstance { + s.MonitoringInterval = &v + return s +} + +// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. +func (s *DBInstance) SetMonitoringRoleArn(v string) *DBInstance { + s.MonitoringRoleArn = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *DBInstance) SetMultiAZ(v bool) *DBInstance { + s.MultiAZ = &v + return s +} + +// SetOptionGroupMemberships sets the OptionGroupMemberships field's value. +func (s *DBInstance) SetOptionGroupMemberships(v []*OptionGroupMembership) *DBInstance { + s.OptionGroupMemberships = v + return s +} + +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInstance { + s.PendingModifiedValues = v + return s +} + +// SetPerformanceInsightsEnabled sets the PerformanceInsightsEnabled field's value. +func (s *DBInstance) SetPerformanceInsightsEnabled(v bool) *DBInstance { + s.PerformanceInsightsEnabled = &v + return s +} + +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { + s.PerformanceInsightsKMSKeyId = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { + s.PromotionTier = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *DBInstance) SetPubliclyAccessible(v bool) *DBInstance { + s.PubliclyAccessible = &v + return s +} + +// SetReadReplicaDBClusterIdentifiers sets the ReadReplicaDBClusterIdentifiers field's value. +func (s *DBInstance) SetReadReplicaDBClusterIdentifiers(v []*string) *DBInstance { + s.ReadReplicaDBClusterIdentifiers = v + return s +} + +// SetReadReplicaDBInstanceIdentifiers sets the ReadReplicaDBInstanceIdentifiers field's value. +func (s *DBInstance) SetReadReplicaDBInstanceIdentifiers(v []*string) *DBInstance { + s.ReadReplicaDBInstanceIdentifiers = v + return s +} + +// SetReadReplicaSourceDBInstanceIdentifier sets the ReadReplicaSourceDBInstanceIdentifier field's value. +func (s *DBInstance) SetReadReplicaSourceDBInstanceIdentifier(v string) *DBInstance { + s.ReadReplicaSourceDBInstanceIdentifier = &v + return s +} + +// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. +func (s *DBInstance) SetSecondaryAvailabilityZone(v string) *DBInstance { + s.SecondaryAvailabilityZone = &v + return s +} + +// SetStatusInfos sets the StatusInfos field's value. +func (s *DBInstance) SetStatusInfos(v []*DBInstanceStatusInfo) *DBInstance { + s.StatusInfos = v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBInstance) SetStorageEncrypted(v bool) *DBInstance { + s.StorageEncrypted = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *DBInstance) SetStorageType(v string) *DBInstance { + s.StorageType = &v + return s +} + +// SetTdeCredentialArn sets the TdeCredentialArn field's value. +func (s *DBInstance) SetTdeCredentialArn(v string) *DBInstance { + s.TdeCredentialArn = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DBInstance) SetTimezone(v string) *DBInstance { + s.Timezone = &v + return s +} + +// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. +func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBInstance { + s.VpcSecurityGroups = v + return s +} + +// Provides a list of status information for a DB instance. +type DBInstanceStatusInfo struct { + _ struct{} `type:"structure"` + + // Details of the error if there is an error for the instance. If the instance + // is not in an error state, this value is blank. + Message *string `type:"string"` + + // Boolean value that is true if the instance is operating normally, or false + // if the instance is in an error state. + Normal *bool `type:"boolean"` + + // Status of the DB instance. For a StatusType of read replica, the values can + // be replicating, error, stopped, or terminated. + Status *string `type:"string"` + + // This value is currently "read replication." + StatusType *string `type:"string"` +} + +// String returns the string representation +func (s DBInstanceStatusInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstanceStatusInfo) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { + s.Message = &v + return s +} + +// SetNormal sets the Normal field's value. +func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { + s.Normal = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { + s.Status = &v + return s +} + +// SetStatusType sets the StatusType field's value. +func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { + s.StatusType = &v + return s +} + +// Contains the details of an Amazon Neptune DB parameter group. +// +// This data type is used as a response element in the DescribeDBParameterGroups +// action. +type DBParameterGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the DB parameter group. + DBParameterGroupArn *string `type:"string"` + + // Provides the name of the DB parameter group family that this DB parameter + // group is compatible with. + DBParameterGroupFamily *string `type:"string"` + + // Provides the name of the DB parameter group. + DBParameterGroupName *string `type:"string"` + + // Provides the customer-specified description for this DB parameter group. + Description *string `type:"string"` +} + +// String returns the string representation +func (s DBParameterGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBParameterGroup) GoString() string { + return s.String() +} + +// SetDBParameterGroupArn sets the DBParameterGroupArn field's value. +func (s *DBParameterGroup) SetDBParameterGroupArn(v string) *DBParameterGroup { + s.DBParameterGroupArn = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DBParameterGroup) SetDBParameterGroupFamily(v string) *DBParameterGroup { + s.DBParameterGroupFamily = &v + return s +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *DBParameterGroup) SetDBParameterGroupName(v string) *DBParameterGroup { + s.DBParameterGroupName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DBParameterGroup) SetDescription(v string) *DBParameterGroup { + s.Description = &v + return s +} + +// The status of the DB parameter group. +// +// This data type is used as a response element in the following actions: +// +// * CreateDBInstance +// +// * DeleteDBInstance +// +// * ModifyDBInstance +// +// * RebootDBInstance +type DBParameterGroupStatus struct { + _ struct{} `type:"structure"` + + // The name of the DP parameter group. + DBParameterGroupName *string `type:"string"` + + // The status of parameter updates. + ParameterApplyStatus *string `type:"string"` +} + +// String returns the string representation +func (s DBParameterGroupStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBParameterGroupStatus) GoString() string { + return s.String() +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *DBParameterGroupStatus) SetDBParameterGroupName(v string) *DBParameterGroupStatus { + s.DBParameterGroupName = &v + return s +} + +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *DBParameterGroupStatus) SetParameterApplyStatus(v string) *DBParameterGroupStatus { + s.ParameterApplyStatus = &v + return s +} + +// This data type is used as a response element in the following actions: +// +// * ModifyDBInstance +// +// * RebootDBInstance +type DBSecurityGroupMembership struct { + _ struct{} `type:"structure"` + + // The name of the DB security group. + DBSecurityGroupName *string `type:"string"` + + // The status of the DB security group. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBSecurityGroupMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBSecurityGroupMembership) GoString() string { + return s.String() +} + +// SetDBSecurityGroupName sets the DBSecurityGroupName field's value. +func (s *DBSecurityGroupMembership) SetDBSecurityGroupName(v string) *DBSecurityGroupMembership { + s.DBSecurityGroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBSecurityGroupMembership) SetStatus(v string) *DBSecurityGroupMembership { + s.Status = &v + return s +} + +// Contains the details of an Amazon Neptune DB subnet group. +// +// This data type is used as a response element in the DescribeDBSubnetGroups +// action. +type DBSubnetGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the DB subnet group. + DBSubnetGroupArn *string `type:"string"` + + // Provides the description of the DB subnet group. + DBSubnetGroupDescription *string `type:"string"` + + // The name of the DB subnet group. + DBSubnetGroupName *string `type:"string"` + + // Provides the status of the DB subnet group. + SubnetGroupStatus *string `type:"string"` + + // Contains a list of Subnet elements. + Subnets []*Subnet `locationNameList:"Subnet" type:"list"` + + // Provides the VpcId of the DB subnet group. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DBSubnetGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBSubnetGroup) GoString() string { + return s.String() +} + +// SetDBSubnetGroupArn sets the DBSubnetGroupArn field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupArn(v string) *DBSubnetGroup { + s.DBSubnetGroupArn = &v + return s +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupDescription(v string) *DBSubnetGroup { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupName(v string) *DBSubnetGroup { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. +func (s *DBSubnetGroup) SetSubnetGroupStatus(v string) *DBSubnetGroup { + s.SubnetGroupStatus = &v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *DBSubnetGroup) SetSubnets(v []*Subnet) *DBSubnetGroup { + s.Subnets = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { + s.VpcId = &v + return s +} + +type DeleteDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier for the DB cluster to be deleted. This parameter + // isn't case-sensitive. + // + // Constraints: + // + // * Must match an existing DBClusterIdentifier. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The DB cluster snapshot identifier of the new DB cluster snapshot created + // when SkipFinalSnapshot is set to false. + // + // Specifying this parameter and also setting the SkipFinalShapshot parameter + // to true results in an error. + // + // Constraints: + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + FinalDBSnapshotIdentifier *string `type:"string"` + + // Determines whether a final DB cluster snapshot is created before the DB cluster + // is deleted. If true is specified, no DB cluster snapshot is created. If false + // is specified, a DB cluster snapshot is created before the DB cluster is deleted. + // + // You must specify a FinalDBSnapshotIdentifier parameter if SkipFinalSnapshot + // is false. + // + // Default: false + SkipFinalSnapshot *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DeleteDBClusterInput) SetDBClusterIdentifier(v string) *DeleteDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. +func (s *DeleteDBClusterInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBClusterInput { + s.FinalDBSnapshotIdentifier = &v + return s +} + +// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. +func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInput { + s.SkipFinalSnapshot = &v + return s +} + +type DeleteDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *DeleteDBClusterOutput) SetDBCluster(v *DBCluster) *DeleteDBClusterOutput { + s.DBCluster = v + return s +} + +type DeleteDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group. + // + // Constraints: + // + // * Must be the name of an existing DB cluster parameter group. + // + // * You can't delete a default DB cluster parameter group. + // + // * Cannot be associated with any DB clusters. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DeleteDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *DeleteDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +type DeleteDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +type DeleteDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // The identifier of the DB cluster snapshot to delete. + // + // Constraints: Must be the name of an existing DB cluster snapshot in the available + // state. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DeleteDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *DeleteDBClusterSnapshotInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +type DeleteDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Contains the details for an Amazon Neptune DB cluster snapshot + // + // This data type is used as a response element in the DescribeDBClusterSnapshots + // action. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *DeleteDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +type DeleteDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The DB instance identifier for the DB instance to be deleted. This parameter + // isn't case-sensitive. + // + // Constraints: + // + // * Must match the name of an existing DB instance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot + // is set to false. + // + // Specifying this parameter and also setting the SkipFinalShapshot parameter + // to true results in an error. + // + // Constraints: + // + // * Must be 1 to 255 letters or numbers. + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // * Cannot be specified when deleting a Read Replica. + FinalDBSnapshotIdentifier *string `type:"string"` + + // Determines whether a final DB snapshot is created before the DB instance + // is deleted. If true is specified, no DBSnapshot is created. If false is specified, + // a DB snapshot is created before the DB instance is deleted. + // + // Note that when a DB instance is in a failure state and has a status of 'failed', + // 'incompatible-restore', or 'incompatible-network', it can only be deleted + // when the SkipFinalSnapshot parameter is set to "true". + // + // Specify true when deleting a Read Replica. + // + // The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot + // is false. + // + // Default: false + SkipFinalSnapshot *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. +func (s *DeleteDBInstanceInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBInstanceInput { + s.FinalDBSnapshotIdentifier = &v + return s +} + +// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. +func (s *DeleteDBInstanceInput) SetSkipFinalSnapshot(v bool) *DeleteDBInstanceInput { + s.SkipFinalSnapshot = &v + return s +} + +type DeleteDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB instance. + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *DeleteDBInstanceOutput) SetDBInstance(v *DBInstance) *DeleteDBInstanceOutput { + s.DBInstance = v + return s +} + +type DeleteDBParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB parameter group. + // + // Constraints: + // + // * Must be the name of an existing DB parameter group + // + // * You can't delete a default DB parameter group + // + // * Cannot be associated with any DB instances + // + // DBParameterGroupName is a required field + DBParameterGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *DeleteDBParameterGroupInput) SetDBParameterGroupName(v string) *DeleteDBParameterGroupInput { + s.DBParameterGroupName = &v + return s +} + +type DeleteDBParameterGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBParameterGroupOutput) GoString() string { + return s.String() +} + +type DeleteDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the database subnet group to delete. + // + // You can't delete the default subnet group. + // + // Constraints: + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DeleteDBSubnetGroupInput) SetDBSubnetGroupName(v string) *DeleteDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +type DeleteDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBSubnetGroupOutput) GoString() string { + return s.String() +} + +type DeleteEventSubscriptionInput struct { + _ struct{} `type:"structure"` + + // The name of the event notification subscription you want to delete. + // + // SubscriptionName is a required field + SubscriptionName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEventSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *DeleteEventSubscriptionInput) SetSubscriptionName(v string) *DeleteEventSubscriptionInput { + s.SubscriptionName = &v + return s +} + +type DeleteEventSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful invocation of the DescribeEventSubscriptions + // action. + EventSubscription *EventSubscription `type:"structure"` +} + +// String returns the string representation +func (s DeleteEventSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventSubscriptionOutput) GoString() string { + return s.String() +} + +// SetEventSubscription sets the EventSubscription field's value. +func (s *DeleteEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *DeleteEventSubscriptionOutput { + s.EventSubscription = v + return s +} + +type DescribeDBClusterParameterGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB cluster parameter group to return details for. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBClusterParameterGroup. + DBClusterParameterGroupName *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterParameterGroups + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClusterParameterGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParameterGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParameterGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParameterGroupsInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBClusterParameterGroupsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetMarker(v string) *DescribeDBClusterParameterGroupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBClusterParameterGroupsInput { + s.MaxRecords = &v + return s +} + +type DescribeDBClusterParameterGroupsOutput struct { + _ struct{} `type:"structure"` + + // A list of DB cluster parameter groups. + DBClusterParameterGroups []*DBClusterParameterGroup `locationNameList:"DBClusterParameterGroup" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterParameterGroups + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterParameterGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParameterGroupsOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroups sets the DBClusterParameterGroups field's value. +func (s *DescribeDBClusterParameterGroupsOutput) SetDBClusterParameterGroups(v []*DBClusterParameterGroup) *DescribeDBClusterParameterGroupsOutput { + s.DBClusterParameterGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParameterGroupsOutput) SetMarker(v string) *DescribeDBClusterParameterGroupsOutput { + s.Marker = &v + return s +} + +type DescribeDBClusterParametersInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB cluster parameter group to return parameter details + // for. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBClusterParameterGroup. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterParameters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // A value that indicates to return only parameters for a specific source. Parameter + // sources can be engine, service, or customer. + Source *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DescribeDBClusterParametersInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParametersInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterParametersInput) SetFilters(v []*Filter) *DescribeDBClusterParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParametersInput) SetMarker(v string) *DescribeDBClusterParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterParametersInput) SetMaxRecords(v int64) *DescribeDBClusterParametersInput { + s.MaxRecords = &v + return s +} + +// SetSource sets the Source field's value. +func (s *DescribeDBClusterParametersInput) SetSource(v string) *DescribeDBClusterParametersInput { + s.Source = &v + return s +} + +// Provides details about a DB cluster parameter group including the parameters +// in the DB cluster parameter group. +type DescribeDBClusterParametersOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous DescribeDBClusterParameters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords . + Marker *string `type:"string"` + + // Provides a list of parameters for the DB cluster parameter group. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` +} + +// String returns the string representation +func (s DescribeDBClusterParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParametersOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParametersOutput) SetMarker(v string) *DescribeDBClusterParametersOutput { + s.Marker = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *DescribeDBClusterParametersOutput) SetParameters(v []*Parameter) *DescribeDBClusterParametersOutput { + s.Parameters = v + return s +} + +type DescribeDBClusterSnapshotAttributesInput struct { + _ struct{} `type:"structure"` + + // The identifier for the DB cluster snapshot to describe the attributes for. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterSnapshotAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotAttributesInput"} + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DescribeDBClusterSnapshotAttributesInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotAttributesInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +type DescribeDBClusterSnapshotAttributesOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes + // API action. + // + // Manual DB cluster snapshot attributes are used to authorize other AWS accounts + // to copy or restore a manual DB cluster snapshot. For more information, see + // the ModifyDBClusterSnapshotAttribute API action. + DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotAttributesOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. +func (s *DescribeDBClusterSnapshotAttributesOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *DescribeDBClusterSnapshotAttributesOutput { + s.DBClusterSnapshotAttributesResult = v + return s +} + +type DescribeDBClusterSnapshotsInput struct { + _ struct{} `type:"structure"` + + // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. + // This parameter can't be used in conjunction with the DBClusterSnapshotIdentifier + // parameter. This parameter is not case-sensitive. + // + // Constraints: + // + // * If supplied, must match the identifier of an existing DBCluster. + DBClusterIdentifier *string `type:"string"` + + // A specific DB cluster snapshot identifier to describe. This parameter can't + // be used in conjunction with the DBClusterIdentifier parameter. This value + // is stored as a lowercase string. + // + // Constraints: + // + // * If supplied, must match the identifier of an existing DBClusterSnapshot. + // + // * If this identifier is for an automated snapshot, the SnapshotType parameter + // must also be specified. + DBClusterSnapshotIdentifier *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // True to include manual DB cluster snapshots that are public and can be copied + // or restored by any AWS account, and otherwise false. The default is false. + // The default is false. + // + // You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute + // API action. + IncludePublic *bool `type:"boolean"` + + // True to include shared manual DB cluster snapshots from other AWS accounts + // that this AWS account has been given permission to copy or restore, and otherwise + // false. The default is false. + // + // You can give an AWS account permission to restore a manual DB cluster snapshot + // from another AWS account by the ModifyDBClusterSnapshotAttribute API action. + IncludeShared *bool `type:"boolean"` + + // An optional pagination token provided by a previous DescribeDBClusterSnapshots + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The type of DB cluster snapshots to be returned. You can specify one of the + // following values: + // + // * automated - Return all DB cluster snapshots that have been automatically + // taken by Amazon Neptune for my AWS account. + // + // * manual - Return all DB cluster snapshots that have been taken by my + // AWS account. + // + // * shared - Return all manual DB cluster snapshots that have been shared + // to my AWS account. + // + // * public - Return all DB cluster snapshots that have been marked as public. + // + // If you don't specify a SnapshotType value, then both automated and manual + // DB cluster snapshots are returned. You can include shared DB cluster snapshots + // with these results by setting the IncludeShared parameter to true. You can + // include public DB cluster snapshots with these results by setting the IncludePublic + // parameter to true. + // + // The IncludeShared and IncludePublic parameters don't apply for SnapshotType + // values of manual or automated. The IncludePublic parameter doesn't apply + // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply + // when SnapshotType is set to public. + SnapshotType *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClusterSnapshotsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterSnapshotsInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DescribeDBClusterSnapshotsInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotsInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterSnapshotsInput) SetFilters(v []*Filter) *DescribeDBClusterSnapshotsInput { + s.Filters = v + return s +} + +// SetIncludePublic sets the IncludePublic field's value. +func (s *DescribeDBClusterSnapshotsInput) SetIncludePublic(v bool) *DescribeDBClusterSnapshotsInput { + s.IncludePublic = &v + return s +} + +// SetIncludeShared sets the IncludeShared field's value. +func (s *DescribeDBClusterSnapshotsInput) SetIncludeShared(v bool) *DescribeDBClusterSnapshotsInput { + s.IncludeShared = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterSnapshotsInput) SetMarker(v string) *DescribeDBClusterSnapshotsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeDBClusterSnapshotsInput { + s.MaxRecords = &v + return s +} + +// SetSnapshotType sets the SnapshotType field's value. +func (s *DescribeDBClusterSnapshotsInput) SetSnapshotType(v string) *DescribeDBClusterSnapshotsInput { + s.SnapshotType = &v + return s +} + +// Provides a list of DB cluster snapshots for the user as the result of a call +// to the DescribeDBClusterSnapshots action. +type DescribeDBClusterSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // Provides a list of DB cluster snapshots for the user. + DBClusterSnapshots []*DBClusterSnapshot `locationNameList:"DBClusterSnapshot" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterSnapshots + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotsOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshots sets the DBClusterSnapshots field's value. +func (s *DescribeDBClusterSnapshotsOutput) SetDBClusterSnapshots(v []*DBClusterSnapshot) *DescribeDBClusterSnapshotsOutput { + s.DBClusterSnapshots = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterSnapshotsOutput) SetMarker(v string) *DescribeDBClusterSnapshotsOutput { + s.Marker = &v + return s +} + +type DescribeDBClustersInput struct { + _ struct{} `type:"structure"` + + // The user-supplied DB cluster identifier. If this parameter is specified, + // information from only the specific DB cluster is returned. This parameter + // isn't case-sensitive. + // + // Constraints: + // + // * If supplied, must match an existing DBClusterIdentifier. + DBClusterIdentifier *string `type:"string"` + + // A filter that specifies one or more DB clusters to describe. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list will only include information + // about the DB clusters identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusters request. + // If this parameter is specified, the response includes only records beyond + // the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClustersInput) SetDBClusterIdentifier(v string) *DescribeDBClustersInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClustersInput) SetFilters(v []*Filter) *DescribeDBClustersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClustersInput) SetMarker(v string) *DescribeDBClustersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClustersInput) SetMaxRecords(v int64) *DescribeDBClustersInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBClusters +// action. +type DescribeDBClustersOutput struct { + _ struct{} `type:"structure"` + + // Contains a list of DB clusters for the user. + DBClusters []*DBCluster `locationNameList:"DBCluster" type:"list"` + + // A pagination token that can be used in a subsequent DescribeDBClusters request. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClustersOutput) GoString() string { + return s.String() +} + +// SetDBClusters sets the DBClusters field's value. +func (s *DescribeDBClustersOutput) SetDBClusters(v []*DBCluster) *DescribeDBClustersOutput { + s.DBClusters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClustersOutput) SetMarker(v string) *DescribeDBClustersOutput { + s.Marker = &v + return s +} + +type DescribeDBEngineVersionsInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB parameter group family to return details for. + // + // Constraints: + // + // * If supplied, must match an existing DBParameterGroupFamily. + DBParameterGroupFamily *string `type:"string"` + + // Indicates that only the default version of the specified engine or engine + // and major version combination is returned. + DefaultOnly *bool `type:"boolean"` + + // The database engine to return. + Engine *string `type:"string"` + + // The database engine version to return. + // + // Example: 5.1.49 + EngineVersion *string `type:"string"` + + // Not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // If this parameter is specified and the requested engine supports the CharacterSetName + // parameter for CreateDBInstance, the response includes a list of supported + // character sets for each engine version. + ListSupportedCharacterSets *bool `type:"boolean"` + + // If this parameter is specified and the requested engine supports the TimeZone + // parameter for CreateDBInstance, the response includes a list of supported + // time zones for each engine version. + ListSupportedTimezones *bool `type:"boolean"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more than the + // MaxRecords value is available, a pagination token called a marker is included + // in the response so that the following results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBEngineVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBEngineVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBEngineVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DescribeDBEngineVersionsInput) SetDBParameterGroupFamily(v string) *DescribeDBEngineVersionsInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetDefaultOnly sets the DefaultOnly field's value. +func (s *DescribeDBEngineVersionsInput) SetDefaultOnly(v bool) *DescribeDBEngineVersionsInput { + s.DefaultOnly = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DescribeDBEngineVersionsInput) SetEngineVersion(v string) *DescribeDBEngineVersionsInput { + s.EngineVersion = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBEngineVersionsInput) SetFilters(v []*Filter) *DescribeDBEngineVersionsInput { + s.Filters = v + return s +} + +// SetListSupportedCharacterSets sets the ListSupportedCharacterSets field's value. +func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *DescribeDBEngineVersionsInput { + s.ListSupportedCharacterSets = &v + return s +} + +// SetListSupportedTimezones sets the ListSupportedTimezones field's value. +func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { + s.ListSupportedTimezones = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBEngineVersions +// action. +type DescribeDBEngineVersionsOutput struct { + _ struct{} `type:"structure"` + + // A list of DBEngineVersion elements. + DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBEngineVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBEngineVersionsOutput) GoString() string { + return s.String() +} + +// SetDBEngineVersions sets the DBEngineVersions field's value. +func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { + s.DBEngineVersions = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { + s.Marker = &v + return s +} + +type DescribeDBInstancesInput struct { + _ struct{} `type:"structure"` + + // The user-supplied instance identifier. If this parameter is specified, information + // from only the specific DB instance is returned. This parameter isn't case-sensitive. + // + // Constraints: + // + // * If supplied, must match the identifier of an existing DBInstance. + DBInstanceIdentifier *string `type:"string"` + + // A filter that specifies one or more DB instances to describe. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list will only include information + // about the DB instances associated with the DB clusters identified by these + // ARNs. + // + // * db-instance-id - Accepts DB instance identifiers and DB instance Amazon + // Resource Names (ARNs). The results list will only include information + // about the DB instances identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBInstances request. + // If this parameter is specified, the response includes only records beyond + // the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DescribeDBInstancesInput) SetDBInstanceIdentifier(v string) *DescribeDBInstancesInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBInstancesInput) SetFilters(v []*Filter) *DescribeDBInstancesInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBInstancesInput) SetMarker(v string) *DescribeDBInstancesInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBInstancesInput) SetMaxRecords(v int64) *DescribeDBInstancesInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBInstances +// action. +type DescribeDBInstancesOutput struct { + _ struct{} `type:"structure"` + + // A list of DBInstance instances. + DBInstances []*DBInstance `locationNameList:"DBInstance" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords . + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstancesOutput) GoString() string { + return s.String() +} + +// SetDBInstances sets the DBInstances field's value. +func (s *DescribeDBInstancesOutput) SetDBInstances(v []*DBInstance) *DescribeDBInstancesOutput { + s.DBInstances = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBInstancesOutput) SetMarker(v string) *DescribeDBInstancesOutput { + s.Marker = &v + return s +} + +type DescribeDBParameterGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB parameter group to return details for. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBClusterParameterGroup. + DBParameterGroupName *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBParameterGroups + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBParameterGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBParameterGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBParameterGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBParameterGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *DescribeDBParameterGroupsInput) SetDBParameterGroupName(v string) *DescribeDBParameterGroupsInput { + s.DBParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBParameterGroupsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBParameterGroupsInput) SetMarker(v string) *DescribeDBParameterGroupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBParameterGroupsInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBParameterGroups +// action. +type DescribeDBParameterGroupsOutput struct { + _ struct{} `type:"structure"` + + // A list of DBParameterGroup instances. + DBParameterGroups []*DBParameterGroup `locationNameList:"DBParameterGroup" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBParameterGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBParameterGroupsOutput) GoString() string { + return s.String() +} + +// SetDBParameterGroups sets the DBParameterGroups field's value. +func (s *DescribeDBParameterGroupsOutput) SetDBParameterGroups(v []*DBParameterGroup) *DescribeDBParameterGroupsOutput { + s.DBParameterGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBParameterGroupsOutput) SetMarker(v string) *DescribeDBParameterGroupsOutput { + s.Marker = &v + return s +} + +type DescribeDBParametersInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB parameter group to return details for. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // DBParameterGroupName is a required field + DBParameterGroupName *string `type:"string" required:"true"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBParameters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The parameter types to return. + // + // Default: All parameter types returned + // + // Valid Values: user | system | engine-default + Source *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBParametersInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *DescribeDBParametersInput) SetDBParameterGroupName(v string) *DescribeDBParametersInput { + s.DBParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBParametersInput) SetFilters(v []*Filter) *DescribeDBParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBParametersInput) SetMarker(v string) *DescribeDBParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBParametersInput) SetMaxRecords(v int64) *DescribeDBParametersInput { + s.MaxRecords = &v + return s +} + +// SetSource sets the Source field's value. +func (s *DescribeDBParametersInput) SetSource(v string) *DescribeDBParametersInput { + s.Source = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBParameters +// action. +type DescribeDBParametersOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // A list of Parameter values. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` +} + +// String returns the string representation +func (s DescribeDBParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBParametersOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBParametersOutput) SetMarker(v string) *DescribeDBParametersOutput { + s.Marker = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *DescribeDBParametersOutput) SetParameters(v []*Parameter) *DescribeDBParametersOutput { + s.Parameters = v + return s +} + +type DescribeDBSubnetGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of the DB subnet group to return details for. + DBSubnetGroupName *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBSubnetGroups + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBSubnetGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBSubnetGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBSubnetGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DescribeDBSubnetGroupsInput) SetDBSubnetGroupName(v string) *DescribeDBSubnetGroupsInput { + s.DBSubnetGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBSubnetGroupsInput) SetFilters(v []*Filter) *DescribeDBSubnetGroupsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBSubnetGroupsInput) SetMarker(v string) *DescribeDBSubnetGroupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBSubnetGroupsInput) SetMaxRecords(v int64) *DescribeDBSubnetGroupsInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBSubnetGroups +// action. +type DescribeDBSubnetGroupsOutput struct { + _ struct{} `type:"structure"` + + // A list of DBSubnetGroup instances. + DBSubnetGroups []*DBSubnetGroup `locationNameList:"DBSubnetGroup" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBSubnetGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBSubnetGroupsOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroups sets the DBSubnetGroups field's value. +func (s *DescribeDBSubnetGroupsOutput) SetDBSubnetGroups(v []*DBSubnetGroup) *DescribeDBSubnetGroupsOutput { + s.DBSubnetGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBSubnetGroupsOutput) SetMarker(v string) *DescribeDBSubnetGroupsOutput { + s.Marker = &v + return s +} + +type DescribeEngineDefaultClusterParametersInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group family to return engine parameter + // information for. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeEngineDefaultClusterParameters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeEngineDefaultClusterParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultClusterParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultClusterParametersInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultClusterParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetMarker(v string) *DescribeEngineDefaultClusterParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultClusterParametersInput { + s.MaxRecords = &v + return s +} + +type DescribeEngineDefaultClusterParametersOutput struct { + _ struct{} `type:"structure"` + + // Contains the result of a successful invocation of the DescribeEngineDefaultParameters + // action. + EngineDefaults *EngineDefaults `type:"structure"` +} + +// String returns the string representation +func (s DescribeEngineDefaultClusterParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultClusterParametersOutput) GoString() string { + return s.String() +} + +// SetEngineDefaults sets the EngineDefaults field's value. +func (s *DescribeEngineDefaultClusterParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultClusterParametersOutput { + s.EngineDefaults = v + return s +} + +type DescribeEngineDefaultParametersInput struct { + _ struct{} `type:"structure"` + + // The name of the DB parameter group family. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // Not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeEngineDefaultParameters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeEngineDefaultParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DescribeEngineDefaultParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEngineDefaultParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { + s.MaxRecords = &v + return s +} + +type DescribeEngineDefaultParametersOutput struct { + _ struct{} `type:"structure"` + + // Contains the result of a successful invocation of the DescribeEngineDefaultParameters + // action. + EngineDefaults *EngineDefaults `type:"structure"` +} + +// String returns the string representation +func (s DescribeEngineDefaultParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultParametersOutput) GoString() string { + return s.String() +} + +// SetEngineDefaults sets the EngineDefaults field's value. +func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { + s.EngineDefaults = v + return s +} + +type DescribeEventCategoriesInput struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The type of source that is generating the events. + // + // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot + SourceType *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventCategoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventCategoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventCategoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { + s.Filters = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { + s.SourceType = &v + return s +} + +// Data returned from the DescribeEventCategories action. +type DescribeEventCategoriesOutput struct { + _ struct{} `type:"structure"` + + // A list of EventCategoriesMap data types. + EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` +} + +// String returns the string representation +func (s DescribeEventCategoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventCategoriesOutput) GoString() string { + return s.String() +} + +// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. +func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { + s.EventCategoriesMapList = v + return s +} + +type DescribeEventSubscriptionsInput struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords . + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The name of the event notification subscription you want to describe. + SubscriptionName *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventSubscriptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventSubscriptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventSubscriptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventSubscriptionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEventSubscriptionsInput) SetFilters(v []*Filter) *DescribeEventSubscriptionsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventSubscriptionsInput) SetMarker(v string) *DescribeEventSubscriptionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEventSubscriptionsInput) SetMaxRecords(v int64) *DescribeEventSubscriptionsInput { + s.MaxRecords = &v + return s +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *DescribeEventSubscriptionsInput) SetSubscriptionName(v string) *DescribeEventSubscriptionsInput { + s.SubscriptionName = &v + return s +} + +// Data returned by the DescribeEventSubscriptions action. +type DescribeEventSubscriptionsOutput struct { + _ struct{} `type:"structure"` + + // A list of EventSubscriptions data types. + EventSubscriptionsList []*EventSubscription `locationNameList:"EventSubscription" type:"list"` + + // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventSubscriptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventSubscriptionsOutput) GoString() string { + return s.String() +} + +// SetEventSubscriptionsList sets the EventSubscriptionsList field's value. +func (s *DescribeEventSubscriptionsOutput) SetEventSubscriptionsList(v []*EventSubscription) *DescribeEventSubscriptionsOutput { + s.EventSubscriptionsList = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventSubscriptionsOutput) SetMarker(v string) *DescribeEventSubscriptionsOutput { + s.Marker = &v + return s +} + +type DescribeEventsInput struct { + _ struct{} `type:"structure"` + + // The number of minutes to retrieve events for. + // + // Default: 60 + Duration *int64 `type:"integer"` + + // The end of the time interval for which to retrieve events, specified in ISO + // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia + // page. (http://en.wikipedia.org/wiki/ISO_8601) + // + // Example: 2009-07-08T18:00Z + EndTime *time.Time `type:"timestamp"` + + // A list of event categories that trigger notifications for a event notification + // subscription. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeEvents request. + // If this parameter is specified, the response includes only records beyond + // the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The identifier of the event source for which events are returned. If not + // specified, then all sources are included in the response. + // + // Constraints: + // + // * If SourceIdentifier is supplied, SourceType must also be provided. + // + // * If the source type is DBInstance, then a DBInstanceIdentifier must be + // supplied. + // + // * If the source type is DBSecurityGroup, a DBSecurityGroupName must be + // supplied. + // + // * If the source type is DBParameterGroup, a DBParameterGroupName must + // be supplied. + // + // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + SourceIdentifier *string `type:"string"` + + // The event source to retrieve events for. If no value is specified, all events + // are returned. + SourceType *string `type:"string" enum:"SourceType"` + + // The beginning of the time interval to retrieve events for, specified in ISO + // 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia + // page. (http://en.wikipedia.org/wiki/ISO_8601) + // + // Example: 2009-07-08T18:00Z + StartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s DescribeEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDuration sets the Duration field's value. +func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { + s.Duration = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { + s.EndTime = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { + s.EventCategories = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { + s.MaxRecords = &v + return s +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { + s.SourceIdentifier = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { + s.SourceType = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { + s.StartTime = &v + return s +} + +// Contains the result of a successful invocation of the DescribeEvents action. +type DescribeEventsOutput struct { + _ struct{} `type:"structure"` + + // A list of Event instances. + Events []*Event `locationNameList:"Event" type:"list"` + + // An optional pagination token provided by a previous Events request. If this + // parameter is specified, the response includes only records beyond the marker, + // up to the value specified by MaxRecords . + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsOutput) GoString() string { + return s.String() +} + +// SetEvents sets the Events field's value. +func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { + s.Events = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { + s.Marker = &v + return s +} + +type DescribeOrderableDBInstanceOptionsInput struct { + _ struct{} `type:"structure"` + + // The DB instance class filter value. Specify this parameter to show only the + // available offerings matching the specified DB instance class. + DBInstanceClass *string `type:"string"` + + // The name of the engine to retrieve DB instance options for. + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The engine version filter value. Specify this parameter to show only the + // available offerings matching the specified engine version. + EngineVersion *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The license model filter value. Specify this parameter to show only the available + // offerings matching the specified license model. + LicenseModel *string `type:"string"` + + // An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords . + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The VPC filter value. Specify this parameter to show only the available VPC + // or non-VPC offerings. + Vpc *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeOrderableDBInstanceOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { + s.DBInstanceClass = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetEngine(v string) *DescribeOrderableDBInstanceOptionsInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetEngineVersion(v string) *DescribeOrderableDBInstanceOptionsInput { + s.EngineVersion = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetFilters(v []*Filter) *DescribeOrderableDBInstanceOptionsInput { + s.Filters = v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetLicenseModel(v string) *DescribeOrderableDBInstanceOptionsInput { + s.LicenseModel = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetMaxRecords(v int64) *DescribeOrderableDBInstanceOptionsInput { + s.MaxRecords = &v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetVpc(v bool) *DescribeOrderableDBInstanceOptionsInput { + s.Vpc = &v + return s +} + +// Contains the result of a successful invocation of the DescribeOrderableDBInstanceOptions +// action. +type DescribeOrderableDBInstanceOptionsOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous OrderableDBInstanceOptions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords . + Marker *string `type:"string"` + + // An OrderableDBInstanceOption structure containing information about orderable + // options for the DB instance. + OrderableDBInstanceOptions []*OrderableDBInstanceOption `locationNameList:"OrderableDBInstanceOption" type:"list"` +} + +// String returns the string representation +func (s DescribeOrderableDBInstanceOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOrderableDBInstanceOptionsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeOrderableDBInstanceOptionsOutput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsOutput { + s.Marker = &v + return s +} + +// SetOrderableDBInstanceOptions sets the OrderableDBInstanceOptions field's value. +func (s *DescribeOrderableDBInstanceOptionsOutput) SetOrderableDBInstanceOptions(v []*OrderableDBInstanceOption) *DescribeOrderableDBInstanceOptionsOutput { + s.OrderableDBInstanceOptions = v + return s +} + +type DescribePendingMaintenanceActionsInput struct { + _ struct{} `type:"structure"` + + // A filter that specifies one or more resources to return pending maintenance + // actions for. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list will only include pending maintenance + // actions for the DB clusters identified by these ARNs. + // + // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. + // The results list will only include pending maintenance actions for the + // DB instances identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribePendingMaintenanceActions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to a number of records specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The ARN of a resource to return pending maintenance actions for. + ResourceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s DescribePendingMaintenanceActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingMaintenanceActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePendingMaintenanceActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribePendingMaintenanceActionsInput) SetFilters(v []*Filter) *DescribePendingMaintenanceActionsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribePendingMaintenanceActionsInput) SetMarker(v string) *DescribePendingMaintenanceActionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribePendingMaintenanceActionsInput) SetMaxRecords(v int64) *DescribePendingMaintenanceActionsInput { + s.MaxRecords = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput { + s.ResourceIdentifier = &v + return s +} + +// Data returned from the DescribePendingMaintenanceActions action. +type DescribePendingMaintenanceActionsOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous DescribePendingMaintenanceActions + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to a number of records specified by MaxRecords. + Marker *string `type:"string"` + + // A list of the pending maintenance actions for the resource. + PendingMaintenanceActions []*ResourcePendingMaintenanceActions `locationNameList:"ResourcePendingMaintenanceActions" type:"list"` +} + +// String returns the string representation +func (s DescribePendingMaintenanceActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingMaintenanceActionsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribePendingMaintenanceActionsOutput) SetMarker(v string) *DescribePendingMaintenanceActionsOutput { + s.Marker = &v + return s +} + +// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. +func (s *DescribePendingMaintenanceActionsOutput) SetPendingMaintenanceActions(v []*ResourcePendingMaintenanceActions) *DescribePendingMaintenanceActionsOutput { + s.PendingMaintenanceActions = v + return s +} + +type DescribeValidDBInstanceModificationsInput struct { + _ struct{} `type:"structure"` + + // The customer identifier or the ARN of your DB instance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeValidDBInstanceModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeValidDBInstanceModificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeValidDBInstanceModificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeValidDBInstanceModificationsInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DescribeValidDBInstanceModificationsInput) SetDBInstanceIdentifier(v string) *DescribeValidDBInstanceModificationsInput { + s.DBInstanceIdentifier = &v + return s +} + +type DescribeValidDBInstanceModificationsOutput struct { + _ struct{} `type:"structure"` + + // Information about valid modifications that you can make to your DB instance. + // Contains the result of a successful call to the DescribeValidDBInstanceModifications + // action. You can use this information when you call ModifyDBInstance. + ValidDBInstanceModificationsMessage *ValidDBInstanceModificationsMessage `type:"structure"` +} + +// String returns the string representation +func (s DescribeValidDBInstanceModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeValidDBInstanceModificationsOutput) GoString() string { + return s.String() +} + +// SetValidDBInstanceModificationsMessage sets the ValidDBInstanceModificationsMessage field's value. +func (s *DescribeValidDBInstanceModificationsOutput) SetValidDBInstanceModificationsMessage(v *ValidDBInstanceModificationsMessage) *DescribeValidDBInstanceModificationsOutput { + s.ValidDBInstanceModificationsMessage = v + return s +} + +// An Active Directory Domain membership record associated with the DB instance. +type DomainMembership struct { + _ struct{} `type:"structure"` + + // The identifier of the Active Directory Domain. + Domain *string `type:"string"` + + // The fully qualified domain name of the Active Directory Domain. + FQDN *string `type:"string"` + + // The name of the IAM role to be used when making API calls to the Directory + // Service. + IAMRoleName *string `type:"string"` + + // The status of the DB instance's Active Directory Domain membership, such + // as joined, pending-join, failed etc). + Status *string `type:"string"` +} + +// String returns the string representation +func (s DomainMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainMembership) GoString() string { + return s.String() +} + +// SetDomain sets the Domain field's value. +func (s *DomainMembership) SetDomain(v string) *DomainMembership { + s.Domain = &v + return s +} + +// SetFQDN sets the FQDN field's value. +func (s *DomainMembership) SetFQDN(v string) *DomainMembership { + s.FQDN = &v + return s +} + +// SetIAMRoleName sets the IAMRoleName field's value. +func (s *DomainMembership) SetIAMRoleName(v string) *DomainMembership { + s.IAMRoleName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DomainMembership) SetStatus(v string) *DomainMembership { + s.Status = &v + return s +} + +// A range of double values. +type DoubleRange struct { + _ struct{} `type:"structure"` + + // The minimum value in the range. + From *float64 `type:"double"` + + // The maximum value in the range. + To *float64 `type:"double"` +} + +// String returns the string representation +func (s DoubleRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DoubleRange) GoString() string { + return s.String() +} + +// SetFrom sets the From field's value. +func (s *DoubleRange) SetFrom(v float64) *DoubleRange { + s.From = &v + return s +} + +// SetTo sets the To field's value. +func (s *DoubleRange) SetTo(v float64) *DoubleRange { + s.To = &v + return s +} + +// This data type is used as a response element in the following actions: +// +// * CreateDBInstance +// +// * DescribeDBInstances +// +// * DeleteDBInstance +type Endpoint struct { + _ struct{} `type:"structure"` + + // Specifies the DNS address of the DB instance. + Address *string `type:"string"` + + // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. + HostedZoneId *string `type:"string"` + + // Specifies the port that the database engine is listening on. + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *Endpoint) SetHostedZoneId(v string) *Endpoint { + s.HostedZoneId = &v + return s +} + +// SetPort sets the Port field's value. +func (s *Endpoint) SetPort(v int64) *Endpoint { + s.Port = &v + return s +} + +// Contains the result of a successful invocation of the DescribeEngineDefaultParameters +// action. +type EngineDefaults struct { + _ struct{} `type:"structure"` + + // Specifies the name of the DB parameter group family that the engine default + // parameters apply to. + DBParameterGroupFamily *string `type:"string"` + + // An optional pagination token provided by a previous EngineDefaults request. + // If this parameter is specified, the response includes only records beyond + // the marker, up to the value specified by MaxRecords . + Marker *string `type:"string"` + + // Contains a list of engine default parameters. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` +} + +// String returns the string representation +func (s EngineDefaults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EngineDefaults) GoString() string { + return s.String() +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *EngineDefaults) SetDBParameterGroupFamily(v string) *EngineDefaults { + s.DBParameterGroupFamily = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { + s.Marker = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { + s.Parameters = v + return s +} + +// This data type is used as a response element in the DescribeEvents action. +type Event struct { + _ struct{} `type:"structure"` + + // Specifies the date and time of the event. + Date *time.Time `type:"timestamp"` + + // Specifies the category for the event. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // Provides the text of this event. + Message *string `type:"string"` + + // The Amazon Resource Name (ARN) for the event. + SourceArn *string `type:"string"` + + // Provides the identifier for the source of the event. + SourceIdentifier *string `type:"string"` + + // Specifies the source type for this event. + SourceType *string `type:"string" enum:"SourceType"` +} + +// String returns the string representation +func (s Event) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Event) GoString() string { + return s.String() +} + +// SetDate sets the Date field's value. +func (s *Event) SetDate(v time.Time) *Event { + s.Date = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *Event) SetEventCategories(v []*string) *Event { + s.EventCategories = v + return s +} + +// SetMessage sets the Message field's value. +func (s *Event) SetMessage(v string) *Event { + s.Message = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *Event) SetSourceArn(v string) *Event { + s.SourceArn = &v + return s +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *Event) SetSourceIdentifier(v string) *Event { + s.SourceIdentifier = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *Event) SetSourceType(v string) *Event { + s.SourceType = &v + return s +} + +// Contains the results of a successful invocation of the DescribeEventCategories +// action. +type EventCategoriesMap struct { + _ struct{} `type:"structure"` + + // The event categories for the specified source type + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // The source type that the returned categories belong to + SourceType *string `type:"string"` +} + +// String returns the string representation +func (s EventCategoriesMap) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventCategoriesMap) GoString() string { + return s.String() +} + +// SetEventCategories sets the EventCategories field's value. +func (s *EventCategoriesMap) SetEventCategories(v []*string) *EventCategoriesMap { + s.EventCategories = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { + s.SourceType = &v + return s +} + +// Contains the results of a successful invocation of the DescribeEventSubscriptions +// action. +type EventSubscription struct { + _ struct{} `type:"structure"` + + // The event notification subscription Id. + CustSubscriptionId *string `type:"string"` + + // The AWS customer account associated with the event notification subscription. + CustomerAwsId *string `type:"string"` + + // A Boolean value indicating if the subscription is enabled. True indicates + // the subscription is enabled. + Enabled *bool `type:"boolean"` + + // A list of event categories for the event notification subscription. + EventCategoriesList []*string `locationNameList:"EventCategory" type:"list"` + + // The Amazon Resource Name (ARN) for the event subscription. + EventSubscriptionArn *string `type:"string"` + + // The topic ARN of the event notification subscription. + SnsTopicArn *string `type:"string"` + + // A list of source IDs for the event notification subscription. + SourceIdsList []*string `locationNameList:"SourceId" type:"list"` + + // The source type for the event notification subscription. + SourceType *string `type:"string"` + + // The status of the event notification subscription. + // + // Constraints: + // + // Can be one of the following: creating | modifying | deleting | active | no-permission + // | topic-not-exist + // + // The status "no-permission" indicates that Neptune no longer has permission + // to post to the SNS topic. The status "topic-not-exist" indicates that the + // topic was deleted after the subscription was created. + Status *string `type:"string"` + + // The time the event notification subscription was created. + SubscriptionCreationTime *string `type:"string"` +} + +// String returns the string representation +func (s EventSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventSubscription) GoString() string { + return s.String() +} + +// SetCustSubscriptionId sets the CustSubscriptionId field's value. +func (s *EventSubscription) SetCustSubscriptionId(v string) *EventSubscription { + s.CustSubscriptionId = &v + return s +} + +// SetCustomerAwsId sets the CustomerAwsId field's value. +func (s *EventSubscription) SetCustomerAwsId(v string) *EventSubscription { + s.CustomerAwsId = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *EventSubscription) SetEnabled(v bool) *EventSubscription { + s.Enabled = &v + return s +} + +// SetEventCategoriesList sets the EventCategoriesList field's value. +func (s *EventSubscription) SetEventCategoriesList(v []*string) *EventSubscription { + s.EventCategoriesList = v + return s +} + +// SetEventSubscriptionArn sets the EventSubscriptionArn field's value. +func (s *EventSubscription) SetEventSubscriptionArn(v string) *EventSubscription { + s.EventSubscriptionArn = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *EventSubscription) SetSnsTopicArn(v string) *EventSubscription { + s.SnsTopicArn = &v + return s +} + +// SetSourceIdsList sets the SourceIdsList field's value. +func (s *EventSubscription) SetSourceIdsList(v []*string) *EventSubscription { + s.SourceIdsList = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *EventSubscription) SetSourceType(v string) *EventSubscription { + s.SourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *EventSubscription) SetStatus(v string) *EventSubscription { + s.Status = &v + return s +} + +// SetSubscriptionCreationTime sets the SubscriptionCreationTime field's value. +func (s *EventSubscription) SetSubscriptionCreationTime(v string) *EventSubscription { + s.SubscriptionCreationTime = &v + return s +} + +type FailoverDBClusterInput struct { + _ struct{} `type:"structure"` + + // A DB cluster identifier to force a failover for. This parameter is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + DBClusterIdentifier *string `type:"string"` + + // The name of the instance to promote to the primary instance. + // + // You must specify the instance identifier for an Read Replica in the DB cluster. + // For example, mydbcluster-replica1. + TargetDBInstanceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s FailoverDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailoverDBClusterInput) GoString() string { + return s.String() +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. +func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *FailoverDBClusterInput { + s.TargetDBInstanceIdentifier = &v + return s +} + +type FailoverDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s FailoverDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailoverDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterOutput { + s.DBCluster = v + return s +} + +// This type is not currently supported. +type Filter struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // This parameter is not currently supported. + // + // Values is a required field + Values []*string `locationNameList:"Value" type:"list" required:"true"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The Amazon Neptune resource with tags to be listed. This value is an Amazon + // Resource Name (ARN). For information about creating an ARN, see Constructing + // an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // ResourceName is a required field + ResourceName *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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput { + s.Filters = v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { + s.ResourceName = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // List of tags returned by the ListTagsForResource operation. + TagList []*Tag `locationNameList:"Tag" type:"list"` +} + +// 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 ModifyDBClusterInput struct { + _ struct{} `type:"structure"` + + // A value that specifies whether the modifications in this request and any + // pending modifications are asynchronously applied as soon as possible, regardless + // of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter + // is set to false, changes to the DB cluster are applied during the next maintenance + // window. + // + // The ApplyImmediately parameter only affects the NewDBClusterIdentifier and + // MasterUserPassword values. If you set the ApplyImmediately parameter value + // to false, then changes to the NewDBClusterIdentifier and MasterUserPassword + // values are applied during the next maintenance window. All other changes + // are applied immediately, regardless of the value of the ApplyImmediately + // parameter. + // + // Default: false + ApplyImmediately *bool `type:"boolean"` + + // The number of days for which automated backups are retained. You must specify + // a minimum value of 1. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 1 to 35 + BackupRetentionPeriod *int64 `type:"integer"` + + // The DB cluster identifier for the cluster being modified. This parameter + // is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB cluster parameter group to use for the DB cluster. + DBClusterParameterGroupName *string `type:"string"` + + // True to enable mapping of AWS Identity and Access Management (IAM) accounts + // to database accounts, and otherwise false. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // The version number of the database engine to which you want to upgrade. Changing + // this parameter results in an outage. The change is applied during the next + // maintenance window unless the ApplyImmediately parameter is set to true. + // + // For a list of valid engine versions, see CreateDBInstance, or call DescribeDBEngineVersions. + EngineVersion *string `type:"string"` + + // The new password for the master database user. This password can contain + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain from 8 to 41 characters. + MasterUserPassword *string `type:"string"` + + // The new DB cluster identifier for the DB cluster when renaming a DB cluster. + // This value is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens + // + // * The first character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // Example: my-cluster2 + NewDBClusterIdentifier *string `type:"string"` + + // A value that indicates that the DB cluster should be associated with the + // specified option group. Changing this parameter doesn't result in an outage + // except in the following case, and the change is applied during the next maintenance + // window unless the ApplyImmediately parameter is set to true for this request. + // If the parameter change results in an option group that enables OEM, this + // change can cause a brief (sub-second) period during which new connections + // are rejected but existing connections are not interrupted. + // + // Permanent options can't be removed from an option group. The option group + // can't be removed from a DB cluster once it is associated with a DB cluster. + OptionGroupName *string `type:"string"` + + // The port number on which the DB cluster accepts connections. + // + // Constraints: Value must be 1150-65535 + // + // Default: The same port as the original DB cluster. + Port *int64 `type:"integer"` + + // The daily time range during which automated backups are created if automated + // backups are enabled, using the BackupRetentionPeriod parameter. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. + // + // Constraints: + // + // * Must be in the format hh24:mi-hh24:mi. + // + // * Must be in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `type:"string"` + + // The weekly time range during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // A list of VPC security groups that the DB cluster will belong to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s ModifyDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput { + s.ApplyImmediately = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBClusterInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { + s.EngineVersion = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { + s.MasterUserPassword = &v + return s +} + +// SetNewDBClusterIdentifier sets the NewDBClusterIdentifier field's value. +func (s *ModifyDBClusterInput) SetNewDBClusterIdentifier(v string) *ModifyDBClusterInput { + s.NewDBClusterIdentifier = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *ModifyDBClusterInput) SetOptionGroupName(v string) *ModifyDBClusterInput { + s.OptionGroupName = &v + return s +} + +// SetPort sets the Port field's value. +func (s *ModifyDBClusterInput) SetPort(v int64) *ModifyDBClusterInput { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *ModifyDBClusterInput) SetPreferredBackupWindow(v string) *ModifyDBClusterInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDBClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { + s.VpcSecurityGroupIds = v + return s +} + +type ModifyDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *ModifyDBClusterOutput) SetDBCluster(v *DBCluster) *ModifyDBClusterOutput { + s.DBCluster = v + return s +} + +type ModifyDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group to modify. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // A list of parameters in the DB cluster parameter group to modify. + // + // Parameters is a required field + Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ModifyDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ModifyDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBClusterParameterGroupInput { + s.Parameters = v + return s +} + +type ModifyDBClusterSnapshotAttributeInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster snapshot attribute to modify. + // + // To manage authorization for other AWS accounts to copy or restore a manual + // DB cluster snapshot, set this value to restore. + // + // AttributeName is a required field + AttributeName *string `type:"string" required:"true"` + + // The identifier for the DB cluster snapshot to modify the attributes for. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // A list of DB cluster snapshot attributes to add to the attribute specified + // by AttributeName. + // + // To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, + // set this list to include one or more AWS account IDs, or all to make the + // manual DB cluster snapshot restorable by any AWS account. Do not add the + // all value for any manual DB cluster snapshots that contain private information + // that you don't want available to all AWS accounts. + ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` + + // A list of DB cluster snapshot attributes to remove from the attribute specified + // by AttributeName. + // + // To remove authorization for other AWS accounts to copy or restore a manual + // DB cluster snapshot, set this list to include one or more AWS account identifiers, + // or all to remove authorization for any AWS account to copy or restore the + // DB cluster snapshot. If you specify all, an AWS account whose account ID + // is explicitly added to the restore attribute can still copy or restore a + // manual DB cluster snapshot. + ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` +} + +// String returns the string representation +func (s ModifyDBClusterSnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterSnapshotAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterSnapshotAttributeInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBClusterSnapshotAttributeInput { + s.AttributeName = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetDBClusterSnapshotIdentifier(v string) *ModifyDBClusterSnapshotAttributeInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetValuesToAdd sets the ValuesToAdd field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBClusterSnapshotAttributeInput { + s.ValuesToAdd = v + return s +} + +// SetValuesToRemove sets the ValuesToRemove field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBClusterSnapshotAttributeInput { + s.ValuesToRemove = v + return s +} + +type ModifyDBClusterSnapshotAttributeOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes + // API action. + // + // Manual DB cluster snapshot attributes are used to authorize other AWS accounts + // to copy or restore a manual DB cluster snapshot. For more information, see + // the ModifyDBClusterSnapshotAttribute API action. + DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBClusterSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterSnapshotAttributeOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. +func (s *ModifyDBClusterSnapshotAttributeOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *ModifyDBClusterSnapshotAttributeOutput { + s.DBClusterSnapshotAttributesResult = v + return s +} + +type ModifyDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The new amount of storage (in gibibytes) to allocate for the DB instance. + // + // Not applicable. Storage is managed by the DB Cluster. + AllocatedStorage *int64 `type:"integer"` + + // Indicates that major version upgrades are allowed. Changing this parameter + // doesn't result in an outage and the change is asynchronously applied as soon + // as possible. + // + // Constraints: This parameter must be set to true when specifying a value for + // the EngineVersion parameter that is a different major version than the DB + // instance's current version. + AllowMajorVersionUpgrade *bool `type:"boolean"` + + // Specifies whether the modifications in this request and any pending modifications + // are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow + // setting for the DB instance. + // + // If this parameter is set to false, changes to the DB instance are applied + // during the next maintenance window. Some parameter changes can cause an outage + // and are applied on the next call to RebootDBInstance, or the next failure + // reboot. + // + // Default: false + ApplyImmediately *bool `type:"boolean"` + + // Indicates that minor version upgrades are applied automatically to the DB + // instance during the maintenance window. Changing this parameter doesn't result + // in an outage except in the following case and the change is asynchronously + // applied as soon as possible. An outage will result if this parameter is set + // to true during the maintenance window, and a newer minor version is available, + // and Neptune has enabled auto patching for that engine version. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The number of days to retain automated backups. Setting this parameter to + // a positive number enables backups. Setting this parameter to 0 disables automated + // backups. + // + // Not applicable. The retention period for automated backups is managed by + // the DB cluster. For more information, see ModifyDBCluster. + // + // Default: Uses existing setting + BackupRetentionPeriod *int64 `type:"integer"` + + // Indicates the certificate that needs to be associated with the instance. + CACertificateIdentifier *string `type:"string"` + + // The configuration setting for the log types to be enabled for export to CloudWatch + // Logs for a specific DB instance or DB cluster. + CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` + + // True to copy all tags from the DB instance to snapshots of the DB instance, + // and otherwise false. The default is false. + CopyTagsToSnapshot *bool `type:"boolean"` + + // The new compute and memory capacity of the DB instance, for example, db.m4.large. + // Not all DB instance classes are available in all AWS Regions. + // + // If you modify the DB instance class, an outage occurs during the change. + // The change is applied during the next maintenance window, unless ApplyImmediately + // is specified as true for this request. + // + // Default: Uses existing setting + DBInstanceClass *string `type:"string"` + + // The DB instance identifier. This value is stored as a lowercase string. + // + // Constraints: + // + // * Must match the identifier of an existing DBInstance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The name of the DB parameter group to apply to the DB instance. Changing + // this setting doesn't result in an outage. The parameter group name itself + // is changed immediately, but the actual parameter changes are not applied + // until you reboot the instance without failover. The db instance will NOT + // be rebooted automatically and the parameter changes will NOT be applied during + // the next maintenance window. + // + // Default: Uses existing setting + // + // Constraints: The DB parameter group must be in the same DB parameter group + // family as this DB instance. + DBParameterGroupName *string `type:"string"` + + // The port number on which the database accepts connections. + // + // The value of the DBPortNumber parameter must not match any of the port values + // specified for options in the option group for the DB instance. + // + // Your database will restart when you change the DBPortNumber value regardless + // of the value of the ApplyImmediately parameter. + // + // Default: 8182 + DBPortNumber *int64 `type:"integer"` + + // A list of DB security groups to authorize on this DB instance. Changing this + // setting doesn't result in an outage and the change is asynchronously applied + // as soon as possible. + // + // Constraints: + // + // * If supplied, must match existing DBSecurityGroups. + DBSecurityGroups []*string `locationNameList:"DBSecurityGroupName" type:"list"` + + // The new DB subnet group for the DB instance. You can use this parameter to + // move your DB instance to a different VPC. + // + // Changing the subnet group causes an outage during the change. The change + // is applied during the next maintenance window, unless you specify true for + // the ApplyImmediately parameter. + // + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. + // + // Example: mySubnetGroup + DBSubnetGroupName *string `type:"string"` + + // Not supported. + Domain *string `type:"string"` + + // Not supported + DomainIAMRoleName *string `type:"string"` + + // True to enable mapping of AWS Identity and Access Management (IAM) accounts + // to database accounts, and otherwise false. + // + // You can enable IAM database authentication for the following database engines + // + // Not applicable. Mapping AWS IAM accounts to database accounts is managed + // by the DB cluster. For more information, see ModifyDBCluster. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // True to enable Performance Insights for the DB instance, and otherwise false. + EnablePerformanceInsights *bool `type:"boolean"` + + // The version number of the database engine to upgrade to. Changing this parameter + // results in an outage and the change is applied during the next maintenance + // window unless the ApplyImmediately parameter is set to true for this request. + // + // For major version upgrades, if a nondefault DB parameter group is currently + // in use, a new DB parameter group in the DB parameter group family for the + // new engine version must be specified. The new DB parameter group can be the + // default for that DB parameter group family. + EngineVersion *string `type:"string"` + + // The new Provisioned IOPS (I/O operations per second) value for the instance. + // + // Changing this setting doesn't result in an outage and the change is applied + // during the next maintenance window unless the ApplyImmediately parameter + // is set to true for this request. + // + // Default: Uses existing setting + Iops *int64 `type:"integer"` + + // The license model for the DB instance. + // + // Valid values: license-included | bring-your-own-license | general-public-license + LicenseModel *string `type:"string"` + + // The new password for the master user. The password can include any printable + // ASCII character except "/", """, or "@". + // + // Not applicable. + // + // Default: Uses existing setting + MasterUserPassword *string `type:"string"` + + // The interval, in seconds, between points when Enhanced Monitoring metrics + // are collected for the DB instance. To disable collecting Enhanced Monitoring + // metrics, specify 0. The default is 0. + // + // If MonitoringRoleArn is specified, then you must also set MonitoringInterval + // to a value other than 0. + // + // Valid Values: 0, 1, 5, 10, 15, 30, 60 + MonitoringInterval *int64 `type:"integer"` + + // The ARN for the IAM role that permits Neptune to send enhanced monitoring + // metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. + // + // If MonitoringInterval is set to a value other than 0, then you must supply + // a MonitoringRoleArn value. + MonitoringRoleArn *string `type:"string"` + + // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter + // doesn't result in an outage and the change is applied during the next maintenance + // window unless the ApplyImmediately parameter is set to true for this request. + MultiAZ *bool `type:"boolean"` + + // The new DB instance identifier for the DB instance when renaming a DB instance. + // When you change the DB instance identifier, an instance reboot will occur + // immediately if you set Apply Immediately to true, or will occur during the + // next maintenance window if Apply Immediately to false. This value is stored + // as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: mydbinstance + NewDBInstanceIdentifier *string `type:"string"` + + // Indicates that the DB instance should be associated with the specified option + // group. Changing this parameter doesn't result in an outage except in the + // following case and the change is applied during the next maintenance window + // unless the ApplyImmediately parameter is set to true for this request. If + // the parameter change results in an option group that enables OEM, this change + // can cause a brief (sub-second) period during which new connections are rejected + // but existing connections are not interrupted. + // + // Permanent options, such as the TDE option for Oracle Advanced Security TDE, + // can't be removed from an option group, and that option group can't be removed + // from a DB instance once it is associated with a DB instance + OptionGroupName *string `type:"string"` + + // The AWS KMS key identifier for encryption of Performance Insights data. The + // KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the + // KMS key alias for the KMS encryption key. + PerformanceInsightsKMSKeyId *string `type:"string"` + + // The daily time range during which automated backups are created if automated + // backups are enabled. + // + // Not applicable. The daily time range for creating automated backups is managed + // by the DB cluster. For more information, see ModifyDBCluster. + // + // Constraints: + // + // * Must be in the format hh24:mi-hh24:mi + // + // * Must be in Universal Time Coordinated (UTC) + // + // * Must not conflict with the preferred maintenance window + // + // * Must be at least 30 minutes + PreferredBackupWindow *string `type:"string"` + + // The weekly time range (in UTC) during which system maintenance can occur, + // which might result in an outage. Changing this parameter doesn't result in + // an outage, except in the following situation, and the change is asynchronously + // applied as soon as possible. If there are pending actions that cause a reboot, + // and the maintenance window is changed to include the current time, then changing + // this parameter will cause a reboot of the DB instance. If moving this window + // to the current time, there must be at least 30 minutes between the current + // time and end of the window to ensure pending changes are applied. + // + // Default: Uses existing setting + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun + // + // Constraints: Must be at least 30 minutes + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which a Read Replica is promoted to the + // primary instance after a failure of the existing primary instance. + // + // Default: 1 + // + // Valid Values: 0 - 15 + PromotionTier *int64 `type:"integer"` + + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` + + // Specifies the storage type to be associated with the DB instance. + // + // If you specify Provisioned IOPS (io1), you must also include a value for + // the Iops parameter. + // + // If you choose to migrate your DB instance from using standard storage to + // using Provisioned IOPS, or from using Provisioned IOPS to using standard + // storage, the process can take time. The duration of the migration depends + // on several factors such as database load, storage size, storage type (standard + // or Provisioned IOPS), amount of IOPS provisioned (if any), and the number + // of prior scale storage operations. Typical migration times are under 24 hours, + // but the process can take up to several days in some cases. During the migration, + // the DB instance is available for use, but might experience performance degradation. + // While the migration takes place, nightly backups for the instance are suspended. + // No other Amazon Neptune operations can take place for the instance, including + // modifying the instance, rebooting the instance, deleting the instance, creating + // a Read Replica for the instance, and creating a DB snapshot of the instance. + // + // Valid values: standard | gp2 | io1 + // + // Default: io1 if the Iops parameter is specified, otherwise standard + StorageType *string `type:"string"` + + // The ARN from the key store with which to associate the instance for TDE encryption. + TdeCredentialArn *string `type:"string"` + + // The password for the given ARN from the key store in order to access the + // device. + TdeCredentialPassword *string `type:"string"` + + // A list of EC2 VPC security groups to authorize on this DB instance. This + // change is asynchronously applied as soon as possible. + // + // Not applicable. The associated list of EC2 VPC security groups is managed + // by the DB cluster. For more information, see ModifyDBCluster. + // + // Constraints: + // + // * If supplied, must match existing VpcSecurityGroupIds. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s ModifyDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *ModifyDBInstanceInput) SetAllocatedStorage(v int64) *ModifyDBInstanceInput { + s.AllocatedStorage = &v + return s +} + +// SetAllowMajorVersionUpgrade sets the AllowMajorVersionUpgrade field's value. +func (s *ModifyDBInstanceInput) SetAllowMajorVersionUpgrade(v bool) *ModifyDBInstanceInput { + s.AllowMajorVersionUpgrade = &v + return s +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyDBInstanceInput) SetApplyImmediately(v bool) *ModifyDBInstanceInput { + s.ApplyImmediately = &v + return s +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *ModifyDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyDBInstanceInput { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *ModifyDBInstanceInput) SetBackupRetentionPeriod(v int64) *ModifyDBInstanceInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. +func (s *ModifyDBInstanceInput) SetCACertificateIdentifier(v string) *ModifyDBInstanceInput { + s.CACertificateIdentifier = &v + return s +} + +// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. +func (s *ModifyDBInstanceInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBInstanceInput { + s.CloudwatchLogsExportConfiguration = v + return s +} + +// SetCopyTagsToSnapshot sets the CopyTagsToSnapshot field's value. +func (s *ModifyDBInstanceInput) SetCopyTagsToSnapshot(v bool) *ModifyDBInstanceInput { + s.CopyTagsToSnapshot = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *ModifyDBInstanceInput) SetDBInstanceClass(v string) *ModifyDBInstanceInput { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *ModifyDBInstanceInput) SetDBInstanceIdentifier(v string) *ModifyDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *ModifyDBInstanceInput) SetDBParameterGroupName(v string) *ModifyDBInstanceInput { + s.DBParameterGroupName = &v + return s +} + +// SetDBPortNumber sets the DBPortNumber field's value. +func (s *ModifyDBInstanceInput) SetDBPortNumber(v int64) *ModifyDBInstanceInput { + s.DBPortNumber = &v + return s +} + +// SetDBSecurityGroups sets the DBSecurityGroups field's value. +func (s *ModifyDBInstanceInput) SetDBSecurityGroups(v []*string) *ModifyDBInstanceInput { + s.DBSecurityGroups = v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *ModifyDBInstanceInput) SetDBSubnetGroupName(v string) *ModifyDBInstanceInput { + s.DBSubnetGroupName = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *ModifyDBInstanceInput) SetDomain(v string) *ModifyDBInstanceInput { + s.Domain = &v + return s +} + +// SetDomainIAMRoleName sets the DomainIAMRoleName field's value. +func (s *ModifyDBInstanceInput) SetDomainIAMRoleName(v string) *ModifyDBInstanceInput { + s.DomainIAMRoleName = &v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *ModifyDBInstanceInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBInstanceInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetEnablePerformanceInsights sets the EnablePerformanceInsights field's value. +func (s *ModifyDBInstanceInput) SetEnablePerformanceInsights(v bool) *ModifyDBInstanceInput { + s.EnablePerformanceInsights = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyDBInstanceInput) SetEngineVersion(v string) *ModifyDBInstanceInput { + s.EngineVersion = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *ModifyDBInstanceInput) SetIops(v int64) *ModifyDBInstanceInput { + s.Iops = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *ModifyDBInstanceInput) SetLicenseModel(v string) *ModifyDBInstanceInput { + s.LicenseModel = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *ModifyDBInstanceInput) SetMasterUserPassword(v string) *ModifyDBInstanceInput { + s.MasterUserPassword = &v + return s +} + +// SetMonitoringInterval sets the MonitoringInterval field's value. +func (s *ModifyDBInstanceInput) SetMonitoringInterval(v int64) *ModifyDBInstanceInput { + s.MonitoringInterval = &v + return s +} + +// SetMonitoringRoleArn sets the MonitoringRoleArn field's value. +func (s *ModifyDBInstanceInput) SetMonitoringRoleArn(v string) *ModifyDBInstanceInput { + s.MonitoringRoleArn = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *ModifyDBInstanceInput) SetMultiAZ(v bool) *ModifyDBInstanceInput { + s.MultiAZ = &v + return s +} + +// SetNewDBInstanceIdentifier sets the NewDBInstanceIdentifier field's value. +func (s *ModifyDBInstanceInput) SetNewDBInstanceIdentifier(v string) *ModifyDBInstanceInput { + s.NewDBInstanceIdentifier = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *ModifyDBInstanceInput) SetOptionGroupName(v string) *ModifyDBInstanceInput { + s.OptionGroupName = &v + return s +} + +// SetPerformanceInsightsKMSKeyId sets the PerformanceInsightsKMSKeyId field's value. +func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *ModifyDBInstanceInput { + s.PerformanceInsightsKMSKeyId = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyDBInstanceInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { + s.PromotionTier = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *ModifyDBInstanceInput) SetPubliclyAccessible(v bool) *ModifyDBInstanceInput { + s.PubliclyAccessible = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *ModifyDBInstanceInput) SetStorageType(v string) *ModifyDBInstanceInput { + s.StorageType = &v + return s +} + +// SetTdeCredentialArn sets the TdeCredentialArn field's value. +func (s *ModifyDBInstanceInput) SetTdeCredentialArn(v string) *ModifyDBInstanceInput { + s.TdeCredentialArn = &v + return s +} + +// SetTdeCredentialPassword sets the TdeCredentialPassword field's value. +func (s *ModifyDBInstanceInput) SetTdeCredentialPassword(v string) *ModifyDBInstanceInput { + s.TdeCredentialPassword = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *ModifyDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBInstanceInput { + s.VpcSecurityGroupIds = v + return s +} + +type ModifyDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB instance. + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *ModifyDBInstanceOutput) SetDBInstance(v *DBInstance) *ModifyDBInstanceOutput { + s.DBInstance = v + return s +} + +type ModifyDBParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB parameter group. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // DBParameterGroupName is a required field + DBParameterGroupName *string `type:"string" required:"true"` + + // An array of parameter names, values, and the apply method for the parameter + // update. At least one parameter name, value, and apply method must be supplied; + // subsequent arguments are optional. A maximum of 20 parameters can be modified + // in a single request. + // + // Valid Values (for the application method): immediate | pending-reboot + // + // You can use the immediate value with dynamic parameters only. You can use + // the pending-reboot value for both dynamic and static parameters, and changes + // are applied when you reboot the DB instance without failover. + // + // Parameters is a required field + Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyDBParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *ModifyDBParameterGroupInput) SetDBParameterGroupName(v string) *ModifyDBParameterGroupInput { + s.DBParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ModifyDBParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBParameterGroupInput { + s.Parameters = v + return s +} + +type ModifyDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The description for the DB subnet group. + DBSubnetGroupDescription *string `type:"string"` + + // The name for the DB subnet group. This value is stored as a lowercase string. + // You can't modify the default subnet group. + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` + + // The EC2 subnet IDs for the DB subnet group. + // + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *ModifyDBSubnetGroupInput { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupName(v string) *ModifyDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *ModifyDBSubnetGroupInput) SetSubnetIds(v []*string) *ModifyDBSubnetGroupInput { + s.SubnetIds = v + return s +} + +type ModifyDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB subnet group. + // + // This data type is used as a response element in the DescribeDBSubnetGroups + // action. + DBSubnetGroup *DBSubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *ModifyDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *ModifyDBSubnetGroupOutput { + s.DBSubnetGroup = v + return s +} + +type ModifyEventSubscriptionInput struct { + _ struct{} `type:"structure"` + + // A Boolean value; set to true to activate the subscription. + Enabled *bool `type:"boolean"` + + // A list of event categories for a SourceType that you want to subscribe to. + // You can see a list of the categories for a given SourceType by using the + // DescribeEventCategories action. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // The Amazon Resource Name (ARN) of the SNS topic created for event notification. + // The ARN is created by Amazon SNS when you create a topic and subscribe to + // it. + SnsTopicArn *string `type:"string"` + + // The type of source that is generating the events. For example, if you want + // to be notified of events generated by a DB instance, you would set this parameter + // to db-instance. if this value is not specified, all events are returned. + // + // Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot + SourceType *string `type:"string"` + + // The name of the event notification subscription. + // + // SubscriptionName is a required field + SubscriptionName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyEventSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyEventSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyEventSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyEventSubscriptionInput"} + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *ModifyEventSubscriptionInput) SetEnabled(v bool) *ModifyEventSubscriptionInput { + s.Enabled = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *ModifyEventSubscriptionInput) SetEventCategories(v []*string) *ModifyEventSubscriptionInput { + s.EventCategories = v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *ModifyEventSubscriptionInput) SetSnsTopicArn(v string) *ModifyEventSubscriptionInput { + s.SnsTopicArn = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *ModifyEventSubscriptionInput) SetSourceType(v string) *ModifyEventSubscriptionInput { + s.SourceType = &v + return s +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *ModifyEventSubscriptionInput) SetSubscriptionName(v string) *ModifyEventSubscriptionInput { + s.SubscriptionName = &v + return s +} + +type ModifyEventSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful invocation of the DescribeEventSubscriptions + // action. + EventSubscription *EventSubscription `type:"structure"` +} + +// String returns the string representation +func (s ModifyEventSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyEventSubscriptionOutput) GoString() string { + return s.String() +} + +// SetEventSubscription sets the EventSubscription field's value. +func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscription) *ModifyEventSubscriptionOutput { + s.EventSubscription = v + return s +} + +// Provides information on the option groups the DB instance is a member of. +type OptionGroupMembership struct { + _ struct{} `type:"structure"` + + // The name of the option group that the instance belongs to. + OptionGroupName *string `type:"string"` + + // The status of the DB instance's option group membership. Valid values are: + // in-sync, pending-apply, pending-removal, pending-maintenance-apply, pending-maintenance-removal, + // applying, removing, and failed. + Status *string `type:"string"` +} + +// String returns the string representation +func (s OptionGroupMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OptionGroupMembership) GoString() string { + return s.String() +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *OptionGroupMembership) SetOptionGroupName(v string) *OptionGroupMembership { + s.OptionGroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *OptionGroupMembership) SetStatus(v string) *OptionGroupMembership { + s.Status = &v + return s +} + +// Contains a list of available options for a DB instance. +// +// This data type is used as a response element in the DescribeOrderableDBInstanceOptions +// action. +type OrderableDBInstanceOption struct { + _ struct{} `type:"structure"` + + // A list of Availability Zones for a DB instance. + AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` + + // The DB instance class for a DB instance. + DBInstanceClass *string `type:"string"` + + // The engine type of a DB instance. + Engine *string `type:"string"` + + // The engine version of a DB instance. + EngineVersion *string `type:"string"` + + // The license model for a DB instance. + LicenseModel *string `type:"string"` + + // Maximum total provisioned IOPS for a DB instance. + MaxIopsPerDbInstance *int64 `type:"integer"` + + // Maximum provisioned IOPS per GiB for a DB instance. + MaxIopsPerGib *float64 `type:"double"` + + // Maximum storage size for a DB instance. + MaxStorageSize *int64 `type:"integer"` + + // Minimum total provisioned IOPS for a DB instance. + MinIopsPerDbInstance *int64 `type:"integer"` + + // Minimum provisioned IOPS per GiB for a DB instance. + MinIopsPerGib *float64 `type:"double"` + + // Minimum storage size for a DB instance. + MinStorageSize *int64 `type:"integer"` + + // Indicates whether a DB instance is Multi-AZ capable. + MultiAZCapable *bool `type:"boolean"` + + // Indicates whether a DB instance can have a Read Replica. + ReadReplicaCapable *bool `type:"boolean"` + + // Indicates the storage type for a DB instance. + StorageType *string `type:"string"` + + // Indicates whether a DB instance supports Enhanced Monitoring at intervals + // from 1 to 60 seconds. + SupportsEnhancedMonitoring *bool `type:"boolean"` + + // Indicates whether a DB instance supports IAM database authentication. + SupportsIAMDatabaseAuthentication *bool `type:"boolean"` + + // Indicates whether a DB instance supports provisioned IOPS. + SupportsIops *bool `type:"boolean"` + + // True if a DB instance supports Performance Insights, otherwise false. + SupportsPerformanceInsights *bool `type:"boolean"` + + // Indicates whether a DB instance supports encrypted storage. + SupportsStorageEncryption *bool `type:"boolean"` + + // Indicates whether a DB instance is in a VPC. + Vpc *bool `type:"boolean"` +} + +// String returns the string representation +func (s OrderableDBInstanceOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrderableDBInstanceOption) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { + s.AvailabilityZones = v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { + s.DBInstanceClass = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *OrderableDBInstanceOption) SetEngineVersion(v string) *OrderableDBInstanceOption { + s.EngineVersion = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstanceOption { + s.LicenseModel = &v + return s +} + +// SetMaxIopsPerDbInstance sets the MaxIopsPerDbInstance field's value. +func (s *OrderableDBInstanceOption) SetMaxIopsPerDbInstance(v int64) *OrderableDBInstanceOption { + s.MaxIopsPerDbInstance = &v + return s +} + +// SetMaxIopsPerGib sets the MaxIopsPerGib field's value. +func (s *OrderableDBInstanceOption) SetMaxIopsPerGib(v float64) *OrderableDBInstanceOption { + s.MaxIopsPerGib = &v + return s +} + +// SetMaxStorageSize sets the MaxStorageSize field's value. +func (s *OrderableDBInstanceOption) SetMaxStorageSize(v int64) *OrderableDBInstanceOption { + s.MaxStorageSize = &v + return s +} + +// SetMinIopsPerDbInstance sets the MinIopsPerDbInstance field's value. +func (s *OrderableDBInstanceOption) SetMinIopsPerDbInstance(v int64) *OrderableDBInstanceOption { + s.MinIopsPerDbInstance = &v + return s +} + +// SetMinIopsPerGib sets the MinIopsPerGib field's value. +func (s *OrderableDBInstanceOption) SetMinIopsPerGib(v float64) *OrderableDBInstanceOption { + s.MinIopsPerGib = &v + return s +} + +// SetMinStorageSize sets the MinStorageSize field's value. +func (s *OrderableDBInstanceOption) SetMinStorageSize(v int64) *OrderableDBInstanceOption { + s.MinStorageSize = &v + return s +} + +// SetMultiAZCapable sets the MultiAZCapable field's value. +func (s *OrderableDBInstanceOption) SetMultiAZCapable(v bool) *OrderableDBInstanceOption { + s.MultiAZCapable = &v + return s +} + +// SetReadReplicaCapable sets the ReadReplicaCapable field's value. +func (s *OrderableDBInstanceOption) SetReadReplicaCapable(v bool) *OrderableDBInstanceOption { + s.ReadReplicaCapable = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *OrderableDBInstanceOption) SetStorageType(v string) *OrderableDBInstanceOption { + s.StorageType = &v + return s +} + +// SetSupportsEnhancedMonitoring sets the SupportsEnhancedMonitoring field's value. +func (s *OrderableDBInstanceOption) SetSupportsEnhancedMonitoring(v bool) *OrderableDBInstanceOption { + s.SupportsEnhancedMonitoring = &v + return s +} + +// SetSupportsIAMDatabaseAuthentication sets the SupportsIAMDatabaseAuthentication field's value. +func (s *OrderableDBInstanceOption) SetSupportsIAMDatabaseAuthentication(v bool) *OrderableDBInstanceOption { + s.SupportsIAMDatabaseAuthentication = &v + return s +} + +// SetSupportsIops sets the SupportsIops field's value. +func (s *OrderableDBInstanceOption) SetSupportsIops(v bool) *OrderableDBInstanceOption { + s.SupportsIops = &v + return s +} + +// SetSupportsPerformanceInsights sets the SupportsPerformanceInsights field's value. +func (s *OrderableDBInstanceOption) SetSupportsPerformanceInsights(v bool) *OrderableDBInstanceOption { + s.SupportsPerformanceInsights = &v + return s +} + +// SetSupportsStorageEncryption sets the SupportsStorageEncryption field's value. +func (s *OrderableDBInstanceOption) SetSupportsStorageEncryption(v bool) *OrderableDBInstanceOption { + s.SupportsStorageEncryption = &v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *OrderableDBInstanceOption) SetVpc(v bool) *OrderableDBInstanceOption { + s.Vpc = &v + return s +} + +// This data type is used as a request parameter in the ModifyDBParameterGroup +// and ResetDBParameterGroup actions. +// +// This data type is used as a response element in the DescribeEngineDefaultParameters +// and DescribeDBParameters actions. +type Parameter struct { + _ struct{} `type:"structure"` + + // Specifies the valid range of values for the parameter. + AllowedValues *string `type:"string"` + + // Indicates when to apply parameter updates. + ApplyMethod *string `type:"string" enum:"ApplyMethod"` + + // Specifies the engine specific parameters type. + ApplyType *string `type:"string"` + + // Specifies the valid data type for the parameter. + DataType *string `type:"string"` + + // Provides a description of the parameter. + Description *string `type:"string"` + + // Indicates whether (true) or not (false) the parameter can be modified. Some + // parameters have security or operational implications that prevent them from + // being changed. + IsModifiable *bool `type:"boolean"` + + // The earliest engine version to which the parameter can apply. + MinimumEngineVersion *string `type:"string"` + + // Specifies the name of the parameter. + ParameterName *string `type:"string"` + + // Specifies the value of the parameter. + ParameterValue *string `type:"string"` + + // Indicates the source of the parameter value. + Source *string `type:"string"` +} + +// String returns the string representation +func (s Parameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Parameter) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *Parameter) SetAllowedValues(v string) *Parameter { + s.AllowedValues = &v + return s +} + +// SetApplyMethod sets the ApplyMethod field's value. +func (s *Parameter) SetApplyMethod(v string) *Parameter { + s.ApplyMethod = &v + return s +} + +// SetApplyType sets the ApplyType field's value. +func (s *Parameter) SetApplyType(v string) *Parameter { + s.ApplyType = &v + return s +} + +// SetDataType sets the DataType field's value. +func (s *Parameter) SetDataType(v string) *Parameter { + s.DataType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Parameter) SetDescription(v string) *Parameter { + s.Description = &v + return s +} + +// SetIsModifiable sets the IsModifiable field's value. +func (s *Parameter) SetIsModifiable(v bool) *Parameter { + s.IsModifiable = &v + return s +} + +// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. +func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { + s.MinimumEngineVersion = &v + return s +} + +// SetParameterName sets the ParameterName field's value. +func (s *Parameter) SetParameterName(v string) *Parameter { + s.ParameterName = &v + return s +} + +// SetParameterValue sets the ParameterValue field's value. +func (s *Parameter) SetParameterValue(v string) *Parameter { + s.ParameterValue = &v + return s +} + +// SetSource sets the Source field's value. +func (s *Parameter) SetSource(v string) *Parameter { + s.Source = &v + return s +} + +// A list of the log types whose configuration is still pending. In other words, +// these log types are in the process of being activated or deactivated. +type PendingCloudwatchLogsExports struct { + _ struct{} `type:"structure"` + + // Log types that are in the process of being enabled. After they are enabled, + // these log types are exported to CloudWatch Logs. + LogTypesToDisable []*string `type:"list"` + + // Log types that are in the process of being deactivated. After they are deactivated, + // these log types aren't exported to CloudWatch Logs. + LogTypesToEnable []*string `type:"list"` +} + +// String returns the string representation +func (s PendingCloudwatchLogsExports) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingCloudwatchLogsExports) GoString() string { + return s.String() +} + +// SetLogTypesToDisable sets the LogTypesToDisable field's value. +func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports { + s.LogTypesToDisable = v + return s +} + +// SetLogTypesToEnable sets the LogTypesToEnable field's value. +func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports { + s.LogTypesToEnable = v + return s +} + +// Provides information about a pending maintenance action for a resource. +type PendingMaintenanceAction struct { + _ struct{} `type:"structure"` + + // The type of pending maintenance action that is available for the resource. + Action *string `type:"string"` + + // The date of the maintenance window when the action is applied. The maintenance + // action is applied to the resource during its first maintenance window after + // this date. If this date is specified, any next-maintenance opt-in requests + // are ignored. + AutoAppliedAfterDate *time.Time `type:"timestamp"` + + // The effective date when the pending maintenance action is applied to the + // resource. This date takes into account opt-in requests received from the + // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. + // This value is blank if an opt-in request has not been received and nothing + // has been specified as AutoAppliedAfterDate or ForcedApplyDate. + CurrentApplyDate *time.Time `type:"timestamp"` + + // A description providing more detail about the maintenance action. + Description *string `type:"string"` + + // The date when the maintenance action is automatically applied. The maintenance + // action is applied to the resource on this date regardless of the maintenance + // window for the resource. If this date is specified, any immediate opt-in + // requests are ignored. + ForcedApplyDate *time.Time `type:"timestamp"` + + // Indicates the type of opt-in request that has been received for the resource. + OptInStatus *string `type:"string"` +} + +// String returns the string representation +func (s PendingMaintenanceAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingMaintenanceAction) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { + s.Action = &v + return s +} + +// SetAutoAppliedAfterDate sets the AutoAppliedAfterDate field's value. +func (s *PendingMaintenanceAction) SetAutoAppliedAfterDate(v time.Time) *PendingMaintenanceAction { + s.AutoAppliedAfterDate = &v + return s +} + +// SetCurrentApplyDate sets the CurrentApplyDate field's value. +func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { + s.CurrentApplyDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { + s.Description = &v + return s +} + +// SetForcedApplyDate sets the ForcedApplyDate field's value. +func (s *PendingMaintenanceAction) SetForcedApplyDate(v time.Time) *PendingMaintenanceAction { + s.ForcedApplyDate = &v + return s +} + +// SetOptInStatus sets the OptInStatus field's value. +func (s *PendingMaintenanceAction) SetOptInStatus(v string) *PendingMaintenanceAction { + s.OptInStatus = &v + return s +} + +// This data type is used as a response element in the ModifyDBInstance action. +type PendingModifiedValues struct { + _ struct{} `type:"structure"` + + // Contains the new AllocatedStorage size for the DB instance that will be applied + // or is currently being applied. + AllocatedStorage *int64 `type:"integer"` + + // Specifies the pending number of days for which automated backups are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // Specifies the identifier of the CA certificate for the DB instance. + CACertificateIdentifier *string `type:"string"` + + // Contains the new DBInstanceClass for the DB instance that will be applied + // or is currently being applied. + DBInstanceClass *string `type:"string"` + + // Contains the new DBInstanceIdentifier for the DB instance that will be applied + // or is currently being applied. + DBInstanceIdentifier *string `type:"string"` + + // The new DB subnet group for the DB instance. + DBSubnetGroupName *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // Specifies the new Provisioned IOPS value for the DB instance that will be + // applied or is currently being applied. + Iops *int64 `type:"integer"` + + // The license model for the DB instance. + // + // Valid values: license-included | bring-your-own-license | general-public-license + LicenseModel *string `type:"string"` + + // Contains the pending or currently-in-progress change of the master credentials + // for the DB instance. + MasterUserPassword *string `type:"string"` + + // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. + MultiAZ *bool `type:"boolean"` + + // A list of the log types whose configuration is still pending. In other words, + // these log types are in the process of being activated or deactivated. + PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"` + + // Specifies the pending port for the DB instance. + Port *int64 `type:"integer"` + + // Specifies the storage type to be associated with the DB instance. + StorageType *string `type:"string"` +} + +// String returns the string representation +func (s PendingModifiedValues) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingModifiedValues) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *PendingModifiedValues) SetAllocatedStorage(v int64) *PendingModifiedValues { + s.AllocatedStorage = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *PendingModifiedValues) SetBackupRetentionPeriod(v int64) *PendingModifiedValues { + s.BackupRetentionPeriod = &v + return s +} + +// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. +func (s *PendingModifiedValues) SetCACertificateIdentifier(v string) *PendingModifiedValues { + s.CACertificateIdentifier = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *PendingModifiedValues) SetDBInstanceClass(v string) *PendingModifiedValues { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *PendingModifiedValues) SetDBInstanceIdentifier(v string) *PendingModifiedValues { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *PendingModifiedValues) SetDBSubnetGroupName(v string) *PendingModifiedValues { + s.DBSubnetGroupName = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { + s.EngineVersion = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *PendingModifiedValues) SetIops(v int64) *PendingModifiedValues { + s.Iops = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *PendingModifiedValues) SetLicenseModel(v string) *PendingModifiedValues { + s.LicenseModel = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { + s.MasterUserPassword = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues { + s.MultiAZ = &v + return s +} + +// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value. +func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues { + s.PendingCloudwatchLogsExports = v + return s +} + +// SetPort sets the Port field's value. +func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { + s.Port = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { + s.StorageType = &v + return s +} + +type PromoteReadReplicaDBClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier of the DB cluster Read Replica to promote. This parameter + // is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster Read Replica. + // + // Example: my-cluster-replica1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PromoteReadReplicaDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PromoteReadReplicaDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PromoteReadReplicaDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PromoteReadReplicaDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *PromoteReadReplicaDBClusterInput) SetDBClusterIdentifier(v string) *PromoteReadReplicaDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +type PromoteReadReplicaDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s PromoteReadReplicaDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PromoteReadReplicaDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *PromoteReadReplicaDBClusterOutput) SetDBCluster(v *DBCluster) *PromoteReadReplicaDBClusterOutput { + s.DBCluster = v + return s +} + +// A range of integer values. +type Range struct { + _ struct{} `type:"structure"` + + // The minimum value in the range. + From *int64 `type:"integer"` + + // The step value for the range. For example, if you have a range of 5,000 to + // 10,000, with a step value of 1,000, the valid values start at 5,000 and step + // up by 1,000. Even though 7,500 is within the range, it isn't a valid value + // for the range. The valid values are 5,000, 6,000, 7,000, 8,000... + Step *int64 `type:"integer"` + + // The maximum value in the range. + To *int64 `type:"integer"` +} + +// String returns the string representation +func (s Range) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Range) GoString() string { + return s.String() +} + +// SetFrom sets the From field's value. +func (s *Range) SetFrom(v int64) *Range { + s.From = &v + return s +} + +// SetStep sets the Step field's value. +func (s *Range) SetStep(v int64) *Range { + s.Step = &v + return s +} + +// SetTo sets the To field's value. +func (s *Range) SetTo(v int64) *Range { + s.To = &v + return s +} + +type RebootDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The DB instance identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must match the identifier of an existing DBInstance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // When true, the reboot is conducted through a MultiAZ failover. + // + // Constraint: You can't specify true if the instance is not configured for + // MultiAZ. + ForceFailover *bool `type:"boolean"` +} + +// String returns the string representation +func (s RebootDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *RebootDBInstanceInput) SetDBInstanceIdentifier(v string) *RebootDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetForceFailover sets the ForceFailover field's value. +func (s *RebootDBInstanceInput) SetForceFailover(v bool) *RebootDBInstanceInput { + s.ForceFailover = &v + return s +} + +type RebootDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB instance. + // + // This data type is used as a response element in the DescribeDBInstances action. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s RebootDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *RebootDBInstanceOutput) SetDBInstance(v *DBInstance) *RebootDBInstanceOutput { + s.DBInstance = v + return s +} + +type RemoveRoleFromDBClusterInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster to disassociate the IAM role from. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB + // cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveRoleFromDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRoleFromDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveRoleFromDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *RemoveRoleFromDBClusterInput) SetDBClusterIdentifier(v string) *RemoveRoleFromDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *RemoveRoleFromDBClusterInput) SetRoleArn(v string) *RemoveRoleFromDBClusterInput { + s.RoleArn = &v + return s +} + +type RemoveRoleFromDBClusterOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveRoleFromDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRoleFromDBClusterOutput) GoString() string { + return s.String() +} + +type RemoveSourceIdentifierFromSubscriptionInput struct { + _ struct{} `type:"structure"` + + // The source identifier to be removed from the subscription, such as the DB + // instance identifier for a DB instance or the name of a security group. + // + // SourceIdentifier is a required field + SourceIdentifier *string `type:"string" required:"true"` + + // The name of the event notification subscription you want to remove a source + // identifier from. + // + // SubscriptionName is a required field + SubscriptionName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveSourceIdentifierFromSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveSourceIdentifierFromSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveSourceIdentifierFromSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveSourceIdentifierFromSubscriptionInput"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SubscriptionName == nil { + invalidParams.Add(request.NewErrParamRequired("SubscriptionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSourceIdentifier(v string) *RemoveSourceIdentifierFromSubscriptionInput { + s.SourceIdentifier = &v + return s +} + +// SetSubscriptionName sets the SubscriptionName field's value. +func (s *RemoveSourceIdentifierFromSubscriptionInput) SetSubscriptionName(v string) *RemoveSourceIdentifierFromSubscriptionInput { + s.SubscriptionName = &v + return s +} + +type RemoveSourceIdentifierFromSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Contains the results of a successful invocation of the DescribeEventSubscriptions + // action. + EventSubscription *EventSubscription `type:"structure"` +} + +// String returns the string representation +func (s RemoveSourceIdentifierFromSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveSourceIdentifierFromSubscriptionOutput) GoString() string { + return s.String() +} + +// SetEventSubscription sets the EventSubscription field's value. +func (s *RemoveSourceIdentifierFromSubscriptionOutput) SetEventSubscription(v *EventSubscription) *RemoveSourceIdentifierFromSubscriptionOutput { + s.EventSubscription = v + return s +} + +type RemoveTagsFromResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Neptune resource that the tags are removed from. This value is + // an Amazon Resource Name (ARN). For information about creating an ARN, see + // Constructing an Amazon Resource Name (ARN) (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // The tag key (name) of the tag to be removed. + // + // TagKeys is a required field + TagKeys []*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.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { + s.ResourceName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { + s.TagKeys = v + return s +} + +type RemoveTagsFromResourceOutput struct { + _ struct{} `type:"structure"` +} + +// 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() +} + +type ResetDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group to reset. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // A list of parameter names in the DB cluster parameter group to reset to the + // default values. You can't use this parameter if the ResetAllParameters parameter + // is set to true. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` + + // A value that is set to true to reset all parameters in the DB cluster parameter + // group to their default values, and false otherwise. You can't use this parameter + // if there is a list of parameter names specified for the Parameters parameter. + ResetAllParameters *bool `type:"boolean"` +} + +// String returns the string representation +func (s ResetDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ResetDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ResetDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetDBClusterParameterGroupInput { + s.Parameters = v + return s +} + +// SetResetAllParameters sets the ResetAllParameters field's value. +func (s *ResetDBClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetDBClusterParameterGroupInput { + s.ResetAllParameters = &v + return s +} + +type ResetDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group. + // + // Constraints: + // + // * Must be 1 to 255 letters or numbers. + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // This value is stored as a lowercase string. + DBClusterParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ResetDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ResetDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupOutput { + s.DBClusterParameterGroupName = &v + return s +} + +type ResetDBParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB parameter group. + // + // Constraints: + // + // * Must match the name of an existing DBParameterGroup. + // + // DBParameterGroupName is a required field + DBParameterGroupName *string `type:"string" required:"true"` + + // To reset the entire DB parameter group, specify the DBParameterGroup name + // and ResetAllParameters parameters. To reset specific parameters, provide + // a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters + // can be modified in a single request. + // + // Valid Values (for Apply method): pending-reboot + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` + + // Specifies whether (true) or not (false) to reset all parameters in the DB + // parameter group to default values. + // + // Default: true + ResetAllParameters *bool `type:"boolean"` +} + +// String returns the string representation +func (s ResetDBParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDBParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDBParameterGroupInput"} + if s.DBParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *ResetDBParameterGroupInput) SetDBParameterGroupName(v string) *ResetDBParameterGroupInput { + s.DBParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ResetDBParameterGroupInput) SetParameters(v []*Parameter) *ResetDBParameterGroupInput { + s.Parameters = v + return s +} + +// SetResetAllParameters sets the ResetAllParameters field's value. +func (s *ResetDBParameterGroupInput) SetResetAllParameters(v bool) *ResetDBParameterGroupInput { + s.ResetAllParameters = &v + return s +} + +// Contains the result of a successful invocation of the ModifyDBParameterGroup +// or ResetDBParameterGroup action. +type ResetDBParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Provides the name of the DB parameter group. + DBParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ResetDBParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *ResetDBParameterGroupOutput) SetDBParameterGroupName(v string) *ResetDBParameterGroupOutput { + s.DBParameterGroupName = &v + return s +} + +// Describes the pending maintenance actions for a resource. +type ResourcePendingMaintenanceActions struct { + _ struct{} `type:"structure"` + + // A list that provides details about the pending maintenance actions for the + // resource. + PendingMaintenanceActionDetails []*PendingMaintenanceAction `locationNameList:"PendingMaintenanceAction" type:"list"` + + // The ARN of the resource that has pending maintenance actions. + ResourceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s ResourcePendingMaintenanceActions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourcePendingMaintenanceActions) GoString() string { + return s.String() +} + +// SetPendingMaintenanceActionDetails sets the PendingMaintenanceActionDetails field's value. +func (s *ResourcePendingMaintenanceActions) SetPendingMaintenanceActionDetails(v []*PendingMaintenanceAction) *ResourcePendingMaintenanceActions { + s.PendingMaintenanceActionDetails = v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *ResourcePendingMaintenanceActions { + s.ResourceIdentifier = &v + return s +} + +type RestoreDBClusterFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // Provides the list of EC2 Availability Zones that instances in the restored + // DB cluster can be created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. + // This parameter isn't case-sensitive. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // Example: my-snapshot-id + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB subnet group to use for the new DB cluster. + // + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // The database name for the restored DB cluster. + DatabaseName *string `type:"string"` + + // True to enable mapping of AWS Identity and Access Management (IAM) accounts + // to database accounts, and otherwise false. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // The database engine to use for the new DB cluster. + // + // Default: The same as source + // + // Constraint: Must be compatible with the engine of the source + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The version of the database engine to use for the new DB cluster. + EngineVersion *string `type:"string"` + + // The AWS KMS key identifier to use when restoring an encrypted DB cluster + // from a DB snapshot or DB cluster snapshot. + // + // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption + // key. If you are restoring a DB cluster with the same AWS account that owns + // the KMS encryption key used to encrypt the new DB cluster, then you can use + // the KMS key alias instead of the ARN for the KMS encryption key. + // + // If you do not specify a value for the KmsKeyId parameter, then the following + // will occur: + // + // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, + // then the restored DB cluster is encrypted using the KMS key that was used + // to encrypt the DB snapshot or DB cluster snapshot. + // + // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is not + // encrypted, then the restored DB cluster is not encrypted. + KmsKeyId *string `type:"string"` + + // The name of the option group to use for the restored DB cluster. + OptionGroupName *string `type:"string"` + + // The port number on which the new DB cluster accepts connections. + // + // Constraints: Value must be 1150-65535 + // + // Default: The same port as the original DB cluster. + Port *int64 `type:"integer"` + + // The identifier for the DB snapshot or DB cluster snapshot to restore from. + // + // You can use either the name or the Amazon Resource Name (ARN) to specify + // a DB cluster snapshot. However, you can use only the ARN to specify a DB + // snapshot. + // + // Constraints: + // + // * Must match the identifier of an existing Snapshot. + // + // SnapshotIdentifier is a required field + SnapshotIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the restored DB cluster. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A list of VPC security groups that the new DB cluster will belong to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s RestoreDBClusterFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *RestoreDBClusterFromSnapshotInput { + s.AvailabilityZones = v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { + s.DBSubnetGroupName = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDBClusterFromSnapshotInput { + s.DatabaseName = &v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromSnapshotInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBClusterFromSnapshotInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { + s.EngineVersion = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetKmsKeyId(v string) *RestoreDBClusterFromSnapshotInput { + s.KmsKeyId = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetOptionGroupName(v string) *RestoreDBClusterFromSnapshotInput { + s.OptionGroupName = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFromSnapshotInput { + s.Port = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { + s.SnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetTags(v []*Tag) *RestoreDBClusterFromSnapshotInput { + s.Tags = v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromSnapshotInput { + s.VpcSecurityGroupIds = v + return s +} + +type RestoreDBClusterFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s RestoreDBClusterFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterFromSnapshotOutput { + s.DBCluster = v + return s +} + +type RestoreDBClusterToPointInTimeInput struct { + _ struct{} `type:"structure"` + + // The name of the new DB cluster to be created. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The DB subnet group name to use for the new DB cluster. + // + // Constraints: If supplied, must match the name of an existing DBSubnetGroup. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // True to enable mapping of AWS Identity and Access Management (IAM) accounts + // to database accounts, and otherwise false. + // + // Default: false + EnableIAMDatabaseAuthentication *bool `type:"boolean"` + + // The AWS KMS key identifier to use when restoring an encrypted DB cluster + // from an encrypted DB cluster. + // + // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption + // key. If you are restoring a DB cluster with the same AWS account that owns + // the KMS encryption key used to encrypt the new DB cluster, then you can use + // the KMS key alias instead of the ARN for the KMS encryption key. + // + // You can restore to a new DB cluster and encrypt the new DB cluster with a + // KMS key that is different than the KMS key used to encrypt the source DB + // cluster. The new DB cluster is encrypted with the KMS key identified by the + // KmsKeyId parameter. + // + // If you do not specify a value for the KmsKeyId parameter, then the following + // will occur: + // + // * If the DB cluster is encrypted, then the restored DB cluster is encrypted + // using the KMS key that was used to encrypt the source DB cluster. + // + // * If the DB cluster is not encrypted, then the restored DB cluster is + // not encrypted. + // + // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then + // the restore request is rejected. + KmsKeyId *string `type:"string"` + + // The name of the option group for the new DB cluster. + OptionGroupName *string `type:"string"` + + // The port number on which the new DB cluster accepts connections. + // + // Constraints: Value must be 1150-65535 + // + // Default: The same port as the original DB cluster. + Port *int64 `type:"integer"` + + // The date and time to restore the DB cluster to. + // + // Valid Values: Value must be a time in Universal Coordinated Time (UTC) format + // + // Constraints: + // + // * Must be before the latest restorable time for the DB instance + // + // * Must be specified if UseLatestRestorableTime parameter is not provided + // + // * Cannot be specified if UseLatestRestorableTime parameter is true + // + // * Cannot be specified if RestoreType parameter is copy-on-write + // + // Example: 2015-03-07T23:45:00Z + RestoreToTime *time.Time `type:"timestamp"` + + // The type of restore to be performed. You can specify one of the following + // values: + // + // * full-copy - The new DB cluster is restored as a full copy of the source + // DB cluster. + // + // * copy-on-write - The new DB cluster is restored as a clone of the source + // DB cluster. + // + // Constraints: You can't specify copy-on-write if the engine version of the + // source DB cluster is earlier than 1.11. + // + // If you don't specify a RestoreType value, then the new DB cluster is restored + // as a full copy of the source DB cluster. + RestoreType *string `type:"string"` + + // The identifier of the source DB cluster from which to restore. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // SourceDBClusterIdentifier is a required field + SourceDBClusterIdentifier *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon Neptune Resources + // (http://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html). + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A value that is set to true to restore the DB cluster to the latest restorable + // backup time, and false otherwise. + // + // Default: false + // + // Constraints: Cannot be specified if RestoreToTime parameter is provided. + UseLatestRestorableTime *bool `type:"boolean"` + + // A list of VPC security groups that the new DB cluster belongs to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s RestoreDBClusterToPointInTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterToPointInTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterToPointInTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.SourceDBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { + s.DBSubnetGroupName = &v + return s +} + +// SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterToPointInTimeInput { + s.EnableIAMDatabaseAuthentication = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetKmsKeyId(v string) *RestoreDBClusterToPointInTimeInput { + s.KmsKeyId = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetOptionGroupName(v string) *RestoreDBClusterToPointInTimeInput { + s.OptionGroupName = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetPort(v int64) *RestoreDBClusterToPointInTimeInput { + s.Port = &v + return s +} + +// SetRestoreToTime sets the RestoreToTime field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput { + s.RestoreToTime = &v + return s +} + +// SetRestoreType sets the RestoreType field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetRestoreType(v string) *RestoreDBClusterToPointInTimeInput { + s.RestoreType = &v + return s +} + +// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetSourceDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { + s.SourceDBClusterIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetTags(v []*Tag) *RestoreDBClusterToPointInTimeInput { + s.Tags = v + return s +} + +// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBClusterToPointInTimeInput { + s.UseLatestRestorableTime = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterToPointInTimeInput { + s.VpcSecurityGroupIds = v + return s +} + +type RestoreDBClusterToPointInTimeOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Neptune DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters action. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s RestoreDBClusterToPointInTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterToPointInTimeOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterToPointInTimeOutput { + s.DBCluster = v + return s +} + +// This data type is used as a response element in the DescribeDBSubnetGroups +// action. +type Subnet struct { + _ struct{} `type:"structure"` + + // Contains Availability Zone information. + // + // This data type is used as an element in the following data type: + // + // * OrderableDBInstanceOption + SubnetAvailabilityZone *AvailabilityZone `type:"structure"` + + // Specifies the identifier of the subnet. + SubnetIdentifier *string `type:"string"` + + // Specifies the status of the subnet. + SubnetStatus *string `type:"string"` +} + +// String returns the string representation +func (s Subnet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subnet) GoString() string { + return s.String() +} + +// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. +func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { + s.SubnetAvailabilityZone = v + return s +} + +// SetSubnetIdentifier sets the SubnetIdentifier field's value. +func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { + s.SubnetIdentifier = &v + return s +} + +// SetSubnetStatus sets the SubnetStatus field's value. +func (s *Subnet) SetSubnetStatus(v string) *Subnet { + s.SubnetStatus = &v + return s +} + +// Metadata assigned to an Amazon Neptune resource consisting of a key-value +// pair. +type Tag struct { + _ struct{} `type:"structure"` + + // A key is the required name of the tag. The string value can be from 1 to + // 128 Unicode characters in length and can't be prefixed with "aws:" or "rds:". + // The string can only contain only the set of Unicode letters, digits, white-space, + // '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). + Key *string `type:"string"` + + // A value is the optional value of the tag. The string value can be from 1 + // to 256 Unicode characters in length and can't be prefixed with "aws:" or + // "rds:". The string can only contain only the set of Unicode letters, digits, + // white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). + Value *string `type:"string"` +} + +// 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() +} + +// 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 +} + +// A time zone associated with a DBInstance. This data type is an element in +// the response to the DescribeDBInstances, and the DescribeDBEngineVersions +// actions. +type Timezone struct { + _ struct{} `type:"structure"` + + // The name of the time zone. + TimezoneName *string `type:"string"` +} + +// String returns the string representation +func (s Timezone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Timezone) GoString() string { + return s.String() +} + +// SetTimezoneName sets the TimezoneName field's value. +func (s *Timezone) SetTimezoneName(v string) *Timezone { + s.TimezoneName = &v + return s +} + +// The version of the database engine that a DB instance can be upgraded to. +type UpgradeTarget struct { + _ struct{} `type:"structure"` + + // A value that indicates whether the target version is applied to any source + // DB instances that have AutoMinorVersionUpgrade set to true. + AutoUpgrade *bool `type:"boolean"` + + // The version of the database engine that a DB instance can be upgraded to. + Description *string `type:"string"` + + // The name of the upgrade target database engine. + Engine *string `type:"string"` + + // The version number of the upgrade target database engine. + EngineVersion *string `type:"string"` + + // A value that indicates whether a database engine is upgraded to a major version. + IsMajorVersionUpgrade *bool `type:"boolean"` +} + +// String returns the string representation +func (s UpgradeTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeTarget) GoString() string { + return s.String() +} + +// SetAutoUpgrade sets the AutoUpgrade field's value. +func (s *UpgradeTarget) SetAutoUpgrade(v bool) *UpgradeTarget { + s.AutoUpgrade = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpgradeTarget) SetDescription(v string) *UpgradeTarget { + s.Description = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpgradeTarget) SetEngineVersion(v string) *UpgradeTarget { + s.EngineVersion = &v + return s +} + +// SetIsMajorVersionUpgrade sets the IsMajorVersionUpgrade field's value. +func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { + s.IsMajorVersionUpgrade = &v + return s +} + +// Information about valid modifications that you can make to your DB instance. +// Contains the result of a successful call to the DescribeValidDBInstanceModifications +// action. You can use this information when you call ModifyDBInstance. +type ValidDBInstanceModificationsMessage struct { + _ struct{} `type:"structure"` + + // Valid storage options for your DB instance. + Storage []*ValidStorageOptions `locationNameList:"ValidStorageOptions" type:"list"` +} + +// String returns the string representation +func (s ValidDBInstanceModificationsMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidDBInstanceModificationsMessage) GoString() string { + return s.String() +} + +// SetStorage sets the Storage field's value. +func (s *ValidDBInstanceModificationsMessage) SetStorage(v []*ValidStorageOptions) *ValidDBInstanceModificationsMessage { + s.Storage = v + return s +} + +// Information about valid modifications that you can make to your DB instance. +// Contains the result of a successful call to the DescribeValidDBInstanceModifications +// action. +type ValidStorageOptions struct { + _ struct{} `type:"structure"` + + // The valid range of Provisioned IOPS to gibibytes of storage multiplier. For + // example, 3-10, which means that provisioned IOPS can be between 3 and 10 + // times storage. + IopsToStorageRatio []*DoubleRange `locationNameList:"DoubleRange" type:"list"` + + // The valid range of provisioned IOPS. For example, 1000-20000. + ProvisionedIops []*Range `locationNameList:"Range" type:"list"` + + // The valid range of storage in gibibytes. For example, 100 to 16384. + StorageSize []*Range `locationNameList:"Range" type:"list"` + + // The valid storage types for your DB instance. For example, gp2, io1. + StorageType *string `type:"string"` +} + +// String returns the string representation +func (s ValidStorageOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidStorageOptions) GoString() string { + return s.String() +} + +// SetIopsToStorageRatio sets the IopsToStorageRatio field's value. +func (s *ValidStorageOptions) SetIopsToStorageRatio(v []*DoubleRange) *ValidStorageOptions { + s.IopsToStorageRatio = v + return s +} + +// SetProvisionedIops sets the ProvisionedIops field's value. +func (s *ValidStorageOptions) SetProvisionedIops(v []*Range) *ValidStorageOptions { + s.ProvisionedIops = v + return s +} + +// SetStorageSize sets the StorageSize field's value. +func (s *ValidStorageOptions) SetStorageSize(v []*Range) *ValidStorageOptions { + s.StorageSize = v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *ValidStorageOptions) SetStorageType(v string) *ValidStorageOptions { + s.StorageType = &v + return s +} + +// This data type is used as a response element for queries on VPC security +// group membership. +type VpcSecurityGroupMembership struct { + _ struct{} `type:"structure"` + + // The status of the VPC security group. + Status *string `type:"string"` + + // The name of the VPC security group. + VpcSecurityGroupId *string `type:"string"` +} + +// String returns the string representation +func (s VpcSecurityGroupMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcSecurityGroupMembership) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { + s.Status = &v + return s +} + +// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. +func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { + s.VpcSecurityGroupId = &v + return s +} + +const ( + // ApplyMethodImmediate is a ApplyMethod enum value + ApplyMethodImmediate = "immediate" + + // ApplyMethodPendingReboot is a ApplyMethod enum value + ApplyMethodPendingReboot = "pending-reboot" +) + +const ( + // SourceTypeDbInstance is a SourceType enum value + SourceTypeDbInstance = "db-instance" + + // SourceTypeDbParameterGroup is a SourceType enum value + SourceTypeDbParameterGroup = "db-parameter-group" + + // SourceTypeDbSecurityGroup is a SourceType enum value + SourceTypeDbSecurityGroup = "db-security-group" + + // SourceTypeDbSnapshot is a SourceType enum value + SourceTypeDbSnapshot = "db-snapshot" + + // SourceTypeDbCluster is a SourceType enum value + SourceTypeDbCluster = "db-cluster" + + // SourceTypeDbClusterSnapshot is a SourceType enum value + SourceTypeDbClusterSnapshot = "db-cluster-snapshot" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go new file mode 100644 index 000000000..503af8466 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/doc.go @@ -0,0 +1,48 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package neptune provides the client and types for making API +// requests to Amazon Neptune. +// +// Amazon Neptune is a fast, reliable, fully-managed graph database service +// that makes it easy to build and run applications that work with highly connected +// datasets. The core of Amazon Neptune is a purpose-built, high-performance +// graph database engine optimized for storing billions of relationships and +// querying the graph with milliseconds latency. Amazon Neptune supports popular +// graph models Property Graph and W3C's RDF, and their respective query languages +// Apache TinkerPop Gremlin and SPARQL, allowing you to easily build queries +// that efficiently navigate highly connected datasets. Neptune powers graph +// use cases such as recommendation engines, fraud detection, knowledge graphs, +// drug discovery, and network security. +// +// This interface reference for Amazon Neptune contains documentation for a +// programming or command line interface you can use to manage Amazon Neptune. +// Note that Amazon Neptune is asynchronous, which means that some interfaces +// might require techniques such as polling or callback functions to determine +// when a command has been applied. In this reference, the parameter descriptions +// indicate whether a command is applied immediately, on the next instance reboot, +// or during the maintenance window. The reference structure is as follows, +// and we list following some related topics from the user guide. +// +// Amazon Neptune API Reference +// +// See https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31 for more information on this service. +// +// See neptune package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/neptune/ +// +// Using the Client +// +// To contact Amazon Neptune 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 Neptune client Neptune for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/neptune/#New +package neptune diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go new file mode 100644 index 000000000..8c0c3f967 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/errors.go @@ -0,0 +1,361 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package neptune + +const ( + + // ErrCodeAuthorizationNotFoundFault for service response error code + // "AuthorizationNotFound". + // + // Specified CIDRIP or EC2 security group is not authorized for the specified + // DB security group. + // + // Neptune may not also be authorized via IAM to perform necessary actions on + // your behalf. + ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" + + // ErrCodeCertificateNotFoundFault for service response error code + // "CertificateNotFound". + // + // CertificateIdentifier does not refer to an existing certificate. + ErrCodeCertificateNotFoundFault = "CertificateNotFound" + + // ErrCodeDBClusterAlreadyExistsFault for service response error code + // "DBClusterAlreadyExistsFault". + // + // User already has a DB cluster with the given identifier. + ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" + + // ErrCodeDBClusterNotFoundFault for service response error code + // "DBClusterNotFoundFault". + // + // DBClusterIdentifier does not refer to an existing DB cluster. + ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" + + // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code + // "DBClusterParameterGroupNotFound". + // + // DBClusterParameterGroupName does not refer to an existing DB Cluster parameter + // group. + ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" + + // ErrCodeDBClusterQuotaExceededFault for service response error code + // "DBClusterQuotaExceededFault". + // + // User attempted to create a new DB cluster and the user has already reached + // the maximum allowed DB cluster quota. + ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" + + // ErrCodeDBClusterRoleAlreadyExistsFault for service response error code + // "DBClusterRoleAlreadyExists". + // + // The specified IAM role Amazon Resource Name (ARN) is already associated with + // the specified DB cluster. + ErrCodeDBClusterRoleAlreadyExistsFault = "DBClusterRoleAlreadyExists" + + // ErrCodeDBClusterRoleNotFoundFault for service response error code + // "DBClusterRoleNotFound". + // + // The specified IAM role Amazon Resource Name (ARN) is not associated with + // the specified DB cluster. + ErrCodeDBClusterRoleNotFoundFault = "DBClusterRoleNotFound" + + // ErrCodeDBClusterRoleQuotaExceededFault for service response error code + // "DBClusterRoleQuotaExceeded". + // + // You have exceeded the maximum number of IAM roles that can be associated + // with the specified DB cluster. + ErrCodeDBClusterRoleQuotaExceededFault = "DBClusterRoleQuotaExceeded" + + // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code + // "DBClusterSnapshotAlreadyExistsFault". + // + // User already has a DB cluster snapshot with the given identifier. + ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" + + // ErrCodeDBClusterSnapshotNotFoundFault for service response error code + // "DBClusterSnapshotNotFoundFault". + // + // DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. + ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" + + // ErrCodeDBInstanceAlreadyExistsFault for service response error code + // "DBInstanceAlreadyExists". + // + // User already has a DB instance with the given identifier. + ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" + + // ErrCodeDBInstanceNotFoundFault for service response error code + // "DBInstanceNotFound". + // + // DBInstanceIdentifier does not refer to an existing DB instance. + ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" + + // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code + // "DBParameterGroupAlreadyExists". + // + // A DB parameter group with the same name exists. + ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists" + + // ErrCodeDBParameterGroupNotFoundFault for service response error code + // "DBParameterGroupNotFound". + // + // DBParameterGroupName does not refer to an existing DB parameter group. + ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" + + // ErrCodeDBParameterGroupQuotaExceededFault for service response error code + // "DBParameterGroupQuotaExceeded". + // + // Request would result in user exceeding the allowed number of DB parameter + // groups. + ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" + + // ErrCodeDBSecurityGroupNotFoundFault for service response error code + // "DBSecurityGroupNotFound". + // + // DBSecurityGroupName does not refer to an existing DB security group. + ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" + + // ErrCodeDBSnapshotAlreadyExistsFault for service response error code + // "DBSnapshotAlreadyExists". + // + // DBSnapshotIdentifier is already used by an existing snapshot. + ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists" + + // ErrCodeDBSnapshotNotFoundFault for service response error code + // "DBSnapshotNotFound". + // + // DBSnapshotIdentifier does not refer to an existing DB snapshot. + ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" + + // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code + // "DBSubnetGroupAlreadyExists". + // + // DBSubnetGroupName is already used by an existing DB subnet group. + ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists" + + // ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code + // "DBSubnetGroupDoesNotCoverEnoughAZs". + // + // Subnets in the DB subnet group should cover at least two Availability Zones + // unless there is only one Availability Zone. + ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs" + + // ErrCodeDBSubnetGroupNotFoundFault for service response error code + // "DBSubnetGroupNotFoundFault". + // + // DBSubnetGroupName does not refer to an existing DB subnet group. + ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" + + // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code + // "DBSubnetGroupQuotaExceeded". + // + // Request would result in user exceeding the allowed number of DB subnet groups. + ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" + + // ErrCodeDBSubnetQuotaExceededFault for service response error code + // "DBSubnetQuotaExceededFault". + // + // Request would result in user exceeding the allowed number of subnets in a + // DB subnet groups. + ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" + + // ErrCodeDBUpgradeDependencyFailureFault for service response error code + // "DBUpgradeDependencyFailure". + // + // The DB upgrade failed because a resource the DB depends on could not be modified. + ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" + + // ErrCodeDomainNotFoundFault for service response error code + // "DomainNotFoundFault". + // + // Domain does not refer to an existing Active Directory Domain. + ErrCodeDomainNotFoundFault = "DomainNotFoundFault" + + // ErrCodeEventSubscriptionQuotaExceededFault for service response error code + // "EventSubscriptionQuotaExceeded". + ErrCodeEventSubscriptionQuotaExceededFault = "EventSubscriptionQuotaExceeded" + + // ErrCodeInstanceQuotaExceededFault for service response error code + // "InstanceQuotaExceeded". + // + // Request would result in user exceeding the allowed number of DB instances. + ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" + + // ErrCodeInsufficientDBClusterCapacityFault for service response error code + // "InsufficientDBClusterCapacityFault". + // + // The DB cluster does not have enough capacity for the current operation. + ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" + + // ErrCodeInsufficientDBInstanceCapacityFault for service response error code + // "InsufficientDBInstanceCapacity". + // + // Specified DB instance class is not available in the specified Availability + // Zone. + ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" + + // ErrCodeInsufficientStorageClusterCapacityFault for service response error code + // "InsufficientStorageClusterCapacity". + // + // There is insufficient storage available for the current action. You may be + // able to resolve this error by updating your subnet group to use different + // Availability Zones that have more storage available. + ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" + + // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code + // "InvalidDBClusterSnapshotStateFault". + // + // The supplied value is not a valid DB cluster snapshot state. + ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" + + // ErrCodeInvalidDBClusterStateFault for service response error code + // "InvalidDBClusterStateFault". + // + // The DB cluster is not in a valid state. + ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" + + // ErrCodeInvalidDBInstanceStateFault for service response error code + // "InvalidDBInstanceState". + // + // The specified DB instance is not in the available state. + ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" + + // ErrCodeInvalidDBParameterGroupStateFault for service response error code + // "InvalidDBParameterGroupState". + // + // The DB parameter group is in use or is in an invalid state. If you are attempting + // to delete the parameter group, you cannot delete it when the parameter group + // is in this state. + ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" + + // ErrCodeInvalidDBSecurityGroupStateFault for service response error code + // "InvalidDBSecurityGroupState". + // + // The state of the DB security group does not allow deletion. + ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" + + // ErrCodeInvalidDBSnapshotStateFault for service response error code + // "InvalidDBSnapshotState". + // + // The state of the DB snapshot does not allow deletion. + ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" + + // ErrCodeInvalidDBSubnetGroupStateFault for service response error code + // "InvalidDBSubnetGroupStateFault". + // + // The DB subnet group cannot be deleted because it is in use. + ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" + + // ErrCodeInvalidDBSubnetStateFault for service response error code + // "InvalidDBSubnetStateFault". + // + // The DB subnet is not in the available state. + ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" + + // ErrCodeInvalidEventSubscriptionStateFault for service response error code + // "InvalidEventSubscriptionState". + ErrCodeInvalidEventSubscriptionStateFault = "InvalidEventSubscriptionState" + + // ErrCodeInvalidRestoreFault for service response error code + // "InvalidRestoreFault". + // + // Cannot restore from vpc backup to non-vpc DB instance. + ErrCodeInvalidRestoreFault = "InvalidRestoreFault" + + // ErrCodeInvalidSubnet for service response error code + // "InvalidSubnet". + // + // The requested subnet is invalid, or multiple subnets were requested that + // are not all in a common VPC. + ErrCodeInvalidSubnet = "InvalidSubnet" + + // ErrCodeInvalidVPCNetworkStateFault for service response error code + // "InvalidVPCNetworkStateFault". + // + // DB subnet group does not cover all Availability Zones after it is created + // because users' change. + ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + + // ErrCodeKMSKeyNotAccessibleFault for service response error code + // "KMSKeyNotAccessibleFault". + // + // Error accessing KMS key. + ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" + + // ErrCodeOptionGroupNotFoundFault for service response error code + // "OptionGroupNotFoundFault". + ErrCodeOptionGroupNotFoundFault = "OptionGroupNotFoundFault" + + // ErrCodeProvisionedIopsNotAvailableInAZFault for service response error code + // "ProvisionedIopsNotAvailableInAZFault". + // + // Provisioned IOPS not available in the specified Availability Zone. + ErrCodeProvisionedIopsNotAvailableInAZFault = "ProvisionedIopsNotAvailableInAZFault" + + // ErrCodeResourceNotFoundFault for service response error code + // "ResourceNotFoundFault". + // + // The specified resource ID was not found. + ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" + + // ErrCodeSNSInvalidTopicFault for service response error code + // "SNSInvalidTopic". + ErrCodeSNSInvalidTopicFault = "SNSInvalidTopic" + + // ErrCodeSNSNoAuthorizationFault for service response error code + // "SNSNoAuthorization". + ErrCodeSNSNoAuthorizationFault = "SNSNoAuthorization" + + // ErrCodeSNSTopicArnNotFoundFault for service response error code + // "SNSTopicArnNotFound". + ErrCodeSNSTopicArnNotFoundFault = "SNSTopicArnNotFound" + + // ErrCodeSharedSnapshotQuotaExceededFault for service response error code + // "SharedSnapshotQuotaExceeded". + // + // You have exceeded the maximum number of accounts that you can share a manual + // DB snapshot with. + ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded" + + // ErrCodeSnapshotQuotaExceededFault for service response error code + // "SnapshotQuotaExceeded". + // + // Request would result in user exceeding the allowed number of DB snapshots. + ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" + + // ErrCodeSourceNotFoundFault for service response error code + // "SourceNotFound". + ErrCodeSourceNotFoundFault = "SourceNotFound" + + // ErrCodeStorageQuotaExceededFault for service response error code + // "StorageQuotaExceeded". + // + // Request would result in user exceeding the allowed amount of storage available + // across all DB instances. + ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" + + // ErrCodeStorageTypeNotSupportedFault for service response error code + // "StorageTypeNotSupported". + // + // StorageType specified cannot be associated with the DB Instance. + ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" + + // ErrCodeSubnetAlreadyInUse for service response error code + // "SubnetAlreadyInUse". + // + // The DB subnet is already in use in the Availability Zone. + ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" + + // ErrCodeSubscriptionAlreadyExistFault for service response error code + // "SubscriptionAlreadyExist". + ErrCodeSubscriptionAlreadyExistFault = "SubscriptionAlreadyExist" + + // ErrCodeSubscriptionCategoryNotFoundFault for service response error code + // "SubscriptionCategoryNotFound". + ErrCodeSubscriptionCategoryNotFoundFault = "SubscriptionCategoryNotFound" + + // ErrCodeSubscriptionNotFoundFault for service response error code + // "SubscriptionNotFound". + ErrCodeSubscriptionNotFoundFault = "SubscriptionNotFound" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go new file mode 100644 index 000000000..3ddc5e5fb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package neptune + +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" +) + +// Neptune provides the API operation methods for making requests to +// Amazon Neptune. See this package's package overview docs +// for details on the service. +// +// Neptune methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Neptune 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 = "rds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Neptune" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Neptune client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Neptune client from just a session. +// svc := neptune.New(mySession) +// +// // Create a Neptune client with additional configuration +// svc := neptune.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Neptune { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "rds" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Neptune { + svc := &Neptune{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2014-10-31", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Neptune operation and runs any +// custom request initialization. +func (c *Neptune) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go new file mode 100644 index 000000000..acc80183c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/waiters.go @@ -0,0 +1,152 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package neptune + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilDBInstanceAvailable uses the Amazon Neptune API operation +// DescribeDBInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *Neptune) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error { + return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Neptune) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBInstanceAvailable", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "available", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleted", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "incompatible-restore", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "incompatible-parameters", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilDBInstanceDeleted uses the Amazon Neptune API operation +// DescribeDBInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *Neptune) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error { + return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Neptune) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBInstanceDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleted", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "DBInstanceNotFound", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "rebooting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "resetting-master-credentials", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index 51065004d..9fac484cf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -437,8 +437,8 @@ func (c *OpsWorks) CloneStackRequest(input *CloneStackInput) (req *request.Reque // By default, all parameters are set to the values used by the parent stack. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -882,8 +882,8 @@ func (c *OpsWorks) CreateStackRequest(input *CreateStackInput) (req *request.Req // Creates a new stack. For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-edit.html). // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -965,8 +965,8 @@ func (c *OpsWorks) CreateUserProfileRequest(input *CreateUserProfileInput) (req // Creates a new user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -1413,8 +1413,8 @@ func (c *OpsWorks) DeleteUserProfileRequest(input *DeleteUserProfileInput) (req // Deletes a user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -1679,8 +1679,8 @@ func (c *OpsWorks) DeregisterInstanceRequest(input *DeregisterInstanceInput) (re // DeregisterInstance API operation for AWS OpsWorks. // // Deregister a registered Amazon EC2 or on-premises instance. This action removes -// the instance from the stack and returns it to your control. This action can -// not be used with instances that were created with AWS OpsWorks Stacks. +// the instance from the stack and returns it to your control. This action cannot +// be used with instances that were created with AWS OpsWorks Stacks. // // Required Permissions: To use this action, an IAM user must have a Manage // permissions level for the stack or an attached policy that explicitly grants @@ -2036,7 +2036,7 @@ func (c *OpsWorks) DescribeAppsRequest(input *DescribeAppsInput) (req *request.R // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2125,7 +2125,7 @@ func (c *OpsWorks) DescribeCommandsRequest(input *DescribeCommandsInput) (req *r // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2214,7 +2214,7 @@ func (c *OpsWorks) DescribeDeploymentsRequest(input *DescribeDeploymentsInput) ( // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2310,7 +2310,7 @@ func (c *OpsWorks) DescribeEcsClustersRequest(input *DescribeEcsClustersInput) ( // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack or an attached policy that explicitly -// grants permission. For more information on user permissions, see Managing +// grants permission. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -2451,7 +2451,7 @@ func (c *OpsWorks) DescribeElasticIpsRequest(input *DescribeElasticIpsInput) (re // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2540,7 +2540,7 @@ func (c *OpsWorks) DescribeElasticLoadBalancersRequest(input *DescribeElasticLoa // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2629,7 +2629,7 @@ func (c *OpsWorks) DescribeInstancesRequest(input *DescribeInstancesInput) (req // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2718,7 +2718,7 @@ func (c *OpsWorks) DescribeLayersRequest(input *DescribeLayersInput) (req *reque // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2807,7 +2807,7 @@ func (c *OpsWorks) DescribeLoadBasedAutoScalingRequest(input *DescribeLoadBasedA // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2894,7 +2894,7 @@ func (c *OpsWorks) DescribeMyUserProfileRequest(input *DescribeMyUserProfileInpu // // Required Permissions: To use this action, an IAM user must have self-management // enabled or an attached policy that explicitly grants permissions. For more -// information on user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -3135,7 +3135,7 @@ func (c *OpsWorks) DescribeRaidArraysRequest(input *DescribeRaidArraysInput) (re // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3222,7 +3222,7 @@ func (c *OpsWorks) DescribeRdsDbInstancesRequest(input *DescribeRdsDbInstancesIn // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -3311,7 +3311,7 @@ func (c *OpsWorks) DescribeServiceErrorsRequest(input *DescribeServiceErrorsInpu // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -3400,7 +3400,7 @@ func (c *OpsWorks) DescribeStackProvisioningParametersRequest(input *DescribeSta // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3488,7 +3488,7 @@ func (c *OpsWorks) DescribeStackSummaryRequest(input *DescribeStackSummaryInput) // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3575,7 +3575,7 @@ func (c *OpsWorks) DescribeStacksRequest(input *DescribeStacksInput) (req *reque // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3664,7 +3664,7 @@ func (c *OpsWorks) DescribeTimeBasedAutoScalingRequest(input *DescribeTimeBasedA // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3750,8 +3750,8 @@ func (c *OpsWorks) DescribeUserProfilesRequest(input *DescribeUserProfilesInput) // Describe specified users. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -3839,7 +3839,7 @@ func (c *OpsWorks) DescribeVolumesRequest(input *DescribeVolumesInput) (req *req // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5627,14 +5627,14 @@ func (c *OpsWorks) UnassignInstanceRequest(input *UnassignInstanceInput) (req *r // UnassignInstance API operation for AWS OpsWorks. // -// Unassigns a registered instance from all of it's layers. The instance remains -// in the stack as an unassigned instance and can be assigned to another layer, -// as needed. You cannot use this action with instances that were created with -// AWS OpsWorks Stacks. +// Unassigns a registered instance from all layers that are using the instance. +// The instance remains in the stack as an unassigned instance, and can be assigned +// to another layer as needed. You cannot use this action with instances that +// were created with AWS OpsWorks Stacks. // // Required Permissions: To use this action, an IAM user must have a Manage // permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User +// permissions. For more information about user permissions, see Managing User // Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6254,7 +6254,7 @@ func (c *OpsWorks) UpdateMyUserProfileRequest(input *UpdateMyUserProfileInput) ( // // Required Permissions: To use this action, an IAM user must have self-management // enabled or an attached policy that explicitly grants permissions. For more -// information on user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -6516,8 +6516,8 @@ func (c *OpsWorks) UpdateUserProfileRequest(input *UpdateUserProfileInput) (req // Updates a specified user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.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 @@ -7027,8 +7027,8 @@ type AttachElasticLoadBalancerInput struct { // ElasticLoadBalancerName is a required field ElasticLoadBalancerName *string `type:"string" required:"true"` - // The ID of the layer that the Elastic Load Balancing instance is to be attached - // to. + // The ID of the layer to which the Elastic Load Balancing instance is to be + // attached. // // LayerId is a required field LayerId *string `type:"string" required:"true"` @@ -7343,8 +7343,8 @@ type CloneStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html) + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html) CustomJson *string `type:"string"` // The cloned stack's default Availability Zone, which must be in the specified @@ -7376,11 +7376,11 @@ type CloneStackInput struct { // Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web. // // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information on how to use custom AMIs with - // OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // you create instances. For more information about how to use custom AMIs + // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the parent stack's operating system. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // You can specify a different Linux operating system for the cloned stack, @@ -7515,9 +7515,9 @@ type CloneStackInput struct { // // * You must specify a value for DefaultSubnetId. // - // For more information on how to use AWS OpsWorks Stacks with a VPC, see Running - // a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information on default VPC and EC2 Classic, see Supported Platforms + // For more information about how to use AWS OpsWorks Stacks with a VPC, see + // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). + // For more information about default VPC and EC2 Classic, see Supported Platforms // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). VpcId *string `type:"string"` } @@ -8244,8 +8244,8 @@ type CreateDeploymentInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The instance IDs for the deployment targets. @@ -8453,15 +8453,15 @@ type CreateInstanceInput struct { // // * A custom AMI: Custom. // - // For more information on the supported operating systems, see AWS OpsWorks + // For more information about the supported operating systems, see AWS OpsWorks // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // The default option is the current Amazon Linux version. If you set this parameter // to Custom, you must use the CreateInstance action's AmiId parameter to specify // the custom AMI that you want to use. Block device mappings are not supported - // if the value is Custom. For more information on the supported operating systems, + // if the value is Custom. For more information about supported operating systems, // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html)For - // more information on how to use custom AMIs with AWS OpsWorks Stacks, see + // more information about how to use custom AMIs with AWS OpsWorks Stacks, see // Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). Os *string `type:"string"` @@ -8962,7 +8962,7 @@ type CreateStackInput struct { // The configuration manager. When you create a stack we recommend that you // use the configuration manager to specify the Chef version: 12, 11.10, or // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 11.4. + // Linux stacks is currently 12. ConfigurationManager *StackConfigurationManager `type:"structure"` // Contains the information required to retrieve an app or cookbook from a repository. @@ -8976,8 +8976,8 @@ type CreateStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The stack's default Availability Zone, which must be in the specified region. @@ -9017,7 +9017,7 @@ type CreateStackInput struct { // you create instances. For more information, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the current Amazon Linux version. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). DefaultOs *string `type:"string"` @@ -9080,8 +9080,24 @@ type CreateStackInput struct { // Name is a required field Name *string `type:"string" required:"true"` - // The stack's AWS region, such as "ap-south-1". For more information about - // Amazon regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). + // The stack's AWS region, such as ap-south-1. For more information about Amazon + // regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). + // + // In the AWS CLI, this API maps to the --stack-region parameter. If the --stack-region + // parameter and the AWS CLI common parameter --region are set to the same value, + // the stack uses a regional endpoint. If the --stack-region parameter is not + // set, but the AWS CLI --region parameter is, this also results in a stack + // with a regional endpoint. However, if the --region parameter is set to us-east-1, + // and the --stack-region parameter is set to one of the following, then the + // stack uses a legacy or classic region: us-west-1, us-west-2, sa-east-1, eu-central-1, + // eu-west-1, ap-northeast-1, ap-southeast-1, ap-southeast-2. In this case, + // the actual API endpoint of the stack is in us-east-1. Only the preceding + // regions are supported as classic regions in the us-east-1 API endpoint. Because + // it is a best practice to choose the regional endpoint that is closest to + // where you manage AWS, we recommend that you use regional endpoints for new + // stacks. The AWS CLI common --region parameter always specifies a regional + // API endpoint; it cannot be used to specify a classic AWS OpsWorks Stacks + // region. // // Region is a required field Region *string `type:"string" required:"true"` @@ -9142,9 +9158,9 @@ type CreateStackInput struct { // // * You must specify a value for DefaultSubnetId. // - // For more information on how to use AWS OpsWorks Stacks with a VPC, see Running - // a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information on default VPC and EC2-Classic, see Supported Platforms + // For more information about how to use AWS OpsWorks Stacks with a VPC, see + // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). + // For more information about default VPC and EC2-Classic, see Supported Platforms // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). VpcId *string `type:"string"` } @@ -9976,7 +9992,7 @@ func (s *DeploymentCommand) SetName(v string) *DeploymentCommand { type DeregisterEcsClusterInput struct { _ struct{} `type:"structure"` - // The cluster's ARN. + // The cluster's Amazon Resource Number (ARN). // // EcsClusterArn is a required field EcsClusterArn *string `type:"string" required:"true"` @@ -10958,6 +10974,7 @@ func (s DescribeOperatingSystemsInput) GoString() string { type DescribeOperatingSystemsOutput struct { _ struct{} `type:"structure"` + // Contains information in response to a DescribeOperatingSystems request. OperatingSystems []*OperatingSystem `type:"list"` } @@ -11118,8 +11135,8 @@ type DescribeRdsDbInstancesInput struct { // An array containing the ARNs of the instances to be described. RdsDbInstanceArns []*string `type:"list"` - // The stack ID that the instances are registered with. The operation returns - // descriptions of all registered Amazon RDS instances. + // The ID of the stack with which the instances are registered. The operation + // returns descriptions of all registered Amazon RDS instances. // // StackId is a required field StackId *string `type:"string" required:"true"` @@ -11256,7 +11273,7 @@ func (s *DescribeServiceErrorsOutput) SetServiceErrors(v []*ServiceError) *Descr type DescribeStackProvisioningParametersInput struct { _ struct{} `type:"structure"` - // The stack ID + // The stack ID. // // StackId is a required field StackId *string `type:"string" required:"true"` @@ -12253,6 +12270,7 @@ type Instance struct { // The instance architecture: "i386" or "x86_64". Architecture *string `type:"string" enum:"Architecture"` + // The instance's Amazon Resource Number (ARN). Arn *string `type:"string"` // For load-based or time-based instances, the type. @@ -12744,6 +12762,7 @@ type InstancesCount struct { // The number of instances with start_failed status. StartFailed *int64 `type:"integer"` + // The number of instances with stop_failed status. StopFailed *int64 `type:"integer"` // The number of instances with stopped status. @@ -12896,6 +12915,7 @@ func (s *InstancesCount) SetUnassigning(v int64) *InstancesCount { type Layer struct { _ struct{} `type:"structure"` + // The Amazon Resource Number (ARN) of a layer. Arn *string `type:"string"` // The layer attributes. @@ -14575,8 +14595,8 @@ type SetPermissionInput struct { // // * iam_only // - // For more information on the permissions associated with these levels, see - // Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). + // For more information about the permissions associated with these levels, + // see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). Level *string `type:"string"` // The stack ID. @@ -15352,6 +15372,7 @@ func (s StartStackOutput) GoString() string { type StopInstanceInput struct { _ struct{} `type:"structure"` + // Specifies whether to force an instance to stop. Force *bool `type:"boolean"` // The instance ID. @@ -15975,7 +15996,7 @@ func (s UpdateAppOutput) GoString() string { type UpdateElasticIpInput struct { _ struct{} `type:"structure"` - // The address. + // The IP address for which you want to update the name. // // ElasticIp is a required field ElasticIp *string `type:"string" required:"true"` @@ -16118,15 +16139,15 @@ type UpdateInstanceInput struct { // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft // Windows Server 2012 R2 with SQL Server Web. // - // For more information on the supported operating systems, see AWS OpsWorks + // For more information about supported operating systems, see AWS OpsWorks // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // The default option is the current Amazon Linux version. If you set this parameter // to Custom, you must use the AmiId parameter to specify the custom AMI that - // you want to use. For more information on the supported operating systems, + // you want to use. For more information about supported operating systems, // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // For more information on how to use custom AMIs with OpsWorks, see Using Custom - // AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // For more information about how to use custom AMIs with OpsWorks, see Using + // Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // You can specify a different Linux operating system for the updated stack, // but you cannot change from Linux to Windows or Windows to Linux. @@ -16613,7 +16634,7 @@ type UpdateStackInput struct { // The configuration manager. When you update a stack, we recommend that you // use the configuration manager to specify the Chef version: 12, 11.10, or // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 11.4. + // Linux stacks is currently 12. ConfigurationManager *StackConfigurationManager `type:"structure"` // Contains the information required to retrieve an app or cookbook from a repository. @@ -16627,8 +16648,8 @@ type UpdateStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The stack's default Availability Zone, which must be in the stack's region. @@ -16661,11 +16682,11 @@ type UpdateStackInput struct { // Windows Server 2012 R2 with SQL Server Web. // // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information on how to use custom AMIs with - // OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // you create instances. For more information about how to use custom AMIs + // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the stack's current operating system. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). DefaultOs *string `type:"string"` @@ -17133,6 +17154,8 @@ type Volume struct { // The Amazon EC2 volume ID. Ec2VolumeId *string `type:"string"` + // Specifies whether an Amazon EBS volume is encrypted. For more information, + // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). Encrypted *bool `type:"boolean"` // The instance ID. @@ -17163,7 +17186,23 @@ type Volume struct { // The volume ID. VolumeId *string `type:"string"` - // The volume type, standard or PIOPS. + // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // + // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 + // GiB and a maximum size of 1024 GiB. + // + // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size + // of 4 GiB and a maximum size of 16384 GiB. + // + // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum + // size of 1 GiB and a maximum size of 16384 GiB. + // + // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized + // HDD volumes must have a minimum size of 500 GiB and a maximum size of + // 16384 GiB. + // + // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB + // and a maximum size of 16384 GiB. VolumeType *string `type:"string"` } @@ -17292,15 +17331,21 @@ type VolumeConfiguration struct { // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). // - // * standard - Magnetic + // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 + // GiB and a maximum size of 1024 GiB. // - // * io1 - Provisioned IOPS (SSD) + // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size + // of 4 GiB and a maximum size of 16384 GiB. // - // * gp2 - General Purpose (SSD) + // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum + // size of 1 GiB and a maximum size of 16384 GiB. // - // * st1 - Throughput Optimized hard disk drive (HDD) + // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized + // HDD volumes must have a minimum size of 500 GiB and a maximum size of + // 16384 GiB. // - // * sc1 - Cold HDD + // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB + // and a maximum size of 16384 GiB. VolumeType *string `type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go index 3e94bb43d..a1a8307ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "opsworks" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "opsworks" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "OpsWorks" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the OpsWorks client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 22c5cd91a..104582b80 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -115,9 +115,9 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // the number of accounts in an organization. Note: deleted and closed accounts // still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get this exception immediately after creating the organization, wait +// one hour and try again. If after an hour it continues to fail with this +// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -302,8 +302,8 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // AttachPolicy API operation for AWS Organizations. // -// Attaches a policy to a root, an organizational unit, or an individual account. -// How the policy affects accounts depends on the type of policy: +// Attaches a policy to a root, an organizational unit (OU), or an individual +// account. How the policy affects accounts depends on the type of policy: // // * Service control policy (SCP) - An SCP specifies what permissions can // be delegated to users in affected member accounts. The scope of influence @@ -385,9 +385,9 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -398,6 +398,11 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -809,6 +814,16 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// If you get an exception that indicates that you exceeded your account limits +// for the organization or that the operation failed because your organization +// is still initializing, wait one hour and then try again. If the error persists +// after an hour, then contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// +// Because CreateAccount operates asynchronously, it can return a successful +// completion message even though account initialization might still be in progress. +// You might need to wait a few minutes before you can successfully access the +// account. +// // When you create a member account with this operation, you can choose whether // to create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate @@ -817,12 +832,6 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // information about how to disable this for an account, see Granting Access // to Your Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html). // -// This operation can be called only from the organization's master account. -// -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). -// // 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. @@ -866,9 +875,9 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -879,6 +888,11 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -991,8 +1005,10 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not finalize the creation of your organization. Try -// again later. If this persists, contact AWS customer support. +// AWS Organizations could not perform the operation because your organization +// has not finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Customer +// Support (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -1126,9 +1142,9 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -1139,6 +1155,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -1383,9 +1404,9 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -1396,6 +1417,11 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -1639,9 +1665,9 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -1652,6 +1678,11 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -2032,7 +2063,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // // Deletes the organization. You can delete an organization only by using credentials // from the master account. The organization must be empty of member accounts, -// OUs, and policies. +// organizational units (OUs), and policies. // // 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 @@ -2197,7 +2228,7 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // DeleteOrganizationalUnit API operation for AWS Organizations. // -// Deletes an organizational unit from a root or another OU. You must first +// Deletes an organizational unit (OU) from a root or another OU. You must first // remove all accounts and child OUs from the OU that you want to delete. // // This operation can be called only from the organization's master account. @@ -2370,7 +2401,8 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // DeletePolicy API operation for AWS Organizations. // // Deletes the specified policy from your organization. Before you perform this -// operation, you must first detach the policy from all OUs, roots, and accounts. +// operation, you must first detach the policy from all organizational units +// (OUs), roots, and accounts. // // This operation can be called only from the organization's master account. // @@ -3450,8 +3482,8 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // DetachPolicy API operation for AWS Organizations. // -// Detaches a policy from a target root, organizational unit, or account. If -// the policy being detached is a service control policy (SCP), the changes +// Detaches a policy from a target root, organizational unit (OU), or account. +// If the policy being detached is a service control policy (SCP), the changes // to permissions for IAM users and roles in affected accounts are immediate. // // Note: Every root, OU, and account must have at least one SCP attached. If @@ -3509,9 +3541,9 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -3522,6 +3554,11 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -3785,9 +3822,9 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -3798,6 +3835,11 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -3986,8 +4028,8 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // Disables an organizational control policy type in a root. A policy of a certain // type can be attached to entities in a root only if that type is enabled in // the root. After you perform this operation, you no longer can attach policies -// of the specified type to that root or to any OU or account in that root. -// You can undo this by using the EnablePolicyType operation. +// of the specified type to that root or to any organizational unit (OU) or +// account in that root. You can undo this by using the EnablePolicyType operation. // // This operation can be called only from the organization's master account. // @@ -4039,9 +4081,9 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -4052,6 +4094,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -4313,9 +4360,9 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -4326,6 +4373,11 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -4520,12 +4572,11 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // in the AWS Organizations User Guide. // // This operation is required only for organizations that were created explicitly -// with only the consolidated billing features enabled, or that were migrated -// from a Consolidated Billing account family to Organizations. Calling this -// operation sends a handshake to every invited account in the organization. -// The feature set change can be finalized and the additional features enabled -// only after all administrators in the invited accounts approve the change -// by accepting the handshake. +// with only the consolidated billing features enabled. Calling this operation +// sends a handshake to every invited account in the organization. The feature +// set change can be finalized and the additional features enabled only after +// all administrators in the invited accounts approve the change by accepting +// the handshake. // // After you enable all features, you can separately enable or disable individual // policy types in a root using EnablePolicyType and DisablePolicyType. To see @@ -4577,9 +4628,9 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // the number of accounts in an organization. Note: deleted and closed accounts // still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get this exception immediately after creating the organization, wait +// one hour and try again. If after an hour it continues to fail with this +// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -4742,8 +4793,9 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // EnablePolicyType API operation for AWS Organizations. // // Enables a policy type in a root. After you enable a policy type in a root, -// you can attach policies of that type to the root, any OU, or account in that -// root. You can undo this by using the DisablePolicyType operation. +// you can attach policies of that type to the root, any organizational unit +// (OU), or account in that root. You can undo this by using the DisablePolicyType +// operation. // // This operation can be called only from the organization's master account. // @@ -4796,9 +4848,9 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -4809,6 +4861,11 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -5019,11 +5076,12 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // accounts from AISPL and AWS, or any other AWS seller. For more information, // see Consolidated Billing in India (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html). // -// This operation can be called only from the organization's master account. +// If you receive an exception that indicates that you exceeded your account +// limits for the organization or that the operation failed because your organization +// is still initializing, wait one hour and then try again. If the error persists +// after an hour, then contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// This operation can be called only from the organization's master 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 @@ -5059,9 +5117,9 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // the number of accounts in an organization. Note: deleted and closed accounts // still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get this exception immediately after creating the organization, wait +// one hour and try again. If after an hour it continues to fail with this +// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -5157,8 +5215,10 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not finalize the creation of your organization. Try -// again later. If this persists, contact AWS customer support. +// AWS Organizations could not perform the operation because your organization +// has not finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Customer +// Support (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -5314,9 +5374,9 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -5327,6 +5387,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -5574,9 +5639,9 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -5587,6 +5652,11 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -5829,7 +5899,8 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // ListAccounts API operation for AWS Organizations. // // Lists all the accounts in the organization. To request only the accounts -// in a specified root or OU, use the ListAccountsForParent operation instead. +// in a specified root or organizational unit (OU), use the ListAccountsForParent +// operation instead. // // Always check the NextToken response parameter for a null value when calling // a List* operation. These operations can occasionally return an empty set @@ -6272,9 +6343,9 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // ListChildren API operation for AWS Organizations. // -// Lists all of the OUs or accounts that are contained in the specified parent -// OU or root. This operation, along with ListParents enables you to traverse -// the tree structure that makes up this root. +// Lists all of the organizational units (OUs) or accounts that are contained +// in the specified parent OU or root. This operation, along with ListParents +// enables you to traverse the tree structure that makes up this root. // // Always check the NextToken response parameter for a null value when calling // a List* operation. These operations can occasionally return an empty set @@ -8271,7 +8342,8 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // ListTargetsForPolicy API operation for AWS Organizations. // -// Lists all the roots, OUs, and accounts to which the specified policy is attached. +// Lists all the roots, organizaitonal units (OUs), and accounts to which the +// specified policy is attached. // // Always check the NextToken response parameter for a null value when calling // a List* operation. These operations can occasionally return an empty set @@ -8487,8 +8559,8 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // MoveAccount API operation for AWS Organizations. // -// Moves an account from its current source parent root or OU to the specified -// destination parent root or OU. +// Moves an account from its current source parent root or organizational unit +// (OU) to the specified destination parent root or OU. // // This operation can be called only from the organization's master account. // @@ -8691,11 +8763,6 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // -// You can remove a member account only after you enable IAM user access to -// billing in the member account. For more information, see Activating Access -// to the Billing and Cost Management Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) -// in the AWS Billing and Cost Management User 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. @@ -8744,9 +8811,9 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -8757,6 +8824,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -9165,9 +9237,9 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // // Note: deleted and closed accounts still count toward your limit. // -// If you get an exception that indicates that you exceeded your account limits -// for the organization or that you can"t add an account because your organization -// is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// If you get receive this exception when running a command immediately after +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -9178,6 +9250,11 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports consolidated billing features only cannot +// perform this operation. +// // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -9422,7 +9499,7 @@ type Account struct { JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"` // The date the account became a part of the organization. - JoinedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + JoinedTimestamp *time.Time `type:"timestamp"` // The friendly name of the account. // @@ -9831,7 +9908,7 @@ type CreateAccountStatus struct { AccountName *string `min:"1" type:"string"` // The date and time that the account was created and the request completed. - CompletedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletedTimestamp *time.Time `type:"timestamp"` // If the request failed, a description of the reason for the failure. // @@ -9860,7 +9937,7 @@ type CreateAccountStatus struct { Id *string `type:"string"` // The date and time that the request was made for the account creation. - RequestedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedTimestamp *time.Time `type:"timestamp"` // The status of the request. State *string `type:"string" enum:"CreateAccountState"` @@ -11165,7 +11242,7 @@ type EnabledServicePrincipal struct { // The date that the service principal was enabled for integration with AWS // Organizations. - DateEnabled *time.Time `type:"timestamp" timestampFormat:"unix"` + DateEnabled *time.Time `type:"timestamp"` // The name of the service principal. This is typically in the form of a URL, // such as: servicename.amazonaws.com. @@ -11233,7 +11310,7 @@ type Handshake struct { // The date and time that the handshake expires. If the recipient of the handshake // request fails to respond before the specified date and time, the handshake // becomes inactive and is no longer valid. - ExpirationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationTimestamp *time.Time `type:"timestamp"` // The unique identifier (ID) of a handshake. The originating account creates // the ID when it initiates the handshake. @@ -11246,7 +11323,7 @@ type Handshake struct { Parties []*HandshakeParty `type:"list"` // The date and time that the handshake request was made. - RequestedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedTimestamp *time.Time `type:"timestamp"` // Additional information that is needed to process the handshake. Resources []*HandshakeResource `type:"list"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go index 7838186af..cc704a61a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go @@ -109,7 +109,7 @@ // requests were successfully made to Organizations, who made the request, when // it was made, and so on. For more about AWS Organizations and its support // for AWS CloudTrail, see Logging AWS Organizations Events with AWS CloudTrail -// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html) +// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html#orgs_cloudtrail-integration) // in the AWS Organizations User Guide. To learn more about CloudTrail, including // how to turn it on and find your log files, see the AWS CloudTrail User Guide // (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go index 7ccbd82e4..fe4011c05 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go @@ -80,9 +80,9 @@ const ( // // Note: deleted and closed accounts still count toward your limit. // - // If you get an exception that indicates that you exceeded your account limits - // for the organization or that you can"t add an account because your organization - // is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // If you get receive this exception when running a command immediately after + // creating the organization, wait one hour and try again. If after an hour + // it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. @@ -93,6 +93,11 @@ const ( // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit // tree that is too many levels deep. // + // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation + // that requires the organization to be configured to support all features. + // An organization that supports consolidated billing features only cannot + // perform this operation. + // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // @@ -197,8 +202,10 @@ const ( // ErrCodeFinalizingOrganizationException for service response error code // "FinalizingOrganizationException". // - // AWS Organizations could not finalize the creation of your organization. Try - // again later. If this persists, contact AWS customer support. + // AWS Organizations could not perform the operation because your organization + // has not finished initializing. This can take up to an hour. Try again later. + // If after one hour you continue to receive this error, contact AWS Customer + // Support (https://console.aws.amazon.com/support/home#/). ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException" // ErrCodeHandshakeAlreadyInStateException for service response error code @@ -221,9 +228,9 @@ const ( // the number of accounts in an organization. Note: deleted and closed accounts // still count toward your limit. // - // If you get an exception that indicates that you exceeded your account limits - // for the organization or that you can"t add an account because your organization - // is still initializing, please contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // If you get this exception immediately after creating the organization, wait + // one hour and try again. If after an hour it continues to fail with this + // error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes you can send in one day. diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go index 0ca4f04f1..565c1715f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "organizations" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "organizations" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Organizations" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Organizations client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go new file mode 100644 index 000000000..f5be2db26 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go @@ -0,0 +1,955 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +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" +) + +const opDescribeServices = "DescribeServices" + +// DescribeServicesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeServices for more information on using the DescribeServices +// 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 DescribeServicesRequest method. +// req, resp := client.DescribeServicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices +func (c *Pricing) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) { + op := &request.Operation{ + Name: opDescribeServices, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeServicesInput{} + } + + output = &DescribeServicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServices API operation for AWS Price List Service. +// +// Returns the metadata for one service or a list of the metadata for all services. +// Use this without a service code to get the service codes for all services. +// Use it with a service code, such as AmazonEC2, to get information specific +// to that service, such as the attribute names available for that service. +// For example, some of the attribute names available for EC2 are volumeType, +// maxIopsVolume, operation, locationType, and instanceCapacity10xlarge. +// +// 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 Price List Service's +// API operation DescribeServices for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices +func (c *Pricing) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) { + req, out := c.DescribeServicesRequest(input) + return out, req.Send() +} + +// DescribeServicesWithContext is the same as DescribeServices with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServices 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 *Pricing) DescribeServicesWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.Option) (*DescribeServicesOutput, error) { + req, out := c.DescribeServicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeServicesPages iterates over the pages of a DescribeServices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeServices 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 DescribeServices operation. +// pageNum := 0 +// err := client.DescribeServicesPages(params, +// func(page *DescribeServicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) DescribeServicesPages(input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool) error { + return c.DescribeServicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeServicesPagesWithContext same as DescribeServicesPages 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 *Pricing) DescribeServicesPagesWithContext(ctx aws.Context, input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeServicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeServicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeServicesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetAttributeValues = "GetAttributeValues" + +// GetAttributeValuesRequest generates a "aws/request.Request" representing the +// client's request for the GetAttributeValues operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetAttributeValues for more information on using the GetAttributeValues +// 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 GetAttributeValuesRequest method. +// req, resp := client.GetAttributeValuesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues +func (c *Pricing) GetAttributeValuesRequest(input *GetAttributeValuesInput) (req *request.Request, output *GetAttributeValuesOutput) { + op := &request.Operation{ + Name: opGetAttributeValues, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetAttributeValuesInput{} + } + + output = &GetAttributeValuesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAttributeValues API operation for AWS Price List Service. +// +// Returns a list of attribute values. Attibutes are similar to the details +// in a Price List API offer file. For a list of available attributes, see Offer +// File Definitions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs) +// in the AWS Billing and Cost Management User Guide (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.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 AWS Price List Service's +// API operation GetAttributeValues for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues +func (c *Pricing) GetAttributeValues(input *GetAttributeValuesInput) (*GetAttributeValuesOutput, error) { + req, out := c.GetAttributeValuesRequest(input) + return out, req.Send() +} + +// GetAttributeValuesWithContext is the same as GetAttributeValues with the addition of +// the ability to pass a context and additional request options. +// +// See GetAttributeValues 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 *Pricing) GetAttributeValuesWithContext(ctx aws.Context, input *GetAttributeValuesInput, opts ...request.Option) (*GetAttributeValuesOutput, error) { + req, out := c.GetAttributeValuesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetAttributeValuesPages iterates over the pages of a GetAttributeValues operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetAttributeValues 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 GetAttributeValues operation. +// pageNum := 0 +// err := client.GetAttributeValuesPages(params, +// func(page *GetAttributeValuesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) GetAttributeValuesPages(input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool) error { + return c.GetAttributeValuesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetAttributeValuesPagesWithContext same as GetAttributeValuesPages 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 *Pricing) GetAttributeValuesPagesWithContext(ctx aws.Context, input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetAttributeValuesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetAttributeValuesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetAttributeValuesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetProducts = "GetProducts" + +// GetProductsRequest generates a "aws/request.Request" representing the +// client's request for the GetProducts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetProducts for more information on using the GetProducts +// 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 GetProductsRequest method. +// req, resp := client.GetProductsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts +func (c *Pricing) GetProductsRequest(input *GetProductsInput) (req *request.Request, output *GetProductsOutput) { + op := &request.Operation{ + Name: opGetProducts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetProductsInput{} + } + + output = &GetProductsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetProducts API operation for AWS Price List Service. +// +// Returns a list of all products that match the filter criteria. +// +// 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 Price List Service's +// API operation GetProducts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts +func (c *Pricing) GetProducts(input *GetProductsInput) (*GetProductsOutput, error) { + req, out := c.GetProductsRequest(input) + return out, req.Send() +} + +// GetProductsWithContext is the same as GetProducts with the addition of +// the ability to pass a context and additional request options. +// +// See GetProducts 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 *Pricing) GetProductsWithContext(ctx aws.Context, input *GetProductsInput, opts ...request.Option) (*GetProductsOutput, error) { + req, out := c.GetProductsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetProductsPages iterates over the pages of a GetProducts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetProducts 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 GetProducts operation. +// pageNum := 0 +// err := client.GetProductsPages(params, +// func(page *GetProductsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) GetProductsPages(input *GetProductsInput, fn func(*GetProductsOutput, bool) bool) error { + return c.GetProductsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetProductsPagesWithContext same as GetProductsPages 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 *Pricing) GetProductsPagesWithContext(ctx aws.Context, input *GetProductsInput, fn func(*GetProductsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetProductsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetProductsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetProductsOutput), !p.HasNextPage()) + } + return p.Err() +} + +// The values of a given attribute, such as Throughput Optimized HDD or Provisioned +// IOPS for the Amazon EC2volumeType attribute. +type AttributeValue struct { + _ struct{} `type:"structure"` + + // The specific value of an attributeName. + Value *string `type:"string"` +} + +// String returns the string representation +func (s AttributeValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *AttributeValue) SetValue(v string) *AttributeValue { + s.Value = &v + return s +} + +type DescribeServicesInput struct { + _ struct{} `type:"structure"` + + // The format version that you want the response to be in. + // + // Valid values are: aws_v1 + FormatVersion *string `type:"string"` + + // The maximum number of results that you want returned in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The code for the service whose information you want to retrieve, such as + // AmazonEC2. You can use the ServiceCode to filter the results in a GetProducts + // call. To retrieve a list of all services, leave this blank. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s DescribeServicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *DescribeServicesInput) SetFormatVersion(v string) *DescribeServicesInput { + s.FormatVersion = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeServicesInput) SetMaxResults(v int64) *DescribeServicesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeServicesInput) SetNextToken(v string) *DescribeServicesInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *DescribeServicesInput) SetServiceCode(v string) *DescribeServicesInput { + s.ServiceCode = &v + return s +} + +type DescribeServicesOutput struct { + _ struct{} `type:"structure"` + + // The format version of the response. For example, aws_v1. + FormatVersion *string `type:"string"` + + // The pagination token for the next set of retreivable results. + NextToken *string `type:"string"` + + // The service metadata for the service or services in the response. + Services []*Service `type:"list"` +} + +// String returns the string representation +func (s DescribeServicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServicesOutput) GoString() string { + return s.String() +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *DescribeServicesOutput) SetFormatVersion(v string) *DescribeServicesOutput { + s.FormatVersion = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeServicesOutput) SetNextToken(v string) *DescribeServicesOutput { + s.NextToken = &v + return s +} + +// SetServices sets the Services field's value. +func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutput { + s.Services = v + return s +} + +// The constraints that you want all returned products to match. +type Filter struct { + _ struct{} `type:"structure"` + + // The product metadata field that you want to filter on. You can filter by + // just the service code to see all products for a specific service, filter + // by just the attribute name to see a specific attribute for multiple services, + // or use both a service code and an attribute name to retrieve only products + // that match both fields. + // + // Valid values include: ServiceCode, and all attribute names + // + // For example, you can filter by the AmazonEC2 service code and the volumeType + // attribute name to get the prices for only Amazon EC2 volumes. + // + // Field is a required field + Field *string `type:"string" required:"true"` + + // The type of filter that you want to use. + // + // Valid values are: TERM_MATCH. TERM_MATCH returns only products that match + // both the given filter field and the given value. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"FilterType"` + + // The service code or attribute value that you want to filter by. If you are + // filtering by service code this is the actual service code, such as AmazonEC2. + // If you are filtering by attribute name, this is the attribute value that + // you want the returned products to match, such as a Provisioned IOPS volume. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Field == nil { + invalidParams.Add(request.NewErrParamRequired("Field")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetField sets the Field field's value. +func (s *Filter) SetField(v string) *Filter { + s.Field = &v + return s +} + +// SetType sets the Type field's value. +func (s *Filter) SetType(v string) *Filter { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Filter) SetValue(v string) *Filter { + s.Value = &v + return s +} + +type GetAttributeValuesInput struct { + _ struct{} `type:"structure"` + + // The name of the attribute that you want to retrieve the values for, such + // as volumeType. + // + // AttributeName is a required field + AttributeName *string `type:"string" required:"true"` + + // The maximum number of results to return in response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The service code for the service whose attributes you want to retrieve. For + // example, if you want the retrieve an EC2 attribute, use AmazonEC2. + // + // ServiceCode is a required field + ServiceCode *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAttributeValuesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAttributeValuesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAttributeValuesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAttributeValuesInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ServiceCode == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *GetAttributeValuesInput) SetAttributeName(v string) *GetAttributeValuesInput { + s.AttributeName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetAttributeValuesInput) SetMaxResults(v int64) *GetAttributeValuesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAttributeValuesInput) SetNextToken(v string) *GetAttributeValuesInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *GetAttributeValuesInput) SetServiceCode(v string) *GetAttributeValuesInput { + s.ServiceCode = &v + return s +} + +type GetAttributeValuesOutput struct { + _ struct{} `type:"structure"` + + // The list of values for an attribute. For example, Throughput Optimized HDD + // and Provisioned IOPS are two available values for the AmazonEC2volumeType. + AttributeValues []*AttributeValue `type:"list"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetAttributeValuesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAttributeValuesOutput) GoString() string { + return s.String() +} + +// SetAttributeValues sets the AttributeValues field's value. +func (s *GetAttributeValuesOutput) SetAttributeValues(v []*AttributeValue) *GetAttributeValuesOutput { + s.AttributeValues = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAttributeValuesOutput) SetNextToken(v string) *GetAttributeValuesOutput { + s.NextToken = &v + return s +} + +type GetProductsInput struct { + _ struct{} `type:"structure"` + + // The list of filters that limit the returned products. only products that + // match all filters are returned. + Filters []*Filter `type:"list"` + + // The format version that you want the response to be in. + // + // Valid values are: aws_v1 + FormatVersion *string `type:"string"` + + // The maximum number of results to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The code for the service whose products you want to retrieve. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s GetProductsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetProductsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetProductsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetProductsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *GetProductsInput) SetFilters(v []*Filter) *GetProductsInput { + s.Filters = v + return s +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *GetProductsInput) SetFormatVersion(v string) *GetProductsInput { + s.FormatVersion = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetProductsInput) SetMaxResults(v int64) *GetProductsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetProductsInput) SetNextToken(v string) *GetProductsInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *GetProductsInput) SetServiceCode(v string) *GetProductsInput { + s.ServiceCode = &v + return s +} + +type GetProductsOutput struct { + _ struct{} `type:"structure"` + + // The format version of the response. For example, aws_v1. + FormatVersion *string `type:"string"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` + + // The list of products that match your filters. The list contains both the + // product metadata and the price information. + PriceList []aws.JSONValue `type:"list"` +} + +// String returns the string representation +func (s GetProductsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetProductsOutput) GoString() string { + return s.String() +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *GetProductsOutput) SetFormatVersion(v string) *GetProductsOutput { + s.FormatVersion = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetProductsOutput) SetNextToken(v string) *GetProductsOutput { + s.NextToken = &v + return s +} + +// SetPriceList sets the PriceList field's value. +func (s *GetProductsOutput) SetPriceList(v []aws.JSONValue) *GetProductsOutput { + s.PriceList = v + return s +} + +// The metadata for a service, such as the service code and available attribute +// names. +type Service struct { + _ struct{} `type:"structure"` + + // The attributes that are available for this service. + AttributeNames []*string `type:"list"` + + // The code for the AWS service. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s Service) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Service) GoString() string { + return s.String() +} + +// SetAttributeNames sets the AttributeNames field's value. +func (s *Service) SetAttributeNames(v []*string) *Service { + s.AttributeNames = v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *Service) SetServiceCode(v string) *Service { + s.ServiceCode = &v + return s +} + +const ( + // FilterTypeTermMatch is a FilterType enum value + FilterTypeTermMatch = "TERM_MATCH" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go new file mode 100644 index 000000000..0555bc4c3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go @@ -0,0 +1,51 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package pricing provides the client and types for making API +// requests to AWS Price List Service. +// +// AWS Price List Service API (AWS Price List Service) is a centralized and +// convenient way to programmatically query Amazon Web Services for services, +// products, and pricing information. The AWS Price List Service uses standardized +// product attributes such as Location, Storage Class, and Operating System, +// and provides prices at the SKU level. You can use the AWS Price List Service +// to build cost control and scenario planning tools, reconcile billing data, +// forecast future spend for budgeting purposes, and provide cost benefit analysis +// that compare your internal workloads with AWS. +// +// Use GetServices without a service code to retrieve the service codes for +// all AWS services, then GetServices with a service code to retreive the attribute +// names for that service. After you have the service code and attribute names, +// you can use GetAttributeValues to see what values are available for an attribute. +// With the service code and an attribute name and value, you can use GetProducts +// to find specific products that you're interested in, such as an AmazonEC2 +// instance, with a Provisioned IOPSvolumeType. +// +// Service Endpoint +// +// AWS Price List Service API provides the following two endpoints: +// +// * https://api.pricing.us-east-1.amazonaws.com +// +// * https://api.pricing.ap-south-1.amazonaws.com +// +// See https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15 for more information on this service. +// +// See pricing package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/ +// +// Using the Client +// +// To contact AWS Price List Service 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 Price List Service client Pricing for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/#New +package pricing diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go new file mode 100644 index 000000000..10e4c44fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go @@ -0,0 +1,37 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +const ( + + // ErrCodeExpiredNextTokenException for service response error code + // "ExpiredNextTokenException". + // + // The pagination token expired. Try again without a pagination token. + ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // An error on the server occurred during the processing of your request. Try + // again later. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The pagination token is invalid. Try again without a pagination token. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // One or more parameters had an invalid value. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The requested resource can't be found. + ErrCodeNotFoundException = "NotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go new file mode 100644 index 000000000..90ff33d0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +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/jsonrpc" +) + +// Pricing provides the API operation methods for making requests to +// AWS Price List Service. See this package's package overview docs +// for details on the service. +// +// Pricing methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Pricing 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 = "api.pricing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Pricing" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Pricing client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Pricing client from just a session. +// svc := pricing.New(mySession) +// +// // Create a Pricing client with additional configuration +// svc := pricing.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pricing { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "pricing" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Pricing { + svc := &Pricing{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-15", + JSONVersion: "1.1", + TargetPrefix: "AWSPriceListService", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Pricing operation and runs any +// custom request initialization. +func (c *Pricing) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 73996cf63..241078f21 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -72,14 +72,14 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterRoleAlreadyExistsFault "DBClusterRoleAlreadyExists" // The specified IAM role Amazon Resource Name (ARN) is already associated with // the specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" // You have exceeded the maximum number of IAM roles that can be associated @@ -251,13 +251,13 @@ func (c *RDS) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource func (c *RDS) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { @@ -428,17 +428,17 @@ func (c *RDS) AuthorizeDBSecurityGroupIngressRequest(input *AuthorizeDBSecurityG // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified CIDRIP or EC2 security group is already authorized for the -// specified DB security group. +// The specified CIDRIP or Amazon EC2 security group is already authorized for +// the specified DB security group. // // * ErrCodeAuthorizationQuotaExceededFault "AuthorizationQuotaExceeded" -// DB security group authorization quota has been reached. +// The DB security group authorization quota has been reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress func (c *RDS) AuthorizeDBSecurityGroupIngress(input *AuthorizeDBSecurityGroupIngressInput) (*AuthorizeDBSecurityGroupIngressOutput, error) { @@ -462,6 +462,92 @@ func (c *RDS) AuthorizeDBSecurityGroupIngressWithContext(ctx aws.Context, input return out, req.Send() } +const opBacktrackDBCluster = "BacktrackDBCluster" + +// BacktrackDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the BacktrackDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 BacktrackDBCluster for more information on using the BacktrackDBCluster +// 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 BacktrackDBClusterRequest method. +// req, resp := client.BacktrackDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster +func (c *RDS) BacktrackDBClusterRequest(input *BacktrackDBClusterInput) (req *request.Request, output *BacktrackDBClusterOutput) { + op := &request.Operation{ + Name: opBacktrackDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BacktrackDBClusterInput{} + } + + output = &BacktrackDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// BacktrackDBCluster API operation for Amazon Relational Database Service. +// +// Backtracks a DB cluster to a specific time, without creating a new DB cluster. +// +// For more information on backtracking, see Backtracking an Aurora DB Cluster +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Managing.Backtrack.html) +// in the Amazon RDS User 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 Relational Database Service's +// API operation BacktrackDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster +func (c *RDS) BacktrackDBCluster(input *BacktrackDBClusterInput) (*BacktrackDBClusterOutput, error) { + req, out := c.BacktrackDBClusterRequest(input) + return out, req.Send() +} + +// BacktrackDBClusterWithContext is the same as BacktrackDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See BacktrackDBCluster 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 *RDS) BacktrackDBClusterWithContext(ctx aws.Context, input *BacktrackDBClusterInput, opts ...request.Option) (*BacktrackDBClusterOutput, error) { + req, out := c.BacktrackDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the @@ -517,10 +603,10 @@ func (c *RDS) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGr // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -665,22 +751,22 @@ func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (r // // Returned Error Codes: // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot func (c *RDS) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { @@ -759,13 +845,13 @@ func (c *RDS) CopyDBParameterGroupRequest(input *CopyDBParameterGroupInput) (req // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" // A DB parameter group with the same name exists. // // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup @@ -856,16 +942,16 @@ func (c *RDS) CopyDBSnapshotRequest(input *CopyDBSnapshotInput) (req *request.Re // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot func (c *RDS) CopyDBSnapshot(input *CopyDBSnapshotInput) (*CopyDBSnapshotOutput, error) { @@ -1037,53 +1123,53 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -1193,7 +1279,7 @@ func (c *RDS) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -1278,19 +1364,19 @@ func (c *RDS) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput // // Returned Error Codes: // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot func (c *RDS) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { @@ -1369,42 +1455,42 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -1413,23 +1499,23 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // The specified option group could not be found. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance func (c *RDS) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { @@ -1520,33 +1606,33 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -1557,8 +1643,8 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -1567,18 +1653,18 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // The specified option group could not be found. // // * ErrCodeDBSubnetGroupNotAllowedFault "DBSubnetGroupNotAllowedFault" -// Indicates that the DBSubnetGroup should not be specified while creating read -// replicas that lie in the same region as the source instance. +// The DBSubnetGroup shouldn't be specified while creating read replicas that +// lie in the same region as the source instance. // // * ErrCodeInvalidDBSubnetGroupFault "InvalidDBSubnetGroupFault" -// Indicates the DBSubnetGroup does not belong to the same VPC as that of an -// existing cross region read replica of the same source instance. +// The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region +// read replica of the same source instance. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica func (c *RDS) CreateDBInstanceReadReplica(input *CreateDBInstanceReadReplicaInput) (*CreateDBInstanceReadReplicaOutput, error) { @@ -1677,7 +1763,7 @@ func (c *RDS) CreateDBParameterGroupRequest(input *CreateDBParameterGroupInput) // // Returned Error Codes: // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -1752,6 +1838,9 @@ func (c *RDS) CreateDBSecurityGroupRequest(input *CreateDBSecurityGroupInput) (r // Creates a new DB security group. DB security groups control access to a DB // instance. // +// A DB security group controls access to EC2-Classic DB instances that are +// not in a VPC. +// // 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. @@ -1765,11 +1854,11 @@ func (c *RDS) CreateDBSecurityGroupRequest(input *CreateDBSecurityGroupInput) (r // exists. // // * ErrCodeDBSecurityGroupQuotaExceededFault "QuotaExceeded.DBSecurityGroup" -// Request would result in user exceeding the allowed number of DB security +// The request would result in the user exceeding the allowed number of DB security // groups. // // * ErrCodeDBSecurityGroupNotSupportedFault "DBSecurityGroupNotSupported" -// A DB security group is not allowed for this action. +// A DB security group isn't allowed for this action. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup func (c *RDS) CreateDBSecurityGroup(input *CreateDBSecurityGroupInput) (*CreateDBSecurityGroupOutput, error) { @@ -1851,13 +1940,13 @@ func (c *RDS) CreateDBSnapshotRequest(input *CreateDBSnapshotInput) (req *reques // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot func (c *RDS) CreateDBSnapshot(input *CreateDBSnapshotInput) (*CreateDBSnapshotOutput, error) { @@ -1940,11 +2029,12 @@ func (c *RDS) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req * // DBSubnetGroupName is already used by an existing DB subnet group. // // * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB subnet groups. +// The request would result in the user exceeding the allowed number of DB subnet +// groups. // // * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. +// The request would result in the user exceeding the allowed number of subnets +// in a DB subnet groups. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -2232,19 +2322,19 @@ func (c *RDS) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster func (c *RDS) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { @@ -2330,11 +2420,11 @@ func (c *RDS) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParamet // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup func (c *RDS) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { @@ -2419,10 +2509,10 @@ func (c *RDS) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput // // Returned Error Codes: // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot func (c *RDS) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { @@ -2525,19 +2615,19 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance func (c *RDS) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { @@ -2620,11 +2710,11 @@ func (c *RDS) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup func (c *RDS) DeleteDBParameterGroup(input *DeleteDBParameterGroupInput) (*DeleteDBParameterGroupOutput, error) { @@ -2707,10 +2797,10 @@ func (c *RDS) DeleteDBSecurityGroupRequest(input *DeleteDBSecurityGroupInput) (r // // Returned Error Codes: // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup func (c *RDS) DeleteDBSecurityGroup(input *DeleteDBSecurityGroupInput) (*DeleteDBSecurityGroupOutput, error) { @@ -2792,10 +2882,10 @@ func (c *RDS) DeleteDBSnapshotRequest(input *DeleteDBSnapshotInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot func (c *RDS) DeleteDBSnapshot(input *DeleteDBSnapshotInput) (*DeleteDBSnapshotOutput, error) { @@ -2878,13 +2968,13 @@ func (c *RDS) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req * // // Returned Error Codes: // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" -// The DB subnet is not in the available state. +// The DB subnet isn't in the available state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup func (c *RDS) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { @@ -3051,7 +3141,7 @@ func (c *RDS) DeleteOptionGroupRequest(input *DeleteOptionGroupInput) (req *requ // The specified option group could not be found. // // * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group is not in the available state. +// The option group isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup func (c *RDS) DeleteOptionGroup(input *DeleteOptionGroupInput) (*DeleteOptionGroupOutput, error) { @@ -3209,7 +3299,7 @@ func (c *RDS) DescribeCertificatesRequest(input *DescribeCertificatesInput) (req // // Returned Error Codes: // * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier does not refer to an existing certificate. +// CertificateIdentifier doesn't refer to an existing certificate. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates func (c *RDS) DescribeCertificates(input *DescribeCertificatesInput) (*DescribeCertificatesOutput, error) { @@ -3233,6 +3323,91 @@ func (c *RDS) DescribeCertificatesWithContext(ctx aws.Context, input *DescribeCe return out, req.Send() } +const opDescribeDBClusterBacktracks = "DescribeDBClusterBacktracks" + +// DescribeDBClusterBacktracksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterBacktracks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDBClusterBacktracks for more information on using the DescribeDBClusterBacktracks +// 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 DescribeDBClusterBacktracksRequest method. +// req, resp := client.DescribeDBClusterBacktracksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks +func (c *RDS) DescribeDBClusterBacktracksRequest(input *DescribeDBClusterBacktracksInput) (req *request.Request, output *DescribeDBClusterBacktracksOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterBacktracks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterBacktracksInput{} + } + + output = &DescribeDBClusterBacktracksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterBacktracks API operation for Amazon Relational Database Service. +// +// Returns information about backtracks for a DB cluster. +// +// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) +// in the Amazon RDS User 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 Relational Database Service's +// API operation DescribeDBClusterBacktracks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeDBClusterBacktrackNotFoundFault "DBClusterBacktrackNotFoundFault" +// BacktrackIdentifier doesn't refer to an existing backtrack. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks +func (c *RDS) DescribeDBClusterBacktracks(input *DescribeDBClusterBacktracksInput) (*DescribeDBClusterBacktracksOutput, error) { + req, out := c.DescribeDBClusterBacktracksRequest(input) + return out, req.Send() +} + +// DescribeDBClusterBacktracksWithContext is the same as DescribeDBClusterBacktracks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterBacktracks 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 *RDS) DescribeDBClusterBacktracksWithContext(ctx aws.Context, input *DescribeDBClusterBacktracksInput, opts ...request.Option) (*DescribeDBClusterBacktracksOutput, error) { + req, out := c.DescribeDBClusterBacktracksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the @@ -3293,7 +3468,7 @@ func (c *RDS) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterPa // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups func (c *RDS) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { @@ -3376,7 +3551,7 @@ func (c *RDS) DescribeDBClusterParametersRequest(input *DescribeDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters func (c *RDS) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { @@ -3466,7 +3641,7 @@ func (c *RDS) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBCluste // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes func (c *RDS) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { @@ -3549,7 +3724,7 @@ func (c *RDS) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshot // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots func (c *RDS) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { @@ -3632,7 +3807,7 @@ func (c *RDS) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *re // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters func (c *RDS) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { @@ -3847,7 +4022,7 @@ func (c *RDS) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req * // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances func (c *RDS) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { @@ -3982,7 +4157,7 @@ func (c *RDS) DescribeDBLogFilesRequest(input *DescribeDBLogFilesInput) (req *re // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles func (c *RDS) DescribeDBLogFiles(input *DescribeDBLogFilesInput) (*DescribeDBLogFilesOutput, error) { @@ -4119,7 +4294,7 @@ func (c *RDS) DescribeDBParameterGroupsRequest(input *DescribeDBParameterGroupsI // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups func (c *RDS) DescribeDBParameterGroups(input *DescribeDBParameterGroupsInput) (*DescribeDBParameterGroupsOutput, error) { @@ -4254,7 +4429,7 @@ func (c *RDS) DescribeDBParametersRequest(input *DescribeDBParametersInput) (req // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters func (c *RDS) DescribeDBParameters(input *DescribeDBParametersInput) (*DescribeDBParametersOutput, error) { @@ -4391,7 +4566,7 @@ func (c *RDS) DescribeDBSecurityGroupsRequest(input *DescribeDBSecurityGroupsInp // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups func (c *RDS) DescribeDBSecurityGroups(input *DescribeDBSecurityGroupsInput) (*DescribeDBSecurityGroupsOutput, error) { @@ -4531,7 +4706,7 @@ func (c *RDS) DescribeDBSnapshotAttributesRequest(input *DescribeDBSnapshotAttri // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes func (c *RDS) DescribeDBSnapshotAttributes(input *DescribeDBSnapshotAttributesInput) (*DescribeDBSnapshotAttributesOutput, error) { @@ -4616,7 +4791,7 @@ func (c *RDS) DescribeDBSnapshotsRequest(input *DescribeDBSnapshotsInput) (req * // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots func (c *RDS) DescribeDBSnapshots(input *DescribeDBSnapshotsInput) (*DescribeDBSnapshotsOutput, error) { @@ -4754,7 +4929,7 @@ func (c *RDS) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) // // Returned Error Codes: // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups func (c *RDS) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { @@ -6266,10 +6441,10 @@ func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDB // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { @@ -6354,10 +6529,10 @@ func (c *RDS) DownloadDBLogFilePortionRequest(input *DownloadDBLogFilePortionInp // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBLogFileNotFoundFault "DBLogFileNotFoundFault" -// LogFileName does not refer to an existing DB log file. +// LogFileName doesn't refer to an existing DB log file. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion func (c *RDS) DownloadDBLogFilePortion(input *DownloadDBLogFilePortionInput) (*DownloadDBLogFilePortionOutput, error) { @@ -6499,13 +6674,13 @@ func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *requ // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster func (c *RDS) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { @@ -6587,13 +6762,13 @@ func (c *RDS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource func (c *RDS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { @@ -6676,41 +6851,41 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster func (c *RDS) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { @@ -6809,11 +6984,11 @@ func (c *RDS) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup @@ -6909,10 +7084,10 @@ func (c *RDS) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnap // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" // You have exceeded the maximum number of accounts that you can share a manual @@ -6998,34 +7173,34 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -7034,23 +7209,23 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // The specified option group could not be found. // // * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" -// The DB upgrade failed because a resource the DB depends on could not be modified. +// The DB upgrade failed because a resource the DB depends on can't be modified. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier does not refer to an existing certificate. +// CertificateIdentifier doesn't refer to an existing certificate. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance func (c *RDS) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { @@ -7146,11 +7321,11 @@ func (c *RDS) ModifyDBParameterGroupRequest(input *ModifyDBParameterGroupInput) // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup @@ -7233,7 +7408,7 @@ func (c *RDS) ModifyDBSnapshotRequest(input *ModifyDBSnapshotInput) (req *reques // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot func (c *RDS) ModifyDBSnapshot(input *ModifyDBSnapshotInput) (*ModifyDBSnapshotOutput, error) { @@ -7328,10 +7503,10 @@ func (c *RDS) ModifyDBSnapshotAttributeRequest(input *ModifyDBSnapshotAttributeI // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" // You have exceeded the maximum number of accounts that you can share a manual @@ -7415,11 +7590,11 @@ func (c *RDS) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req * // // Returned Error Codes: // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. +// The request would result in the user exceeding the allowed number of subnets +// in a DB subnet groups. // // * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" // The DB subnet is already in use in the Availability Zone. @@ -7611,7 +7786,7 @@ func (c *RDS) ModifyOptionGroupRequest(input *ModifyOptionGroupInput) (req *requ // // Returned Error Codes: // * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group is not in the available state. +// The option group isn't in the available state. // // * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" // The specified option group could not be found. @@ -7703,10 +7878,10 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica func (c *RDS) PromoteReadReplica(input *PromoteReadReplicaInput) (*PromoteReadReplicaOutput, error) { @@ -7785,10 +7960,10 @@ func (c *RDS) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClus // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster func (c *RDS) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { @@ -7961,10 +8136,10 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance func (c *RDS) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { @@ -8047,14 +8222,14 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterRoleNotFoundFault "DBClusterRoleNotFound" -// The specified IAM role Amazon Resource Name (ARN) is not associated with -// the specified DB cluster. +// The specified IAM role Amazon Resource Name (ARN) isn't associated with the +// specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster func (c *RDS) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { @@ -8220,13 +8395,13 @@ func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource func (c *RDS) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { @@ -8318,11 +8493,11 @@ func (c *RDS) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameter // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup func (c *RDS) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*DBClusterParameterGroupNameMessage, error) { @@ -8408,11 +8583,11 @@ func (c *RDS) ResetDBParameterGroupRequest(input *ResetDBParameterGroupInput) (r // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup func (c *RDS) ResetDBParameterGroup(input *ResetDBParameterGroupInput) (*DBParameterGroupNameMessage, error) { @@ -8494,51 +8669,51 @@ func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name could not be found or Amazon RDS is not -// authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName -// and S3IngestionRoleArn values and try again. +// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized +// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and +// S3IngestionRoleArn values and try again. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3 @@ -8629,52 +8804,52 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. +// The DB cluster doesn't have enough capacity for the current operation. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that @@ -8684,7 +8859,11 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // The specified option group could not be found. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot func (c *RDS) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { @@ -8777,58 +8956,62 @@ func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPoin // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. +// The DB cluster doesn't have enough capacity for the current operation. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" // The specified option group could not be found. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime func (c *RDS) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { @@ -8928,34 +9111,34 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -8972,23 +9155,26 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { @@ -9072,27 +9258,27 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -9103,13 +9289,13 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name could not be found or Amazon RDS is not -// authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName -// and S3IngestionRoleArn values and try again. +// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized +// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and +// S3IngestionRoleArn values and try again. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -9118,17 +9304,17 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 func (c *RDS) RestoreDBInstanceFromS3(input *RestoreDBInstanceFromS3Input) (*RestoreDBInstanceFromS3Output, error) { @@ -9202,7 +9388,7 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // the BackupRetentionPeriod property. // // The target database is created with most of the original configuration, but -// in a system-selected availability zone, with the default security group, +// in a system-selected Availability Zone, with the default security group, // the default subnet group, and the default DB parameter group. By default, // the new DB instance is created as a single-AZ deployment except when the // instance is a SQL Server instance that has an option group that is associated @@ -9221,38 +9407,38 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodePointInTimeRestoreNotEnabledFault "PointInTimeRestoreNotEnabled" // SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod // equal to 0. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -9269,23 +9455,26 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { @@ -9367,17 +9556,17 @@ func (c *RDS) RevokeDBSecurityGroupIngressRequest(input *RevokeDBSecurityGroupIn // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress func (c *RDS) RevokeDBSecurityGroupIngress(input *RevokeDBSecurityGroupIngressInput) (*RevokeDBSecurityGroupIngressOutput, error) { @@ -9460,45 +9649,45 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance func (c *RDS) StartDBInstance(input *StartDBInstanceInput) (*StartDBInstanceOutput, error) { @@ -9583,19 +9772,19 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance func (c *RDS) StopDBInstance(input *StopDBInstanceInput) (*StopDBInstanceOutput, error) { @@ -10107,7 +10296,7 @@ func (s *AuthorizeDBSecurityGroupIngressOutput) SetDBSecurityGroup(v *DBSecurity type AvailabilityZone struct { _ struct{} `type:"structure"` - // The name of the availability zone. + // The name of the Availability Zone. Name *string `type:"string"` } @@ -10127,6 +10316,233 @@ func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { return s } +// Contains the available processor feature information for the DB instance +// class of a DB instance. +// +// For more information, see Configuring the Processor of the DB Instance Class +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor) +// in the Amazon RDS User Guide. +type AvailableProcessorFeature struct { + _ struct{} `type:"structure"` + + // The allowed values for the processor feature of the DB instance class. + AllowedValues *string `type:"string"` + + // The default value for the processor feature of the DB instance class. + DefaultValue *string `type:"string"` + + // The name of the processor feature. Valid names are coreCount and threadsPerCore. + Name *string `type:"string"` +} + +// String returns the string representation +func (s AvailableProcessorFeature) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailableProcessorFeature) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *AvailableProcessorFeature) SetAllowedValues(v string) *AvailableProcessorFeature { + s.AllowedValues = &v + return s +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *AvailableProcessorFeature) SetDefaultValue(v string) *AvailableProcessorFeature { + s.DefaultValue = &v + return s +} + +// SetName sets the Name field's value. +func (s *AvailableProcessorFeature) SetName(v string) *AvailableProcessorFeature { + s.Name = &v + return s +} + +type BacktrackDBClusterInput struct { + _ struct{} `type:"structure"` + + // The timestamp of the time to backtrack the DB cluster to, specified in ISO + // 8601 format. For more information about ISO 8601, see the ISO8601 Wikipedia + // page. (http://en.wikipedia.org/wiki/ISO_8601) + // + // If the specified time is not a consistent time for the DB cluster, Aurora + // automatically chooses the nearest possible consistent time for the DB cluster. + // + // Constraints: + // + // * Must contain a valid ISO 8601 timestamp. + // + // * Cannot contain a timestamp set in the future. + // + // Example: 2017-07-08T18:00Z + // + // BacktrackTo is a required field + BacktrackTo *time.Time `type:"timestamp" required:"true"` + + // The DB cluster identifier of the DB cluster to be backtracked. This parameter + // is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // A value that, if specified, forces the DB cluster to backtrack when binary + // logging is enabled. Otherwise, an error occurs when binary logging is enabled. + Force *bool `type:"boolean"` + + // If BacktrackTo is set to a timestamp earlier than the earliest backtrack + // time, this value backtracks the DB cluster to the earliest possible backtrack + // time. Otherwise, an error occurs. + UseEarliestTimeOnPointInTimeUnavailable *bool `type:"boolean"` +} + +// String returns the string representation +func (s BacktrackDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BacktrackDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BacktrackDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BacktrackDBClusterInput"} + if s.BacktrackTo == nil { + invalidParams.Add(request.NewErrParamRequired("BacktrackTo")) + } + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBacktrackTo sets the BacktrackTo field's value. +func (s *BacktrackDBClusterInput) SetBacktrackTo(v time.Time) *BacktrackDBClusterInput { + s.BacktrackTo = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *BacktrackDBClusterInput) SetDBClusterIdentifier(v string) *BacktrackDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetForce sets the Force field's value. +func (s *BacktrackDBClusterInput) SetForce(v bool) *BacktrackDBClusterInput { + s.Force = &v + return s +} + +// SetUseEarliestTimeOnPointInTimeUnavailable sets the UseEarliestTimeOnPointInTimeUnavailable field's value. +func (s *BacktrackDBClusterInput) SetUseEarliestTimeOnPointInTimeUnavailable(v bool) *BacktrackDBClusterInput { + s.UseEarliestTimeOnPointInTimeUnavailable = &v + return s +} + +// This data type is used as a response element in the DescribeDBClusterBacktracks +// action. +type BacktrackDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the backtrack identifier. + BacktrackIdentifier *string `type:"string"` + + // The timestamp of the time at which the backtrack was requested. + BacktrackRequestCreationTime *time.Time `type:"timestamp"` + + // The timestamp of the time to which the DB cluster was backtracked. + BacktrackTo *time.Time `type:"timestamp"` + + // The timestamp of the time from which the DB cluster was backtracked. + BacktrackedFrom *time.Time `type:"timestamp"` + + // Contains a user-supplied DB cluster identifier. This identifier is the unique + // key that identifies a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // The status of the backtrack. This property returns one of the following values: + // + // * applying - The backtrack is currently being applied to or rolled back + // from the DB cluster. + // + // * completed - The backtrack has successfully been applied to or rolled + // back from the DB cluster. + // + // * failed - An error occurred while the backtrack was applied to or rolled + // back from the DB cluster. + // + // * pending - The backtrack is currently pending application to or rollback + // from the DB cluster. + Status *string `type:"string"` +} + +// String returns the string representation +func (s BacktrackDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BacktrackDBClusterOutput) GoString() string { + return s.String() +} + +// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackIdentifier(v string) *BacktrackDBClusterOutput { + s.BacktrackIdentifier = &v + return s +} + +// SetBacktrackRequestCreationTime sets the BacktrackRequestCreationTime field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackRequestCreationTime(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackRequestCreationTime = &v + return s +} + +// SetBacktrackTo sets the BacktrackTo field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackTo(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackTo = &v + return s +} + +// SetBacktrackedFrom sets the BacktrackedFrom field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackedFrom(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackedFrom = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *BacktrackDBClusterOutput) SetDBClusterIdentifier(v string) *BacktrackDBClusterOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *BacktrackDBClusterOutput) SetStatus(v string) *BacktrackDBClusterOutput { + s.Status = &v + return s +} + // A CA certificate for an AWS account. type Certificate struct { _ struct{} `type:"structure"` @@ -10144,10 +10560,10 @@ type Certificate struct { Thumbprint *string `type:"string"` // The starting date from which the certificate is valid. - ValidFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `type:"timestamp"` // The final date that the certificate continues to be valid. - ValidTill *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidTill *time.Time `type:"timestamp"` } // String returns the string representation @@ -10403,10 +10819,6 @@ type CopyDBClusterSnapshotInput struct { // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key // alias for the KMS encryption key. // - // If you copy an unencrypted DB cluster snapshot and specify a value for the - // KmsKeyId parameter, Amazon RDS encrypts the target DB cluster snapshot using - // the specified KMS encryption key. - // // If you copy an encrypted DB cluster snapshot from your AWS account, you can // specify a value for KmsKeyId to encrypt the copy with a new KMS encryption // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster @@ -10420,6 +10832,9 @@ type CopyDBClusterSnapshotInput struct { // DB cluster snapshot in the destination AWS Region. KMS encryption keys are // specific to the AWS Region that they are created in, and you can't use encryption // keys from one AWS Region in another AWS Region. + // + // If you copy an unencrypted DB cluster snapshot and specify a value for the + // KmsKeyId parameter, an error is returned. KmsKeyId *string `type:"string"` // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot @@ -11091,6 +11506,17 @@ type CreateDBClusterInput struct { // and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups are retained. You must specify // a minimum value of 1. // @@ -11144,6 +11570,10 @@ type CreateDBClusterInput struct { // DestinationRegion is used for presigning the request to a given region. DestinationRegion *string `type:"string"` + // The list of log types that need to be enabled for exporting to CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -11339,6 +11769,12 @@ func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBCluste return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *CreateDBClusterInput) SetBacktrackWindow(v int64) *CreateDBClusterInput { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { s.BackupRetentionPeriod = &v @@ -11381,6 +11817,12 @@ func (s *CreateDBClusterInput) SetDestinationRegion(v string) *CreateDBClusterIn return s } +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *CreateDBClusterInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBClusterInput { + s.EnableCloudwatchLogsExports = v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *CreateDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *CreateDBClusterInput { s.EnableIAMDatabaseAuthentication = &v @@ -12008,6 +12450,9 @@ type CreateDBInstanceInput struct { EnableIAMDatabaseAuthentication *bool `type:"boolean"` // True to enable Performance Insights for the DB instance, and otherwise false. + // + // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon Relational Database Service User Guide. EnablePerformanceInsights *bool `type:"boolean"` // The name of the database engine to be used for this instance. @@ -12049,9 +12494,11 @@ type CreateDBInstanceInput struct { // The version number of the database engine to use. // - // The following are the database engines and major and minor versions that - // are available with Amazon RDS. Not every database engine is available for - // every AWS Region. + // For a list of valid engine versions, call DescribeDBEngineVersions. + // + // The following are the database engines and links to information about the + // major and minor versions that are available with Amazon RDS. Not every database + // engine is available for every AWS Region. // // Amazon Aurora // @@ -12060,98 +12507,28 @@ type CreateDBInstanceInput struct { // // MariaDB // - // * 10.2.12 (supported in all AWS Regions) + // See MariaDB on Amazon RDS Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt) + // in the Amazon RDS User Guide. // - // * 10.2.11 (supported in all AWS Regions) + // Microsoft SQL Server // - // 10.1.31 (supported in all AWS Regions) - // - // * 10.1.26 (supported in all AWS Regions) - // - // * 10.1.23 (supported in all AWS Regions) - // - // * 10.1.19 (supported in all AWS Regions) - // - // * 10.1.14 (supported in all AWS Regions except us-east-2) - // - // * 10.0.34 (supported in all AWS Regions) - // - // * 10.0.32 (supported in all AWS Regions) - // - // * 10.0.31 (supported in all AWS Regions) - // - // * 10.0.28 (supported in all AWS Regions) - // - // * 10.0.24 (supported in all AWS Regions) - // - // * 10.0.17 (supported in all AWS Regions except us-east-2, ca-central-1, - // eu-west-2) - // - // Microsoft SQL Server 2017 - // - // * 14.00.1000.169.v1 (supported for all editions, and all AWS Regions) - // - // Microsoft SQL Server 2016 - // - // * 13.00.4451.0.v1 (supported for all editions, and all AWS Regions) - // - // * 13.00.4422.0.v1 (supported for all editions, and all AWS Regions) - // - // * 13.00.2164.0.v1 (supported for all editions, and all AWS Regions) - // - // Microsoft SQL Server 2014 - // - // * 12.00.5546.0.v1 (supported for all editions, and all AWS Regions) - // - // * 12.00.5000.0.v1 (supported for all editions, and all AWS Regions) - // - // * 12.00.4422.0.v1 (supported for all editions except Enterprise Edition, - // and all AWS Regions except ca-central-1 and eu-west-2) - // - // Microsoft SQL Server 2012 - // - // * 11.00.6594.0.v1 (supported for all editions, and all AWS Regions) - // - // * 11.00.6020.0.v1 (supported for all editions, and all AWS Regions) - // - // * 11.00.5058.0.v1 (supported for all editions, and all AWS Regions except - // us-east-2, ca-central-1, and eu-west-2) - // - // * 11.00.2100.60.v1 (supported for all editions, and all AWS Regions except - // us-east-2, ca-central-1, and eu-west-2) - // - // Microsoft SQL Server 2008 R2 - // - // * 10.50.6529.0.v1 (supported for all editions, and all AWS Regions except - // us-east-2, ca-central-1, and eu-west-2) - // - // * 10.50.6000.34.v1 (supported for all editions, and all AWS Regions except - // us-east-2, ca-central-1, and eu-west-2) - // - // * 10.50.2789.0.v1 (supported for all editions, and all AWS Regions except - // us-east-2, ca-central-1, and eu-west-2) + // See Version and Feature Support on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.FeatureSupport) + // in the Amazon RDS User Guide. // // MySQL // - // * 5.7.21 (supported in all AWS regions) + // See MySQL on Amazon RDS Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) + // in the Amazon RDS User Guide. // - // * 5.7.19 (supported in all AWS regions) + // Oracle // - // * 5.7.17 (supported in all AWS regions) + // See Oracle Database Engine Release Notes (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html) + // in the Amazon RDS User Guide. // - // * 5.7.16 (supported in all AWS regions) + // PostgreSQL // - // 5.6.39(supported in all AWS Regions) - // - // 5.6.37(supported in all AWS Regions) - // - // 5.6.35(supported in all AWS Regions) - // - // 5.6.34(supported in all AWS Regions) - // - // 5.6.29(supported in all AWS Regions) - // - // 5.6.27 + // See Supported PostgreSQL Database Versions (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.DBVersions) + // in the Amazon RDS User Guide. EngineVersion *string `type:"string"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -12319,6 +12696,10 @@ type CreateDBInstanceInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number on which the database accepts connections. // // MySQL @@ -12405,6 +12786,10 @@ type CreateDBInstanceInput struct { // Constraints: Minimum 30-minute window. PreferredMaintenanceWindow *string `type:"string"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). @@ -12685,6 +13070,12 @@ func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *Create return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *CreateDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { s.Port = &v @@ -12703,6 +13094,12 @@ func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateD return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *CreateDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *CreateDBInstanceInput { + s.ProcessorFeatures = v + return s +} + // SetPromotionTier sets the PromotionTier field's value. func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { s.PromotionTier = &v @@ -12866,6 +13263,9 @@ type CreateDBInstanceReadReplicaInput struct { EnableIAMDatabaseAuthentication *bool `type:"boolean"` // True to enable Performance Insights for the read replica, and otherwise false. + // + // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon Relational Database Service User Guide. EnablePerformanceInsights *bool `type:"boolean"` // The amount of Provisioned IOPS (input/output operations per second) to be @@ -12925,6 +13325,10 @@ type CreateDBInstanceReadReplicaInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number that the DB instance uses for connections. // // Default: Inherits from the source DB instance @@ -12975,6 +13379,10 @@ type CreateDBInstanceReadReplicaInput struct { // and Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). PreSignedUrl *string `type:"string"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal @@ -13037,6 +13445,10 @@ type CreateDBInstanceReadReplicaInput struct { // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A value that specifies that the DB instance class of the DB instance uses + // its default processor features. + UseDefaultProcessorFeatures *bool `type:"boolean"` } // String returns the string representation @@ -13167,6 +13579,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsKMSKeyId(v stri return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceReadReplicaInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceReadReplicaInput) SetPort(v int64) *CreateDBInstanceReadReplicaInput { s.Port = &v @@ -13179,6 +13597,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetPreSignedUrl(v string) *CreateDBIn return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *CreateDBInstanceReadReplicaInput) SetProcessorFeatures(v []*ProcessorFeature) *CreateDBInstanceReadReplicaInput { + s.ProcessorFeatures = v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *CreateDBInstanceReadReplicaInput) SetPubliclyAccessible(v bool) *CreateDBInstanceReadReplicaInput { s.PubliclyAccessible = &v @@ -13209,6 +13633,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetTags(v []*Tag) *CreateDBInstanceRe return s } +// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. +func (s *CreateDBInstanceReadReplicaInput) SetUseDefaultProcessorFeatures(v bool) *CreateDBInstanceReadReplicaInput { + s.UseDefaultProcessorFeatures = &v + return s +} + type CreateDBInstanceReadReplicaOutput struct { _ struct{} `type:"structure"` @@ -13242,6 +13672,13 @@ type CreateDBParameterGroupInput struct { // to a DB instance running a database engine and engine version compatible // with that DB parameter group family. // + // To list all of the available parameter group families, use the following + // command: + // + // aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" + // + // The output contains duplicates. + // // DBParameterGroupFamily is a required field DBParameterGroupFamily *string `type:"string" required:"true"` @@ -13954,6 +14391,13 @@ type DBCluster struct { // can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The number of change records stored for Backtrack. + BacktrackConsumedChangeRecords *int64 `type:"long"` + + // The target backtrack window, in seconds. If this value is set to 0, backtracking + // is disabled for the DB cluster. Otherwise, backtracking is enabled. + BacktrackWindow *int64 `type:"long"` + // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int64 `type:"integer"` @@ -13966,7 +14410,7 @@ type DBCluster struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) for the DB cluster. DBClusterArn *string `type:"string"` @@ -13998,9 +14442,16 @@ type DBCluster struct { // cluster is accessed. DbClusterResourceId *string `type:"string"` - // Specifies the earliest time to which a database can be restored with point-in-time + // The earliest time to which a DB cluster can be backtracked. + EarliestBacktrackTime *time.Time `type:"timestamp"` + + // The earliest time to which a database can be restored with point-in-time // restore. - EarliestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestRestorableTime *time.Time `type:"timestamp"` + + // A list of log types that this DB cluster is configured to export to CloudWatch + // Logs. + EnabledCloudwatchLogsExports []*string `type:"list"` // Specifies the connection endpoint for the primary instance of the DB cluster. Endpoint *string `type:"string"` @@ -14024,7 +14475,7 @@ type DBCluster struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // Contains the master username for the DB cluster. MasterUsername *string `type:"string"` @@ -14105,6 +14556,18 @@ func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { return s } +// SetBacktrackConsumedChangeRecords sets the BacktrackConsumedChangeRecords field's value. +func (s *DBCluster) SetBacktrackConsumedChangeRecords(v int64) *DBCluster { + s.BacktrackConsumedChangeRecords = &v + return s +} + +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *DBCluster) SetBacktrackWindow(v int64) *DBCluster { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { s.BackupRetentionPeriod = &v @@ -14177,12 +14640,24 @@ func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { return s } +// SetEarliestBacktrackTime sets the EarliestBacktrackTime field's value. +func (s *DBCluster) SetEarliestBacktrackTime(v time.Time) *DBCluster { + s.EarliestBacktrackTime = &v + return s +} + // SetEarliestRestorableTime sets the EarliestRestorableTime field's value. func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { s.EarliestRestorableTime = &v return s } +// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. +func (s *DBCluster) SetEnabledCloudwatchLogsExports(v []*string) *DBCluster { + s.EnabledCloudwatchLogsExports = v + return s +} + // SetEndpoint sets the Endpoint field's value. func (s *DBCluster) SetEndpoint(v string) *DBCluster { s.Endpoint = &v @@ -14535,7 +15010,7 @@ type DBClusterSnapshot struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // Specifies the DB cluster identifier of the DB cluster that this DB cluster // snapshot was created from. @@ -14576,7 +15051,7 @@ type DBClusterSnapshot struct { // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // Provides the type of the DB cluster snapshot. SnapshotType *string `type:"string"` @@ -15060,7 +15535,7 @@ type DBInstance struct { IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` // Provides the date and time the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + InstanceCreateTime *time.Time `type:"timestamp"` // Specifies the Provisioned IOPS (I/O operations per second) value. Iops *int64 `type:"integer"` @@ -15071,7 +15546,7 @@ type DBInstance struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // License model information for this DB instance. LicenseModel *string `type:"string"` @@ -15106,6 +15581,10 @@ type DBInstance struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // Specifies the daily time range during which automated backups are created // if automated backups are enabled, as determined by the BackupRetentionPeriod. PreferredBackupWindow *string `type:"string"` @@ -15114,6 +15593,10 @@ type DBInstance struct { // in Universal Coordinated Time (UTC). PreferredMaintenanceWindow *string `type:"string"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). @@ -15415,6 +15898,12 @@ func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *DBInstance) SetPerformanceInsightsRetentionPeriod(v int64) *DBInstance { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { s.PreferredBackupWindow = &v @@ -15427,6 +15916,12 @@ func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *DBInstance) SetProcessorFeatures(v []*ProcessorFeature) *DBInstance { + s.ProcessorFeatures = v + return s +} + // SetPromotionTier sets the PromotionTier field's value. func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { s.PromotionTier = &v @@ -15840,7 +16335,7 @@ type DBSnapshot struct { // Specifies the time when the snapshot was taken, in Universal Coordinated // Time (UTC). - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + InstanceCreateTime *time.Time `type:"timestamp"` // Specifies the Provisioned IOPS (I/O operations per second) value of the DB // instance at the time of the snapshot. @@ -15865,9 +16360,13 @@ type DBSnapshot struct { // of the snapshot. Port *int64 `type:"integer"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance when the DB snapshot was created. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // Provides the type of the DB snapshot. SnapshotType *string `type:"string"` @@ -16009,6 +16508,12 @@ func (s *DBSnapshot) SetPort(v int64) *DBSnapshot { return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *DBSnapshot) SetProcessorFeatures(v []*ProcessorFeature) *DBSnapshot { + s.ProcessorFeatures = v + return s +} + // SetSnapshotCreateTime sets the SnapshotCreateTime field's value. func (s *DBSnapshot) SetSnapshotCreateTime(v time.Time) *DBSnapshot { s.SnapshotCreateTime = &v @@ -17089,6 +17594,173 @@ func (s *DescribeCertificatesOutput) SetMarker(v string) *DescribeCertificatesOu return s } +type DescribeDBClusterBacktracksInput struct { + _ struct{} `type:"structure"` + + // If specified, this value is the backtrack identifier of the backtrack to + // be described. + // + // Constraints: + // + // * Must contain a valid universally unique identifier (UUID). For more + // information about UUIDs, see A Universally Unique Identifier (UUID) URN + // Namespace (http://www.ietf.org/rfc/rfc4122.txt). + // + // Example: 123e4567-e89b-12d3-a456-426655440000 + BacktrackIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster to be described. This parameter + // is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // A filter that specifies one or more DB clusters to describe. Supported filters + // include the following: + // + // * db-cluster-backtrack-id - Accepts backtrack identifiers. The results + // list includes information about only the backtracks identified by these + // identifiers. + // + // * db-cluster-backtrack-status - Accepts any of the following backtrack + // status values: + // + // applying + // + // completed + // + // failed + // + // pending + // + // The results list includes information about only the backtracks identified + // by these values. For more information about backtrack status values, see + // DBClusterBacktrack. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterBacktracks + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClusterBacktracksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterBacktracksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterBacktracksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterBacktracksInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. +func (s *DescribeDBClusterBacktracksInput) SetBacktrackIdentifier(v string) *DescribeDBClusterBacktracksInput { + s.BacktrackIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClusterBacktracksInput) SetDBClusterIdentifier(v string) *DescribeDBClusterBacktracksInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterBacktracksInput) SetFilters(v []*Filter) *DescribeDBClusterBacktracksInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterBacktracksInput) SetMarker(v string) *DescribeDBClusterBacktracksInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterBacktracksInput) SetMaxRecords(v int64) *DescribeDBClusterBacktracksInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBClusterBacktracks +// action. +type DescribeDBClusterBacktracksOutput struct { + _ struct{} `type:"structure"` + + // Contains a list of backtracks for the user. + DBClusterBacktracks []*BacktrackDBClusterOutput `locationNameList:"DBClusterBacktrack" type:"list"` + + // A pagination token that can be used in a subsequent DescribeDBClusterBacktracks + // request. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterBacktracksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterBacktracksOutput) GoString() string { + return s.String() +} + +// SetDBClusterBacktracks sets the DBClusterBacktracks field's value. +func (s *DescribeDBClusterBacktracksOutput) SetDBClusterBacktracks(v []*BacktrackDBClusterOutput) *DescribeDBClusterBacktracksOutput { + s.DBClusterBacktracks = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterBacktracksOutput) SetMarker(v string) *DescribeDBClusterBacktracksOutput { + s.Marker = &v + return s +} + type DescribeDBClusterParameterGroupsInput struct { _ struct{} `type:"structure"` @@ -17749,7 +18421,7 @@ type DescribeDBEngineVersionsInput struct { // Example: 5.1.49 EngineVersion *string `type:"string"` - // Not currently supported. + // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` // If this parameter is specified and the requested engine supports the CharacterSetName @@ -19075,7 +19747,7 @@ type DescribeEngineDefaultParametersInput struct { // DBParameterGroupFamily is a required field DBParameterGroupFamily *string `type:"string" required:"true"` - // Not currently supported. + // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` // An optional pagination token provided by a previous DescribeEngineDefaultParameters @@ -19378,7 +20050,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // A list of event categories that trigger notifications for a event notification // subscription. @@ -19431,7 +20103,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -20283,7 +20955,9 @@ type DescribeReservedDBInstancesOfferingsInput struct { OfferingType *string `type:"string"` // Product description filter value. Specify this parameter to show only the - // available offerings matching the specified product description. + // available offerings that contain the specified product description. + // + // The results show offerings that partially match the filter value. ProductDescription *string `type:"string"` // The offering identifier filter value. Specify this parameter to show only @@ -21016,7 +21690,7 @@ type Event struct { _ struct{} `type:"structure"` // Specifies the date and time of the event. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // Specifies the category for the event. EventCategories []*string `locationNameList:"EventCategory" type:"list"` @@ -21294,16 +21968,31 @@ func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterO return s } -// This type is not currently supported. +// A filter name and value pair that is used to return a more specific list +// of results from a describe operation. Filters can be used to match a set +// of resources by specific criteria, such as IDs. The filters supported by +// a describe operation are documented with the describe operation. +// +// Currently, wildcards are not supported in filters. +// +// The following actions can be filtered: +// +// * DescribeDBClusterBacktracks +// +// * DescribeDBClusters +// +// * DescribeDBInstances +// +// * DescribePendingMaintenanceActions type Filter struct { _ struct{} `type:"structure"` - // This parameter is not currently supported. + // The name of the filter. Filter names are case-sensitive. // // Name is a required field Name *string `type:"string" required:"true"` - // This parameter is not currently supported. + // One or more filter values. Filter values are case-sensitive. // // Values is a required field Values []*string `locationNameList:"Value" type:"list" required:"true"` @@ -21483,6 +22172,17 @@ type ModifyDBClusterInput struct { // Default: false ApplyImmediately *bool `type:"boolean"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups are retained. You must specify // a minimum value of 1. // @@ -21493,6 +22193,10 @@ type ModifyDBClusterInput struct { // * Must be a value from 1 to 35 BackupRetentionPeriod *int64 `type:"integer"` + // The configuration setting for the log types to be enabled for export to CloudWatch + // Logs for a specific DB cluster. + CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` + // The DB cluster identifier for the cluster being modified. This parameter // is not case-sensitive. // @@ -21512,6 +22216,13 @@ type ModifyDBClusterInput struct { // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` + // The version number of the database engine to which you want to upgrade. Changing + // this parameter results in an outage. The change is applied during the next + // maintenance window unless the ApplyImmediately parameter is set to true. + // + // For a list of valid engine versions, see CreateDBCluster, or call DescribeDBEngineVersions. + EngineVersion *string `type:"string"` + // The new password for the master database user. This password can contain // any printable ASCII character except "/", """, or "@". // @@ -21619,12 +22330,24 @@ func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *ModifyDBClusterInput) SetBacktrackWindow(v int64) *ModifyDBClusterInput { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { s.BackupRetentionPeriod = &v return s } +// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. +func (s *ModifyDBClusterInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBClusterInput { + s.CloudwatchLogsExportConfiguration = v + return s +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { s.DBClusterIdentifier = &v @@ -21643,6 +22366,12 @@ func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *Modif return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { + s.EngineVersion = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { s.MasterUserPassword = &v @@ -21958,7 +22687,7 @@ type ModifyDBInstanceInput struct { CACertificateIdentifier *string `type:"string"` // The configuration setting for the log types to be enabled for export to CloudWatch - // Logs for a specific DB instance or DB cluster. + // Logs for a specific DB instance. CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` // True to copy all tags from the DB instance to snapshots of the DB instance, @@ -22100,6 +22829,9 @@ type ModifyDBInstanceInput struct { EnableIAMDatabaseAuthentication *bool `type:"boolean"` // True to enable Performance Insights for the DB instance, and otherwise false. + // + // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon Relational Database Service User Guide. EnablePerformanceInsights *bool `type:"boolean"` // The version number of the database engine to upgrade to. Changing this parameter @@ -22111,7 +22843,8 @@ type ModifyDBInstanceInput struct { // new engine version must be specified. The new DB parameter group can be the // default for that DB parameter group family. // - // For a list of valid engine versions, see CreateDBInstance. + // For information about valid engine versions, see CreateDBInstance, or call + // DescribeDBEngineVersions. EngineVersion *string `type:"string"` // The new Provisioned IOPS (I/O operations per second) value for the RDS instance. @@ -22247,6 +22980,10 @@ type ModifyDBInstanceInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The daily time range during which automated backups are created if automated // backups are enabled, as determined by the BackupRetentionPeriod parameter. // Changing this parameter doesn't result in an outage and the change is asynchronously @@ -22286,6 +23023,10 @@ type ModifyDBInstanceInput struct { // Constraints: Must be at least 30 minutes PreferredMaintenanceWindow *string `type:"string"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // A value that specifies the order in which an Aurora Replica is promoted to // the primary instance after a failure of the existing primary instance. For // more information, see Fault Tolerance for an Aurora DB Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html#Aurora.Managing.FaultTolerance). @@ -22341,6 +23082,10 @@ type ModifyDBInstanceInput struct { // device. TdeCredentialPassword *string `type:"string"` + // A value that specifies that the DB instance class of the DB instance uses + // its default processor features. + UseDefaultProcessorFeatures *bool `type:"boolean"` + // A list of EC2 VPC security groups to authorize on this DB instance. This // change is asynchronously applied as soon as possible. // @@ -22546,6 +23291,12 @@ func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *Modify return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *ModifyDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *ModifyDBInstanceInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { s.PreferredBackupWindow = &v @@ -22558,6 +23309,12 @@ func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyD return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *ModifyDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *ModifyDBInstanceInput { + s.ProcessorFeatures = v + return s +} + // SetPromotionTier sets the PromotionTier field's value. func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { s.PromotionTier = &v @@ -22588,6 +23345,12 @@ func (s *ModifyDBInstanceInput) SetTdeCredentialPassword(v string) *ModifyDBInst return s } +// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. +func (s *ModifyDBInstanceInput) SetUseDefaultProcessorFeatures(v bool) *ModifyDBInstanceInput { + s.UseDefaultProcessorFeatures = &v + return s +} + // SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. func (s *ModifyDBInstanceInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBInstanceInput { s.VpcSecurityGroupIds = v @@ -23896,6 +24659,10 @@ type OrderableDBInstanceOption struct { // A list of Availability Zones for a DB instance. AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` + // A list of the available processor features for the DB instance class of a + // DB instance. + AvailableProcessorFeatures []*AvailableProcessorFeature `locationNameList:"AvailableProcessorFeature" type:"list"` + // The DB instance class for a DB instance. DBInstanceClass *string `type:"string"` @@ -23971,6 +24738,12 @@ func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) return s } +// SetAvailableProcessorFeatures sets the AvailableProcessorFeatures field's value. +func (s *OrderableDBInstanceOption) SetAvailableProcessorFeatures(v []*AvailableProcessorFeature) *OrderableDBInstanceOption { + s.AvailableProcessorFeatures = v + return s +} + // SetDBInstanceClass sets the DBInstanceClass field's value. func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { s.DBInstanceClass = &v @@ -24243,14 +25016,14 @@ type PendingMaintenanceAction struct { // action is applied to the resource during its first maintenance window after // this date. If this date is specified, any next-maintenance opt-in requests // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + AutoAppliedAfterDate *time.Time `type:"timestamp"` // The effective date when the pending maintenance action is applied to the // resource. This date takes into account opt-in requests received from the // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. // This value is blank if an opt-in request has not been received and nothing // has been specified as AutoAppliedAfterDate or ForcedApplyDate. - CurrentApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CurrentApplyDate *time.Time `type:"timestamp"` // A description providing more detail about the maintenance action. Description *string `type:"string"` @@ -24259,7 +25032,7 @@ type PendingMaintenanceAction struct { // action is applied to the resource on this date regardless of the maintenance // window for the resource. If this date is specified, any immediate opt-in // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ForcedApplyDate *time.Time `type:"timestamp"` // Indicates the type of opt-in request that has been received for the resource. OptInStatus *string `type:"string"` @@ -24362,6 +25135,10 @@ type PendingModifiedValues struct { // Specifies the pending port for the DB instance. Port *int64 `type:"integer"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Specifies the storage type to be associated with the DB instance. StorageType *string `type:"string"` } @@ -24454,12 +25231,85 @@ func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *PendingModifiedValues) SetProcessorFeatures(v []*ProcessorFeature) *PendingModifiedValues { + s.ProcessorFeatures = v + return s +} + // SetStorageType sets the StorageType field's value. func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { s.StorageType = &v return s } +// Contains the processor features of a DB instance class. +// +// To specify the number of CPU cores, use the coreCount feature name for the +// Name parameter. To specify the number of threads per core, use the threadsPerCore +// feature name for the Name parameter. +// +// You can set the processor features of the DB instance class for a DB instance +// when you call one of the following actions: +// +// * CreateDBInstance +// +// * ModifyDBInstance +// +// * RestoreDBInstanceFromDBSnapshot +// +// * RestoreDBInstanceFromS3 +// +// * RestoreDBInstanceToPointInTime +// +// You can view the valid processor values for a particular instance class by +// calling the DescribeOrderableDBInstanceOptions action and specifying the +// instance class for the DBInstanceClass parameter. +// +// In addition, you can use the following actions for DB instance class processor +// information: +// +// * DescribeDBInstances +// +// * DescribeDBSnapshots +// +// * DescribeValidDBInstanceModifications +// +// For more information, see Configuring the Processor of the DB Instance Class +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor) +// in the Amazon RDS User Guide. +type ProcessorFeature struct { + _ struct{} `type:"structure"` + + // The name of the processor feature. Valid names are coreCount and threadsPerCore. + Name *string `type:"string"` + + // The value of a processor feature name. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ProcessorFeature) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProcessorFeature) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *ProcessorFeature) SetName(v string) *ProcessorFeature { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ProcessorFeature) SetValue(v string) *ProcessorFeature { + s.Value = &v + return s +} + type PromoteReadReplicaDBClusterInput struct { _ struct{} `type:"structure"` @@ -25149,7 +25999,7 @@ type ReservedDBInstance struct { ReservedDBInstancesOfferingId *string `type:"string"` // The time the reservation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved DB instance. State *string `type:"string"` @@ -25551,6 +26401,17 @@ type RestoreDBClusterFromS3Input struct { // can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups of the restored DB cluster // are retained. You must specify a minimum value of 1. // @@ -25599,6 +26460,10 @@ type RestoreDBClusterFromS3Input struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` + // The list of logs that the restored DB cluster is to export to CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -25801,6 +26666,12 @@ func (s *RestoreDBClusterFromS3Input) SetAvailabilityZones(v []*string) *Restore return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterFromS3Input) SetBacktrackWindow(v int64) *RestoreDBClusterFromS3Input { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *RestoreDBClusterFromS3Input) SetBackupRetentionPeriod(v int64) *RestoreDBClusterFromS3Input { s.BackupRetentionPeriod = &v @@ -25837,6 +26708,12 @@ func (s *RestoreDBClusterFromS3Input) SetDatabaseName(v string) *RestoreDBCluste return s } +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *RestoreDBClusterFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromS3Input { + s.EnableCloudwatchLogsExports = v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *RestoreDBClusterFromS3Input) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromS3Input { s.EnableIAMDatabaseAuthentication = &v @@ -25977,6 +26854,17 @@ type RestoreDBClusterFromSnapshotInput struct { // DB cluster can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. // This parameter isn't case-sensitive. // @@ -26003,6 +26891,10 @@ type RestoreDBClusterFromSnapshotInput struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` + // The list of logs that the restored DB cluster is to export to CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -26105,6 +26997,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *R return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetBacktrackWindow(v int64) *RestoreDBClusterFromSnapshotInput { + s.BacktrackWindow = &v + return s +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { s.DBClusterIdentifier = &v @@ -26123,6 +27021,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDB return s } +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { + s.EnableCloudwatchLogsExports = v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *RestoreDBClusterFromSnapshotInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterFromSnapshotInput { s.EnableIAMDatabaseAuthentication = &v @@ -26205,6 +27109,17 @@ func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *Restore type RestoreDBClusterToPointInTimeInput struct { _ struct{} `type:"structure"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The name of the new DB cluster to be created. // // Constraints: @@ -26225,6 +27140,10 @@ type RestoreDBClusterToPointInTimeInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // The list of logs that the restored DB cluster is to export to CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -26262,9 +27181,9 @@ type RestoreDBClusterToPointInTimeInput struct { // The port number on which the new DB cluster accepts connections. // - // Constraints: Value must be 1150-65535 + // Constraints: A value from 1150-65535. // - // Default: The same port as the original DB cluster. + // Default: The default port for the engine. Port *int64 `type:"integer"` // The date and time to restore the DB cluster to. @@ -26282,7 +27201,7 @@ type RestoreDBClusterToPointInTimeInput struct { // * Cannot be specified if RestoreType parameter is copy-on-write // // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RestoreToTime *time.Time `type:"timestamp"` // The type of restore to be performed. You can specify one of the following // values: @@ -26350,6 +27269,12 @@ func (s *RestoreDBClusterToPointInTimeInput) Validate() error { return nil } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetBacktrackWindow(v int64) *RestoreDBClusterToPointInTimeInput { + s.BacktrackWindow = &v + return s +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { s.DBClusterIdentifier = &v @@ -26362,6 +27287,12 @@ func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *Res return s } +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { + s.EnableCloudwatchLogsExports = v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *RestoreDBClusterToPointInTimeInput) SetEnableIAMDatabaseAuthentication(v bool) *RestoreDBClusterToPointInTimeInput { s.EnableIAMDatabaseAuthentication = &v @@ -26613,6 +27544,10 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Constraints: Value must be 1150-65535 Port *int64 `type:"integer"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal @@ -26649,6 +27584,10 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // The password for the given ARN from the key store in order to access the // device. TdeCredentialPassword *string `type:"string"` + + // A value that specifies that the DB instance class of the DB instance uses + // its default processor features. + UseDefaultProcessorFeatures *bool `type:"boolean"` } // String returns the string representation @@ -26785,6 +27724,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetPort(v int64) *RestoreDBInstan return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceFromDBSnapshotInput { + s.ProcessorFeatures = v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *RestoreDBInstanceFromDBSnapshotInput) SetPubliclyAccessible(v bool) *RestoreDBInstanceFromDBSnapshotInput { s.PubliclyAccessible = &v @@ -26815,6 +27760,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetTdeCredentialPassword(v string return s } +// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceFromDBSnapshotInput { + s.UseDefaultProcessorFeatures = &v + return s +} + type RestoreDBInstanceFromDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -26937,6 +27888,9 @@ type RestoreDBInstanceFromS3Input struct { EnableIAMDatabaseAuthentication *bool `type:"boolean"` // True to enable Performance Insights for the DB instance, and otherwise false. + // + // For more information, see Using Amazon Performance Insights (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon Relational Database Service User Guide. EnablePerformanceInsights *bool `type:"boolean"` // The name of the database engine to be used for this instance. @@ -26947,7 +27901,8 @@ type RestoreDBInstanceFromS3Input struct { Engine *string `type:"string" required:"true"` // The version number of the database engine to use. Choose the latest minor - // version of your database engine as specified in CreateDBInstance. + // version of your database engine. For information about engine versions, see + // CreateDBInstance, or call DescribeDBEngineVersions. EngineVersion *string `type:"string"` // The amount of Provisioned IOPS (input/output operations per second) to allocate @@ -27023,6 +27978,10 @@ type RestoreDBInstanceFromS3Input struct { // the KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number on which the database accepts connections. // // Type: Integer @@ -27063,6 +28022,10 @@ type RestoreDBInstanceFromS3Input struct { // * Must be at least 30 minutes. PreferredMaintenanceWindow *string `type:"string"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Specifies whether the DB instance is publicly accessible or not. For more // information, see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` @@ -27111,6 +28074,10 @@ type RestoreDBInstanceFromS3Input struct { // see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html). Tags []*Tag `locationNameList:"Tag" type:"list"` + // A value that specifies that the DB instance class of the DB instance uses + // its default processor features. + UseDefaultProcessorFeatures *bool `type:"boolean"` + // A list of VPC security groups to associate with this DB instance. VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } @@ -27312,6 +28279,12 @@ func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsKMSKeyId(v string) return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsRetentionPeriod(v int64) *RestoreDBInstanceFromS3Input { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *RestoreDBInstanceFromS3Input) SetPort(v int64) *RestoreDBInstanceFromS3Input { s.Port = &v @@ -27330,6 +28303,12 @@ func (s *RestoreDBInstanceFromS3Input) SetPreferredMaintenanceWindow(v string) * return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *RestoreDBInstanceFromS3Input) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceFromS3Input { + s.ProcessorFeatures = v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *RestoreDBInstanceFromS3Input) SetPubliclyAccessible(v bool) *RestoreDBInstanceFromS3Input { s.PubliclyAccessible = &v @@ -27384,6 +28363,12 @@ func (s *RestoreDBInstanceFromS3Input) SetTags(v []*Tag) *RestoreDBInstanceFromS return s } +// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. +func (s *RestoreDBInstanceFromS3Input) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceFromS3Input { + s.UseDefaultProcessorFeatures = &v + return s +} + // SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. func (s *RestoreDBInstanceFromS3Input) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceFromS3Input { s.VpcSecurityGroupIds = v @@ -27548,6 +28533,10 @@ type RestoreDBInstanceToPointInTimeInput struct { // Default: The same port as the original DB instance. Port *int64 `type:"integer"` + // The number of CPU cores and the number of threads per core for the DB instance + // class of the DB instance. + ProcessorFeatures []*ProcessorFeature `locationNameList:"ProcessorFeature" type:"list"` + // Specifies the accessibility options for the DB instance. A value of true // specifies an Internet-facing instance with a publicly resolvable DNS name, // which resolves to a public IP address. A value of false specifies an internal @@ -27577,7 +28566,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // * Cannot be specified if UseLatestRestorableTime parameter is true // // Example: 2009-09-07T23:45:00Z - RestoreTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RestoreTime *time.Time `type:"timestamp"` // The identifier of the source DB instance from which to restore. // @@ -27620,6 +28609,10 @@ type RestoreDBInstanceToPointInTimeInput struct { // device. TdeCredentialPassword *string `type:"string"` + // A value that specifies that the DB instance class of the DB instance uses + // its default processor features. + UseDefaultProcessorFeatures *bool `type:"boolean"` + // Specifies whether (true) or not (false) the DB instance is restored from // the latest backup time. // @@ -27751,6 +28744,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetPort(v int64) *RestoreDBInstanc return s } +// SetProcessorFeatures sets the ProcessorFeatures field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetProcessorFeatures(v []*ProcessorFeature) *RestoreDBInstanceToPointInTimeInput { + s.ProcessorFeatures = v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetPubliclyAccessible(v bool) *RestoreDBInstanceToPointInTimeInput { s.PubliclyAccessible = &v @@ -27799,6 +28798,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetTdeCredentialPassword(v string) return s } +// SetUseDefaultProcessorFeatures sets the UseDefaultProcessorFeatures field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetUseDefaultProcessorFeatures(v bool) *RestoreDBInstanceToPointInTimeInput { + s.UseDefaultProcessorFeatures = &v + return s +} + // SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBInstanceToPointInTimeInput { s.UseLatestRestorableTime = &v @@ -28300,6 +29305,9 @@ type ValidDBInstanceModificationsMessage struct { // Valid storage options for your DB instance. Storage []*ValidStorageOptions `locationNameList:"ValidStorageOptions" type:"list"` + + // Valid processor features for your DB instance. + ValidProcessorFeatures []*AvailableProcessorFeature `locationNameList:"AvailableProcessorFeature" type:"list"` } // String returns the string representation @@ -28318,6 +29326,12 @@ func (s *ValidDBInstanceModificationsMessage) SetStorage(v []*ValidStorageOption return s } +// SetValidProcessorFeatures sets the ValidProcessorFeatures field's value. +func (s *ValidDBInstanceModificationsMessage) SetValidProcessorFeatures(v []*AvailableProcessorFeature) *ValidDBInstanceModificationsMessage { + s.ValidProcessorFeatures = v + return s +} + // Information about valid modifications that you can make to your DB instance. // Contains the result of a successful call to the DescribeValidDBInstanceModifications // action. diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go index 4cb1983df..a4201c6da 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go @@ -7,55 +7,61 @@ const ( // ErrCodeAuthorizationAlreadyExistsFault for service response error code // "AuthorizationAlreadyExists". // - // The specified CIDRIP or EC2 security group is already authorized for the - // specified DB security group. + // The specified CIDRIP or Amazon EC2 security group is already authorized for + // the specified DB security group. ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists" // ErrCodeAuthorizationNotFoundFault for service response error code // "AuthorizationNotFound". // - // Specified CIDRIP or EC2 security group is not authorized for the specified - // DB security group. + // The specified CIDRIP or Amazon EC2 security group isn't authorized for the + // specified DB security group. // - // RDS may not also be authorized via IAM to perform necessary actions on your - // behalf. + // RDS also may not be authorized by using IAM to perform necessary actions + // on your behalf. ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" // ErrCodeAuthorizationQuotaExceededFault for service response error code // "AuthorizationQuotaExceeded". // - // DB security group authorization quota has been reached. + // The DB security group authorization quota has been reached. ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" // ErrCodeCertificateNotFoundFault for service response error code // "CertificateNotFound". // - // CertificateIdentifier does not refer to an existing certificate. + // CertificateIdentifier doesn't refer to an existing certificate. ErrCodeCertificateNotFoundFault = "CertificateNotFound" // ErrCodeDBClusterAlreadyExistsFault for service response error code // "DBClusterAlreadyExistsFault". // - // User already has a DB cluster with the given identifier. + // The user already has a DB cluster with the given identifier. ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" + // ErrCodeDBClusterBacktrackNotFoundFault for service response error code + // "DBClusterBacktrackNotFoundFault". + // + // BacktrackIdentifier doesn't refer to an existing backtrack. + ErrCodeDBClusterBacktrackNotFoundFault = "DBClusterBacktrackNotFoundFault" + // ErrCodeDBClusterNotFoundFault for service response error code // "DBClusterNotFoundFault". // - // DBClusterIdentifier does not refer to an existing DB cluster. + // DBClusterIdentifier doesn't refer to an existing DB cluster. ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code // "DBClusterParameterGroupNotFound". // - // DBClusterParameterGroupName does not refer to an existing DB Cluster parameter + // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" // ErrCodeDBClusterQuotaExceededFault for service response error code // "DBClusterQuotaExceededFault". // - // User attempted to create a new DB cluster and the user has already reached + // The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" @@ -69,8 +75,8 @@ const ( // ErrCodeDBClusterRoleNotFoundFault for service response error code // "DBClusterRoleNotFound". // - // The specified IAM role Amazon Resource Name (ARN) is not associated with - // the specified DB cluster. + // The specified IAM role Amazon Resource Name (ARN) isn't associated with the + // specified DB cluster. ErrCodeDBClusterRoleNotFoundFault = "DBClusterRoleNotFound" // ErrCodeDBClusterRoleQuotaExceededFault for service response error code @@ -83,31 +89,31 @@ const ( // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code // "DBClusterSnapshotAlreadyExistsFault". // - // User already has a DB cluster snapshot with the given identifier. + // The user already has a DB cluster snapshot with the given identifier. ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" // ErrCodeDBClusterSnapshotNotFoundFault for service response error code // "DBClusterSnapshotNotFoundFault". // - // DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. + // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" // ErrCodeDBInstanceAlreadyExistsFault for service response error code // "DBInstanceAlreadyExists". // - // User already has a DB instance with the given identifier. + // The user already has a DB instance with the given identifier. ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" // ErrCodeDBInstanceNotFoundFault for service response error code // "DBInstanceNotFound". // - // DBInstanceIdentifier does not refer to an existing DB instance. + // DBInstanceIdentifier doesn't refer to an existing DB instance. ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" // ErrCodeDBLogFileNotFoundFault for service response error code // "DBLogFileNotFoundFault". // - // LogFileName does not refer to an existing DB log file. + // LogFileName doesn't refer to an existing DB log file. ErrCodeDBLogFileNotFoundFault = "DBLogFileNotFoundFault" // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code @@ -119,13 +125,13 @@ const ( // ErrCodeDBParameterGroupNotFoundFault for service response error code // "DBParameterGroupNotFound". // - // DBParameterGroupName does not refer to an existing DB parameter group. + // DBParameterGroupName doesn't refer to an existing DB parameter group. ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" // ErrCodeDBParameterGroupQuotaExceededFault for service response error code // "DBParameterGroupQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB parameter + // The request would result in the user exceeding the allowed number of DB parameter // groups. ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" @@ -139,19 +145,19 @@ const ( // ErrCodeDBSecurityGroupNotFoundFault for service response error code // "DBSecurityGroupNotFound". // - // DBSecurityGroupName does not refer to an existing DB security group. + // DBSecurityGroupName doesn't refer to an existing DB security group. ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" // ErrCodeDBSecurityGroupNotSupportedFault for service response error code // "DBSecurityGroupNotSupported". // - // A DB security group is not allowed for this action. + // A DB security group isn't allowed for this action. ErrCodeDBSecurityGroupNotSupportedFault = "DBSecurityGroupNotSupported" // ErrCodeDBSecurityGroupQuotaExceededFault for service response error code // "QuotaExceeded.DBSecurityGroup". // - // Request would result in user exceeding the allowed number of DB security + // The request would result in the user exceeding the allowed number of DB security // groups. ErrCodeDBSecurityGroupQuotaExceededFault = "QuotaExceeded.DBSecurityGroup" @@ -164,7 +170,7 @@ const ( // ErrCodeDBSnapshotNotFoundFault for service response error code // "DBSnapshotNotFound". // - // DBSnapshotIdentifier does not refer to an existing DB snapshot. + // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code @@ -183,39 +189,40 @@ const ( // ErrCodeDBSubnetGroupNotAllowedFault for service response error code // "DBSubnetGroupNotAllowedFault". // - // Indicates that the DBSubnetGroup should not be specified while creating read - // replicas that lie in the same region as the source instance. + // The DBSubnetGroup shouldn't be specified while creating read replicas that + // lie in the same region as the source instance. ErrCodeDBSubnetGroupNotAllowedFault = "DBSubnetGroupNotAllowedFault" // ErrCodeDBSubnetGroupNotFoundFault for service response error code // "DBSubnetGroupNotFoundFault". // - // DBSubnetGroupName does not refer to an existing DB subnet group. + // DBSubnetGroupName doesn't refer to an existing DB subnet group. ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code // "DBSubnetGroupQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB subnet groups. + // The request would result in the user exceeding the allowed number of DB subnet + // groups. ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" // ErrCodeDBSubnetQuotaExceededFault for service response error code // "DBSubnetQuotaExceededFault". // - // Request would result in user exceeding the allowed number of subnets in a - // DB subnet groups. + // The request would result in the user exceeding the allowed number of subnets + // in a DB subnet groups. ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" // ErrCodeDBUpgradeDependencyFailureFault for service response error code // "DBUpgradeDependencyFailure". // - // The DB upgrade failed because a resource the DB depends on could not be modified. + // The DB upgrade failed because a resource the DB depends on can't be modified. ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" // ErrCodeDomainNotFoundFault for service response error code // "DomainNotFoundFault". // - // Domain does not refer to an existing Active Directory Domain. + // Domain doesn't refer to an existing Active Directory domain. ErrCodeDomainNotFoundFault = "DomainNotFoundFault" // ErrCodeEventSubscriptionQuotaExceededFault for service response error code @@ -227,85 +234,85 @@ const ( // ErrCodeInstanceQuotaExceededFault for service response error code // "InstanceQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB instances. + // The request would result in the user exceeding the allowed number of DB instances. ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" // ErrCodeInsufficientDBClusterCapacityFault for service response error code // "InsufficientDBClusterCapacityFault". // - // The DB cluster does not have enough capacity for the current operation. + // The DB cluster doesn't have enough capacity for the current operation. ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" // ErrCodeInsufficientDBInstanceCapacityFault for service response error code // "InsufficientDBInstanceCapacity". // - // Specified DB instance class is not available in the specified Availability + // The specified DB instance class isn't available in the specified Availability // Zone. ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" // ErrCodeInsufficientStorageClusterCapacityFault for service response error code // "InsufficientStorageClusterCapacity". // - // There is insufficient storage available for the current action. You may be - // able to resolve this error by updating your subnet group to use different + // There is insufficient storage available for the current action. You might + // be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code // "InvalidDBClusterSnapshotStateFault". // - // The supplied value is not a valid DB cluster snapshot state. + // The supplied value isn't a valid DB cluster snapshot state. ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" // ErrCodeInvalidDBClusterStateFault for service response error code // "InvalidDBClusterStateFault". // - // The DB cluster is not in a valid state. + // The DB cluster isn't in a valid state. ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" // ErrCodeInvalidDBInstanceStateFault for service response error code // "InvalidDBInstanceState". // - // The specified DB instance is not in the available state. + // The specified DB instance isn't in the available state. ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" // ErrCodeInvalidDBParameterGroupStateFault for service response error code // "InvalidDBParameterGroupState". // // The DB parameter group is in use or is in an invalid state. If you are attempting - // to delete the parameter group, you cannot delete it when the parameter group + // to delete the parameter group, you can't delete it when the parameter group // is in this state. ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" // ErrCodeInvalidDBSecurityGroupStateFault for service response error code // "InvalidDBSecurityGroupState". // - // The state of the DB security group does not allow deletion. + // The state of the DB security group doesn't allow deletion. ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" // ErrCodeInvalidDBSnapshotStateFault for service response error code // "InvalidDBSnapshotState". // - // The state of the DB snapshot does not allow deletion. + // The state of the DB snapshot doesn't allow deletion. ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" // ErrCodeInvalidDBSubnetGroupFault for service response error code // "InvalidDBSubnetGroupFault". // - // Indicates the DBSubnetGroup does not belong to the same VPC as that of an - // existing cross region read replica of the same source instance. + // The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region + // read replica of the same source instance. ErrCodeInvalidDBSubnetGroupFault = "InvalidDBSubnetGroupFault" // ErrCodeInvalidDBSubnetGroupStateFault for service response error code // "InvalidDBSubnetGroupStateFault". // - // The DB subnet group cannot be deleted because it is in use. + // The DB subnet group cannot be deleted because it's in use. ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" // ErrCodeInvalidDBSubnetStateFault for service response error code // "InvalidDBSubnetStateFault". // - // The DB subnet is not in the available state. + // The DB subnet isn't in the available state. ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" // ErrCodeInvalidEventSubscriptionStateFault for service response error code @@ -318,21 +325,21 @@ const ( // ErrCodeInvalidOptionGroupStateFault for service response error code // "InvalidOptionGroupStateFault". // - // The option group is not in the available state. + // The option group isn't in the available state. ErrCodeInvalidOptionGroupStateFault = "InvalidOptionGroupStateFault" // ErrCodeInvalidRestoreFault for service response error code // "InvalidRestoreFault". // - // Cannot restore from vpc backup to non-vpc DB instance. + // Cannot restore from VPC backup to non-VPC DB instance. ErrCodeInvalidRestoreFault = "InvalidRestoreFault" // ErrCodeInvalidS3BucketFault for service response error code // "InvalidS3BucketFault". // - // The specified Amazon S3 bucket name could not be found or Amazon RDS is not - // authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName - // and S3IngestionRoleArn values and try again. + // The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized + // to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and + // S3IngestionRoleArn values and try again. ErrCodeInvalidS3BucketFault = "InvalidS3BucketFault" // ErrCodeInvalidSubnet for service response error code @@ -345,14 +352,14 @@ const ( // ErrCodeInvalidVPCNetworkStateFault for service response error code // "InvalidVPCNetworkStateFault". // - // DB subnet group does not cover all Availability Zones after it is created - // because users' change. + // The DB subnet group doesn't cover all Availability Zones after it's created + // because of users' change. ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" // ErrCodeKMSKeyNotAccessibleFault for service response error code // "KMSKeyNotAccessibleFault". // - // Error accessing KMS key. + // An error occurred accessing an AWS KMS key. ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" // ErrCodeOptionGroupAlreadyExistsFault for service response error code @@ -444,7 +451,7 @@ const ( // ErrCodeSnapshotQuotaExceededFault for service response error code // "SnapshotQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB snapshots. + // The request would result in the user exceeding the allowed number of DB snapshots. ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" // ErrCodeSourceNotFoundFault for service response error code @@ -456,14 +463,14 @@ const ( // ErrCodeStorageQuotaExceededFault for service response error code // "StorageQuotaExceeded". // - // Request would result in user exceeding the allowed amount of storage available - // across all DB instances. + // The request would result in the user exceeding the allowed amount of storage + // available across all DB instances. ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" // ErrCodeStorageTypeNotSupportedFault for service response error code // "StorageTypeNotSupported". // - // StorageType specified cannot be associated with the DB Instance. + // Storage of the StorageType specified can't be associated with the DB instance. ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" // ErrCodeSubnetAlreadyInUse for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go b/vendor/github.com/aws/aws-sdk-go/service/rds/service.go index 2e2ec2e97..f2d0efaf7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "rds" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "rds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "RDS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the RDS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index 7fcc803f1..82e996e83 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -12,6 +12,106 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/query" ) +const opAcceptReservedNodeExchange = "AcceptReservedNodeExchange" + +// AcceptReservedNodeExchangeRequest generates a "aws/request.Request" representing the +// client's request for the AcceptReservedNodeExchange operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AcceptReservedNodeExchange for more information on using the AcceptReservedNodeExchange +// 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 AcceptReservedNodeExchangeRequest method. +// req, resp := client.AcceptReservedNodeExchangeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange +func (c *Redshift) AcceptReservedNodeExchangeRequest(input *AcceptReservedNodeExchangeInput) (req *request.Request, output *AcceptReservedNodeExchangeOutput) { + op := &request.Operation{ + Name: opAcceptReservedNodeExchange, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptReservedNodeExchangeInput{} + } + + output = &AcceptReservedNodeExchangeOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptReservedNodeExchange API operation for Amazon Redshift. +// +// Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to +// the configuration (term, payment type, or number of nodes) and no additional +// costs. +// +// 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 Redshift's +// API operation AcceptReservedNodeExchange for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" +// The specified reserved compute node not found. +// +// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" +// Indicates that the Reserved Node being exchanged is not in an active state. +// +// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" +// Indicates that the reserved node has already been exchanged. +// +// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" +// Specified offering does not exist. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" +// Your request cannot be completed because a dependent internal service is +// temporarily unavailable. Wait 30 to 60 seconds and try again. +// +// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" +// User already has a reservation with the given identifier. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange +func (c *Redshift) AcceptReservedNodeExchange(input *AcceptReservedNodeExchangeInput) (*AcceptReservedNodeExchangeOutput, error) { + req, out := c.AcceptReservedNodeExchangeRequest(input) + return out, req.Send() +} + +// AcceptReservedNodeExchangeWithContext is the same as AcceptReservedNodeExchange with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptReservedNodeExchange 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 *Redshift) AcceptReservedNodeExchangeWithContext(ctx aws.Context, input *AcceptReservedNodeExchangeInput, opts ...request.Option) (*AcceptReservedNodeExchangeOutput, error) { + req, out := c.AcceptReservedNodeExchangeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIngress" // AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the @@ -371,10 +471,10 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // // Creates a new cluster. // -// To create the cluster in Virtual Private Cloud (VPC), you must provide a -// cluster subnet group name. The cluster subnet group identifies the subnets -// of your VPC that Amazon Redshift uses when creating the cluster. For more -// information about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) +// To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster +// subnet group name. The cluster subnet group identifies the subnets of your +// VPC that Amazon Redshift uses when creating the cluster. For more information +// about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) // in the Amazon Redshift Cluster Management Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -440,7 +540,8 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // The Elastic IP (EIP) is invalid or cannot be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -548,7 +649,8 @@ func (c *Redshift) CreateClusterParameterGroupRequest(input *CreateClusterParame // A cluster parameter group with the same name already exists. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -644,7 +746,8 @@ func (c *Redshift) CreateClusterSecurityGroupRequest(input *CreateClusterSecurit // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -745,7 +848,8 @@ func (c *Redshift) CreateClusterSnapshotRequest(input *CreateClusterSnapshotInpu // snapshots. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -855,7 +959,8 @@ func (c *Redshift) CreateClusterSubnetGroupRequest(input *CreateClusterSubnetGro // Your account is not authorized to perform the requested operation. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -999,7 +1104,8 @@ func (c *Redshift) CreateEventSubscriptionRequest(input *CreateEventSubscription // The specified Amazon Redshift event source could not be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1098,7 +1204,8 @@ func (c *Redshift) CreateHsmClientCertificateRequest(input *CreateHsmClientCerti // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1198,7 +1305,8 @@ func (c *Redshift) CreateHsmConfigurationRequest(input *CreateHsmConfigurationIn // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1297,7 +1405,8 @@ func (c *Redshift) CreateSnapshotCopyGrantRequest(input *CreateSnapshotCopyGrant // The encryption key has exceeded its grant limit in AWS KMS. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1376,7 +1485,7 @@ func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Reque // // Adds one or more tags to a specified resource. // -// A resource can have up to 10 tags. If you try to create more than 10 tags +// A resource can have up to 50 tags. If you try to create more than 50 tags // for a resource, you will receive an error and the attempt will fail. // // If you specify a key that already exists for the resource, the value for @@ -1391,7 +1500,8 @@ func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" // The resource could not be found. @@ -2312,6 +2422,85 @@ func (c *Redshift) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput return out, req.Send() } +const opDescribeClusterDbRevisions = "DescribeClusterDbRevisions" + +// DescribeClusterDbRevisionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusterDbRevisions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeClusterDbRevisions for more information on using the DescribeClusterDbRevisions +// 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 DescribeClusterDbRevisionsRequest method. +// req, resp := client.DescribeClusterDbRevisionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions +func (c *Redshift) DescribeClusterDbRevisionsRequest(input *DescribeClusterDbRevisionsInput) (req *request.Request, output *DescribeClusterDbRevisionsOutput) { + op := &request.Operation{ + Name: opDescribeClusterDbRevisions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClusterDbRevisionsInput{} + } + + output = &DescribeClusterDbRevisionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusterDbRevisions API operation for Amazon Redshift. +// +// Returns an array of ClusterDbRevision objects. +// +// 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 Redshift's +// API operation DescribeClusterDbRevisions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions +func (c *Redshift) DescribeClusterDbRevisions(input *DescribeClusterDbRevisionsInput) (*DescribeClusterDbRevisionsOutput, error) { + req, out := c.DescribeClusterDbRevisionsRequest(input) + return out, req.Send() +} + +// DescribeClusterDbRevisionsWithContext is the same as DescribeClusterDbRevisions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusterDbRevisions 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 *Redshift) DescribeClusterDbRevisionsWithContext(ctx aws.Context, input *DescribeClusterDbRevisionsInput, opts ...request.Option) (*DescribeClusterDbRevisionsOutput, error) { + req, out := c.DescribeClusterDbRevisionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" // DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the @@ -5511,6 +5700,102 @@ func (c *Redshift) GetClusterCredentialsWithContext(ctx aws.Context, input *GetC return out, req.Send() } +const opGetReservedNodeExchangeOfferings = "GetReservedNodeExchangeOfferings" + +// GetReservedNodeExchangeOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the GetReservedNodeExchangeOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetReservedNodeExchangeOfferings for more information on using the GetReservedNodeExchangeOfferings +// 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 GetReservedNodeExchangeOfferingsRequest method. +// req, resp := client.GetReservedNodeExchangeOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings +func (c *Redshift) GetReservedNodeExchangeOfferingsRequest(input *GetReservedNodeExchangeOfferingsInput) (req *request.Request, output *GetReservedNodeExchangeOfferingsOutput) { + op := &request.Operation{ + Name: opGetReservedNodeExchangeOfferings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetReservedNodeExchangeOfferingsInput{} + } + + output = &GetReservedNodeExchangeOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetReservedNodeExchangeOfferings API operation for Amazon Redshift. +// +// Returns an array of ReservedNodeOfferings which is filtered by payment type, +// term, and instance type. +// +// 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 Redshift's +// API operation GetReservedNodeExchangeOfferings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" +// The specified reserved compute node not found. +// +// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" +// Indicates that the Reserved Node being exchanged is not in an active state. +// +// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" +// Indicates that the reserved node has already been exchanged. +// +// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" +// Specified offering does not exist. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" +// Your request cannot be completed because a dependent internal service is +// temporarily unavailable. Wait 30 to 60 seconds and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings +func (c *Redshift) GetReservedNodeExchangeOfferings(input *GetReservedNodeExchangeOfferingsInput) (*GetReservedNodeExchangeOfferingsOutput, error) { + req, out := c.GetReservedNodeExchangeOfferingsRequest(input) + return out, req.Send() +} + +// GetReservedNodeExchangeOfferingsWithContext is the same as GetReservedNodeExchangeOfferings with the addition of +// the ability to pass a context and additional request options. +// +// See GetReservedNodeExchangeOfferings 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 *Redshift) GetReservedNodeExchangeOfferingsWithContext(ctx aws.Context, input *GetReservedNodeExchangeOfferingsInput, opts ...request.Option) (*GetReservedNodeExchangeOfferingsOutput, error) { + req, out := c.GetReservedNodeExchangeOfferingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyCluster = "ModifyCluster" // ModifyClusterRequest generates a "aws/request.Request" representing the @@ -5628,6 +5913,10 @@ func (c *Redshift) ModifyClusterRequest(input *ModifyClusterInput) (req *request // * ErrCodeInvalidElasticIpFault "InvalidElasticIpFault" // The Elastic IP (EIP) is invalid or cannot be found. // +// * ErrCodeTableLimitExceededFault "TableLimitExceeded" +// The number of tables in the cluster exceeds the limit for the requested new +// cluster node type. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster func (c *Redshift) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { req, out := c.ModifyClusterRequest(input) @@ -5650,6 +5939,92 @@ func (c *Redshift) ModifyClusterWithContext(ctx aws.Context, input *ModifyCluste return out, req.Send() } +const opModifyClusterDbRevision = "ModifyClusterDbRevision" + +// ModifyClusterDbRevisionRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterDbRevision operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ModifyClusterDbRevision for more information on using the ModifyClusterDbRevision +// 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 ModifyClusterDbRevisionRequest method. +// req, resp := client.ModifyClusterDbRevisionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision +func (c *Redshift) ModifyClusterDbRevisionRequest(input *ModifyClusterDbRevisionInput) (req *request.Request, output *ModifyClusterDbRevisionOutput) { + op := &request.Operation{ + Name: opModifyClusterDbRevision, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterDbRevisionInput{} + } + + output = &ModifyClusterDbRevisionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClusterDbRevision API operation for Amazon Redshift. +// +// Modifies the database revision of a cluster. The database revision is a unique +// revision of the database running in a 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 Amazon Redshift's +// API operation ModifyClusterDbRevision for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeClusterOnLatestRevisionFault "ClusterOnLatestRevision" +// Cluster is already on the latest database revision. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision +func (c *Redshift) ModifyClusterDbRevision(input *ModifyClusterDbRevisionInput) (*ModifyClusterDbRevisionOutput, error) { + req, out := c.ModifyClusterDbRevisionRequest(input) + return out, req.Send() +} + +// ModifyClusterDbRevisionWithContext is the same as ModifyClusterDbRevision with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClusterDbRevision 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 *Redshift) ModifyClusterDbRevisionWithContext(ctx aws.Context, input *ModifyClusterDbRevisionInput, opts ...request.Option) (*ModifyClusterDbRevisionOutput, error) { + req, out := c.ModifyClusterDbRevisionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyClusterIamRoles = "ModifyClusterIamRoles" // ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the @@ -6945,6 +7320,82 @@ func (c *Redshift) RotateEncryptionKeyWithContext(ctx aws.Context, input *Rotate return out, req.Send() } +type AcceptReservedNodeExchangeInput struct { + _ struct{} `type:"structure"` + + // A string representing the identifier of the Reserved Node to be exchanged. + // + // ReservedNodeId is a required field + ReservedNodeId *string `type:"string" required:"true"` + + // The unique identifier of the Reserved Node offering to be used for the exchange. + // + // TargetReservedNodeOfferingId is a required field + TargetReservedNodeOfferingId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptReservedNodeExchangeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptReservedNodeExchangeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptReservedNodeExchangeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptReservedNodeExchangeInput"} + if s.ReservedNodeId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) + } + if s.TargetReservedNodeOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetReservedNodeOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservedNodeId sets the ReservedNodeId field's value. +func (s *AcceptReservedNodeExchangeInput) SetReservedNodeId(v string) *AcceptReservedNodeExchangeInput { + s.ReservedNodeId = &v + return s +} + +// SetTargetReservedNodeOfferingId sets the TargetReservedNodeOfferingId field's value. +func (s *AcceptReservedNodeExchangeInput) SetTargetReservedNodeOfferingId(v string) *AcceptReservedNodeExchangeInput { + s.TargetReservedNodeOfferingId = &v + return s +} + +type AcceptReservedNodeExchangeOutput struct { + _ struct{} `type:"structure"` + + // Describes a reserved node. You can call the DescribeReservedNodeOfferings + // API to obtain the available reserved node offerings. + ExchangedReservedNode *ReservedNode `type:"structure"` +} + +// String returns the string representation +func (s AcceptReservedNodeExchangeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptReservedNodeExchangeOutput) GoString() string { + return s.String() +} + +// SetExchangedReservedNode sets the ExchangedReservedNode field's value. +func (s *AcceptReservedNodeExchangeOutput) SetExchangedReservedNode(v *ReservedNode) *AcceptReservedNodeExchangeOutput { + s.ExchangedReservedNode = v + return s +} + // Describes an AWS customer account authorized to restore a snapshot. type AccountWithRestoreAccess struct { _ struct{} `type:"structure"` @@ -7207,7 +7658,7 @@ type Cluster struct { AvailabilityZone *string `type:"string"` // The date and time that the cluster was created. - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The unique identifier of the cluster. ClusterIdentifier *string `type:"string"` @@ -7334,6 +7785,9 @@ type Cluster struct { // The number of compute nodes in the cluster. NumberOfNodes *int64 `type:"integer"` + // Cluster operations that are waiting to be started. + PendingActions []*string `type:"list"` + // A value that, if present, indicates that changes to the cluster are pending. // Specific pending changes are identified by subelements. PendingModifiedValues *PendingModifiedValues `type:"structure"` @@ -7528,6 +7982,12 @@ func (s *Cluster) SetNumberOfNodes(v int64) *Cluster { return s } +// SetPendingActions sets the PendingActions field's value. +func (s *Cluster) SetPendingActions(v []*string) *Cluster { + s.PendingActions = v + return s +} + // SetPendingModifiedValues sets the PendingModifiedValues field's value. func (s *Cluster) SetPendingModifiedValues(v *PendingModifiedValues) *Cluster { s.PendingModifiedValues = v @@ -7570,6 +8030,58 @@ func (s *Cluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *Cluster return s } +// Describes a ClusterDbRevision. +type ClusterDbRevision struct { + _ struct{} `type:"structure"` + + // The unique identifier of the cluster. + ClusterIdentifier *string `type:"string"` + + // A string representing the current cluster version. + CurrentDatabaseRevision *string `type:"string"` + + // The date on which the database revision was released. + DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` + + // A list of RevisionTarget objects, where each object describes the database + // revision that a cluster can be updated to. + RevisionTargets []*RevisionTarget `locationNameList:"RevisionTarget" type:"list"` +} + +// String returns the string representation +func (s ClusterDbRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClusterDbRevision) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ClusterDbRevision) SetClusterIdentifier(v string) *ClusterDbRevision { + s.ClusterIdentifier = &v + return s +} + +// SetCurrentDatabaseRevision sets the CurrentDatabaseRevision field's value. +func (s *ClusterDbRevision) SetCurrentDatabaseRevision(v string) *ClusterDbRevision { + s.CurrentDatabaseRevision = &v + return s +} + +// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. +func (s *ClusterDbRevision) SetDatabaseRevisionReleaseDate(v time.Time) *ClusterDbRevision { + s.DatabaseRevisionReleaseDate = &v + return s +} + +// SetRevisionTargets sets the RevisionTargets field's value. +func (s *ClusterDbRevision) SetRevisionTargets(v []*RevisionTarget) *ClusterDbRevision { + s.RevisionTargets = v + return s +} + // An AWS Identity and Access Management (IAM) role that can be used by the // associated Amazon Redshift cluster to access other AWS services. type ClusterIamRole struct { @@ -10343,6 +10855,100 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DescribeClusterDbRevisionsInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for a cluster whose ClusterDbRevisions you are requesting. + // This parameter is case sensitive. All clusters defined for an account are + // returned by default. + ClusterIdentifier *string `type:"string"` + + // An optional parameter that specifies the starting point for returning a set + // of response records. When the results of a DescribeClusterDbRevisions request + // exceed the value specified in MaxRecords, Amazon Redshift returns a value + // in the marker field of the response. You can retrieve the next set of response + // records by providing the returned marker value in the marker parameter and + // retrying the request. + // + // Constraints: You can specify either the ClusterIdentifier parameter, or the + // marker parameter, but not both. + Marker *string `type:"string"` + + // The maximum number of response records to return in each call. If the number + // of remaining response records exceeds the specified MaxRecords value, a value + // is returned in the marker field of the response. You can retrieve the next + // set of response records by providing the returned marker value in the marker + // parameter and retrying the request. + // + // Default: 100 + // + // Constraints: minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeClusterDbRevisionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterDbRevisionsInput) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *DescribeClusterDbRevisionsInput) SetClusterIdentifier(v string) *DescribeClusterDbRevisionsInput { + s.ClusterIdentifier = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterDbRevisionsInput) SetMarker(v string) *DescribeClusterDbRevisionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeClusterDbRevisionsInput) SetMaxRecords(v int64) *DescribeClusterDbRevisionsInput { + s.MaxRecords = &v + return s +} + +type DescribeClusterDbRevisionsOutput struct { + _ struct{} `type:"structure"` + + // A list of revisions. + ClusterDbRevisions []*ClusterDbRevision `locationNameList:"ClusterDbRevision" type:"list"` + + // A string representing the starting point for the next set of revisions. If + // a value is returned in a response, you can retrieve the next set of revisions + // by providing the value in the marker parameter and retrying the command. + // If the marker field is empty, all revisions have already been returned. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClusterDbRevisionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterDbRevisionsOutput) GoString() string { + return s.String() +} + +// SetClusterDbRevisions sets the ClusterDbRevisions field's value. +func (s *DescribeClusterDbRevisionsOutput) SetClusterDbRevisions(v []*ClusterDbRevision) *DescribeClusterDbRevisionsOutput { + s.ClusterDbRevisions = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterDbRevisionsOutput) SetMarker(v string) *DescribeClusterDbRevisionsOutput { + s.Marker = &v + return s +} + type DescribeClusterParameterGroupsInput struct { _ struct{} `type:"structure"` @@ -10725,7 +11331,7 @@ type DescribeClusterSnapshotsInput struct { // about ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2012-07-16T18:00:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional parameter that specifies the starting point to return a set of // response records. When the results of a DescribeClusterSnapshots request @@ -10765,7 +11371,7 @@ type DescribeClusterSnapshotsInput struct { // ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2012-07-16T18:00:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // A tag key or keys for which you want to return all matching cluster snapshots // that are associated with the specified key or keys. For example, suppose @@ -11518,7 +12124,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional parameter that specifies the starting point to return a set of // response records. When the results of a DescribeEvents request exceed the @@ -11577,7 +12183,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13202,7 +13808,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time of the event. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // A list of the event categories. // @@ -13417,7 +14023,7 @@ type EventSubscription struct { // The date and time the Amazon Redshift event notification subscription was // created. - SubscriptionCreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SubscriptionCreationTime *time.Time `type:"timestamp"` // The list of tags for the event subscription. Tags []*Tag `locationNameList:"Tag" type:"list"` @@ -13670,7 +14276,7 @@ type GetClusterCredentialsOutput struct { DbUser *string `type:"string"` // The date and time the password in DbPassword expires. - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Expiration *time.Time `type:"timestamp"` } // String returns the string representation @@ -13701,6 +14307,99 @@ func (s *GetClusterCredentialsOutput) SetExpiration(v time.Time) *GetClusterCred return s } +type GetReservedNodeExchangeOfferingsInput struct { + _ struct{} `type:"structure"` + + // A value that indicates the starting point for the next set of ReservedNodeOfferings. + Marker *string `type:"string"` + + // An integer setting the maximum number of ReservedNodeOfferings to retrieve. + MaxRecords *int64 `type:"integer"` + + // A string representing the node identifier for the Reserved Node to be exchanged. + // + // ReservedNodeId is a required field + ReservedNodeId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetReservedNodeExchangeOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetReservedNodeExchangeOfferingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetReservedNodeExchangeOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetReservedNodeExchangeOfferingsInput"} + if s.ReservedNodeId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMarker sets the Marker field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetMarker(v string) *GetReservedNodeExchangeOfferingsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetMaxRecords(v int64) *GetReservedNodeExchangeOfferingsInput { + s.MaxRecords = &v + return s +} + +// SetReservedNodeId sets the ReservedNodeId field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetReservedNodeId(v string) *GetReservedNodeExchangeOfferingsInput { + s.ReservedNodeId = &v + return s +} + +type GetReservedNodeExchangeOfferingsOutput struct { + _ struct{} `type:"structure"` + + // An optional parameter that specifies the starting point for returning a set + // of response records. When the results of a GetReservedNodeExchangeOfferings + // request exceed the value specified in MaxRecords, Amazon Redshift returns + // a value in the marker field of the response. You can retrieve the next set + // of response records by providing the returned marker value in the marker + // parameter and retrying the request. + Marker *string `type:"string"` + + // Returns an array of ReservedNodeOffering objects. + ReservedNodeOfferings []*ReservedNodeOffering `locationNameList:"ReservedNodeOffering" type:"list"` +} + +// String returns the string representation +func (s GetReservedNodeExchangeOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetReservedNodeExchangeOfferingsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *GetReservedNodeExchangeOfferingsOutput) SetMarker(v string) *GetReservedNodeExchangeOfferingsOutput { + s.Marker = &v + return s +} + +// SetReservedNodeOfferings sets the ReservedNodeOfferings field's value. +func (s *GetReservedNodeExchangeOfferingsOutput) SetReservedNodeOfferings(v []*ReservedNodeOffering) *GetReservedNodeExchangeOfferingsOutput { + s.ReservedNodeOfferings = v + return s +} + // Returns information about an HSM client certificate. The certificate is stored // in a secure Hardware Storage Module (HSM), and used by the Amazon Redshift // cluster to encrypt data files. @@ -13909,10 +14608,10 @@ type LoggingStatus struct { LastFailureMessage *string `type:"string"` // The last time when logs failed to be delivered. - LastFailureTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastFailureTime *time.Time `type:"timestamp"` // The last time that logs were delivered. - LastSuccessfulDeliveryTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastSuccessfulDeliveryTime *time.Time `type:"timestamp"` // true if logging is on, false if logging is off. LoggingEnabled *bool `type:"boolean"` @@ -13967,6 +14666,84 @@ func (s *LoggingStatus) SetS3KeyPrefix(v string) *LoggingStatus { return s } +type ModifyClusterDbRevisionInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of a cluster whose database revision you want to modify. + // + // Example: examplecluster + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` + + // The identifier of the database revision. You can retrieve this value from + // the response to the DescribeClusterDbRevisions request. + // + // RevisionTarget is a required field + RevisionTarget *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyClusterDbRevisionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterDbRevisionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterDbRevisionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterDbRevisionInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.RevisionTarget == nil { + invalidParams.Add(request.NewErrParamRequired("RevisionTarget")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ModifyClusterDbRevisionInput) SetClusterIdentifier(v string) *ModifyClusterDbRevisionInput { + s.ClusterIdentifier = &v + return s +} + +// SetRevisionTarget sets the RevisionTarget field's value. +func (s *ModifyClusterDbRevisionInput) SetRevisionTarget(v string) *ModifyClusterDbRevisionInput { + s.RevisionTarget = &v + return s +} + +type ModifyClusterDbRevisionOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyClusterDbRevisionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterDbRevisionOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *ModifyClusterDbRevisionOutput) SetCluster(v *Cluster) *ModifyClusterDbRevisionOutput { + s.Cluster = v + return s +} + type ModifyClusterIamRolesInput struct { _ struct{} `type:"structure"` @@ -14248,7 +15025,7 @@ type ModifyClusterInput struct { PubliclyAccessible *bool `type:"boolean"` // A list of virtual private cloud (VPC) security groups to be associated with - // the cluster. + // the cluster. This change is asynchronously applied as soon as possible. VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } @@ -15239,7 +16016,7 @@ type ReservedNode struct { // The time the reservation started. You purchase a reserved node offering for // a duration. This is the start time of that duration. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved compute node. // @@ -15252,6 +16029,11 @@ type ReservedNode struct { // use. // // * payment-failed-Payment failed for the purchase attempt. + // + // * retired-The reserved node is no longer available. + // + // * exchanging-The owner is exchanging the reserved node for another reserved + // node. State *string `type:"string"` // The hourly rate Amazon Redshift charges you for this reserved node. @@ -16084,6 +16866,50 @@ func (s *RestoreTableFromClusterSnapshotOutput) SetTableRestoreStatus(v *TableRe return s } +// Describes a RevisionTarget. +type RevisionTarget struct { + _ struct{} `type:"structure"` + + // A unique string that identifies the version to update the cluster to. You + // can use this value in ModifyClusterDbRevision. + DatabaseRevision *string `type:"string"` + + // The date on which the database revision was released. + DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` + + // A string that describes the changes and features that will be applied to + // the cluster when it is updated to the corresponding ClusterDbRevision. + Description *string `type:"string"` +} + +// String returns the string representation +func (s RevisionTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevisionTarget) GoString() string { + return s.String() +} + +// SetDatabaseRevision sets the DatabaseRevision field's value. +func (s *RevisionTarget) SetDatabaseRevision(v string) *RevisionTarget { + s.DatabaseRevision = &v + return s +} + +// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. +func (s *RevisionTarget) SetDatabaseRevisionReleaseDate(v time.Time) *RevisionTarget { + s.DatabaseRevisionReleaseDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RevisionTarget) SetDescription(v string) *RevisionTarget { + s.Description = &v + return s +} + type RevokeClusterSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -16350,7 +17176,7 @@ type Snapshot struct { BackupProgressInMegaBytes *float64 `type:"double"` // The time (UTC) when the cluster was originally created. - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The identifier of the cluster for which the snapshot was taken. ClusterIdentifier *string `type:"string"` @@ -16418,7 +17244,7 @@ type Snapshot struct { // The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains // a copy of the cluster data as of this exact time. - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // The snapshot identifier that is provided in the request. SnapshotIdentifier *string `type:"string"` @@ -16772,7 +17598,7 @@ type TableRestoreStatus struct { // The time that the table restore request was made, in Universal Coordinated // Time (UTC). - RequestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RequestTime *time.Time `type:"timestamp"` // The identifier of the snapshot that the table is being restored from. SnapshotIdentifier *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go index 8b0570fe3..0cf4ad603 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go @@ -49,6 +49,12 @@ const ( // The ClusterIdentifier parameter does not refer to an existing cluster. ErrCodeClusterNotFoundFault = "ClusterNotFound" + // ErrCodeClusterOnLatestRevisionFault for service response error code + // "ClusterOnLatestRevision". + // + // Cluster is already on the latest database revision. + ErrCodeClusterOnLatestRevisionFault = "ClusterOnLatestRevision" + // ErrCodeClusterParameterGroupAlreadyExistsFault for service response error code // "ClusterParameterGroupAlreadyExists". // @@ -308,6 +314,12 @@ const ( // in use by one or more Amazon Redshift clusters. ErrCodeInvalidHsmConfigurationStateFault = "InvalidHsmConfigurationStateFault" + // ErrCodeInvalidReservedNodeStateFault for service response error code + // "InvalidReservedNodeState". + // + // Indicates that the Reserved Node being exchanged is not in an active state. + ErrCodeInvalidReservedNodeStateFault = "InvalidReservedNodeState" + // ErrCodeInvalidRestoreFault for service response error code // "InvalidRestore". // @@ -396,6 +408,12 @@ const ( // User already has a reservation with the given identifier. ErrCodeReservedNodeAlreadyExistsFault = "ReservedNodeAlreadyExists" + // ErrCodeReservedNodeAlreadyMigratedFault for service response error code + // "ReservedNodeAlreadyMigrated". + // + // Indicates that the reserved node has already been exchanged. + ErrCodeReservedNodeAlreadyMigratedFault = "ReservedNodeAlreadyMigrated" + // ErrCodeReservedNodeNotFoundFault for service response error code // "ReservedNodeNotFound". // @@ -535,6 +553,13 @@ const ( // The allowed values are ERROR and INFO. ErrCodeSubscriptionSeverityNotFoundFault = "SubscriptionSeverityNotFound" + // ErrCodeTableLimitExceededFault for service response error code + // "TableLimitExceeded". + // + // The number of tables in the cluster exceeds the limit for the requested new + // cluster node type. + ErrCodeTableLimitExceededFault = "TableLimitExceeded" + // ErrCodeTableRestoreNotFoundFault for service response error code // "TableRestoreNotFoundFault". // @@ -544,7 +569,8 @@ const ( // ErrCodeTagLimitExceededFault for service response error code // "TagLimitExceededFault". // - // The request exceeds the limit of 10 tags for the resource. + // The number of tables in your source cluster exceeds the limit for the target + // cluster. Resize to a larger cluster node type. ErrCodeTagLimitExceededFault = "TagLimitExceededFault" // ErrCodeUnauthorizedOperation for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go index b859170a4..a750d141c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "redshift" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "redshift" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Redshift" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Redshift client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index 5357821e8..97351a76f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -6401,7 +6401,7 @@ type ChangeInfo struct { // at 17:48:16.751 UTC. // // SubmittedAt is a required field - SubmittedAt *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + SubmittedAt *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -13275,7 +13275,7 @@ type StatusReport struct { // 8601 format (https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal // Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March // 27, 2017 at 17:48:16.751 UTC. - CheckedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CheckedTime *time.Time `type:"timestamp"` // A description of the status of the health check endpoint as reported by one // of the Amazon Route 53 health checkers. diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53/service.go index 98ba1c8f8..dd22cb2cd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "route53" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "route53" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Route 53" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Route53 client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index a27823fdf..0e999ca33 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -3,14 +3,22 @@ package s3 import ( + "bytes" "fmt" "io" + "sync" + "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go/private/protocol/rest" "github.com/aws/aws-sdk-go/private/protocol/restxml" ) @@ -6017,6 +6025,88 @@ func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput return out, req.Send() } +const opSelectObjectContent = "SelectObjectContent" + +// SelectObjectContentRequest generates a "aws/request.Request" representing the +// client's request for the SelectObjectContent operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 SelectObjectContent for more information on using the SelectObjectContent +// 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 SelectObjectContentRequest method. +// req, resp := client.SelectObjectContentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent +func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) { + op := &request.Operation{ + Name: opSelectObjectContent, + HTTPMethod: "POST", + HTTPPath: "/{Bucket}/{Key+}?select&select-type=2", + } + + if input == nil { + input = &SelectObjectContentInput{} + } + + output = &SelectObjectContentOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) + req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + return +} + +// SelectObjectContent API operation for Amazon Simple Storage Service. +// +// This operation filters the contents of an Amazon S3 object based on a simple +// Structured Query Language (SQL) statement. In the request, along with the +// SQL expression, you must also specify a data serialization format (JSON or +// CSV) of the object. Amazon S3 uses this to parse object data into records, +// and returns only records that match the specified SQL expression. You must +// also specify the data serialization format for the response. +// +// 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 Simple Storage Service's +// API operation SelectObjectContent for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent +func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) { + req, out := c.SelectObjectContentRequest(input) + return out, req.Send() +} + +// SelectObjectContentWithContext is the same as SelectObjectContent with the addition of +// the ability to pass a context and additional request options. +// +// See SelectObjectContent 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 *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) { + req, out := c.SelectObjectContentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUploadPart = "UploadPart" // UploadPartRequest generates a "aws/request.Request" representing the @@ -6730,7 +6820,7 @@ type Bucket struct { _ struct{} `type:"structure"` // Date the bucket was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationDate *time.Time `type:"timestamp"` // The name of the bucket. Name *string `type:"string"` @@ -6977,6 +7067,11 @@ func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { type CSVInput struct { _ struct{} `type:"structure"` + // Specifies that CSV field values may contain quoted record delimiters and + // such records should be allowed. Default value is FALSE. Setting this value + // to TRUE may lower performance. + AllowQuotedRecordDelimiter *bool `type:"boolean"` + // Single character used to indicate a row should be ignored when present at // the start of a row. Comments *string `type:"string"` @@ -7008,6 +7103,12 @@ func (s CSVInput) GoString() string { return s.String() } +// SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value. +func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput { + s.AllowQuotedRecordDelimiter = &v + return s +} + // SetComments sets the Comments field's value. func (s *CSVInput) SetComments(v string) *CSVInput { s.Comments = &v @@ -7474,6 +7575,32 @@ func (s *Condition) SetKeyPrefixEquals(v string) *Condition { return s } +type ContinuationEvent struct { + _ struct{} `locationName:"ContinuationEvent" type:"structure"` +} + +// String returns the string representation +func (s ContinuationEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContinuationEvent) GoString() string { + return s.String() +} + +// The ContinuationEvent is and event in the SelectObjectContentEventStream group of events. +func (s *ContinuationEvent) eventSelectObjectContentEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ContinuationEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + return nil +} + type CopyObjectInput struct { _ struct{} `type:"structure"` @@ -7510,14 +7637,14 @@ type CopyObjectInput struct { CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` // Copies the object if it has been modified since the specified time. - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` // Copies the object if its entity tag (ETag) is different than the specified // ETag. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` // Copies the object if it hasn't been modified since the specified time. - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` // Specifies the algorithm to use when decrypting the source object (e.g., AES256). CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` @@ -7533,7 +7660,7 @@ type CopyObjectInput struct { CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -7962,7 +8089,7 @@ type CopyObjectResult struct { ETag *string `type:"string"` - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` } // String returns the string representation @@ -7994,7 +8121,7 @@ type CopyPartResult struct { ETag *string `type:"string"` // Date and time at which the object was uploaded. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` } // String returns the string representation @@ -8198,7 +8325,7 @@ type CreateMultipartUploadInput struct { ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -8446,7 +8573,7 @@ type CreateMultipartUploadOutput struct { _ struct{} `type:"structure"` // Date when multipart upload will become eligible for abort operation by lifecycle. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` + AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` // Id of the lifecycle rule that makes a multipart upload eligible for abort // operation. @@ -9306,7 +9433,7 @@ type DeleteMarkerEntry struct { Key *string `min:"1" type:"string"` // Date and time the object was last modified. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -9919,6 +10046,32 @@ func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfig return s } +type EndEvent struct { + _ struct{} `locationName:"EndEvent" type:"structure"` +} + +// String returns the string representation +func (s EndEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndEvent) GoString() string { + return s.String() +} + +// The EndEvent is and event in the SelectObjectContentEventStream group of events. +func (s *EndEvent) eventSelectObjectContentEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the EndEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *EndEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + return nil +} + type Error struct { _ struct{} `type:"structure"` @@ -10014,6 +10167,7 @@ type FilterRule struct { // the filtering rule applies. Maximum prefix length can be up to 1,024 characters. // Overlapping prefixes and suffixes are not supported. For more information, // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Name *string `type:"string" enum:"FilterRuleName"` Value *string `type:"string"` @@ -11435,7 +11589,7 @@ type GetObjectInput struct { // Return the object only if it has been modified since the specified time, // otherwise return a 304 (not modified). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` // Return the object only if its entity tag (ETag) is different from the one // specified, otherwise return a 304 (not modified). @@ -11443,7 +11597,7 @@ type GetObjectInput struct { // Return the object only if it has not been modified since the specified time, // otherwise return a 412 (precondition failed). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -11479,7 +11633,7 @@ type GetObjectInput struct { ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"` // Sets the Expires header of the response. - ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"` + ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"` // Specifies the algorithm to use to when encrypting the object (e.g., AES256). SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` @@ -11706,7 +11860,7 @@ type GetObjectOutput struct { Expires *string `location:"header" locationName:"Expires" type:"string"` // Last modified date of the object - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` @@ -12366,7 +12520,7 @@ type HeadObjectInput struct { // Return the object only if it has been modified since the specified time, // otherwise return a 304 (not modified). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` // Return the object only if its entity tag (ETag) is different from the one // specified, otherwise return a 304 (not modified). @@ -12374,7 +12528,7 @@ type HeadObjectInput struct { // Return the object only if it has not been modified since the specified time, // otherwise return a 412 (precondition failed). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -12578,7 +12732,7 @@ type HeadObjectOutput struct { Expires *string `location:"header" locationName:"Expires" type:"string"` // Last modified date of the object - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` @@ -12872,7 +13026,7 @@ type InputSerialization struct { // Describes the serialization of a CSV-encoded object. CSV *CSVInput `type:"structure"` - // Specifies object's compression format. Valid values: NONE, GZIP. Default + // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default // Value: NONE. CompressionType *string `type:"string" enum:"CompressionType"` @@ -13378,6 +13532,7 @@ type LambdaFunctionConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -15195,7 +15350,7 @@ type ListPartsOutput struct { _ struct{} `type:"structure"` // Date when multipart upload will become eligible for abort operation by lifecycle. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` + AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` // Id of the lifecycle rule that makes a multipart upload eligible for abort // operation. @@ -15751,7 +15906,7 @@ type MultipartUpload struct { _ struct{} `type:"structure"` // Date and time at which the multipart upload was initiated. - Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Initiated *time.Time `type:"timestamp"` // Identifies who initiated the multipart upload. Initiator *Initiator `type:"structure"` @@ -15825,7 +15980,8 @@ type NoncurrentVersionExpiration struct { // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) + // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in + // the Amazon Simple Storage Service Developer Guide. NoncurrentDays *int64 `type:"integer"` } @@ -15857,7 +16013,8 @@ type NoncurrentVersionTransition struct { // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) + // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in + // the Amazon Simple Storage Service Developer Guide. NoncurrentDays *int64 `type:"integer"` // The class of storage used to store the object. @@ -16006,6 +16163,7 @@ func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConf // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) +// in the Amazon Simple Storage Service Developer Guide. type NotificationConfigurationFilter struct { _ struct{} `type:"structure"` @@ -16036,7 +16194,7 @@ type Object struct { Key *string `min:"1" type:"string"` - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -16155,7 +16313,7 @@ type ObjectVersion struct { Key *string `min:"1" type:"string"` // Date and time the object was last modified. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -16336,7 +16494,7 @@ type Part struct { ETag *string `type:"string"` // Date and time at which the part was uploaded. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` // Part number identifying the part. This is a positive integer between 1 and // 10,000. @@ -16380,6 +16538,87 @@ func (s *Part) SetSize(v int64) *Part { return s } +type Progress struct { + _ struct{} `type:"structure"` + + // Current number of uncompressed object bytes processed. + BytesProcessed *int64 `type:"long"` + + // Current number of bytes of records payload data returned. + BytesReturned *int64 `type:"long"` + + // Current number of object bytes scanned. + BytesScanned *int64 `type:"long"` +} + +// String returns the string representation +func (s Progress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Progress) GoString() string { + return s.String() +} + +// SetBytesProcessed sets the BytesProcessed field's value. +func (s *Progress) SetBytesProcessed(v int64) *Progress { + s.BytesProcessed = &v + return s +} + +// SetBytesReturned sets the BytesReturned field's value. +func (s *Progress) SetBytesReturned(v int64) *Progress { + s.BytesReturned = &v + return s +} + +// SetBytesScanned sets the BytesScanned field's value. +func (s *Progress) SetBytesScanned(v int64) *Progress { + s.BytesScanned = &v + return s +} + +type ProgressEvent struct { + _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"` + + // The Progress event details. + Details *Progress `locationName:"Details" type:"structure"` +} + +// String returns the string representation +func (s ProgressEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProgressEvent) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent { + s.Details = v + return s +} + +// The ProgressEvent is and event in the SelectObjectContentEventStream group of events. +func (s *ProgressEvent) eventSelectObjectContentEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ProgressEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + type PutBucketAccelerateConfigurationInput struct { _ struct{} `type:"structure" payload:"AccelerateConfiguration"` @@ -18037,7 +18276,7 @@ type PutObjectInput struct { ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -18510,6 +18749,7 @@ type QueueConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -18622,6 +18862,45 @@ func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDep return s } +type RecordsEvent struct { + _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"` + + // The byte array of partial, one or more result records. + // + // Payload is automatically base64 encoded/decoded by the SDK. + Payload []byte `type:"blob"` +} + +// String returns the string representation +func (s RecordsEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordsEvent) GoString() string { + return s.String() +} + +// SetPayload sets the Payload field's value. +func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent { + s.Payload = v + return s +} + +// The RecordsEvent is and event in the SelectObjectContentEventStream group of events. +func (s *RecordsEvent) eventSelectObjectContentEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *RecordsEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + s.Payload = make([]byte, len(msg.Payload)) + copy(s.Payload, msg.Payload) + return nil +} + type Redirect struct { _ struct{} `type:"structure"` @@ -18939,6 +19218,30 @@ func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfigur return s } +type RequestProgress struct { + _ struct{} `type:"structure"` + + // Specifies whether periodic QueryProgress frames should be sent. Valid values: + // TRUE, FALSE. Default value: FALSE. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s RequestProgress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestProgress) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *RequestProgress) SetEnabled(v bool) *RequestProgress { + s.Enabled = &v + return s +} + type RestoreObjectInput struct { _ struct{} `type:"structure" payload:"RestoreRequest"` @@ -19392,6 +19695,439 @@ func (s SSES3) GoString() string { return s.String() } +// SelectObjectContentEventStream provides handling of EventStreams for +// the SelectObjectContent API. +// +// Use this type to receive SelectObjectContentEventStream events. The events +// can be read from the Events channel member. +// +// The events that can be received are: +// +// * ContinuationEvent +// * EndEvent +// * ProgressEvent +// * RecordsEvent +// * StatsEvent +type SelectObjectContentEventStream struct { + // Reader is the EventStream reader for the SelectObjectContentEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader SelectObjectContentEventStreamReader + + // StreamCloser is the io.Closer for the EventStream connection. For HTTP + // EventStream this is the response Body. The stream will be closed when + // the Close method of the EventStream is called. + StreamCloser io.Closer +} + +// Close closes the EventStream. This will also cause the Events channel to be +// closed. You can use the closing of the Events channel to terminate your +// application's read from the API's EventStream. +// +// Will close the underlying EventStream reader. For EventStream over HTTP +// connection this will also close the HTTP connection. +// +// Close must be called when done using the EventStream API. Not calling Close +// may result in resource leaks. +func (es *SelectObjectContentEventStream) Close() (err error) { + es.Reader.Close() + return es.Err() +} + +// Err returns any error that occurred while reading EventStream Events from +// the service API's response. Returns nil if there were no errors. +func (es *SelectObjectContentEventStream) Err() error { + if err := es.Reader.Err(); err != nil { + return err + } + es.StreamCloser.Close() + + return nil +} + +// Events returns a channel to read EventStream Events from the +// SelectObjectContent API. +// +// These events are: +// +// * ContinuationEvent +// * EndEvent +// * ProgressEvent +// * RecordsEvent +// * StatsEvent +func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { + return es.Reader.Events() +} + +// SelectObjectContentEventStreamEvent groups together all EventStream +// events read from the SelectObjectContent API. +// +// These events are: +// +// * ContinuationEvent +// * EndEvent +// * ProgressEvent +// * RecordsEvent +// * StatsEvent +type SelectObjectContentEventStreamEvent interface { + eventSelectObjectContentEventStream() +} + +// SelectObjectContentEventStreamReader provides the interface for reading EventStream +// Events from the SelectObjectContent API. The +// default implementation for this interface will be SelectObjectContentEventStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * ContinuationEvent +// * EndEvent +// * ProgressEvent +// * RecordsEvent +// * StatsEvent +type SelectObjectContentEventStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan SelectObjectContentEventStreamEvent + + // Close will close the underlying event stream reader. For event stream over + // HTTP this will also close the HTTP connection. + Close() error + + // Returns any error that has occured while reading from the event stream. + Err() error +} + +type readSelectObjectContentEventStream struct { + eventReader *eventstreamapi.EventReader + stream chan SelectObjectContentEventStreamEvent + errVal atomic.Value + + done chan struct{} + closeOnce sync.Once +} + +func newReadSelectObjectContentEventStream( + reader io.ReadCloser, + unmarshalers request.HandlerList, + logger aws.Logger, + logLevel aws.LogLevelType, +) *readSelectObjectContentEventStream { + r := &readSelectObjectContentEventStream{ + stream: make(chan SelectObjectContentEventStreamEvent), + done: make(chan struct{}), + } + + r.eventReader = eventstreamapi.NewEventReader( + reader, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: unmarshalers, + }, + r.unmarshalerForEventType, + ) + r.eventReader.UseLogger(logger, logLevel) + + return r +} + +// Close will close the underlying event stream reader. For EventStream over +// HTTP this will also close the HTTP connection. +func (r *readSelectObjectContentEventStream) Close() error { + r.closeOnce.Do(r.safeClose) + + return r.Err() +} + +func (r *readSelectObjectContentEventStream) safeClose() { + close(r.done) + err := r.eventReader.Close() + if err != nil { + r.errVal.Store(err) + } +} + +func (r *readSelectObjectContentEventStream) Err() error { + if v := r.errVal.Load(); v != nil { + return v.(error) + } + + return nil +} + +func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { + return r.stream +} + +func (r *readSelectObjectContentEventStream) readEventStream() { + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.errVal.Store(err) + return + } + + select { + case r.stream <- event.(SelectObjectContentEventStreamEvent): + case <-r.done: + return + } + } +} + +func (r *readSelectObjectContentEventStream) unmarshalerForEventType( + eventType string, +) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "Cont": + return &ContinuationEvent{}, nil + + case "End": + return &EndEvent{}, nil + + case "Progress": + return &ProgressEvent{}, nil + + case "Records": + return &RecordsEvent{}, nil + + case "Stats": + return &StatsEvent{}, nil + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType), + nil, + ) + } +} + +// Request to filter the contents of an Amazon S3 object based on a simple Structured +// Query Language (SQL) statement. In the request, along with the SQL expression, +// you must also specify a data serialization format (JSON or CSV) of the object. +// Amazon S3 uses this to parse object data into records, and returns only records +// that match the specified SQL expression. You must also specify the data serialization +// format for the response. For more information, go to S3Select API Documentation +// (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html). +type SelectObjectContentInput struct { + _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` + + // The S3 Bucket. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // The expression that is used to query the object. + // + // Expression is a required field + Expression *string `type:"string" required:"true"` + + // The type of the provided expression (e.g., SQL). + // + // ExpressionType is a required field + ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"` + + // Describes the format of the data in the object that is being queried. + // + // InputSerialization is a required field + InputSerialization *InputSerialization `type:"structure" required:"true"` + + // The Object Key. + // + // Key is a required field + Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + + // Describes the format of the data that you want Amazon S3 to return in response. + // + // OutputSerialization is a required field + OutputSerialization *OutputSerialization `type:"structure" required:"true"` + + // Specifies if periodic request progress information should be enabled. + RequestProgress *RequestProgress `type:"structure"` + + // The SSE Algorithm used to encrypt the object. For more information, go to + // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). + SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` + + // The SSE Customer Key. For more information, go to Server-Side Encryption + // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + + // The SSE Customer Key MD5. For more information, go to Server-Side Encryption + // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). + SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` +} + +// String returns the string representation +func (s SelectObjectContentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SelectObjectContentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SelectObjectContentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.ExpressionType == nil { + invalidParams.Add(request.NewErrParamRequired("ExpressionType")) + } + if s.InputSerialization == nil { + invalidParams.Add(request.NewErrParamRequired("InputSerialization")) + } + 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.OutputSerialization == nil { + invalidParams.Add(request.NewErrParamRequired("OutputSerialization")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput { + s.Bucket = &v + return s +} + +func (s *SelectObjectContentInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetExpression sets the Expression field's value. +func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput { + s.Expression = &v + return s +} + +// SetExpressionType sets the ExpressionType field's value. +func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput { + s.ExpressionType = &v + return s +} + +// SetInputSerialization sets the InputSerialization field's value. +func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput { + s.InputSerialization = v + return s +} + +// SetKey sets the Key field's value. +func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput { + s.Key = &v + return s +} + +// SetOutputSerialization sets the OutputSerialization field's value. +func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput { + s.OutputSerialization = v + return s +} + +// SetRequestProgress sets the RequestProgress field's value. +func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput { + s.RequestProgress = v + return s +} + +// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. +func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput { + s.SSECustomerAlgorithm = &v + return s +} + +// SetSSECustomerKey sets the SSECustomerKey field's value. +func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput { + s.SSECustomerKey = &v + return s +} + +func (s *SelectObjectContentInput) getSSECustomerKey() (v string) { + if s.SSECustomerKey == nil { + return v + } + return *s.SSECustomerKey +} + +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput { + s.SSECustomerKeyMD5 = &v + return s +} + +type SelectObjectContentOutput struct { + _ struct{} `type:"structure" payload:"Payload"` + + // Use EventStream to use the API's stream. + EventStream *SelectObjectContentEventStream `type:"structure"` +} + +// String returns the string representation +func (s SelectObjectContentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SelectObjectContentOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput { + s.EventStream = v + return s +} + +func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) { + if r.Error != nil { + return + } + reader := newReadSelectObjectContentEventStream( + r.HTTPResponse.Body, + r.Handlers.UnmarshalStream, + r.Config.Logger, + r.Config.LogLevel.Value(), + ) + go reader.readEventStream() + + eventStream := &SelectObjectContentEventStream{ + StreamCloser: r.HTTPResponse.Body, + Reader: reader, + } + s.EventStream = eventStream +} + // Describes the parameters for Select job types. type SelectParameters struct { _ struct{} `type:"structure"` @@ -19696,6 +20432,87 @@ func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects { return s } +type Stats struct { + _ struct{} `type:"structure"` + + // Total number of uncompressed object bytes processed. + BytesProcessed *int64 `type:"long"` + + // Total number of bytes of records payload data returned. + BytesReturned *int64 `type:"long"` + + // Total number of object bytes scanned. + BytesScanned *int64 `type:"long"` +} + +// String returns the string representation +func (s Stats) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Stats) GoString() string { + return s.String() +} + +// SetBytesProcessed sets the BytesProcessed field's value. +func (s *Stats) SetBytesProcessed(v int64) *Stats { + s.BytesProcessed = &v + return s +} + +// SetBytesReturned sets the BytesReturned field's value. +func (s *Stats) SetBytesReturned(v int64) *Stats { + s.BytesReturned = &v + return s +} + +// SetBytesScanned sets the BytesScanned field's value. +func (s *Stats) SetBytesScanned(v int64) *Stats { + s.BytesScanned = &v + return s +} + +type StatsEvent struct { + _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"` + + // The Stats event details. + Details *Stats `locationName:"Details" type:"structure"` +} + +// String returns the string representation +func (s StatsEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StatsEvent) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent { + s.Details = v + return s +} + +// The StatsEvent is and event in the SelectObjectContentEventStream group of events. +func (s *StatsEvent) eventSelectObjectContentEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *StatsEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + type StorageClassAnalysis struct { _ struct{} `type:"structure"` @@ -19949,6 +20766,7 @@ type TopicConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -20122,14 +20940,14 @@ type UploadPartCopyInput struct { CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` // Copies the object if it has been modified since the specified time. - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` // Copies the object if its entity tag (ETag) is different than the specified // ETag. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` // Copies the object if it hasn't been modified since the specified time. - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` // The range of bytes to copy from the source object. The range value must use // the form bytes=first-last, where the first and last are the zero-based byte @@ -20882,6 +21700,9 @@ const ( // CompressionTypeGzip is a CompressionType enum value CompressionTypeGzip = "GZIP" + + // CompressionTypeBzip2 is a CompressionType enum value + CompressionTypeBzip2 = "BZIP2" ) // Requests Amazon S3 to encode the object keys in the response and specifies diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go index 614e477d3..20de53f29 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "s3" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "s3" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "S3" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the S3 client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, @@ -71,6 +73,8 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) + svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler) + // Run custom client initialization if present if initClient != nil { initClient(svc.Client) diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go new file mode 100644 index 000000000..667e1c1a1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -0,0 +1,5193 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +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 opCancelRotateSecret = "CancelRotateSecret" + +// CancelRotateSecretRequest generates a "aws/request.Request" representing the +// client's request for the CancelRotateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CancelRotateSecret for more information on using the CancelRotateSecret +// 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 CancelRotateSecretRequest method. +// req, resp := client.CancelRotateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret +func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInput) (req *request.Request, output *CancelRotateSecretOutput) { + op := &request.Operation{ + Name: opCancelRotateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelRotateSecretInput{} + } + + output = &CancelRotateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelRotateSecret API operation for AWS Secrets Manager. +// +// Disables automatic scheduled rotation and cancels the rotation of a secret +// if one is currently in progress. +// +// To re-enable scheduled rotation, call RotateSecret with AutomaticallyRotateAfterDays +// set to a value greater than 0. This will immediately rotate your secret and +// then enable the automatic schedule. +// +// If you cancel a rotation that is in progress, it can leave the VersionStage +// labels in an unexpected state. Depending on what step of the rotation was +// in progress, you might need to remove the staging label AWSPENDING from the +// partially created version, specified by the SecretVersionId response value. +// You should also evaluate the partially rotated new version to see if it should +// be deleted, which you can do by removing all staging labels from the new +// version's VersionStage field. +// +// To successfully start a rotation, the staging label AWSPENDING must be in +// one of the following states: +// +// * Not be attached to any version at all +// +// * Attached to the same version as the staging label AWSCURRENT +// +// If the staging label AWSPENDING is attached to a different version than the +// version with AWSCURRENT then the attempt to rotate fails. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:CancelRotateSecret +// +// Related operations +// +// * To configure rotation for a secret or to manually trigger a rotation, +// use RotateSecret. +// +// * To get the rotation configuration details for a secret, use DescribeSecret. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// * To list all of the versions currently associated with a secret, use +// ListSecretVersionIds. +// +// 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 Secrets Manager's +// API operation CancelRotateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret +func (c *SecretsManager) CancelRotateSecret(input *CancelRotateSecretInput) (*CancelRotateSecretOutput, error) { + req, out := c.CancelRotateSecretRequest(input) + return out, req.Send() +} + +// CancelRotateSecretWithContext is the same as CancelRotateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See CancelRotateSecret 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 *SecretsManager) CancelRotateSecretWithContext(ctx aws.Context, input *CancelRotateSecretInput, opts ...request.Option) (*CancelRotateSecretOutput, error) { + req, out := c.CancelRotateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSecret = "CreateSecret" + +// CreateSecretRequest generates a "aws/request.Request" representing the +// client's request for the CreateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateSecret for more information on using the CreateSecret +// 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 CreateSecretRequest method. +// req, resp := client.CreateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret +func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *request.Request, output *CreateSecretOutput) { + op := &request.Operation{ + Name: opCreateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSecretInput{} + } + + output = &CreateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSecret API operation for AWS Secrets Manager. +// +// Creates a new secret. A secret in Secrets Manager consists of both the protected +// secret data and the important information needed to manage the secret. +// +// Secrets Manager stores the encrypted secret data in one of a collection of +// "versions" associated with the secret. Each version contains a copy of the +// encrypted secret data. Each version is associated with one or more "staging +// labels" that identify where the version is in the rotation cycle. The SecretVersionsToStages +// field of the secret contains the mapping of staging labels to the active +// versions of the secret. Versions without a staging label are considered deprecated +// and are not included in the list. +// +// You provide the secret data to be encrypted by putting text in either the +// SecretString parameter or binary data in the SecretBinary parameter, but +// not both. If you include SecretString or SecretBinary then Secrets Manager +// also creates an initial secret version and automatically attaches the staging +// label AWSCURRENT to the new version. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// Secrets Manager creates it for you automatically. All users in the same AWS +// account automatically have access to use the default CMK. Note that if an +// Secrets Manager API call results in AWS having to create the account's AWS-managed +// CMK, it can result in a one-time significant delay in returning the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom AWS KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the AWS KMS key policy must grant cross-account access to that +// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt +// operations. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:CreateSecret +// +// * kms:GenerateDataKey - needed only if you use a customer-managed AWS +// KMS key to encrypt the secret. You do not need this permission to use +// the account's default AWS managed CMK for Secrets Manager. +// +// * kms:Decrypt - needed only if you use a customer-managed AWS KMS key +// to encrypt the secret. You do not need this permission to use the account's +// default AWS managed CMK for Secrets Manager. +// +// Related operations +// +// * To delete a secret, use DeleteSecret. +// +// * To modify an existing secret, use UpdateSecret. +// +// * To create a new version of a secret, use PutSecretValue. +// +// * To retrieve the encrypted secure string and secure binary values, use +// GetSecretValue. +// +// * To retrieve all other details for a secret, use DescribeSecret. This +// does not include the encrypted secure string and secure binary values. +// +// * To retrieve the list of secret versions associated with the current +// secret, use DescribeSecret and examine the SecretVersionsToStages response +// value. +// +// 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 Secrets Manager's +// API operation CreateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the Secrets Manager internal +// limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodePreconditionNotMetException "PreconditionNotMetException" +// The request failed because you did not complete all the prerequisite steps. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret +func (c *SecretsManager) CreateSecret(input *CreateSecretInput) (*CreateSecretOutput, error) { + req, out := c.CreateSecretRequest(input) + return out, req.Send() +} + +// CreateSecretWithContext is the same as CreateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSecret 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 *SecretsManager) CreateSecretWithContext(ctx aws.Context, input *CreateSecretInput, opts ...request.Option) (*CreateSecretOutput, error) { + req, out := c.CreateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// 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 DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy +func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourcePolicy API operation for AWS Secrets Manager. +// +// Deletes the resource-based permission policy that's attached to the secret. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DeleteResourcePolicy +// +// Related operations +// +// * To attach a resource policy to a secret, use PutResourcePolicy. +// +// * To retrieve the current resource-based policy that's attached to a secret, +// use GetResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// 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 Secrets Manager's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy +func (c *SecretsManager) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy 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 *SecretsManager) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSecret = "DeleteSecret" + +// DeleteSecretRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteSecret for more information on using the DeleteSecret +// 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 DeleteSecretRequest method. +// req, resp := client.DeleteSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret +func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *request.Request, output *DeleteSecretOutput) { + op := &request.Operation{ + Name: opDeleteSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSecretInput{} + } + + output = &DeleteSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSecret API operation for AWS Secrets Manager. +// +// Deletes an entire secret and all of its versions. You can optionally include +// a recovery window during which you can restore the secret. If you don't specify +// a recovery window value, the operation defaults to 30 days. Secrets Manager +// attaches a DeletionDate stamp to the secret that specifies the end of the +// recovery window. At the end of the recovery window, Secrets Manager deletes +// the secret permanently. +// +// At any time before recovery window ends, you can use RestoreSecret to remove +// the DeletionDate and cancel the deletion of the secret. +// +// You cannot access the encrypted secret information in any secret that is +// scheduled for deletion. If you need to access that information, you must +// cancel the deletion with RestoreSecret and then retrieve the information. +// +// There is no explicit operation to delete a version of a secret. Instead, +// remove all staging labels from the VersionStage field of a version. That +// marks the version as deprecated and allows Secrets Manager to delete it as +// needed. Versions that do not have any staging labels do not show up in ListSecretVersionIds +// unless you specify IncludeDeprecated. +// +// The permanent secret deletion at the end of the waiting period is performed +// as a background task with low priority. There is no guarantee of a specific +// time after the recovery window for the actual delete operation to occur. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DeleteSecret +// +// Related operations +// +// * To create a secret, use CreateSecret. +// +// * To cancel deletion of a version of a secret before the recovery window +// has expired, use RestoreSecret. +// +// 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 Secrets Manager's +// API operation DeleteSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret +func (c *SecretsManager) DeleteSecret(input *DeleteSecretInput) (*DeleteSecretOutput, error) { + req, out := c.DeleteSecretRequest(input) + return out, req.Send() +} + +// DeleteSecretWithContext is the same as DeleteSecret with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSecret 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 *SecretsManager) DeleteSecretWithContext(ctx aws.Context, input *DeleteSecretInput, opts ...request.Option) (*DeleteSecretOutput, error) { + req, out := c.DeleteSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSecret = "DescribeSecret" + +// DescribeSecretRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeSecret for more information on using the DescribeSecret +// 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 DescribeSecretRequest method. +// req, resp := client.DescribeSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret +func (c *SecretsManager) DescribeSecretRequest(input *DescribeSecretInput) (req *request.Request, output *DescribeSecretOutput) { + op := &request.Operation{ + Name: opDescribeSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSecretInput{} + } + + output = &DescribeSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSecret API operation for AWS Secrets Manager. +// +// Retrieves the details of a secret. It does not include the encrypted fields. +// Only those fields that are populated with a value are returned in the response. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DescribeSecret +// +// Related operations +// +// * To create a secret, use CreateSecret. +// +// * To modify a secret, use UpdateSecret. +// +// * To retrieve the encrypted secret information in a version of the secret, +// use GetSecretValue. +// +// * To list all of the secrets in the AWS account, use ListSecrets. +// +// 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 Secrets Manager's +// API operation DescribeSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret +func (c *SecretsManager) DescribeSecret(input *DescribeSecretInput) (*DescribeSecretOutput, error) { + req, out := c.DescribeSecretRequest(input) + return out, req.Send() +} + +// DescribeSecretWithContext is the same as DescribeSecret with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSecret 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 *SecretsManager) DescribeSecretWithContext(ctx aws.Context, input *DescribeSecretInput, opts ...request.Option) (*DescribeSecretOutput, error) { + req, out := c.DescribeSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRandomPassword = "GetRandomPassword" + +// GetRandomPasswordRequest generates a "aws/request.Request" representing the +// client's request for the GetRandomPassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetRandomPassword for more information on using the GetRandomPassword +// 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 GetRandomPasswordRequest method. +// req, resp := client.GetRandomPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword +func (c *SecretsManager) GetRandomPasswordRequest(input *GetRandomPasswordInput) (req *request.Request, output *GetRandomPasswordOutput) { + op := &request.Operation{ + Name: opGetRandomPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRandomPasswordInput{} + } + + output = &GetRandomPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRandomPassword API operation for AWS Secrets Manager. +// +// Generates a random password of the specified complexity. This operation is +// intended for use in the Lambda rotation function. Per best practice, we recommend +// that you specify the maximum length and include every character type that +// the system you are generating a password for can support. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetRandomPassword +// +// 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 Secrets Manager's +// API operation GetRandomPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword +func (c *SecretsManager) GetRandomPassword(input *GetRandomPasswordInput) (*GetRandomPasswordOutput, error) { + req, out := c.GetRandomPasswordRequest(input) + return out, req.Send() +} + +// GetRandomPasswordWithContext is the same as GetRandomPassword with the addition of +// the ability to pass a context and additional request options. +// +// See GetRandomPassword 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 *SecretsManager) GetRandomPasswordWithContext(ctx aws.Context, input *GetRandomPasswordInput, opts ...request.Option) (*GetRandomPasswordOutput, error) { + req, out := c.GetRandomPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResourcePolicy = "GetResourcePolicy" + +// GetResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetResourcePolicy for more information on using the GetResourcePolicy +// 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 GetResourcePolicyRequest method. +// req, resp := client.GetResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy +func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { + op := &request.Operation{ + Name: opGetResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResourcePolicyInput{} + } + + output = &GetResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourcePolicy API operation for AWS Secrets Manager. +// +// Retrieves the JSON text of the resource-based policy document that's attached +// to the specified secret. The JSON request string input and response output +// are shown formatted with white space and line breaks for better readability. +// Submit your input as a single line JSON string. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetResourcePolicy +// +// Related operations +// +// * To attach a resource policy to a secret, use PutResourcePolicy. +// +// * To delete the resource-based policy that's attached to a secret, use +// DeleteResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// 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 Secrets Manager's +// API operation GetResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy +func (c *SecretsManager) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + return out, req.Send() +} + +// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourcePolicy 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 *SecretsManager) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSecretValue = "GetSecretValue" + +// GetSecretValueRequest generates a "aws/request.Request" representing the +// client's request for the GetSecretValue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetSecretValue for more information on using the GetSecretValue +// 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 GetSecretValueRequest method. +// req, resp := client.GetSecretValueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue +func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req *request.Request, output *GetSecretValueOutput) { + op := &request.Operation{ + Name: opGetSecretValue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSecretValueInput{} + } + + output = &GetSecretValueOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSecretValue API operation for AWS Secrets Manager. +// +// Retrieves the contents of the encrypted fields SecretString or SecretBinary +// from the specified version of a secret, whichever contains content. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetSecretValue +// +// * kms:Decrypt - required only if you use a customer-managed AWS KMS key +// to encrypt the secret. You do not need this permission to use the account's +// default AWS managed CMK for Secrets Manager. +// +// Related operations +// +// * To create a new version of the secret with different encrypted information, +// use PutSecretValue. +// +// * To retrieve the non-encrypted details for the secret, use DescribeSecret. +// +// 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 Secrets Manager's +// API operation GetSecretValue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeDecryptionFailure "DecryptionFailure" +// Secrets Manager can't decrypt the protected secret text using the provided +// KMS key. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue +func (c *SecretsManager) GetSecretValue(input *GetSecretValueInput) (*GetSecretValueOutput, error) { + req, out := c.GetSecretValueRequest(input) + return out, req.Send() +} + +// GetSecretValueWithContext is the same as GetSecretValue with the addition of +// the ability to pass a context and additional request options. +// +// See GetSecretValue 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 *SecretsManager) GetSecretValueWithContext(ctx aws.Context, input *GetSecretValueInput, opts ...request.Option) (*GetSecretValueOutput, error) { + req, out := c.GetSecretValueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSecretVersionIds = "ListSecretVersionIds" + +// ListSecretVersionIdsRequest generates a "aws/request.Request" representing the +// client's request for the ListSecretVersionIds operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListSecretVersionIds for more information on using the ListSecretVersionIds +// 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 ListSecretVersionIdsRequest method. +// req, resp := client.ListSecretVersionIdsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds +func (c *SecretsManager) ListSecretVersionIdsRequest(input *ListSecretVersionIdsInput) (req *request.Request, output *ListSecretVersionIdsOutput) { + op := &request.Operation{ + Name: opListSecretVersionIds, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListSecretVersionIdsInput{} + } + + output = &ListSecretVersionIdsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecretVersionIds API operation for AWS Secrets Manager. +// +// Lists all of the versions attached to the specified secret. The output does +// not include the SecretString or SecretBinary fields. By default, the list +// includes only versions that have at least one staging label in VersionStage +// attached. +// +// Always check the NextToken response parameter when calling any of the List* +// operations. These operations can occasionally return an empty or shorter +// than expected list of results even when there are more results available. +// When this happens, the NextToken response parameter contains a value to pass +// to the next call to the same API to request the next part of the list. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:ListSecretVersionIds +// +// Related operations +// +// * To list the secrets in an account, use ListSecrets. +// +// 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 Secrets Manager's +// API operation ListSecretVersionIds for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// You provided an invalid NextToken value. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds +func (c *SecretsManager) ListSecretVersionIds(input *ListSecretVersionIdsInput) (*ListSecretVersionIdsOutput, error) { + req, out := c.ListSecretVersionIdsRequest(input) + return out, req.Send() +} + +// ListSecretVersionIdsWithContext is the same as ListSecretVersionIds with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecretVersionIds 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 *SecretsManager) ListSecretVersionIdsWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, opts ...request.Option) (*ListSecretVersionIdsOutput, error) { + req, out := c.ListSecretVersionIdsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListSecretVersionIdsPages iterates over the pages of a ListSecretVersionIds operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSecretVersionIds 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 ListSecretVersionIds operation. +// pageNum := 0 +// err := client.ListSecretVersionIdsPages(params, +// func(page *ListSecretVersionIdsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecretsManager) ListSecretVersionIdsPages(input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool) error { + return c.ListSecretVersionIdsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSecretVersionIdsPagesWithContext same as ListSecretVersionIdsPages 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 *SecretsManager) ListSecretVersionIdsPagesWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSecretVersionIdsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSecretVersionIdsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListSecrets = "ListSecrets" + +// ListSecretsRequest generates a "aws/request.Request" representing the +// client's request for the ListSecrets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListSecrets for more information on using the ListSecrets +// 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 ListSecretsRequest method. +// req, resp := client.ListSecretsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets +func (c *SecretsManager) ListSecretsRequest(input *ListSecretsInput) (req *request.Request, output *ListSecretsOutput) { + op := &request.Operation{ + Name: opListSecrets, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListSecretsInput{} + } + + output = &ListSecretsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecrets API operation for AWS Secrets Manager. +// +// Lists all of the secrets that are stored by Secrets Manager in the AWS account. +// To list the versions currently stored for a specific secret, use ListSecretVersionIds. +// The encrypted fields SecretString and SecretBinary are not included in the +// output. To get that information, call the GetSecretValue operation. +// +// Always check the NextToken response parameter when calling any of the List* +// operations. These operations can occasionally return an empty or shorter +// than expected list of results even when there are more results available. +// When this happens, the NextToken response parameter contains a value to pass +// to the next call to the same API to request the next part of the list. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:ListSecrets +// +// Related operations +// +// * To list the versions attached to a secret, use ListSecretVersionIds. +// +// 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 Secrets Manager's +// API operation ListSecrets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// You provided an invalid NextToken value. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets +func (c *SecretsManager) ListSecrets(input *ListSecretsInput) (*ListSecretsOutput, error) { + req, out := c.ListSecretsRequest(input) + return out, req.Send() +} + +// ListSecretsWithContext is the same as ListSecrets with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecrets 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 *SecretsManager) ListSecretsWithContext(ctx aws.Context, input *ListSecretsInput, opts ...request.Option) (*ListSecretsOutput, error) { + req, out := c.ListSecretsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListSecretsPages iterates over the pages of a ListSecrets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSecrets 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 ListSecrets operation. +// pageNum := 0 +// err := client.ListSecretsPages(params, +// func(page *ListSecretsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecretsManager) ListSecretsPages(input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool) error { + return c.ListSecretsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSecretsPagesWithContext same as ListSecretsPages 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 *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSecretsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSecretsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutResourcePolicy for more information on using the PutResourcePolicy +// 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 PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy +func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for AWS Secrets Manager. +// +// Attaches the contents of the specified resource-based permission policy to +// a secret. A resource-based policy is optional. Alternatively, you can use +// IAM identity-based policies that specify the secret's Amazon Resource Name +// (ARN) in the policy statement's Resources element. You can also use a combination +// of both identity-based and resource-based policies. The affected users and +// roles receive the permissions that are permitted by all of the relevant policies. +// For more information, see Using Resource-Based Policies for AWS Secrets Manager +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). +// For the complete description of the AWS policy syntax and grammar, see IAM +// JSON Policy Reference (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) +// in the IAM User Guide. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:PutResourcePolicy +// +// Related operations +// +// * To retrieve the resource policy that's attached to a secret, use GetResourcePolicy. +// +// * To delete the resource-based policy that's attached to a secret, use +// DeleteResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// 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 Secrets Manager's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy +func (c *SecretsManager) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy 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 *SecretsManager) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutSecretValue = "PutSecretValue" + +// PutSecretValueRequest generates a "aws/request.Request" representing the +// client's request for the PutSecretValue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PutSecretValue for more information on using the PutSecretValue +// 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 PutSecretValueRequest method. +// req, resp := client.PutSecretValueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue +func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req *request.Request, output *PutSecretValueOutput) { + op := &request.Operation{ + Name: opPutSecretValue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutSecretValueInput{} + } + + output = &PutSecretValueOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutSecretValue API operation for AWS Secrets Manager. +// +// Stores a new encrypted secret value in the specified secret. To do this, +// the operation creates a new version and attaches it to the secret. The version +// can contain a new SecretString value or a new SecretBinary value. You can +// also specify the staging labels that are initially attached to the new version. +// +// The Secrets Manager console uses only the SecretString field. To add binary +// data to a secret with the SecretBinary field you must use the AWS CLI or +// one of the AWS SDKs. +// +// * If this operation creates the first version for the secret then Secrets +// Manager automatically attaches the staging label AWSCURRENT to the new +// version. +// +// * If another version of this secret already exists, then this operation +// does not automatically move any staging labels other than those that you +// explicitly specify in the VersionStages parameter. +// +// * If this operation moves the staging label AWSCURRENT from another version +// to this version (because you included it in the StagingLabels parameter) +// then Secrets Manager also automatically moves the staging label AWSPREVIOUS +// to the version that AWSCURRENT was removed from. +// +// * This operation is idempotent. If a version with a SecretVersionId with +// the same value as the ClientRequestToken parameter already exists and +// you specify the same secret data, the operation succeeds but does nothing. +// However, if the secret data is different, then the operation fails because +// you cannot modify an existing version; you can only create new ones. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// Secrets Manager creates it for you automatically. All users in the same AWS +// account automatically have access to use the default CMK. Note that if an +// Secrets Manager API call results in AWS having to create the account's AWS-managed +// CMK, it can result in a one-time significant delay in returning the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom AWS KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the AWS KMS key policy must grant cross-account access to that +// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt +// operations. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:PutSecretValue +// +// * kms:GenerateDataKey - needed only if you use a customer-managed AWS +// KMS key to encrypt the secret. You do not need this permission to use +// the account's default AWS managed CMK for Secrets Manager. +// +// Related operations +// +// * To retrieve the encrypted value you store in the version of a secret, +// use GetSecretValue. +// +// * To create a secret, use CreateSecret. +// +// * To get the details for a secret, use DescribeSecret. +// +// * To list the versions attached to a secret, use ListSecretVersionIds. +// +// 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 Secrets Manager's +// API operation PutSecretValue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the Secrets Manager internal +// limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue +func (c *SecretsManager) PutSecretValue(input *PutSecretValueInput) (*PutSecretValueOutput, error) { + req, out := c.PutSecretValueRequest(input) + return out, req.Send() +} + +// PutSecretValueWithContext is the same as PutSecretValue with the addition of +// the ability to pass a context and additional request options. +// +// See PutSecretValue 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 *SecretsManager) PutSecretValueWithContext(ctx aws.Context, input *PutSecretValueInput, opts ...request.Option) (*PutSecretValueOutput, error) { + req, out := c.PutSecretValueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreSecret = "RestoreSecret" + +// RestoreSecretRequest generates a "aws/request.Request" representing the +// client's request for the RestoreSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RestoreSecret for more information on using the RestoreSecret +// 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 RestoreSecretRequest method. +// req, resp := client.RestoreSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret +func (c *SecretsManager) RestoreSecretRequest(input *RestoreSecretInput) (req *request.Request, output *RestoreSecretOutput) { + op := &request.Operation{ + Name: opRestoreSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreSecretInput{} + } + + output = &RestoreSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreSecret API operation for AWS Secrets Manager. +// +// Cancels the scheduled deletion of a secret by removing the DeletedDate time +// stamp. This makes the secret accessible to query once again. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:RestoreSecret +// +// Related operations +// +// * To delete a secret, use DeleteSecret. +// +// 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 Secrets Manager's +// API operation RestoreSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret +func (c *SecretsManager) RestoreSecret(input *RestoreSecretInput) (*RestoreSecretOutput, error) { + req, out := c.RestoreSecretRequest(input) + return out, req.Send() +} + +// RestoreSecretWithContext is the same as RestoreSecret with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreSecret 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 *SecretsManager) RestoreSecretWithContext(ctx aws.Context, input *RestoreSecretInput, opts ...request.Option) (*RestoreSecretOutput, error) { + req, out := c.RestoreSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRotateSecret = "RotateSecret" + +// RotateSecretRequest generates a "aws/request.Request" representing the +// client's request for the RotateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RotateSecret for more information on using the RotateSecret +// 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 RotateSecretRequest method. +// req, resp := client.RotateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret +func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *request.Request, output *RotateSecretOutput) { + op := &request.Operation{ + Name: opRotateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RotateSecretInput{} + } + + output = &RotateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// RotateSecret API operation for AWS Secrets Manager. +// +// Configures and starts the asynchronous process of rotating this secret. If +// you include the configuration parameters, the operation sets those values +// for the secret and then immediately starts a rotation. If you do not include +// the configuration parameters, the operation starts a rotation with the values +// already stored in the secret. After the rotation completes, the protected +// service and its clients all use the new version of the secret. +// +// This required configuration information includes the ARN of an AWS Lambda +// function and the time between scheduled rotations. The Lambda rotation function +// creates a new version of the secret and creates or updates the credentials +// on the protected service to match. After testing the new credentials, the +// function marks the new secret with the staging label AWSCURRENT so that your +// clients all immediately begin to use the new version. For more information +// about rotating secrets and how to configure a Lambda function to rotate the +// secrets for your protected service, see Rotating Secrets in AWS Secrets Manager +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) +// in the AWS Secrets Manager User Guide. +// +// The rotation function must end with the versions of the secret in one of +// two states: +// +// * The AWSPENDING and AWSCURRENT staging labels are attached to the same +// version of the secret, or +// +// * The AWSPENDING staging label is not attached to any version of the secret. +// +// If instead the AWSPENDING staging label is present but is not attached to +// the same version as AWSCURRENT then any later invocation of RotateSecret +// assumes that a previous rotation request is still in progress and returns +// an error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:RotateSecret +// +// * lambda:InvokeFunction (on the function specified in the secret's metadata) +// +// Related operations +// +// * To list the secrets in your account, use ListSecrets. +// +// * To get the details for a version of a secret, use DescribeSecret. +// +// * To create a new version of a secret, use CreateSecret. +// +// * To attach staging labels to or remove staging labels from a version +// of a secret, use UpdateSecretVersionStage. +// +// 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 Secrets Manager's +// API operation RotateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret +func (c *SecretsManager) RotateSecret(input *RotateSecretInput) (*RotateSecretOutput, error) { + req, out := c.RotateSecretRequest(input) + return out, req.Send() +} + +// RotateSecretWithContext is the same as RotateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See RotateSecret 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 *SecretsManager) RotateSecretWithContext(ctx aws.Context, input *RotateSecretInput, opts ...request.Option) (*RotateSecretOutput, error) { + req, out := c.RotateSecretRequest(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 +// successfuly. +// +// 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/secretsmanager-2017-10-17/TagResource +func (c *SecretsManager) 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.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Secrets Manager. +// +// Attaches one or more tags, each consisting of a key name and a value, to +// the specified secret. Tags are part of the secret's overall metadata, and +// are not associated with any specific version of the secret. This operation +// only appends tags to the existing list of tags. To remove tags, you must +// use UntagResource. +// +// The following basic restrictions apply to tags: +// +// * Maximum number of tags per secret—50 +// +// * Maximum key length—127 Unicode characters in UTF-8 +// +// * Maximum value length—255 Unicode characters in UTF-8 +// +// * Tag keys and values are case sensitive. +// +// * Do not use the aws: prefix in your tag names or values because it is +// reserved for AWS use. You can't edit or delete tag names or values with +// this prefix. Tags with this prefix do not count against your tags per +// secret limit. +// +// * If your tagging schema will be used across multiple services and resources, +// remember that other services might have restrictions on allowed characters. +// Generally allowed characters are: letters, spaces, and numbers representable +// in UTF-8, plus the following special characters: + - = . _ : / @. +// +// If you use tags as part of your security strategy, then adding or removing +// a tag can change permissions. If successfully completing this operation would +// result in you losing your permissions for this secret, then the operation +// is blocked and returns an Access Denied error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:TagResource +// +// Related operations +// +// * To remove one or more tags from the collection attached to a secret, +// use UntagResource. +// +// * To view the list of tags attached to a secret, use DescribeSecret. +// +// 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 Secrets Manager's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource +func (c *SecretsManager) 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 *SecretsManager) 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 +// successfuly. +// +// 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/secretsmanager-2017-10-17/UntagResource +func (c *SecretsManager) 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.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Secrets Manager. +// +// Removes one or more tags from the specified secret. +// +// This operation is idempotent. If a requested tag is not attached to the secret, +// no error is returned and the secret metadata is unchanged. +// +// If you use tags as part of your security strategy, then removing a tag can +// change permissions. If successfully completing this operation would result +// in you losing your permissions for this secret, then the operation is blocked +// and returns an Access Denied error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UntagResource +// +// Related operations +// +// * To add one or more tags to the collection attached to a secret, use +// TagResource. +// +// * To view the list of tags attached to a secret, use DescribeSecret. +// +// 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 Secrets Manager's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource +func (c *SecretsManager) 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 *SecretsManager) 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 opUpdateSecret = "UpdateSecret" + +// UpdateSecretRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateSecret for more information on using the UpdateSecret +// 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 UpdateSecretRequest method. +// req, resp := client.UpdateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret +func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *request.Request, output *UpdateSecretOutput) { + op := &request.Operation{ + Name: opUpdateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSecretInput{} + } + + output = &UpdateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSecret API operation for AWS Secrets Manager. +// +// Modifies many of the details of a secret. If you include a ClientRequestToken +// and either SecretString or SecretBinary then it also creates a new version +// attached to the secret. +// +// To modify the rotation configuration of a secret, use RotateSecret instead. +// +// The Secrets Manager console uses only the SecretString parameter and therefore +// limits you to encrypting and storing only a text string. To encrypt and store +// binary data as part of the version of a secret, you must use either the AWS +// CLI or one of the AWS SDKs. +// +// * If a version with a SecretVersionId with the same value as the ClientRequestToken +// parameter already exists, the operation generates an error. You cannot +// modify an existing version, you can only create new ones. +// +// * If you include SecretString or SecretBinary to create a new secret version, +// Secrets Manager automatically attaches the staging label AWSCURRENT to +// the new version. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// Secrets Manager creates it for you automatically. All users in the same AWS +// account automatically have access to use the default CMK. Note that if an +// Secrets Manager API call results in AWS having to create the account's AWS-managed +// CMK, it can result in a one-time significant delay in returning the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom AWS KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the AWS KMS key policy must grant cross-account access to that +// other account's user or role for both the kms:GenerateDataKey and kms:Decrypt +// operations. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UpdateSecret +// +// * kms:GenerateDataKey - needed only if you use a custom AWS KMS key to +// encrypt the secret. You do not need this permission to use the account's +// AWS managed CMK for Secrets Manager. +// +// * kms:Decrypt - needed only if you use a custom AWS KMS key to encrypt +// the secret. You do not need this permission to use the account's AWS managed +// CMK for Secrets Manager. +// +// Related operations +// +// * To create a new secret, use CreateSecret. +// +// * To add only a new version to an existing secret, use PutSecretValue. +// +// * To get the details for a secret, use DescribeSecret. +// +// * To list the versions contained in a secret, use ListSecretVersionIds. +// +// 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 Secrets Manager's +// API operation UpdateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the Secrets Manager internal +// limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodePreconditionNotMetException "PreconditionNotMetException" +// The request failed because you did not complete all the prerequisite steps. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret +func (c *SecretsManager) UpdateSecret(input *UpdateSecretInput) (*UpdateSecretOutput, error) { + req, out := c.UpdateSecretRequest(input) + return out, req.Send() +} + +// UpdateSecretWithContext is the same as UpdateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSecret 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 *SecretsManager) UpdateSecretWithContext(ctx aws.Context, input *UpdateSecretInput, opts ...request.Option) (*UpdateSecretOutput, error) { + req, out := c.UpdateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSecretVersionStage = "UpdateSecretVersionStage" + +// UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSecretVersionStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateSecretVersionStage for more information on using the UpdateSecretVersionStage +// 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 UpdateSecretVersionStageRequest method. +// req, resp := client.UpdateSecretVersionStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage +func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVersionStageInput) (req *request.Request, output *UpdateSecretVersionStageOutput) { + op := &request.Operation{ + Name: opUpdateSecretVersionStage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSecretVersionStageInput{} + } + + output = &UpdateSecretVersionStageOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSecretVersionStage API operation for AWS Secrets Manager. +// +// Modifies the staging labels attached to a version of a secret. Staging labels +// are used to track a version as it progresses through the secret rotation +// process. You can attach a staging label to only one version of a secret at +// a time. If a staging label to be added is already attached to another version, +// then it is moved--removed from the other version first and then attached +// to this one. For more information about staging labels, see Staging Labels +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) +// in the AWS Secrets Manager User Guide. +// +// The staging labels that you specify in the VersionStage parameter are added +// to the existing list of staging labels--they don't replace it. +// +// You can move the AWSCURRENT staging label to this version by including it +// in this call. +// +// Whenever you move AWSCURRENT, Secrets Manager automatically moves the label +// AWSPREVIOUS to the version that AWSCURRENT was removed from. +// +// If this action results in the last label being removed from a version, then +// the version is considered to be 'deprecated' and can be deleted by Secrets +// Manager. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UpdateSecretVersionStage +// +// Related operations +// +// * To get the list of staging labels that are currently associated with +// a version of a secret, use DescribeSecret and examine the SecretVersionsToStages +// response value. +// +// 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 Secrets Manager's +// API operation UpdateSecretVersionStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the Secrets Manager internal +// limits. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage +func (c *SecretsManager) UpdateSecretVersionStage(input *UpdateSecretVersionStageInput) (*UpdateSecretVersionStageOutput, error) { + req, out := c.UpdateSecretVersionStageRequest(input) + return out, req.Send() +} + +// UpdateSecretVersionStageWithContext is the same as UpdateSecretVersionStage with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSecretVersionStage 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 *SecretsManager) UpdateSecretVersionStageWithContext(ctx aws.Context, input *UpdateSecretVersionStageInput, opts ...request.Option) (*UpdateSecretVersionStageOutput, error) { + req, out := c.UpdateSecretVersionStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CancelRotateSecretInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret for which you want to cancel a rotation request. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelRotateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRotateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelRotateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelRotateSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *CancelRotateSecretInput) SetSecretId(v string) *CancelRotateSecretInput { + s.SecretId = &v + return s +} + +type CancelRotateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret for which rotation was canceled. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which rotation was canceled. + Name *string `min:"1" type:"string"` + + // The unique identifier of the version of the secret that was created during + // the rotation. This version might not be complete, and should be evaluated + // for possible deletion. At the very least, you should remove the VersionStage + // value AWSPENDING to enable this version to be deleted. Failing to clean up + // a cancelled rotation can block you from successfully starting future rotations. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s CancelRotateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRotateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *CancelRotateSecretOutput) SetARN(v string) *CancelRotateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *CancelRotateSecretOutput) SetName(v string) *CancelRotateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *CancelRotateSecretOutput) SetVersionId(v string) *CancelRotateSecretOutput { + s.VersionId = &v + return s +} + +type CreateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) If you include SecretString or SecretBinary, then an initial version + // is created as part of the secret, and this parameter specifies a unique identifier + // for the new version. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes it as the value for this parameter in the request. If + // you don't use the SDK and instead generate a raw HTTP request to the Secrets + // Manager service endpoint, then you must generate a ClientRequestToken yourself + // for the new version and include that value in the request. + // + // This value helps ensure idempotency. Secrets Manager uses this value to prevent + // the accidental creation of duplicate versions if there are failures and retries + // during a rotation. We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness of your versions within the specified secret. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as those in the request, then the + // request is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from those in the request then the + // request fails because you cannot modify an existing version. Instead, + // use PutSecretValue to create a new version. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies a user-provided description of the secret. + Description *string `type:"string"` + + // (Optional) Specifies the ARN, Key ID, or alias of the AWS KMS customer master + // key (CMK) to be used to encrypt the SecretString or SecretBinary values in + // the versions stored in this secret. + // + // You can specify any of the supported ways to identify a AWS KMS key ID. If + // you need to reference a CMK in a different account, you can use only the + // key ARN or the alias ARN. + // + // If you don't specify this value, then Secrets Manager defaults to using the + // AWS account's default CMK (the one named aws/secretsmanager). If a AWS KMS + // CMK with that name doesn't yet exist, then Secrets Manager creates it for + // you automatically the first time it needs to encrypt a version's SecretString + // or SecretBinary fields. + // + // You can use the account's default CMK to encrypt and decrypt only if you + // call this operation using credentials from the same account that owns the + // secret. If the secret is in a different account, then you must create a custom + // CMK and specify the ARN in this field. + KmsKeyId *string `type:"string"` + + // Specifies the friendly name of the new secret. + // + // The secret name must be ASCII letters, digits, or the following characters + // : /_+=.@- + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // + // Either SecretString or SecretBinary must have a value, but not both. They + // cannot both be empty. + // + // This parameter is not available using the Secrets Manager console. It can + // be accessed only by using the AWS CLI or one of the AWS SDKs. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. + // + // Either SecretString or SecretBinary must have a value, but not both. They + // cannot both be empty. + // + // If you create a secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For example: + // + // [{"username":"bob"},{"password":"abc123xyz456"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + SecretString *string `type:"string"` + + // (Optional) Specifies a list of user-defined tags that are attached to the + // secret. Each tag is a "Key" and "Value" pair of strings. This operation only + // appends tags to the existing list of tags. To remove tags, you must use UntagResource. + // + // Secrets Manager tag key names are case sensitive. A tag with the key "ABC" + // is a different tag from one with key "abc". + // + // If you check tags in IAM policy Condition elements as part of your security + // strategy, then adding or removing a tag can change permissions. If the successful + // completion of this operation would result in you losing your permissions + // for this secret, then this operation is blocked and returns an Access Denied + // error. + // + // This parameter requires a JSON text string argument. For information on how + // to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For example: + // + // [{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + // + // The following basic restrictions apply to tags: + // + // * Maximum number of tags per secret—50 + // + // * Maximum key length—127 Unicode characters in UTF-8 + // + // * Maximum value length—255 Unicode characters in UTF-8 + // + // * Tag keys and values are case sensitive. + // + // * Do not use the aws: prefix in your tag names or values because it is + // reserved for AWS use. You can't edit or delete tag names or values with + // this prefix. Tags with this prefix do not count against your tags per + // secret limit. + // + // * If your tagging schema will be used across multiple services and resources, + // remember that other services might have restrictions on allowed characters. + // Generally allowed characters are: letters, spaces, and numbers representable + // in UTF-8, plus the following special characters: + - = . _ : / @. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + 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 { + 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 +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateSecretInput) SetClientRequestToken(v string) *CreateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateSecretInput) SetDescription(v string) *CreateSecretInput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateSecretInput) SetKmsKeyId(v string) *CreateSecretInput { + s.KmsKeyId = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecretInput) SetName(v string) *CreateSecretInput { + s.Name = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *CreateSecretInput) SetSecretBinary(v []byte) *CreateSecretInput { + s.SecretBinary = v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *CreateSecretInput) SetSecretString(v string) *CreateSecretInput { + s.SecretString = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSecretInput) SetTags(v []*Tag) *CreateSecretInput { + s.Tags = v + return s +} + +type CreateSecretOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the secret that you just created. + // + // Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that you just created. + Name *string `min:"1" type:"string"` + + // The unique identifier that's associated with the version of the secret you + // just created. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s CreateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *CreateSecretOutput) SetARN(v string) *CreateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecretOutput) SetName(v string) *CreateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { + s.VersionId = &v + return s +} + +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret that you want to delete the attached resource-based + // policy for. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *DeleteResourcePolicyInput) SetSecretId(v string) *DeleteResourcePolicyInput { + s.SecretId = &v + return s +} + +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that the resource-based policy was deleted for. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that the resource-based policy was deleted + // for. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DeleteResourcePolicyOutput) SetARN(v string) *DeleteResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteResourcePolicyOutput) SetName(v string) *DeleteResourcePolicyOutput { + s.Name = &v + return s +} + +type DeleteSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies the number of days that Secrets Manager waits before + // it can delete the secret. + // + // This value can range from 7 to 30 days. The default value is 30. + RecoveryWindowInDays *int64 `type:"long"` + + // Specifies the secret that you want to delete. You can specify either the + // Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. +func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput { + s.RecoveryWindowInDays = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *DeleteSecretInput) SetSecretId(v string) *DeleteSecretInput { + s.SecretId = &v + return s +} + +type DeleteSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that is now scheduled for deletion. + ARN *string `min:"20" type:"string"` + + // The date and time after which this secret can be deleted by Secrets Manager + // and can no longer be restored. This value is the date and time of the delete + // request plus the number of days specified in RecoveryWindowInDays. + DeletionDate *time.Time `type:"timestamp"` + + // The friendly name of the secret that is now scheduled for deletion. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DeleteSecretOutput) SetARN(v string) *DeleteSecretOutput { + s.ARN = &v + return s +} + +// SetDeletionDate sets the DeletionDate field's value. +func (s *DeleteSecretOutput) SetDeletionDate(v time.Time) *DeleteSecretOutput { + s.DeletionDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteSecretOutput) SetName(v string) *DeleteSecretOutput { + s.Name = &v + return s +} + +type DescribeSecretInput struct { + _ struct{} `type:"structure"` + + // The identifier of the secret whose details you want to retrieve. You can + // specify either the Amazon Resource Name (ARN) or the friendly name of the + // secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *DescribeSecretInput) SetSecretId(v string) *DescribeSecretInput { + s.SecretId = &v + return s +} + +type DescribeSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // This value exists if the secret is scheduled for deletion. Some time after + // the specified date and time, Secrets Manager deletes the secret and all of + // its versions. + // + // If a secret is scheduled for deletion, then its details, including the encrypted + // secret information, is not accessible. To cancel a scheduled deletion and + // restore access, use RestoreSecret. + DeletedDate *time.Time `type:"timestamp"` + + // The user-provided description of the secret. + Description *string `type:"string"` + + // The ARN or alias of the AWS KMS customer master key (CMK) that's used to + // encrypt the SecretString or SecretBinary fields in each version of the secret. + // If you don't provide a key, then Secrets Manager defaults to encrypting the + // secret fields with the default AWS KMS CMK (the one named awssecretsmanager) + // for this account. + KmsKeyId *string `type:"string"` + + // The last date that this secret was accessed. This value is truncated to midnight + // of the date and therefore shows only the date, not the time. + LastAccessedDate *time.Time `type:"timestamp"` + + // The last date and time that this secret was modified in any way. + LastChangedDate *time.Time `type:"timestamp"` + + // The last date and time that the Secrets Manager rotation process for this + // secret was invoked. + LastRotatedDate *time.Time `type:"timestamp"` + + // The user-provided friendly name of the secret. + Name *string `min:"1" type:"string"` + + // Specifies whether automatic rotation is enabled for this secret. + // + // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set + // to a value greater than 0. To disable rotation, use CancelRotateSecret. + RotationEnabled *bool `type:"boolean"` + + // The ARN of a Lambda function that's invoked by Secrets Manager to rotate + // the secret either automatically per the schedule or manually by a call to + // RotateSecret. + RotationLambdaARN *string `type:"string"` + + // A structure that contains the rotation configuration for this secret. + RotationRules *RotationRulesType `type:"structure"` + + // The list of user-defined tags that are associated with the secret. To add + // tags to a secret, use TagResource. To remove tags, use UntagResource. + Tags []*Tag `type:"list"` + + // A list of all of the currently assigned VersionStage staging labels and the + // SecretVersionId that each is attached to. Staging labels are used to keep + // track of the different versions during the rotation process. + // + // A version that does not have any staging labels attached is considered deprecated + // and subject to deletion. Such versions are not included in this list. + VersionIdsToStages map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s DescribeSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DescribeSecretOutput) SetARN(v string) *DescribeSecretOutput { + s.ARN = &v + return s +} + +// SetDeletedDate sets the DeletedDate field's value. +func (s *DescribeSecretOutput) SetDeletedDate(v time.Time) *DescribeSecretOutput { + s.DeletedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeSecretOutput) SetDescription(v string) *DescribeSecretOutput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DescribeSecretOutput) SetKmsKeyId(v string) *DescribeSecretOutput { + s.KmsKeyId = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *DescribeSecretOutput) SetLastAccessedDate(v time.Time) *DescribeSecretOutput { + s.LastAccessedDate = &v + return s +} + +// SetLastChangedDate sets the LastChangedDate field's value. +func (s *DescribeSecretOutput) SetLastChangedDate(v time.Time) *DescribeSecretOutput { + s.LastChangedDate = &v + return s +} + +// SetLastRotatedDate sets the LastRotatedDate field's value. +func (s *DescribeSecretOutput) SetLastRotatedDate(v time.Time) *DescribeSecretOutput { + s.LastRotatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeSecretOutput) SetName(v string) *DescribeSecretOutput { + s.Name = &v + return s +} + +// SetRotationEnabled sets the RotationEnabled field's value. +func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { + s.RotationEnabled = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *DescribeSecretOutput) SetRotationLambdaARN(v string) *DescribeSecretOutput { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *DescribeSecretOutput) SetRotationRules(v *RotationRulesType) *DescribeSecretOutput { + s.RotationRules = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribeSecretOutput) SetTags(v []*Tag) *DescribeSecretOutput { + s.Tags = v + return s +} + +// SetVersionIdsToStages sets the VersionIdsToStages field's value. +func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput { + s.VersionIdsToStages = v + return s +} + +type GetRandomPasswordInput struct { + _ struct{} `type:"structure"` + + // A string that includes characters that should not be included in the generated + // password. The default is that all characters from the included sets can be + // used. + ExcludeCharacters *string `type:"string"` + + // Specifies that the generated password should not include lowercase letters. + // The default if you do not include this switch parameter is that lowercase + // letters can be included. + ExcludeLowercase *bool `type:"boolean"` + + // Specifies that the generated password should not include digits. The default + // if you do not include this switch parameter is that digits can be included. + ExcludeNumbers *bool `type:"boolean"` + + // Specifies that the generated password should not include punctuation characters. + // The default if you do not include this switch parameter is that punctuation + // characters can be included. + ExcludePunctuation *bool `type:"boolean"` + + // Specifies that the generated password should not include uppercase letters. + // The default if you do not include this switch parameter is that uppercase + // letters can be included. + ExcludeUppercase *bool `type:"boolean"` + + // Specifies that the generated password can include the space character. The + // default if you do not include this switch parameter is that the space character + // is not included. + IncludeSpace *bool `type:"boolean"` + + // The desired length of the generated password. The default value if you do + // not include this parameter is 32 characters. + PasswordLength *int64 `min:"1" type:"long"` + + // A boolean value that specifies whether the generated password must include + // at least one of every allowed character type. The default value is True and + // the operation requires at least one of every character type. + RequireEachIncludedType *bool `type:"boolean"` +} + +// String returns the string representation +func (s GetRandomPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRandomPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRandomPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRandomPasswordInput"} + if s.PasswordLength != nil && *s.PasswordLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("PasswordLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExcludeCharacters sets the ExcludeCharacters field's value. +func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput { + s.ExcludeCharacters = &v + return s +} + +// SetExcludeLowercase sets the ExcludeLowercase field's value. +func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput { + s.ExcludeLowercase = &v + return s +} + +// SetExcludeNumbers sets the ExcludeNumbers field's value. +func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput { + s.ExcludeNumbers = &v + return s +} + +// SetExcludePunctuation sets the ExcludePunctuation field's value. +func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput { + s.ExcludePunctuation = &v + return s +} + +// SetExcludeUppercase sets the ExcludeUppercase field's value. +func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput { + s.ExcludeUppercase = &v + return s +} + +// SetIncludeSpace sets the IncludeSpace field's value. +func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput { + s.IncludeSpace = &v + return s +} + +// SetPasswordLength sets the PasswordLength field's value. +func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput { + s.PasswordLength = &v + return s +} + +// SetRequireEachIncludedType sets the RequireEachIncludedType field's value. +func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput { + s.RequireEachIncludedType = &v + return s +} + +type GetRandomPasswordOutput struct { + _ struct{} `type:"structure"` + + // A string with the generated password. + RandomPassword *string `type:"string"` +} + +// String returns the string representation +func (s GetRandomPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRandomPasswordOutput) GoString() string { + return s.String() +} + +// SetRandomPassword sets the RandomPassword field's value. +func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput { + s.RandomPassword = &v + return s +} + +type GetResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret that you want to retrieve the attached resource-based + // policy for. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *GetResourcePolicyInput) SetSecretId(v string) *GetResourcePolicyInput { + s.SecretId = &v + return s +} + +type GetResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that the resource-based policy was retrieved for. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that the resource-based policy was retrieved + // for. + Name *string `min:"1" type:"string"` + + // A JSON-formatted string that describes the permissions that are associated + // with the attached secret. These permissions are combined with any permissions + // that are associated with the user or role that attempts to access this secret. + // The combined permissions specify who can access the secret and what actions + // they can perform. For more information, see Authentication and Access Control + // for AWS Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) + // in the AWS Secrets Manager User Guide. + ResourcePolicy *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *GetResourcePolicyOutput) SetARN(v string) *GetResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetResourcePolicyOutput) SetName(v string) *GetResourcePolicyOutput { + s.Name = &v + return s +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput { + s.ResourcePolicy = &v + return s +} + +type GetSecretValueInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret containing the version that you want to retrieve. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // Specifies the unique identifier of the version of the secret that you want + // to retrieve. If you specify this parameter then don't specify VersionStage. + // If you don't specify either a VersionStage or SecretVersionId then the default + // is to perform the operation on the version with the VersionStage value of + // AWSCURRENT. + // + // This value is typically a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value with 32 hexadecimal digits. + VersionId *string `min:"32" type:"string"` + + // Specifies the secret version that you want to retrieve by the staging label + // attached to the version. + // + // Staging labels are used to keep track of different versions during the rotation + // process. If you use this parameter then don't specify SecretVersionId. If + // you don't specify either a VersionStage or SecretVersionId, then the default + // is to perform the operation on the version with the VersionStage value of + // AWSCURRENT. + VersionStage *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetSecretValueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecretValueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSecretValueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSecretValueInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionId != nil && len(*s.VersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("VersionId", 32)) + } + if s.VersionStage != nil && len(*s.VersionStage) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *GetSecretValueInput) SetSecretId(v string) *GetSecretValueInput { + s.SecretId = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetSecretValueInput) SetVersionId(v string) *GetSecretValueInput { + s.VersionId = &v + return s +} + +// SetVersionStage sets the VersionStage field's value. +func (s *GetSecretValueInput) SetVersionStage(v string) *GetSecretValueInput { + s.VersionStage = &v + return s +} + +type GetSecretValueOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // The date and time that this version of the secret was created. + CreatedDate *time.Time `type:"timestamp"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // The decrypted part of the protected secret information that was originally + // provided as binary data in the form of a byte array. The response parameter + // represents the binary data as a base64-encoded (https://tools.ietf.org/html/rfc4648#section-4) + // string. + // + // This parameter is not used if the secret is created by the Secrets Manager + // console. + // + // If you store custom information in this field of the secret, then you must + // code your Lambda rotation function to parse and interpret whatever you store + // in the SecretString or SecretBinary fields. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // The decrypted part of the protected secret information that was originally + // provided as a string. + // + // If you create this secret by using the Secrets Manager console then only + // the SecretString parameter contains data. Secrets Manager stores the information + // as a JSON structure of key/value pairs that the Lambda rotation function + // knows how to parse. + // + // If you store custom information in the secret by using the CreateSecret, + // UpdateSecret, or PutSecretValue API operations instead of the Secrets Manager + // console, or by using the Other secret type in the console, then you must + // code your Lambda rotation function to parse and interpret those values. + SecretString *string `type:"string"` + + // The unique identifier of this version of the secret. + VersionId *string `min:"32" type:"string"` + + // A list of all of the staging labels currently attached to this version of + // the secret. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s GetSecretValueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecretValueOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *GetSecretValueOutput) SetARN(v string) *GetSecretValueOutput { + s.ARN = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetSecretValueOutput) SetCreatedDate(v time.Time) *GetSecretValueOutput { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetSecretValueOutput) SetName(v string) *GetSecretValueOutput { + s.Name = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *GetSecretValueOutput) SetSecretBinary(v []byte) *GetSecretValueOutput { + s.SecretBinary = v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *GetSecretValueOutput) SetSecretString(v string) *GetSecretValueOutput { + s.SecretString = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetSecretValueOutput) SetVersionId(v string) *GetSecretValueOutput { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *GetSecretValueOutput) SetVersionStages(v []*string) *GetSecretValueOutput { + s.VersionStages = v + return s +} + +type ListSecretVersionIdsInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies that you want the results to include versions that do + // not have any staging labels attached to them. Such versions are considered + // deprecated and are subject to deletion by Secrets Manager as needed. + IncludeDeprecated *bool `type:"boolean"` + + // (Optional) Limits the number of results that you want to include in the response. + // If you don't include this parameter, it defaults to a value that's specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (isn't null). Include + // that value as the NextToken request parameter in the next call to the operation + // to get the next part of the results. Note that Secrets Manager might return + // fewer results than the maximum even when there are more results available. + // You should check NextToken after every operation to ensure that you receive + // all of the results. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Use this parameter in a request if you receive a NextToken response + // in a previous request that indicates that there's more output available. + // In a subsequent call, set it to the value of the previous call's NextToken + // response to indicate where the output should continue from. + NextToken *string `min:"1" type:"string"` + + // The identifier for the secret containing the versions you want to list. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListSecretVersionIdsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretVersionIdsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecretVersionIdsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecretVersionIdsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIncludeDeprecated sets the IncludeDeprecated field's value. +func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput { + s.IncludeDeprecated = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecretVersionIdsInput) SetMaxResults(v int64) *ListSecretVersionIdsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretVersionIdsInput) SetNextToken(v string) *ListSecretVersionIdsInput { + s.NextToken = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *ListSecretVersionIdsInput) SetSecretId(v string) *ListSecretVersionIdsInput { + s.SecretId = &v + return s +} + +type ListSecretVersionIdsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the secret. + // + // Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // If present in the response, this value indicates that there's more output + // available than what's included in the current response. This can occur even + // when the response includes no values at all, such as when you ask for a filtered + // view of a very long list. Use this value in the NextToken request parameter + // in a subsequent call to the operation to continue processing and get the + // next part of the output. You should repeat this until the NextToken response + // element comes back empty (as null). + NextToken *string `min:"1" type:"string"` + + // The list of the currently available versions of the specified secret. + Versions []*SecretVersionsListEntry `type:"list"` +} + +// String returns the string representation +func (s ListSecretVersionIdsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretVersionIdsOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *ListSecretVersionIdsOutput) SetARN(v string) *ListSecretVersionIdsOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListSecretVersionIdsOutput) SetName(v string) *ListSecretVersionIdsOutput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretVersionIdsOutput) SetNextToken(v string) *ListSecretVersionIdsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListSecretVersionIdsOutput) SetVersions(v []*SecretVersionsListEntry) *ListSecretVersionIdsOutput { + s.Versions = v + return s +} + +type ListSecretsInput struct { + _ struct{} `type:"structure"` + + // (Optional) Limits the number of results that you want to include in the response. + // If you don't include this parameter, it defaults to a value that's specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (isn't null). Include + // that value as the NextToken request parameter in the next call to the operation + // to get the next part of the results. Note that Secrets Manager might return + // fewer results than the maximum even when there are more results available. + // You should check NextToken after every operation to ensure that you receive + // all of the results. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Use this parameter in a request if you receive a NextToken response + // in a previous request that indicates that there's more output available. + // In a subsequent call, set it to the value of the previous call's NextToken + // response to indicate where the output should continue from. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListSecretsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecretsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecretsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecretsInput) SetMaxResults(v int64) *ListSecretsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretsInput) SetNextToken(v string) *ListSecretsInput { + s.NextToken = &v + return s +} + +type ListSecretsOutput struct { + _ struct{} `type:"structure"` + + // If present in the response, this value indicates that there's more output + // available than what's included in the current response. This can occur even + // when the response includes no values at all, such as when you ask for a filtered + // view of a very long list. Use this value in the NextToken request parameter + // in a subsequent call to the operation to continue processing and get the + // next part of the output. You should repeat this until the NextToken response + // element comes back empty (as null). + NextToken *string `min:"1" type:"string"` + + // A list of the secrets in the account. + SecretList []*SecretListEntry `type:"list"` +} + +// String returns the string representation +func (s ListSecretsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretsOutput) SetNextToken(v string) *ListSecretsOutput { + s.NextToken = &v + return s +} + +// SetSecretList sets the SecretList field's value. +func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput { + s.SecretList = v + return s +} + +type PutResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // A JSON-formatted string that's constructed according to the grammar and syntax + // for an AWS resource-based policy. The policy in the string identifies who + // can access or manage this secret and its versions. For information on how + // to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + // + // ResourcePolicy is a required field + ResourcePolicy *string `min:"1" type:"string" required:"true"` + + // Specifies the secret that you want to attach the resource-based policy to. + // You can specify either the ARN or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} + if s.ResourcePolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ResourcePolicy")) + } + if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput { + s.ResourcePolicy = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *PutResourcePolicyInput) SetSecretId(v string) *PutResourcePolicyInput { + s.SecretId = &v + return s +} + +type PutResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that the resource-based policy was retrieved for. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that the resource-based policy was retrieved + // for. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *PutResourcePolicyOutput) SetARN(v string) *PutResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutResourcePolicyOutput) SetName(v string) *PutResourcePolicyOutput { + s.Name = &v + return s +} + +type PutSecretValueInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies a unique identifier for the new version of the secret. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request. If you don't use the SDK and instead + // generate a raw HTTP request to the Secrets Manager service endpoint, then + // you must generate a ClientRequestToken yourself for new versions and include + // that value in the request. + // + // This value helps ensure idempotency. Secrets Manager uses this value to prevent + // the accidental creation of duplicate versions if there are failures and retries + // during the Lambda rotation function's processing. We recommend that you generate + // a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) value + // to ensure uniqueness within the specified secret. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // or SecretBinary values are the same as those in the request then the request + // is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from those in the request then the + // request fails because you cannot modify an existing secret version. You + // can only create new versions to store new secret values. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // Either SecretBinary or SecretString must have a value, but not both. They + // cannot both be empty. + // + // This parameter is not accessible if the secret using the Secrets Manager + // console. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // Specifies the secret to which you want to add a new version. You can specify + // either the Amazon Resource Name (ARN) or the friendly name of the secret. + // The secret must already exist. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. Either SecretString or SecretBinary must have + // a value, but not both. They cannot both be empty. + // + // If you create this secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the default Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + // + // For example: + // + // [{"username":"bob"},{"password":"abc123xyz456"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + SecretString *string `type:"string"` + + // (Optional) Specifies a list of staging labels that are attached to this version + // of the secret. These staging labels are used to track the versions through + // the rotation process by the Lambda rotation function. + // + // A staging label must be unique to a single version of the secret. If you + // specify a staging label that's already associated with a different version + // of the same secret then that staging label is automatically removed from + // the other version and attached to this version. + // + // If you do not specify a value for VersionStages then Secrets Manager automatically + // moves the staging label AWSCURRENT to this new version. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s PutSecretValueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutSecretValueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutSecretValueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutSecretValueInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionStages != nil && len(s.VersionStages) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStages", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *PutSecretValueInput) SetClientRequestToken(v string) *PutSecretValueInput { + s.ClientRequestToken = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *PutSecretValueInput) SetSecretBinary(v []byte) *PutSecretValueInput { + s.SecretBinary = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *PutSecretValueInput) SetSecretId(v string) *PutSecretValueInput { + s.SecretId = &v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *PutSecretValueInput) SetSecretString(v string) *PutSecretValueInput { + s.SecretString = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *PutSecretValueInput) SetVersionStages(v []*string) *PutSecretValueInput { + s.VersionStages = v + return s +} + +type PutSecretValueOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the secret for which you just created + // a version. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which you just created or updated a version. + Name *string `min:"1" type:"string"` + + // The unique identifier of the version of the secret you just created or updated. + VersionId *string `min:"32" type:"string"` + + // The list of staging labels that are currently attached to this version of + // the secret. Staging labels are used to track a version as it progresses through + // the secret rotation process. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s PutSecretValueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutSecretValueOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *PutSecretValueOutput) SetARN(v string) *PutSecretValueOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutSecretValueOutput) SetName(v string) *PutSecretValueOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *PutSecretValueOutput) SetVersionId(v string) *PutSecretValueOutput { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutput { + s.VersionStages = v + return s +} + +type RestoreSecretInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret that you want to restore from a previously scheduled + // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RestoreSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *RestoreSecretInput) SetSecretId(v string) *RestoreSecretInput { + s.SecretId = &v + return s +} + +type RestoreSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that was restored. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that was restored. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RestoreSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *RestoreSecretOutput) SetARN(v string) *RestoreSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *RestoreSecretOutput) SetName(v string) *RestoreSecretOutput { + s.Name = &v + return s +} + +type RotateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies a unique identifier for the new version of the secret + // that helps ensure idempotency. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request for this parameter. If you don't + // use the SDK and instead generate a raw HTTP request to the Secrets Manager + // service endpoint, then you must generate a ClientRequestToken yourself for + // new versions and include that value in the request. + // + // You only need to specify your own value if you are implementing your own + // retry logic and want to ensure that a given secret is not created twice. + // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness within the specified secret. + // + // Secrets Manager uses this value to prevent the accidental creation of duplicate + // versions if there are failures and retries during the function's processing. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as the request, then the request + // is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from the request then an error occurs + // because you cannot modify an existing secret value. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies the ARN of the Lambda function that can rotate the secret. + RotationLambdaARN *string `type:"string"` + + // A structure that defines the rotation configuration for this secret. + RotationRules *RotationRulesType `type:"structure"` + + // Specifies the secret that you want to rotate. You can specify either the + // Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RotateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.RotationRules != nil { + if err := s.RotationRules.Validate(); err != nil { + invalidParams.AddNested("RotationRules", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *RotateSecretInput) SetClientRequestToken(v string) *RotateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *RotateSecretInput) SetRotationLambdaARN(v string) *RotateSecretInput { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *RotateSecretInput) SetRotationRules(v *RotationRulesType) *RotateSecretInput { + s.RotationRules = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *RotateSecretInput) SetSecretId(v string) *RotateSecretInput { + s.SecretId = &v + return s +} + +type RotateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // The ID of the new version of the secret created by the rotation started by + // this request. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s RotateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *RotateSecretOutput) SetARN(v string) *RotateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *RotateSecretOutput) SetName(v string) *RotateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *RotateSecretOutput) SetVersionId(v string) *RotateSecretOutput { + s.VersionId = &v + return s +} + +// A structure that defines the rotation configuration for the secret. +type RotationRulesType struct { + _ struct{} `type:"structure"` + + // Specifies the number of days between automatic scheduled rotations of the + // secret. + AutomaticallyAfterDays *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s RotationRulesType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotationRulesType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotationRulesType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotationRulesType"} + if s.AutomaticallyAfterDays != nil && *s.AutomaticallyAfterDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("AutomaticallyAfterDays", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutomaticallyAfterDays sets the AutomaticallyAfterDays field's value. +func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType { + s.AutomaticallyAfterDays = &v + return s +} + +// A structure that contains the details about a secret. It does not include +// the encrypted SecretString and SecretBinary values. To get those values, +// use the GetSecretValue operation. +type SecretListEntry struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the secret. + // + // For more information about ARNs in Secrets Manager, see Policy Resources + // (http://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) + // in the AWS Secrets Manager User Guide. + ARN *string `min:"20" type:"string"` + + // The date and time on which this secret was deleted. Not present on active + // secrets. The secret can be recovered until the number of days in the recovery + // window has passed, as specified in the RecoveryWindowInDays parameter of + // the DeleteSecret operation. + DeletedDate *time.Time `type:"timestamp"` + + // The user-provided description of the secret. + Description *string `type:"string"` + + // The ARN or alias of the AWS KMS customer master key (CMK) that's used to + // encrypt the SecretString and SecretBinary fields in each version of the secret. + // If you don't provide a key, then Secrets Manager defaults to encrypting the + // secret fields with the default KMS CMK (the one named awssecretsmanager) + // for this account. + KmsKeyId *string `type:"string"` + + // The last date that this secret was accessed. This value is truncated to midnight + // of the date and therefore shows only the date, not the time. + LastAccessedDate *time.Time `type:"timestamp"` + + // The last date and time that this secret was modified in any way. + LastChangedDate *time.Time `type:"timestamp"` + + // The last date and time that the rotation process for this secret was invoked. + LastRotatedDate *time.Time `type:"timestamp"` + + // The friendly name of the secret. You can use forward slashes in the name + // to represent a path hierarchy. For example, /prod/databases/dbserver1 could + // represent the secret for a server named dbserver1 in the folder databases + // in the folder prod. + Name *string `min:"1" type:"string"` + + // Indicated whether automatic, scheduled rotation is enabled for this secret. + RotationEnabled *bool `type:"boolean"` + + // The ARN of an AWS Lambda function that's invoked by Secrets Manager to rotate + // and expire the secret either automatically per the schedule or manually by + // a call to RotateSecret. + RotationLambdaARN *string `type:"string"` + + // A structure that defines the rotation configuration for the secret. + RotationRules *RotationRulesType `type:"structure"` + + // A list of all of the currently assigned SecretVersionStage staging labels + // and the SecretVersionId that each is attached to. Staging labels are used + // to keep track of the different versions during the rotation process. + // + // A version that does not have any SecretVersionStage is considered deprecated + // and subject to deletion. Such versions are not included in this list. + SecretVersionsToStages map[string][]*string `type:"map"` + + // The list of user-defined tags that are associated with the secret. To add + // tags to a secret, use TagResource. To remove tags, use UntagResource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s SecretListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecretListEntry) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *SecretListEntry) SetARN(v string) *SecretListEntry { + s.ARN = &v + return s +} + +// SetDeletedDate sets the DeletedDate field's value. +func (s *SecretListEntry) SetDeletedDate(v time.Time) *SecretListEntry { + s.DeletedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *SecretListEntry) SetDescription(v string) *SecretListEntry { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *SecretListEntry) SetKmsKeyId(v string) *SecretListEntry { + s.KmsKeyId = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *SecretListEntry) SetLastAccessedDate(v time.Time) *SecretListEntry { + s.LastAccessedDate = &v + return s +} + +// SetLastChangedDate sets the LastChangedDate field's value. +func (s *SecretListEntry) SetLastChangedDate(v time.Time) *SecretListEntry { + s.LastChangedDate = &v + return s +} + +// SetLastRotatedDate sets the LastRotatedDate field's value. +func (s *SecretListEntry) SetLastRotatedDate(v time.Time) *SecretListEntry { + s.LastRotatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *SecretListEntry) SetName(v string) *SecretListEntry { + s.Name = &v + return s +} + +// SetRotationEnabled sets the RotationEnabled field's value. +func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { + s.RotationEnabled = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *SecretListEntry) SetRotationLambdaARN(v string) *SecretListEntry { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *SecretListEntry) SetRotationRules(v *RotationRulesType) *SecretListEntry { + s.RotationRules = v + return s +} + +// SetSecretVersionsToStages sets the SecretVersionsToStages field's value. +func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry { + s.SecretVersionsToStages = v + return s +} + +// SetTags sets the Tags field's value. +func (s *SecretListEntry) SetTags(v []*Tag) *SecretListEntry { + s.Tags = v + return s +} + +// A structure that contains information about one version of a secret. +type SecretVersionsListEntry struct { + _ struct{} `type:"structure"` + + // The date and time this version of the secret was created. + CreatedDate *time.Time `type:"timestamp"` + + // The date that this version of the secret was last accessed. Note that the + // resolution of this field is at the date level and does not include the time. + LastAccessedDate *time.Time `type:"timestamp"` + + // The unique version identifier of this version of the secret. + VersionId *string `min:"32" type:"string"` + + // An array of staging labels that are currently associated with this version + // of the secret. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s SecretVersionsListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecretVersionsListEntry) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *SecretVersionsListEntry) SetCreatedDate(v time.Time) *SecretVersionsListEntry { + s.CreatedDate = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *SecretVersionsListEntry) SetLastAccessedDate(v time.Time) *SecretVersionsListEntry { + s.LastAccessedDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *SecretVersionsListEntry) SetVersionId(v string) *SecretVersionsListEntry { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *SecretVersionsListEntry) SetVersionStages(v []*string) *SecretVersionsListEntry { + s.VersionStages = v + return s +} + +// A structure that contains information about a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The key identifier, or name, of the tag. + Key *string `min:"1" type:"string"` + + // The string value that's associated with the key of the tag. + Value *string `type:"string"` +} + +// 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 && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 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 +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The identifier for the secret that you want to attach tags to. You can specify + // either the Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // The tags to attach to the secret. Each element in the list consists of a + // Key and a Value. + // + // This parameter to the API requires a JSON text string argument. For information + // on how to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For the AWS CLI, you can also use the syntax: + // --Tags Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…] + // + // Tags is a required field + Tags []*Tag `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.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + 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 +} + +// SetSecretId sets the SecretId field's value. +func (s *TagResourceInput) SetSecretId(v string) *TagResourceInput { + s.SecretId = &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() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The identifier for the secret that you want to remove tags from. You can + // specify either the Amazon Resource Name (ARN) or the friendly name of the + // secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // A list of tag key names to remove from the secret. You don't specify the + // value. Both the key and its associated value are removed. + // + // This parameter to the API requires a JSON text string argument. For information + // on how to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + // + // TagKeys is a required field + TagKeys []*string `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.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *UntagResourceInput) SetSecretId(v string) *UntagResourceInput { + s.SecretId = &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 UpdateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) If you want to add a new version to the secret, this parameter + // specifies a unique identifier for the new version that helps ensure idempotency. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request. If you don't use the SDK and instead + // generate a raw HTTP request to the Secrets Manager service endpoint, then + // you must generate a ClientRequestToken yourself for new versions and include + // that value in the request. + // + // You typically only need to interact with this value if you implement your + // own retry logic and want to ensure that a given secret is not created twice. + // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness within the specified secret. + // + // Secrets Manager uses this value to prevent the accidental creation of duplicate + // versions if there are failures and retries during the Lambda rotation function's + // processing. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as those in the request then the + // request is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from the request then an error occurs + // because you cannot modify an existing secret value. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies a user-provided description of the secret. + Description *string `type:"string"` + + // (Optional) Specifies the ARN or alias of the AWS KMS customer master key + // (CMK) to be used to encrypt the protected text in the versions of this secret. + // + // If you don't specify this value, then Secrets Manager defaults to using the + // default CMK in the account (the one named aws/secretsmanager). If a AWS KMS + // CMK with that name doesn't exist, then Secrets Manager creates it for you + // automatically the first time it needs to encrypt a version's Plaintext or + // PlaintextString fields. + // + // You can only use the account's default CMK to encrypt and decrypt if you + // call this operation using credentials from the same account that owns the + // secret. If the secret is in a different account, then you must create a custom + // CMK and provide the ARN in this field. + KmsKeyId *string `type:"string"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // Either SecretBinary or SecretString must have a value, but not both. They + // cannot both be empty. + // + // This parameter is not accessible using the Secrets Manager console. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // Specifies the secret that you want to update or to which you want to add + // a new version. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. Either SecretBinary or SecretString must have + // a value, but not both. They cannot both be empty. + // + // If you create this secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the default Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For example: + // + // [{"username":"bob"},{"password":"abc123xyz456"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + SecretString *string `type:"string"` +} + +// String returns the string representation +func (s UpdateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *UpdateSecretInput) SetClientRequestToken(v string) *UpdateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateSecretInput) SetDescription(v string) *UpdateSecretInput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *UpdateSecretInput) SetKmsKeyId(v string) *UpdateSecretInput { + s.KmsKeyId = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *UpdateSecretInput) SetSecretBinary(v []byte) *UpdateSecretInput { + s.SecretBinary = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *UpdateSecretInput) SetSecretId(v string) *UpdateSecretInput { + s.SecretId = &v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *UpdateSecretInput) SetSecretString(v string) *UpdateSecretInput { + s.SecretString = &v + return s +} + +type UpdateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of this secret. + // + // Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of this secret. + Name *string `min:"1" type:"string"` + + // If a version of the secret was created or updated by this operation, then + // its unique identifier is returned. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s UpdateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *UpdateSecretOutput) SetARN(v string) *UpdateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateSecretOutput) SetName(v string) *UpdateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *UpdateSecretOutput) SetVersionId(v string) *UpdateSecretOutput { + s.VersionId = &v + return s +} + +type UpdateSecretVersionStageInput struct { + _ struct{} `type:"structure"` + + // (Optional) The secret version ID that you want to add the staging labels + // to. + // + // If any of the staging labels are already attached to a different version + // of the secret, then they are removed from that version before adding them + // to this version. + MoveToVersionId *string `min:"32" type:"string"` + + // (Optional) Specifies the secret version ID of the version that the staging + // labels are to be removed from. + // + // If you want to move a label to a new version, you do not have to explicitly + // remove it with this parameter. Adding a label using the MoveToVersionId parameter + // automatically removes it from the old version. However, if you do include + // both the "MoveTo" and "RemoveFrom" parameters, then the move is successful + // only if the staging labels are actually present on the "RemoveFrom" version. + // If a staging label was on a different version than "RemoveFrom", then the + // request fails. + RemoveFromVersionId *string `min:"32" type:"string"` + + // Specifies the secret with the version whose list of staging labels you want + // to modify. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // The list of staging labels to add to this version. + // + // VersionStage is a required field + VersionStage *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSecretVersionStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretVersionStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSecretVersionStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSecretVersionStageInput"} + if s.MoveToVersionId != nil && len(*s.MoveToVersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("MoveToVersionId", 32)) + } + if s.RemoveFromVersionId != nil && len(*s.RemoveFromVersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("RemoveFromVersionId", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionStage == nil { + invalidParams.Add(request.NewErrParamRequired("VersionStage")) + } + if s.VersionStage != nil && len(*s.VersionStage) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMoveToVersionId sets the MoveToVersionId field's value. +func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput { + s.MoveToVersionId = &v + return s +} + +// SetRemoveFromVersionId sets the RemoveFromVersionId field's value. +func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput { + s.RemoveFromVersionId = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *UpdateSecretVersionStageInput) SetSecretId(v string) *UpdateSecretVersionStageInput { + s.SecretId = &v + return s +} + +// SetVersionStage sets the VersionStage field's value. +func (s *UpdateSecretVersionStageInput) SetVersionStage(v string) *UpdateSecretVersionStageInput { + s.VersionStage = &v + return s +} + +type UpdateSecretVersionStageOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret with the staging labels that were modified. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret with the staging labels that were modified. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateSecretVersionStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretVersionStageOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *UpdateSecretVersionStageOutput) SetARN(v string) *UpdateSecretVersionStageOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateSecretVersionStageOutput) SetName(v string) *UpdateSecretVersionStageOutput { + s.Name = &v + return s +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go new file mode 100644 index 000000000..0379c4365 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go @@ -0,0 +1,87 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package secretsmanager provides the client and types for making API +// requests to AWS Secrets Manager. +// +// AWS Secrets Manager is a web service that enables you to store, manage, and +// retrieve, secrets. +// +// This guide provides descriptions of the Secrets Manager API. For more information +// about using this service, see the AWS Secrets Manager User Guide (http://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). +// +// API Version +// +// This version of the Secrets Manager API Reference documents the Secrets Manager +// API version 2017-10-17. +// +// As an alternative to using the API directly, you can use one of the AWS SDKs, +// which consist of libraries and sample code for various programming languages +// and platforms (such as Java, Ruby, .NET, iOS, and Android). The SDKs provide +// a convenient way to create programmatic access to AWS Secrets Manager. For +// example, the SDKs take care of cryptographically signing requests, managing +// errors, and retrying requests automatically. For more information about the +// AWS SDKs, including how to download and install them, see Tools for Amazon +// Web Services (http://aws.amazon.com/tools/). +// +// We recommend that you use the AWS SDKs to make programmatic API calls to +// Secrets Manager. However, you also can use the Secrets Manager HTTP Query +// API to make direct calls to the Secrets Manager web service. To learn more +// about the Secrets Manager HTTP Query API, see Making Query Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/query-requests.html) +// in the AWS Secrets Manager User Guide. +// +// Secrets Manager supports GET and POST requests for all actions. That is, +// the API doesn't require you to use GET for some actions and POST for others. +// However, GET requests are subject to the limitation size of a URL. Therefore, +// for operations that require larger sizes, use a POST request. +// +// Support and Feedback for AWS Secrets Manager +// +// We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com +// (mailto:awssecretsmanager-feedback@amazon.com), or post your feedback and +// questions in the AWS Secrets Manager Discussion Forum (http://forums.aws.amazon.com/forum.jspa?forumID=296). +// For more information about the AWS Discussion Forums, see Forums Help (http://forums.aws.amazon.com/help.jspa). +// +// How examples are presented +// +// The JSON that AWS Secrets Manager expects as your request parameters and +// that the service returns as a response to HTTP query requests are single, +// long strings without line breaks or white space formatting. The JSON shown +// in the examples is formatted with both line breaks and white space to improve +// readability. When example input parameters would also result in long strings +// that extend beyond the screen, we insert line breaks to enhance readability. +// You should always submit the input as a single JSON text string. +// +// Logging API Requests +// +// AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API +// calls for your AWS account and delivers log files to an Amazon S3 bucket. +// By using information that's collected by AWS CloudTrail, you can determine +// which requests were successfully made to Secrets Manager, who made the request, +// when it was made, and so on. For more about AWS Secrets Manager and its support +// for AWS CloudTrail, see Logging AWS Secrets Manager Events with AWS CloudTrail +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail) +// in the AWS Secrets Manager User Guide. To learn more about CloudTrail, including +// how to turn it on and find your log files, see the AWS CloudTrail User Guide +// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17 for more information on this service. +// +// See secretsmanager package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/ +// +// Using the Client +// +// To contact AWS Secrets Manager 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 Secrets Manager client SecretsManager for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/#New +package secretsmanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go new file mode 100644 index 000000000..b3c0c48fd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go @@ -0,0 +1,87 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +const ( + + // ErrCodeDecryptionFailure for service response error code + // "DecryptionFailure". + // + // Secrets Manager can't decrypt the protected secret text using the provided + // KMS key. + ErrCodeDecryptionFailure = "DecryptionFailure" + + // ErrCodeEncryptionFailure for service response error code + // "EncryptionFailure". + // + // Secrets Manager can't encrypt the protected secret text using the provided + // KMS key. Check that the customer master key (CMK) is available, enabled, + // and not in an invalid state. For more information, see How Key State Affects + // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). + ErrCodeEncryptionFailure = "EncryptionFailure" + + // ErrCodeInternalServiceError for service response error code + // "InternalServiceError". + // + // An error occurred on the server side. + ErrCodeInternalServiceError = "InternalServiceError" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // You provided an invalid NextToken value. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // You provided an invalid value for a parameter. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // You provided a parameter value that is not valid for the current state of + // the resource. + // + // Possible causes: + // + // * You tried to perform the operation on a secret that's currently marked + // deleted. + // + // * You tried to enable rotation on a secret that doesn't already have a + // Lambda function ARN configured and you didn't include such an ARN as a + // parameter in this call. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request failed because it would exceed one of the Secrets Manager internal + // limits. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeMalformedPolicyDocumentException for service response error code + // "MalformedPolicyDocumentException". + // + // The policy document that you provided isn't valid. + ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" + + // ErrCodePreconditionNotMetException for service response error code + // "PreconditionNotMetException". + // + // The request failed because you did not complete all the prerequisite steps. + ErrCodePreconditionNotMetException = "PreconditionNotMetException" + + // ErrCodeResourceExistsException for service response error code + // "ResourceExistsException". + // + // A resource with the ID you requested already exists. + ErrCodeResourceExistsException = "ResourceExistsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // We can't find the resource that you asked for. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go new file mode 100644 index 000000000..c4758e96d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +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/jsonrpc" +) + +// SecretsManager provides the API operation methods for making requests to +// AWS Secrets Manager. See this package's package overview docs +// for details on the service. +// +// SecretsManager methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SecretsManager 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 = "secretsmanager" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Secrets Manager" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the SecretsManager client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a SecretsManager client from just a session. +// svc := secretsmanager.New(mySession) +// +// // Create a SecretsManager client with additional configuration +// svc := secretsmanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecretsManager { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "secretsmanager" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SecretsManager { + svc := &SecretsManager{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-17", + JSONVersion: "1.1", + TargetPrefix: "secretsmanager", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a SecretsManager operation and runs any +// custom request initialization. +func (c *SecretsManager) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 9c32b8535..79d3abf8a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -9641,6 +9641,13 @@ type ListAcceptedPortfolioSharesInput struct { // The page token for the next set of results. To retrieve the first set of // results, use null. PageToken *string `type:"string"` + + // The type of shared portfolios to list. The default is to list imported portfolios. + // + // * AWS_SERVICECATALOG - List default portfolios + // + // * IMPORTED - List imported portfolios + PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` } // String returns the string representation @@ -9671,6 +9678,12 @@ func (s *ListAcceptedPortfolioSharesInput) SetPageToken(v string) *ListAcceptedP return s } +// SetPortfolioShareType sets the PortfolioShareType field's value. +func (s *ListAcceptedPortfolioSharesInput) SetPortfolioShareType(v string) *ListAcceptedPortfolioSharesInput { + s.PortfolioShareType = &v + return s +} + type ListAcceptedPortfolioSharesOutput struct { _ struct{} `type:"structure"` @@ -10943,7 +10956,7 @@ type PortfolioDetail struct { ARN *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the portfolio. Description *string `type:"string"` @@ -11076,7 +11089,7 @@ type ProductViewDetail struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The ARN of the product. ProductARN *string `min:"1" type:"string"` @@ -11452,7 +11465,7 @@ type ProvisionedProductAttribute struct { Arn *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The identifier of the provisioned product. Id *string `min:"1" type:"string"` @@ -11621,7 +11634,7 @@ type ProvisionedProductDetail struct { Arn *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The identifier of the provisioned product. Id *string `type:"string"` @@ -11731,7 +11744,7 @@ type ProvisionedProductPlanDetails struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related // events. @@ -11777,7 +11790,7 @@ type ProvisionedProductPlanDetails struct { Tags []*Tag `type:"list"` // The time when the plan was last updated. - UpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdatedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -11955,7 +11968,7 @@ type ProvisioningArtifact struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12010,7 +12023,7 @@ type ProvisioningArtifactDetail struct { Active *bool `type:"boolean"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12235,7 +12248,7 @@ type ProvisioningArtifactSummary struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12342,7 +12355,7 @@ type RecordDetail struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The path identifier. PathId *string `min:"1" type:"string"` @@ -12397,7 +12410,7 @@ type RecordDetail struct { Status *string `type:"string" enum:"RecordStatus"` // The time when the record was last updated. - UpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdatedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -12799,7 +12812,7 @@ type ResourceDetail struct { ARN *string `type:"string"` // The creation time of the resource. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the resource. Description *string `type:"string"` @@ -14593,6 +14606,14 @@ const ( EvaluationTypeDynamic = "DYNAMIC" ) +const ( + // PortfolioShareTypeImported is a PortfolioShareType enum value + PortfolioShareTypeImported = "IMPORTED" + + // PortfolioShareTypeAwsServicecatalog is a PortfolioShareType enum value + PortfolioShareTypeAwsServicecatalog = "AWS_SERVICECATALOG" +) + const ( // PrincipalTypeIam is a PrincipalType enum value PrincipalTypeIam = "IAM" diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go index 05ced0ca3..f15a5b802 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "servicecatalog" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "servicecatalog" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Service Catalog" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ServiceCatalog client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go index a76d05b57..d5410ec6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go @@ -3963,7 +3963,7 @@ type Namespace struct { // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. // For example, the value 1516925490.087 represents Friday, January 26, 2018 // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // A unique string that identifies the request and that allows failed requests // to be retried without the risk of executing an operation twice. @@ -4216,7 +4216,7 @@ type Operation struct { // and Coordinated Universal Time (UTC). The value of CreateDate is accurate // to milliseconds. For example, the value 1516925490.087 represents Friday, // January 26, 2018 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // The code associated with ErrorMessage. Values for ErrorCode include the following: // @@ -4269,7 +4269,7 @@ type Operation struct { // in Unix date/time format and Coordinated Universal Time (UTC). The value // of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087 // represents Friday, January 26, 2018 12:11:30.087 AM. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -4670,7 +4670,7 @@ type Service struct { // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. // For example, the value 1516925490.087 represents Friday, January 26, 2018 // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // A unique string that identifies the request and that allows failed requests // to be retried without the risk of executing the operation twice. CreatorRequestId diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go index 3a0c82b22..b5c177a62 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "servicediscovery" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "servicediscovery" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ServiceDiscovery" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ServiceDiscovery client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index 88c520d0a..f93a8b732 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -246,7 +246,7 @@ func (c *SES) CreateConfigurationSetEventDestinationRequest(input *CreateConfigu // Creates a configuration set event destination. // // When you create or update an event destination, you must provide one, and -// only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis +// only one, destination. The destination can be CloudWatch, Amazon Kinesis // Firehose, or Amazon Simple Notification Service (Amazon SNS). // // An event destination is the AWS service to which Amazon SES publishes the @@ -357,9 +357,8 @@ func (c *SES) CreateConfigurationSetTrackingOptionsRequest(input *CreateConfigur // // By default, images and links used for tracking open and click events are // hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using configuration -// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// your own to handle these events. For information about using custom domains, +// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.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 @@ -455,7 +454,7 @@ func (c *SES) CreateCustomVerificationEmailTemplateRequest(input *CreateCustomVe // Creates a new custom verification email template. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -855,8 +854,8 @@ func (c *SES) CreateTemplateRequest(input *CreateTemplateInput) (req *request.Re // Indicates that a resource could not be created because of a naming conflict. // // * ErrCodeInvalidTemplateException "InvalidTemplate" -// Indicates that a template could not be created because it contained invalid -// JSON. +// Indicates that the template that you specified could not be rendered. This +// issue may occur when a template refers to a partial that does not exist. // // * ErrCodeLimitExceededException "LimitExceeded" // Indicates that a resource could not be created because of service limits. @@ -1103,9 +1102,8 @@ func (c *SES) DeleteConfigurationSetTrackingOptionsRequest(input *DeleteConfigur // // By default, images and links used for tracking open and click events are // hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using configuration -// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// your own to handle these events. For information about using custom domains, +// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html). // // Deleting this kind of association will result in emails sent using the specified // configuration set to capture open and click events using the standard, Amazon @@ -1196,7 +1194,7 @@ func (c *SES) DeleteCustomVerificationEmailTemplateRequest(input *DeleteCustomVe // Deletes an existing custom verification email template. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -2170,7 +2168,8 @@ func (c *SES) GetAccountSendingEnabledRequest(input *GetAccountSendingEnabledInp // GetAccountSendingEnabled API operation for Amazon Simple Email Service. // -// Returns the email sending status of the Amazon SES account. +// Returns the email sending status of the Amazon SES account for the current +// region. // // You can execute this operation no more than once per second. // @@ -2250,7 +2249,7 @@ func (c *SES) GetCustomVerificationEmailTemplateRequest(input *GetCustomVerifica // specify. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -2844,7 +2843,7 @@ func (c *SES) GetSendStatisticsRequest(input *GetSendStatisticsInput) (req *requ // GetSendStatistics API operation for Amazon Simple Email Service. // -// Provides sending statistics for the Amazon SES account. The result is a list +// Provides sending statistics for the current AWS Region. The result is a list // of data points, representing the last two weeks of sending activity. Each // data point in the list contains statistics for a 15-minute period of time. // @@ -3006,8 +3005,8 @@ func (c *SES) ListConfigurationSetsRequest(input *ListConfigurationSetsInput) (r // ListConfigurationSets API operation for Amazon Simple Email Service. // // Provides a list of the configuration sets associated with your Amazon SES -// account. For information about using configuration sets, see Monitoring Your -// Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) +// account in the current AWS Region. For information about using configuration +// sets, see Monitoring Your Amazon SES Sending Activity (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. This operation @@ -3095,10 +3094,11 @@ func (c *SES) ListCustomVerificationEmailTemplatesRequest(input *ListCustomVerif // ListCustomVerificationEmailTemplates API operation for Amazon Simple Email Service. // -// Lists the existing custom verification email templates for your account. +// Lists the existing custom verification email templates for your account in +// the current AWS Region. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -3232,7 +3232,8 @@ func (c *SES) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Re // ListIdentities API operation for Amazon Simple Email Service. // // Returns a list containing all of the identities (email addresses and domains) -// for your AWS account, regardless of verification status. +// for your AWS account in the current AWS Region, regardless of verification +// status. // // You can execute this operation no more than once per second. // @@ -3443,7 +3444,8 @@ func (c *SES) ListReceiptFiltersRequest(input *ListReceiptFiltersInput) (req *re // ListReceiptFilters API operation for Amazon Simple Email Service. // -// Lists the IP address filters associated with your AWS account. +// Lists the IP address filters associated with your AWS account in the current +// AWS Region. // // For information about managing IP address filters, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html). @@ -3522,10 +3524,10 @@ func (c *SES) ListReceiptRuleSetsRequest(input *ListReceiptRuleSetsInput) (req * // ListReceiptRuleSets API operation for Amazon Simple Email Service. // -// Lists the receipt rule sets that exist under your AWS account. If there are -// additional receipt rule sets to be retrieved, you will receive a NextToken -// that you can provide to the next call to ListReceiptRuleSets to retrieve -// the additional entries. +// Lists the receipt rule sets that exist under your AWS account in the current +// AWS Region. If there are additional receipt rule sets to be retrieved, you +// will receive a NextToken that you can provide to the next call to ListReceiptRuleSets +// to retrieve the additional entries. // // For information about managing receipt rule sets, see the Amazon SES Developer // Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html). @@ -3604,7 +3606,8 @@ func (c *SES) ListTemplatesRequest(input *ListTemplatesInput) (req *request.Requ // ListTemplates API operation for Amazon Simple Email Service. // -// Lists the email templates present in your Amazon SES account. +// Lists the email templates present in your Amazon SES account in the current +// AWS Region. // // You can execute this operation no more than once per second. // @@ -4156,12 +4159,13 @@ func (c *SES) SendCustomVerificationEmailRequest(input *SendCustomVerificationEm // SendCustomVerificationEmail API operation for Amazon Simple Email Service. // // Adds an email address to the list of identities for your Amazon SES account -// and attempts to verify it. As a result of executing this operation, a customized -// verification email is sent to the specified address. +// in the current AWS Region and attempts to verify it. As a result of executing +// this operation, a customized verification email is sent to the specified +// address. // // To use this operation, you must first create a custom verification email // template. For more information about creating and using custom verification -// email templates, see Using Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// email templates, see Using Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -4595,6 +4599,17 @@ func (c *SES) SendTemplatedEmailRequest(input *SendTemplatedEmailInput) (req *re // message will be rejected, even if the message contains other recipients // that are valid. // +// If your call to the SendTemplatedEmail operation includes all of the required +// parameters, Amazon SES accepts it and returns a Message ID. However, if Amazon +// SES can't render the email because the template contains errors, it doesn't +// send the email. Additionally, because it already accepted the message, Amazon +// SES doesn't return a message stating that it was unable to send the email. +// +// For these reasons, we highly recommend that you set up Amazon SES to send +// you notifications when Rendering Failure events occur. For more information, +// see Sending Personalized Email Using the Amazon SES API (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html) +// in the Amazon Simple Email Service 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. @@ -5389,10 +5404,11 @@ func (c *SES) UpdateAccountSendingEnabledRequest(input *UpdateAccountSendingEnab // UpdateAccountSendingEnabled API operation for Amazon Simple Email Service. // -// Enables or disables email sending across your entire Amazon SES account. -// You can use this operation in conjunction with Amazon CloudWatch alarms to -// temporarily pause email sending across your Amazon SES account when reputation -// metrics (such as your bounce on complaint rate) reach certain thresholds. +// Enables or disables email sending across your entire Amazon SES account in +// the current AWS Region. You can use this operation in conjunction with Amazon +// CloudWatch alarms to temporarily pause email sending across your Amazon SES +// account in a given AWS Region when reputation metrics (such as your bounce +// or complaint rates) reach certain thresholds. // // You can execute this operation no more than once per second. // @@ -5576,10 +5592,10 @@ func (c *SES) UpdateConfigurationSetReputationMetricsEnabledRequest(input *Updat // UpdateConfigurationSetReputationMetricsEnabled API operation for Amazon Simple Email Service. // // Enables or disables the publishing of reputation metrics for emails sent -// using a specific configuration set. Reputation metrics include bounce and -// complaint rates. These metrics are published to Amazon CloudWatch. By using -// Amazon CloudWatch, you can create alarms when bounce or complaint rates exceed -// a certain threshold. +// using a specific configuration set in a given AWS Region. Reputation metrics +// include bounce and complaint rates. These metrics are published to Amazon +// CloudWatch. By using CloudWatch, you can create alarms when bounce or complaint +// rates exceed certain thresholds. // // You can execute this operation no more than once per second. // @@ -5663,10 +5679,10 @@ func (c *SES) UpdateConfigurationSetSendingEnabledRequest(input *UpdateConfigura // UpdateConfigurationSetSendingEnabled API operation for Amazon Simple Email Service. // // Enables or disables email sending for messages sent using a specific configuration -// set. You can use this operation in conjunction with Amazon CloudWatch alarms -// to temporarily pause email sending for a configuration set when the reputation -// metrics for that configuration set (such as your bounce on complaint rate) -// reach certain thresholds. +// set in a given AWS Region. You can use this operation in conjunction with +// Amazon CloudWatch alarms to temporarily pause email sending for a configuration +// set when the reputation metrics for that configuration set (such as your +// bounce on complaint rate) exceed certain thresholds. // // You can execute this operation no more than once per second. // @@ -5752,9 +5768,8 @@ func (c *SES) UpdateConfigurationSetTrackingOptionsRequest(input *UpdateConfigur // // By default, images and links used for tracking open and click events are // hosted on domains operated by Amazon SES. You can configure a subdomain of -// your own to handle these events. For information about using configuration -// sets, see Configuring Custom Domains to Handle Open and Click Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// your own to handle these events. For information about using custom domains, +// see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.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 @@ -5849,7 +5864,7 @@ func (c *SES) UpdateCustomVerificationEmailTemplateRequest(input *UpdateCustomVe // Updates an existing custom verification email template. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -6067,8 +6082,8 @@ func (c *SES) UpdateTemplateRequest(input *UpdateTemplateInput) (req *request.Re // SES account. // // * ErrCodeInvalidTemplateException "InvalidTemplate" -// Indicates that a template could not be created because it contained invalid -// JSON. +// Indicates that the template that you specified could not be rendered. This +// issue may occur when a template refers to a partial that does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate func (c *SES) UpdateTemplate(input *UpdateTemplateInput) (*UpdateTemplateOutput, error) { @@ -6224,9 +6239,9 @@ func (c *SES) VerifyDomainIdentityRequest(input *VerifyDomainIdentityInput) (req // VerifyDomainIdentity API operation for Amazon Simple Email Service. // -// Adds a domain to the list of identities for your Amazon SES account and attempts -// to verify it. For more information about verifying domains, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) +// Adds a domain to the list of identities for your Amazon SES account in the +// current AWS Region and attempts to verify it. For more information about +// verifying domains, see Verifying Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // // You can execute this operation no more than once per second. @@ -6380,8 +6395,8 @@ func (c *SES) VerifyEmailIdentityRequest(input *VerifyEmailIdentityInput) (req * // VerifyEmailIdentity API operation for Amazon Simple Email Service. // // Adds an email address to the list of identities for your Amazon SES account -// and attempts to verify it. As a result of executing this operation, a verification -// email is sent to the specified address. +// in the current AWS region and attempts to verify it. As a result of executing +// this operation, a verification email is sent to the specified address. // // You can execute this operation no more than once per second. // @@ -7348,8 +7363,8 @@ type CreateConfigurationSetTrackingOptionsInput struct { // emails. // // For more information, see Configuring Custom Domains to Handle Open and Click - // Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) - // in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). + // Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) + // in the Amazon SES Developer Guide. // // TrackingOptions is a required field TrackingOptions *TrackingOptions `type:"structure" required:"true"` @@ -9094,12 +9109,12 @@ func (s GetAccountSendingEnabledInput) GoString() string { } // Represents a request to return the email sending status for your Amazon SES -// account. +// account in the current AWS Region. type GetAccountSendingEnabledOutput struct { _ struct{} `type:"structure"` // Describes whether email sending is enabled or disabled for your Amazon SES - // account. + // account in the current AWS Region. Enabled *bool `type:"boolean"` } @@ -10237,7 +10252,7 @@ func (s *ListConfigurationSetsOutput) SetNextToken(v string) *ListConfigurationS // for your account. // // For more information about custom verification email templates, see Using -// Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) +// Custom Verification Email Templates (ses/latest/DeveloperGuide/custom-verification-emails.html) // in the Amazon SES Developer Guide. type ListCustomVerificationEmailTemplatesInput struct { _ struct{} `type:"structure"` @@ -10765,7 +10780,7 @@ type MessageDsn struct { // When the message was received by the reporting mail transfer agent (MTA), // in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) date-time format. - ArrivalDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ArrivalDate *time.Time `type:"timestamp"` // Additional X-headers to include in the DSN. ExtensionFields []*ExtensionField `type:"list"` @@ -11088,7 +11103,7 @@ type ReceiptAction struct { StopAction *StopAction `type:"structure"` // Calls Amazon WorkMail and, optionally, publishes a notification to Amazon - // SNS. + // Amazon SNS. WorkmailAction *WorkmailAction `type:"structure"` } @@ -11448,7 +11463,7 @@ type ReceiptRuleSetMetadata struct { _ struct{} `type:"structure"` // The date and time the receipt rule set was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the receipt rule set. The name must: // @@ -11518,7 +11533,7 @@ type RecipientDsnFields struct { // The time the final delivery attempt was made, in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) // date-time format. - LastAttemptDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastAttemptDate *time.Time `type:"timestamp"` // The MTA to which the remote MTA attempted to deliver the message, formatted // as specified in RFC 3464 (https://tools.ietf.org/html/rfc3464) (mta-name-type; @@ -11695,7 +11710,7 @@ type ReputationOptions struct { // // If email sending for the configuration set has never been disabled and later // re-enabled, the value of this attribute is null. - LastFreshStart *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastFreshStart *time.Time `type:"timestamp"` // Describes whether or not Amazon SES publishes reputation metrics for the // configuration set, such as bounce and complaint rates, to Amazon CloudWatch. @@ -11787,10 +11802,10 @@ type S3Action struct { // using Amazon S3 server-side encryption. This means that you must use the // Amazon S3 encryption client to decrypt the email after retrieving it from // Amazon S3, as the service has no access to use your AWS KMS keys for decryption. - // This encryption client is currently available with the AWS Java SDK (http://aws.amazon.com/sdk-for-java/) - // and AWS Ruby SDK (http://aws.amazon.com/sdk-for-ruby/) only. For more information - // about client-side encryption using AWS KMS master keys, see the Amazon S3 - // Developer Guide (AmazonS3/latest/dev/UsingClientSideEncryption.html). + // This encryption client is currently available with the AWS SDK for Java (http://aws.amazon.com/sdk-for-java/) + // and AWS SDK for Ruby (http://aws.amazon.com/sdk-for-ruby/) only. For more + // information about client-side encryption using AWS KMS master keys, see the + // Amazon S3 Developer Guide (http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html). KmsKeyArn *string `type:"string"` // The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory @@ -12458,7 +12473,7 @@ type SendDataPoint struct { Rejects *int64 `type:"long"` // Time of the data point. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -13824,7 +13839,7 @@ type TemplateMetadata struct { _ struct{} `type:"structure"` // The time and date the template was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the template. Name *string `type:"string"` @@ -13935,8 +13950,8 @@ func (s *TestRenderTemplateOutput) SetRenderedTemplate(v string) *TestRenderTemp // emails. // // For more information, see Configuring Custom Domains to Handle Open and Click -// Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) -// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) +// in the Amazon SES Developer Guide. type TrackingOptions struct { _ struct{} `type:"structure"` @@ -13967,7 +13982,7 @@ type UpdateAccountSendingEnabledInput struct { _ struct{} `type:"structure"` // Describes whether email sending is enabled or disabled for your Amazon SES - // account. + // account in the current AWS Region. Enabled *bool `type:"boolean"` } @@ -14231,8 +14246,8 @@ type UpdateConfigurationSetTrackingOptionsInput struct { // emails. // // For more information, see Configuring Custom Domains to Handle Open and Click - // Tracking (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) - // in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). + // Tracking (ses/latest/DeveloperGuide/configure-custom-open-click-domains.html) + // in the Amazon SES Developer Guide. // // TrackingOptions is a required field TrackingOptions *TrackingOptions `type:"structure" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go index 0050868b2..6ba270a75 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/doc.go @@ -3,9 +3,10 @@ // Package ses provides the client and types for making API // requests to Amazon Simple Email Service. // -// This is the API Reference for Amazon Simple Email Service (https://aws.amazon.com/ses/) -// (Amazon SES). This documentation is intended to be used in conjunction with -// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). +// This document contains reference information for the Amazon Simple Email +// Service (https://aws.amazon.com/ses/) (Amazon SES) API, version 2010-12-01. +// This document is best used in conjunction with the Amazon SES Developer Guide +// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html). // // For a list of Amazon SES endpoints to use in service requests, see Regions // and Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go index 2d03c2440..dd94d6351 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/errors.go @@ -158,8 +158,8 @@ const ( // ErrCodeInvalidTemplateException for service response error code // "InvalidTemplate". // - // Indicates that a template could not be created because it contained invalid - // JSON. + // Indicates that the template that you specified could not be rendered. This + // issue may occur when a template refers to a partial that does not exist. ErrCodeInvalidTemplateException = "InvalidTemplate" // ErrCodeInvalidTrackingOptionsException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go index b71b2322e..0e33b771f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "email" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "email" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SES" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SES client with a session. @@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 2f6f75f4c..9a1b78af7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -1944,7 +1944,7 @@ type ActivityListItem struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the activity. // @@ -2229,7 +2229,7 @@ type CreateActivityOutput struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -2350,7 +2350,7 @@ type CreateStateMachineOutput struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) that identifies the created state machine. // @@ -2542,7 +2542,7 @@ type DescribeActivityOutput struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the activity. // @@ -2668,7 +2668,7 @@ type DescribeExecutionOutput struct { // The date the execution is started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the executed stated machine. // @@ -2681,7 +2681,7 @@ type DescribeExecutionOutput struct { Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` // If the execution has already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp"` } // String returns the string representation @@ -2812,7 +2812,7 @@ type DescribeStateMachineForExecutionOutput struct { // For a newly created state machine, this is the creation date. // // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -2902,7 +2902,7 @@ type DescribeStateMachineOutput struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The Amazon States Language definition of the state machine. // @@ -3083,7 +3083,7 @@ type ExecutionListItem struct { // The date the execution started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the executed state machine. // @@ -3096,7 +3096,7 @@ type ExecutionListItem struct { Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` // If the execution already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp"` } // String returns the string representation @@ -3524,7 +3524,7 @@ type HistoryEvent struct { // The date the event occurred. // // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unix" required:"true"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` // The type of the event. // @@ -4498,7 +4498,7 @@ type StartExecutionOutput struct { // The date the execution is started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -4612,7 +4612,7 @@ type StateMachineListItem struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the state machine. // @@ -4730,7 +4730,7 @@ type StopExecutionOutput struct { // The date the execution is stopped. // // StopDate is a required field - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -4820,7 +4820,7 @@ type UpdateStateMachineOutput struct { // The date and time the state machine was updated. // // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go index f9d12a58f..2436268f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "states" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "states" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SFN" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SFN client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go index fb3a0e3cd..d4de27413 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go @@ -30,8 +30,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sdb" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "sdb" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SimpleDB" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SimpleDB client with a session. @@ -56,6 +57,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index 41ea5fcbc..b69a5ed8a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -1376,6 +1376,8 @@ func (c *SNS) ListEndpointsByPlatformApplicationRequest(input *ListEndpointsByPl // are no more records to return, NextToken will be null. For more information, // see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). // +// This action is throttled at 30 transactions per second (TPS). +// // 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. @@ -1624,6 +1626,8 @@ func (c *SNS) ListPlatformApplicationsRequest(input *ListPlatformApplicationsInp // no more records to return, NextToken will be null. For more information, // see Using Amazon SNS Mobile Push Notifications (http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html). // +// This action is throttled at 15 transactions per second (TPS). +// // 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. @@ -1768,6 +1772,8 @@ func (c *SNS) ListSubscriptionsRequest(input *ListSubscriptionsInput) (req *requ // is also returned. Use the NextToken parameter in a new ListSubscriptions // call to get further results. // +// This action is throttled at 30 transactions per second (TPS). +// // 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. @@ -1912,6 +1918,8 @@ func (c *SNS) ListSubscriptionsByTopicRequest(input *ListSubscriptionsByTopicInp // a NextToken is also returned. Use the NextToken parameter in a new ListSubscriptionsByTopic // call to get further results. // +// This action is throttled at 30 transactions per second (TPS). +// // 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. @@ -2058,6 +2066,8 @@ func (c *SNS) ListTopicsRequest(input *ListTopicsInput) (req *request.Request, o // of topics, up to 100. If there are more topics, a NextToken is also returned. // Use the NextToken parameter in a new ListTopics call to get further results. // +// This action is throttled at 30 transactions per second (TPS). +// // 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. @@ -2283,10 +2293,15 @@ func (c *SNS) PublishRequest(input *PublishInput) (req *request.Request, output // Publish API operation for Amazon Simple Notification Service. // -// Sends a message to all of a topic's subscribed endpoints. When a messageId -// is returned, the message has been saved and Amazon SNS will attempt to deliver -// it to the topic's subscribers shortly. The format of the outgoing message -// to each subscribed endpoint depends on the notification protocol. +// Sends a message to an Amazon SNS topic or sends a text message (SMS message) +// directly to a phone number. +// +// If you send a message to a topic, Amazon SNS delivers the message to each +// endpoint that is subscribed to the topic. The format of the message depends +// on the notification protocol for each subscribed endpoint. +// +// When a messageId is returned, the message has been saved and Amazon SNS will +// attempt to deliver it shortly. // // To use the Publish action for sending a message to a mobile endpoint, such // as an app on a Kindle device or mobile phone, you must specify the EndpointArn @@ -2764,7 +2779,8 @@ func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesI // SetSubscriptionAttributes API operation for Amazon Simple Notification Service. // -// Allows a subscription owner to set an attribute of the topic to a new value. +// Allows a subscription owner to set an attribute of the subscription to a +// new value. // // 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 @@ -2777,6 +2793,11 @@ func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesI // * ErrCodeInvalidParameterException "InvalidParameter" // Indicates that a request parameter does not comply with the associated constraints. // +// * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" +// Indicates that the number of filter polices in your AWS account exceeds the +// limit. To add more filter polices, submit an SNS Limit Increase case in the +// AWS Support Center. +// // * ErrCodeInternalErrorException "InternalError" // Indicates an internal service error. // @@ -2947,6 +2968,8 @@ func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, out // the ConfirmSubscription action with the token from the confirmation message. // Confirmation tokens are valid for three days. // +// This action is throttled at 100 transactions per second (TPS). +// // 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. @@ -2958,6 +2981,11 @@ func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, out // * ErrCodeSubscriptionLimitExceededException "SubscriptionLimitExceeded" // Indicates that the customer already owns the maximum allowed number of subscriptions. // +// * ErrCodeFilterPolicyLimitExceededException "FilterPolicyLimitExceeded" +// Indicates that the number of filter polices in your AWS account exceeds the +// limit. To add more filter polices, submit an SNS Limit Increase case in the +// AWS Support Center. +// // * ErrCodeInvalidParameterException "InvalidParameter" // Indicates that a request parameter does not comply with the associated constraints. // @@ -3045,6 +3073,8 @@ func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, // message is delivered to the endpoint, so that the endpoint owner can easily // resubscribe to the topic if the Unsubscribe request was unintended. // +// This action is throttled at 100 transactions per second (TPS). +// // 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. @@ -4047,21 +4077,31 @@ type GetSubscriptionAttributesOutput struct { // A map of the subscription's attributes. Attributes in this map include the // following: // - // * SubscriptionArn -- the subscription's ARN - // - // * TopicArn -- the topic ARN that the subscription is associated with - // - // * Owner -- the AWS account ID of the subscription's owner - // // * ConfirmationWasAuthenticated -- true if the subscription confirmation - // request was authenticated + // request was authenticated. // - // * DeliveryPolicy -- the JSON serialization of the subscription's delivery - // policy + // * DeliveryPolicy -- The JSON serialization of the subscription's delivery + // policy. // - // * EffectiveDeliveryPolicy -- the JSON serialization of the effective delivery + // * EffectiveDeliveryPolicy -- The JSON serialization of the effective delivery // policy that takes into account the topic delivery policy and account system - // defaults + // defaults. + // + // * FilterPolicy -- The filter policy JSON that is assigned to the subscription. + // + // * Owner -- The AWS account ID of the subscription's owner. + // + // * PendingConfirmation -- true if the subscription hasn't been confirmed. + // To confirm a pending subscription, call the ConfirmSubscription action + // with a confirmation token. + // + // * RawMessageDelivery -- true if raw message delivery is enabled for the + // subscription. Raw messages are free of JSON formatting and can be sent + // to HTTP/S and Amazon SQS endpoints. + // + // * SubscriptionArn -- The subscription's ARN. + // + // * TopicArn -- The topic ARN that the subscription is associated with. Attributes map[string]*string `type:"map"` } @@ -4586,8 +4626,9 @@ type MessageAttributeValue struct { // BinaryValue is automatically base64 encoded/decoded by the SDK. BinaryValue []byte `type:"blob"` - // Amazon SNS supports the following logical data types: String, Number, and - // Binary. For more information, see Message Attribute Data Types (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes). + // Amazon SNS supports the following logical data types: String, String.Array, + // Number, and Binary. For more information, see Message Attribute Data Types + // (http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes). // // DataType is a required field DataType *string `type:"string" required:"true"` @@ -4729,17 +4770,26 @@ func (s *PlatformApplication) SetPlatformApplicationArn(v string) *PlatformAppli type PublishInput struct { _ struct{} `type:"structure"` - // The message you want to send to the topic. - // - // If you want to send the same message to all transport protocols, include - // the text of the message as a String value. + // The message you want to send. // + // If you are publishing to a topic and you want to send the same message to + // all transport protocols, include the text of the message as a String value. // If you want to send different messages for each transport protocol, set the // value of the MessageStructure parameter to json and use a JSON object for // the Message parameter. // - // Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size - // (262144 bytes, not 262144 characters). + // Constraints: + // + // With the exception of SMS, messages must be UTF-8 encoded strings and at + // most 256 KB in size (262144 bytes, not 262144 characters). + // + // * For SMS, each message can contain up to 140 bytes, and the character + // limit depends on the encoding scheme. For example, an SMS message can + // contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. + // If you publish a message that exceeds the size limit, Amazon SNS sends + // it as multiple messages, each fitting within the size limit. Messages + // are not cut off in the middle of a word but on whole-word boundaries. + // The total size limit for a single SMS publish action is 1600 bytes. // // JSON-specific constraints: // @@ -5186,8 +5236,10 @@ type SetSMSAttributesInput struct { // costs that exceed your limit. // // By default, the spend limit is set to the maximum allowed by Amazon SNS. - // If you want to exceed the maximum, contact AWS Support (https://aws.amazon.com/premiumsupport/) - // or your AWS sales representative for a service limit increase. + // If you want to raise the limit, submit an SNS Limit Increase case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns). + // For New limit value, enter your desired monthly spend limit. In the Use Case + // Description field, explain that you are requesting an SMS monthly spend limit + // increase. // // DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS to // write logs about SMS deliveries in CloudWatch Logs. For each SMS message @@ -5301,7 +5353,7 @@ type SetSubscriptionAttributesInput struct { // The name of the attribute you want to set. Only a subset of the subscriptions // attributes are mutable. // - // Valid values: DeliveryPolicy | RawMessageDelivery + // Valid values: DeliveryPolicy | FilterPolicy | RawMessageDelivery // // AttributeName is a required field AttributeName *string `type:"string" required:"true"` @@ -5456,6 +5508,10 @@ func (s SetTopicAttributesOutput) GoString() string { type SubscribeInput struct { _ struct{} `type:"structure"` + // Assigns attributes to the subscription as a map of key-value pairs. You can + // assign any attribute that is supported by the SetSubscriptionAttributes action. + Attributes map[string]*string `type:"map"` + // The endpoint that you want to receive notifications. Endpoints vary by protocol: // // * For the http protocol, the endpoint is an URL beginning with "http://" @@ -5499,6 +5555,21 @@ type SubscribeInput struct { // Protocol is a required field Protocol *string `type:"string" required:"true"` + // Sets whether the response from the Subscribe request includes the subscription + // ARN, even if the subscription is not yet confirmed. + // + // If you set this parameter to false, the response includes the ARN for confirmed + // subscriptions, but it includes an ARN value of "pending subscription" for + // subscriptions that are not yet confirmed. A subscription becomes confirmed + // when the subscriber calls the ConfirmSubscription action with a confirmation + // token. + // + // If you set this parameter to true, the response includes the ARN in all cases, + // even if the subscription is not yet confirmed. + // + // The default value is false. + ReturnSubscriptionArn *bool `type:"boolean"` + // The ARN of the topic you want to subscribe to. // // TopicArn is a required field @@ -5531,6 +5602,12 @@ func (s *SubscribeInput) Validate() error { return nil } +// SetAttributes sets the Attributes field's value. +func (s *SubscribeInput) SetAttributes(v map[string]*string) *SubscribeInput { + s.Attributes = v + return s +} + // SetEndpoint sets the Endpoint field's value. func (s *SubscribeInput) SetEndpoint(v string) *SubscribeInput { s.Endpoint = &v @@ -5543,6 +5620,12 @@ func (s *SubscribeInput) SetProtocol(v string) *SubscribeInput { return s } +// SetReturnSubscriptionArn sets the ReturnSubscriptionArn field's value. +func (s *SubscribeInput) SetReturnSubscriptionArn(v bool) *SubscribeInput { + s.ReturnSubscriptionArn = &v + return s +} + // SetTopicArn sets the TopicArn field's value. func (s *SubscribeInput) SetTopicArn(v string) *SubscribeInput { s.TopicArn = &v @@ -5553,8 +5636,10 @@ func (s *SubscribeInput) SetTopicArn(v string) *SubscribeInput { type SubscribeOutput struct { _ struct{} `type:"structure"` - // The ARN of the subscription, if the service was able to create a subscription - // immediately (without requiring endpoint owner confirmation). + // The ARN of the subscription if it is confirmed, or the string "pending confirmation" + // if the subscription requires confirmation. However, if the API request parameter + // ReturnSubscriptionArn is true, then the value is always the subscription + // ARN, even if the subscription requires confirmation. SubscriptionArn *string `type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go index 60e503f25..9d2993bcc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go @@ -16,6 +16,14 @@ const ( // Exception error indicating endpoint disabled. ErrCodeEndpointDisabledException = "EndpointDisabled" + // ErrCodeFilterPolicyLimitExceededException for service response error code + // "FilterPolicyLimitExceeded". + // + // Indicates that the number of filter polices in your AWS account exceeds the + // limit. To add more filter polices, submit an SNS Limit Increase case in the + // AWS Support Center. + ErrCodeFilterPolicyLimitExceededException = "FilterPolicyLimitExceeded" + // ErrCodeInternalErrorException for service response error code // "InternalError". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go b/vendor/github.com/aws/aws-sdk-go/service/sns/service.go index fb75ea60a..96d7c8ba0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sns" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "sns" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SNS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SNS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go index 50b5f4b80..d463ecf0d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sqs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "sqs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SQS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SQS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index a42c79cb5..adbb5b2c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -99,6 +99,10 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. // +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource func (c *SSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { req, out := c.AddTagsToResourceRequest(input) @@ -186,12 +190,12 @@ func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Requ // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -386,12 +390,12 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -513,12 +517,12 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -903,8 +907,8 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) // you enable encryption in Amazon S3 to ensure secure data storage. We also // recommend that you secure access to the Amazon S3 bucket by creating a restrictive // bucket policy. To view an example of a restrictive Amazon S3 bucket policy -// for Resource Data Sync, see Configuring Resource Data Sync for Inventory -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-configuring.html#sysman-inventory-datasync). +// for Resource Data Sync, see Create a Resource Data Sync for Inventory (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync-create.html) +// in the AWS Systems Manager User 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 @@ -1115,12 +1119,12 @@ func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *requ // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -1245,6 +1249,101 @@ func (c *SSM) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentIn return out, req.Send() } +const opDeleteInventory = "DeleteInventory" + +// DeleteInventoryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInventory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteInventory for more information on using the DeleteInventory +// 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 DeleteInventoryRequest method. +// req, resp := client.DeleteInventoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory +func (c *SSM) DeleteInventoryRequest(input *DeleteInventoryInput) (req *request.Request, output *DeleteInventoryOutput) { + op := &request.Operation{ + Name: opDeleteInventory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInventoryInput{} + } + + output = &DeleteInventoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInventory API operation for Amazon Simple Systems Manager (SSM). +// +// Delete a custom inventory type, or the data associated with a custom Inventory +// type. Deleting a custom inventory type is also referred to as deleting a +// custom inventory schema. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DeleteInventory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" +// The parameter type name is not valid. +// +// * ErrCodeInvalidOptionException "InvalidOptionException" +// The delete inventory option specified is not valid. Verify the option and +// try again. +// +// * ErrCodeInvalidDeleteInventoryParametersException "InvalidDeleteInventoryParametersException" +// One or more of the parameters specified for the delete operation is not valid. +// Verify all parameters and try again. +// +// * ErrCodeInvalidInventoryRequestException "InvalidInventoryRequestException" +// The request is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory +func (c *SSM) DeleteInventory(input *DeleteInventoryInput) (*DeleteInventoryOutput, error) { + req, out := c.DeleteInventoryRequest(input) + return out, req.Send() +} + +// DeleteInventoryWithContext is the same as DeleteInventory with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInventory 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 *SSM) DeleteInventoryWithContext(ctx aws.Context, input *DeleteInventoryInput, opts ...request.Option) (*DeleteInventoryOutput, error) { + req, out := c.DeleteInventoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the @@ -1700,7 +1799,7 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI // // Removes the server or virtual machine from the list of registered servers. // You can reregister the instance again at any time. If you don't plan to use -// Run Command on the server, we suggest uninstalling the SSM Agent first. +// Run Command on the server, we suggest uninstalling SSM Agent first. // // 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 @@ -1715,12 +1814,12 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -2230,12 +2329,12 @@ func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req * // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -2262,6 +2361,180 @@ func (c *SSM) DescribeAssociationWithContext(ctx aws.Context, input *DescribeAss return out, req.Send() } +const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTargets" + +// DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAssociationExecutionTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeAssociationExecutionTargets for more information on using the DescribeAssociationExecutionTargets +// 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 DescribeAssociationExecutionTargetsRequest method. +// req, resp := client.DescribeAssociationExecutionTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets +func (c *SSM) DescribeAssociationExecutionTargetsRequest(input *DescribeAssociationExecutionTargetsInput) (req *request.Request, output *DescribeAssociationExecutionTargetsOutput) { + op := &request.Operation{ + Name: opDescribeAssociationExecutionTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAssociationExecutionTargetsInput{} + } + + output = &DescribeAssociationExecutionTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAssociationExecutionTargets API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to view information about a specific execution of a specific +// association. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DescribeAssociationExecutionTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// * ErrCodeAssociationExecutionDoesNotExist "AssociationExecutionDoesNotExist" +// The specified execution ID does not exist. Verify the ID number and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets +func (c *SSM) DescribeAssociationExecutionTargets(input *DescribeAssociationExecutionTargetsInput) (*DescribeAssociationExecutionTargetsOutput, error) { + req, out := c.DescribeAssociationExecutionTargetsRequest(input) + return out, req.Send() +} + +// DescribeAssociationExecutionTargetsWithContext is the same as DescribeAssociationExecutionTargets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAssociationExecutionTargets 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 *SSM) DescribeAssociationExecutionTargetsWithContext(ctx aws.Context, input *DescribeAssociationExecutionTargetsInput, opts ...request.Option) (*DescribeAssociationExecutionTargetsOutput, error) { + req, out := c.DescribeAssociationExecutionTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAssociationExecutions = "DescribeAssociationExecutions" + +// DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAssociationExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeAssociationExecutions for more information on using the DescribeAssociationExecutions +// 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 DescribeAssociationExecutionsRequest method. +// req, resp := client.DescribeAssociationExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions +func (c *SSM) DescribeAssociationExecutionsRequest(input *DescribeAssociationExecutionsInput) (req *request.Request, output *DescribeAssociationExecutionsOutput) { + op := &request.Operation{ + Name: opDescribeAssociationExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAssociationExecutionsInput{} + } + + output = &DescribeAssociationExecutionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAssociationExecutions API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to view all executions for a specific association ID. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DescribeAssociationExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions +func (c *SSM) DescribeAssociationExecutions(input *DescribeAssociationExecutionsInput) (*DescribeAssociationExecutionsOutput, error) { + req, out := c.DescribeAssociationExecutionsRequest(input) + return out, req.Send() +} + +// DescribeAssociationExecutionsWithContext is the same as DescribeAssociationExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAssociationExecutions 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 *SSM) DescribeAssociationExecutionsWithContext(ctx aws.Context, input *DescribeAssociationExecutionsInput, opts ...request.Option) (*DescribeAssociationExecutionsOutput, error) { + req, out := c.DescribeAssociationExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the @@ -2757,12 +3030,12 @@ func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffect // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -2951,12 +3224,12 @@ func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceA // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3043,6 +3316,10 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat // information for all your instances. If you specify an instance ID that is // not valid or an instance that you do not own, you receive an error. // +// The IamRole field for this API action is the Amazon Identity and Access Management +// (IAM) role assigned to on-premises instances. This call does not return the +// IAM role for Amazon EC2 instances. +// // 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. @@ -3059,12 +3336,12 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3382,12 +3659,12 @@ func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -3421,6 +3698,92 @@ func (c *SSM) DescribeInstancePatchesWithContext(ctx aws.Context, input *Describ return out, req.Send() } +const opDescribeInventoryDeletions = "DescribeInventoryDeletions" + +// DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInventoryDeletions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeInventoryDeletions for more information on using the DescribeInventoryDeletions +// 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 DescribeInventoryDeletionsRequest method. +// req, resp := client.DescribeInventoryDeletionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions +func (c *SSM) DescribeInventoryDeletionsRequest(input *DescribeInventoryDeletionsInput) (req *request.Request, output *DescribeInventoryDeletionsOutput) { + op := &request.Operation{ + Name: opDescribeInventoryDeletions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeInventoryDeletionsInput{} + } + + output = &DescribeInventoryDeletionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInventoryDeletions API operation for Amazon Simple Systems Manager (SSM). +// +// Describes a specific delete inventory operation. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DescribeInventoryDeletions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidDeletionIdException "InvalidDeletionIdException" +// The ID specified for the delete operation does not exist or is not valide. +// Verify the ID and try again. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions +func (c *SSM) DescribeInventoryDeletions(input *DescribeInventoryDeletionsInput) (*DescribeInventoryDeletionsOutput, error) { + req, out := c.DescribeInventoryDeletionsRequest(input) + return out, req.Send() +} + +// DescribeInventoryDeletionsWithContext is the same as DescribeInventoryDeletions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInventoryDeletions 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 *SSM) DescribeInventoryDeletionsWithContext(ctx aws.Context, input *DescribeInventoryDeletionsInput, opts ...request.Option) (*DescribeInventoryDeletionsOutput, error) { + req, out := c.DescribeInventoryDeletionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenanceWindowExecutionTaskInvocations" // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the @@ -4470,12 +4833,12 @@ func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -4557,6 +4920,9 @@ func (c *SSM) GetDefaultPatchBaselineRequest(input *GetDefaultPatchBaselineInput // creating multiple default patch baselines. For example, you can create a // default patch baseline for each operating system. // +// If you do not specify an operating system value, the default patch baseline +// for Windows is returned. +// // 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. @@ -5415,7 +5781,8 @@ func (c *SSM) GetParameterRequest(input *GetParameterInput) (req *request.Reques // GetParameter API operation for Amazon Simple Systems Manager (SSM). // -// Get information about a parameter by using the parameter name. +// Get information about a parameter by using the parameter name. Don't confuse +// this API action with the GetParameters API action. // // 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 @@ -5648,7 +6015,8 @@ func (c *SSM) GetParametersRequest(input *GetParametersInput) (req *request.Requ // GetParameters API operation for Amazon Simple Systems Manager (SSM). // -// Get details of a parameter. +// Get details of a parameter. Don't confuse this API action with the GetParameter +// API action. // // 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 @@ -5737,7 +6105,8 @@ func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req * // GetParametersByPath API operation for Amazon Simple Systems Manager (SSM). // // Retrieve parameters in a specific hierarchy. For more information, see Working -// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html). +// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html) +// in the AWS Systems Manager User Guide. // // Request results are returned on a best-effort basis. If you specify MaxResults // in the request, the response includes information up to the limit specified. @@ -6315,12 +6684,12 @@ func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -6473,12 +6842,12 @@ func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Reques // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -7034,12 +7403,12 @@ func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -7644,12 +8013,12 @@ func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Reques // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -7756,7 +8125,7 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques // PutParameter API operation for Amazon Simple Systems Manager (SSM). // -// Add one or more parameters to the system. +// Add a parameter to the system. // // 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 @@ -7784,8 +8153,9 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques // The parameter already exists. You can't create duplicate parameters. // // * ErrCodeHierarchyLevelLimitExceededException "HierarchyLevelLimitExceededException" -// A hierarchy can have a maximum of 15 levels. For more information, see Working -// with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html). +// A hierarchy can have a maximum of 15 levels. For more information, see Requirements +// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) +// in the AWS Systems Manager User Guide. // // * ErrCodeHierarchyTypeMismatchException "HierarchyTypeMismatchException" // Parameter Store does not support changing a parameter type in a hierarchy. @@ -8280,6 +8650,10 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource func (c *SSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { req, out := c.RemoveTagsFromResourceRequest(input) @@ -8458,12 +8832,12 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -8471,6 +8845,9 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // * ErrCodeInvalidDocument "InvalidDocument" // The specified document does not exist. // +// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" +// The document version is not valid or does not exist. +// // * ErrCodeInvalidOutputFolder "InvalidOutputFolder" // The S3 bucket does not exist. // @@ -8519,6 +8896,89 @@ func (c *SSM) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, o return out, req.Send() } +const opStartAssociationsOnce = "StartAssociationsOnce" + +// StartAssociationsOnceRequest generates a "aws/request.Request" representing the +// client's request for the StartAssociationsOnce operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 StartAssociationsOnce for more information on using the StartAssociationsOnce +// 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 StartAssociationsOnceRequest method. +// req, resp := client.StartAssociationsOnceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce +func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (req *request.Request, output *StartAssociationsOnceOutput) { + op := &request.Operation{ + Name: opStartAssociationsOnce, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartAssociationsOnceInput{} + } + + output = &StartAssociationsOnceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartAssociationsOnce API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to execute an association immediately and only one time. +// This action can be helpful when troubleshooting associations. +// +// 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 Simple Systems Manager (SSM)'s +// API operation StartAssociationsOnce for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidAssociation "InvalidAssociation" +// The association is not valid or does not exist. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce +func (c *SSM) StartAssociationsOnce(input *StartAssociationsOnceInput) (*StartAssociationsOnceOutput, error) { + req, out := c.StartAssociationsOnceRequest(input) + return out, req.Send() +} + +// StartAssociationsOnceWithContext is the same as StartAssociationsOnce with the addition of +// the ability to pass a context and additional request options. +// +// See StartAssociationsOnce 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 *SSM) StartAssociationsOnceWithContext(ctx aws.Context, input *StartAssociationsOnceInput, opts ...request.Option) (*StartAssociationsOnceOutput, error) { + req, out := c.StartAssociationsOnceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the @@ -8890,12 +9350,12 @@ func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -9360,18 +9820,18 @@ func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowT // Modifies a task assigned to a Maintenance Window. You can't change the task // type, but you can change the following values: // -// Task ARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript -// to AWS-RunShellScript. +// * TaskARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript +// to AWS-RunShellScript. // -// Service role ARN. +// * ServiceRoleArn // -// Task parameters. +// * TaskInvocationParameters // -// Task priority. +// * Priority // -// Task MaxConcurrency and MaxErrors. +// * MaxConcurrency // -// Log location. +// * MaxErrors // // If a parameter is null, then the corresponding field is not modified. Also, // if you set Replace to true, then all fields required by the RegisterTaskWithMaintenanceWindow @@ -9478,12 +9938,12 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI // // You do not have permission to access the instance. // -// The SSM Agent is not running. On managed instances and Linux instances, verify +// SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // -// The SSM Agent or EC2Config service is not registered to the SSM endpoint. -// Try reinstalling the SSM Agent or EC2Config service. +// SSM Agent or EC2Config service is not registered to the SSM endpoint. Try +// reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -9613,7 +10073,7 @@ type Activation struct { ActivationId *string `type:"string"` // The date the activation was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A name for the managed instance when it is created. DefaultInstanceName *string `type:"string"` @@ -9622,7 +10082,7 @@ type Activation struct { Description *string `type:"string"` // The date when this activation can no longer be used to register managed instances. - ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `type:"timestamp"` // Whether or not the activation is expired. Expired *bool `type:"boolean"` @@ -9708,16 +10168,29 @@ type AddTagsToResourceInput struct { // The resource ID you want to tag. // - // For the ManagedInstance, MaintenanceWindow, and PatchBaseline values, use - // the ID of the resource, such as mw-01234361858c9b57b for a Maintenance Window. + // Use the ID of the resource. Here are some examples: + // + // ManagedInstance: mi-012345abcde + // + // MaintenanceWindow: mw-012345abcde + // + // PatchBaseline: pb-012345abcde // // For the Document and Parameter values, use the name of the resource. // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // Specifies the type of resource you are tagging. // + // The ManagedInstance type for this API action is for on-premises managed instances. + // You must specify the the name of the managed instance in the following format: + // mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` @@ -9725,6 +10198,8 @@ type AddTagsToResourceInput struct { // the tag to have a value, specify the parameter with no value, and we set // the value to an empty string. // + // Do not enter personally identifiable information in this field. + // // Tags is a required field Tags []*Tag `type:"list" required:"true"` } @@ -9821,7 +10296,7 @@ type Association struct { InstanceId *string `type:"string"` // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // The name of the Systems Manager document. Name *string `type:"string"` @@ -9920,7 +10395,7 @@ type AssociationDescription struct { AssociationVersion *string `type:"string"` // The date when the association was made. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // The document version. DocumentVersion *string `type:"string"` @@ -9929,13 +10404,13 @@ type AssociationDescription struct { InstanceId *string `type:"string"` // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // The last date on which the association was successfully run. - LastSuccessfulExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulExecutionDate *time.Time `type:"timestamp"` // The date when the association was last updated. - LastUpdateAssociationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateAssociationDate *time.Time `type:"timestamp"` // The name of the Systems Manager document. Name *string `type:"string"` @@ -10065,6 +10540,319 @@ func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription return s } +// Includes information about the specified association. +type AssociationExecution struct { + _ struct{} `type:"structure"` + + // The association ID. + AssociationId *string `type:"string"` + + // The association version. + AssociationVersion *string `type:"string"` + + // The time the execution started. + CreatedTime *time.Time `type:"timestamp"` + + // Detailed status information about the execution. + DetailedStatus *string `type:"string"` + + // The execution ID for the association. If the association does not run at + // intervals or according to a schedule, then the ExecutionID is the same as + // the AssociationID. + ExecutionId *string `type:"string"` + + // The date of the last execution. + LastExecutionDate *time.Time `type:"timestamp"` + + // An aggregate status of the resources in the execution based on the status + // type. + ResourceCountByStatus *string `type:"string"` + + // The status of the association execution. + Status *string `type:"string"` +} + +// String returns the string representation +func (s AssociationExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecution) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *AssociationExecution) SetAssociationId(v string) *AssociationExecution { + s.AssociationId = &v + return s +} + +// SetAssociationVersion sets the AssociationVersion field's value. +func (s *AssociationExecution) SetAssociationVersion(v string) *AssociationExecution { + s.AssociationVersion = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *AssociationExecution) SetCreatedTime(v time.Time) *AssociationExecution { + s.CreatedTime = &v + return s +} + +// SetDetailedStatus sets the DetailedStatus field's value. +func (s *AssociationExecution) SetDetailedStatus(v string) *AssociationExecution { + s.DetailedStatus = &v + return s +} + +// SetExecutionId sets the ExecutionId field's value. +func (s *AssociationExecution) SetExecutionId(v string) *AssociationExecution { + s.ExecutionId = &v + return s +} + +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *AssociationExecution) SetLastExecutionDate(v time.Time) *AssociationExecution { + s.LastExecutionDate = &v + return s +} + +// SetResourceCountByStatus sets the ResourceCountByStatus field's value. +func (s *AssociationExecution) SetResourceCountByStatus(v string) *AssociationExecution { + s.ResourceCountByStatus = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociationExecution) SetStatus(v string) *AssociationExecution { + s.Status = &v + return s +} + +// Filters used in the request. +type AssociationExecutionFilter struct { + _ struct{} `type:"structure"` + + // The key value used in the request. + // + // Key is a required field + Key *string `type:"string" required:"true" enum:"AssociationExecutionFilterKey"` + + // The filter type specified in the request. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"AssociationFilterOperatorType"` + + // The value specified for the key. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociationExecutionFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociationExecutionFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + 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 *AssociationExecutionFilter) SetKey(v string) *AssociationExecutionFilter { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *AssociationExecutionFilter) SetType(v string) *AssociationExecutionFilter { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AssociationExecutionFilter) SetValue(v string) *AssociationExecutionFilter { + s.Value = &v + return s +} + +// Includes information about the specified association execution. +type AssociationExecutionTarget struct { + _ struct{} `type:"structure"` + + // The association ID. + AssociationId *string `type:"string"` + + // The association version. + AssociationVersion *string `type:"string"` + + // Detailed information about the execution status. + DetailedStatus *string `type:"string"` + + // The execution ID. If the association does not run at intervals or according + // to a schedule, then the ExecutionID is the same as the AssociationID. + ExecutionId *string `type:"string"` + + // The date of the last execution. + LastExecutionDate *time.Time `type:"timestamp"` + + // The location where the association details are saved. + OutputSource *OutputSource `type:"structure"` + + // The resource ID, for example, the instance ID where the association ran. + ResourceId *string `min:"1" type:"string"` + + // The resource type, for example, instance. + ResourceType *string `min:"1" type:"string"` + + // The association execution status. + Status *string `type:"string"` +} + +// String returns the string representation +func (s AssociationExecutionTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionTarget) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *AssociationExecutionTarget) SetAssociationId(v string) *AssociationExecutionTarget { + s.AssociationId = &v + return s +} + +// SetAssociationVersion sets the AssociationVersion field's value. +func (s *AssociationExecutionTarget) SetAssociationVersion(v string) *AssociationExecutionTarget { + s.AssociationVersion = &v + return s +} + +// SetDetailedStatus sets the DetailedStatus field's value. +func (s *AssociationExecutionTarget) SetDetailedStatus(v string) *AssociationExecutionTarget { + s.DetailedStatus = &v + return s +} + +// SetExecutionId sets the ExecutionId field's value. +func (s *AssociationExecutionTarget) SetExecutionId(v string) *AssociationExecutionTarget { + s.ExecutionId = &v + return s +} + +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *AssociationExecutionTarget) SetLastExecutionDate(v time.Time) *AssociationExecutionTarget { + s.LastExecutionDate = &v + return s +} + +// SetOutputSource sets the OutputSource field's value. +func (s *AssociationExecutionTarget) SetOutputSource(v *OutputSource) *AssociationExecutionTarget { + s.OutputSource = v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *AssociationExecutionTarget) SetResourceId(v string) *AssociationExecutionTarget { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *AssociationExecutionTarget) SetResourceType(v string) *AssociationExecutionTarget { + s.ResourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociationExecutionTarget) SetStatus(v string) *AssociationExecutionTarget { + s.Status = &v + return s +} + +// Filters for the association execution. +type AssociationExecutionTargetsFilter struct { + _ struct{} `type:"structure"` + + // The key value used in the request. + // + // Key is a required field + Key *string `type:"string" required:"true" enum:"AssociationExecutionTargetsFilterKey"` + + // The value specified for the key. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociationExecutionTargetsFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionTargetsFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociationExecutionTargetsFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionTargetsFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + 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 *AssociationExecutionTargetsFilter) SetKey(v string) *AssociationExecutionTargetsFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter { + s.Value = &v + return s +} + // Describes a filter. type AssociationFilter struct { _ struct{} `type:"structure"` @@ -10175,7 +10963,7 @@ type AssociationStatus struct { // The date when the status changed. // // Date is a required field - Date *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + Date *time.Time `type:"timestamp" required:"true"` // The reason for the status. // @@ -10259,7 +11047,7 @@ type AssociationVersionInfo struct { AssociationVersion *string `type:"string"` // The date the association version was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The version of a Systems Manager document used when the association version // was created. @@ -10381,10 +11169,10 @@ type AutomationExecution struct { ExecutedBy *string `type:"string"` // The time the execution finished. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started. - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // A message describing why an execution has failed, if the status is set to // Failed. @@ -10661,10 +11449,10 @@ type AutomationExecutionMetadata struct { // The time the execution finished. This is not populated if the execution is // still in progress. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started.> - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // The list of execution outputs as defined in the Automation document. FailureMessage *string `type:"string"` @@ -10898,10 +11686,62 @@ func (s CancelCommandOutput) GoString() string { return s.String() } +// Configuration options for sending command output to CloudWatch Logs. +type CloudWatchOutputConfig struct { + _ struct{} `type:"structure"` + + // The name of the CloudWatch log group where you want to send command output. + // If you don't specify a group name, Systems Manager automatically creates + // a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName. + CloudWatchLogGroupName *string `min:"1" type:"string"` + + // Enables Systems Manager to send command output to CloudWatch Logs. + CloudWatchOutputEnabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s CloudWatchOutputConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchOutputConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchOutputConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchOutputConfig"} + if s.CloudWatchLogGroupName != nil && len(*s.CloudWatchLogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CloudWatchLogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogGroupName sets the CloudWatchLogGroupName field's value. +func (s *CloudWatchOutputConfig) SetCloudWatchLogGroupName(v string) *CloudWatchOutputConfig { + s.CloudWatchLogGroupName = &v + return s +} + +// SetCloudWatchOutputEnabled sets the CloudWatchOutputEnabled field's value. +func (s *CloudWatchOutputConfig) SetCloudWatchOutputEnabled(v bool) *CloudWatchOutputConfig { + s.CloudWatchOutputEnabled = &v + return s +} + // Describes a command request. type Command struct { _ struct{} `type:"structure"` + // CloudWatch Logs information where you want Systems Manager to send the command + // output. + CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` + // A unique identifier for this command. CommandId *string `min:"36" type:"string"` @@ -10914,16 +11754,22 @@ type Command struct { // Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable. CompletedCount *int64 `type:"integer"` + // The number of targets for which the status is Delivery Timed Out. + DeliveryTimedOutCount *int64 `type:"integer"` + // The name of the document requested for execution. DocumentName *string `type:"string"` + // The SSM document version. + DocumentVersion *string `type:"string"` + // The number of targets for which the status is Failed or Execution Timed Out. ErrorCount *int64 `type:"integer"` // If this time is reached and the command has not already started executing, - // it will not execute. Calculated based on the ExpiresAfter user input provided + // it will not run. Calculated based on the ExpiresAfter user input provided // as part of the SendCommand API. - ExpiresAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpiresAfter *time.Time `type:"timestamp"` // The instance IDs against which this command was requested. InstanceIds []*string `type:"list"` @@ -10931,15 +11777,17 @@ type Command struct { // The maximum number of instances that are allowed to execute the command at // the same time. You can specify a number of instances, such as 10, or a percentage // of instances, such as 10%. The default value is 50. For more information - // about how to use MaxConcurrency, see Executing a Command Using Systems Manager - // Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html). + // about how to use MaxConcurrency, see Executing Commands Using Systems Manager + // Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) + // in the AWS Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before the system stops sending the // command to additional targets. You can specify a number of errors, such as // 10, or a percentage or errors, such as 10%. The default value is 0. For more - // information about how to use MaxErrors, see Executing a Command Using Systems - // Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html). + // information about how to use MaxErrors, see Executing Commands Using Systems + // Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) + // in the AWS Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` // Configurations for sending notifications about command status changes. @@ -10962,7 +11810,7 @@ type Command struct { Parameters map[string][]*string `type:"map"` // The date and time the command was requested. - RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedDateTime *time.Time `type:"timestamp"` // The IAM service role that Run Command uses to act on your behalf when sending // notifications about command status changes. @@ -10974,8 +11822,10 @@ type Command struct { // A detailed status of the command execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Run Command Status (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-about-status.html). - // StatusDetails can be one of the following values: + // For more information about these statuses, see Understanding Command Statuses + // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // in the AWS Systems Manager User Guide. StatusDetails can be one of the following + // values: // // * Pending: The command has not been sent to any instances. // @@ -11025,6 +11875,12 @@ func (s Command) GoString() string { return s.String() } +// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. +func (s *Command) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *Command { + s.CloudWatchOutputConfig = v + return s +} + // SetCommandId sets the CommandId field's value. func (s *Command) SetCommandId(v string) *Command { s.CommandId = &v @@ -11043,12 +11899,24 @@ func (s *Command) SetCompletedCount(v int64) *Command { return s } +// SetDeliveryTimedOutCount sets the DeliveryTimedOutCount field's value. +func (s *Command) SetDeliveryTimedOutCount(v int64) *Command { + s.DeliveryTimedOutCount = &v + return s +} + // SetDocumentName sets the DocumentName field's value. func (s *Command) SetDocumentName(v string) *Command { s.DocumentName = &v return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *Command) SetDocumentVersion(v string) *Command { + s.DocumentVersion = &v + return s +} + // SetErrorCount sets the ErrorCount field's value. func (s *Command) SetErrorCount(v int64) *Command { s.ErrorCount = &v @@ -11209,6 +12077,10 @@ func (s *CommandFilter) SetValue(v string) *CommandFilter { type CommandInvocation struct { _ struct{} `type:"structure"` + // CloudWatch Logs information where you want Systems Manager to send the command + // output. + CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` + // The command against which this invocation was requested. CommandId *string `min:"36" type:"string"` @@ -11221,6 +12093,9 @@ type CommandInvocation struct { // The document name that was requested for execution. DocumentName *string `type:"string"` + // The SSM document version. + DocumentVersion *string `type:"string"` + // The instance ID in which this invocation was requested. InstanceId *string `type:"string"` @@ -11234,7 +12109,7 @@ type CommandInvocation struct { NotificationConfig *NotificationConfig `type:"structure"` // The time and date the request was sent to this instance. - RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedDateTime *time.Time `type:"timestamp"` // The IAM service role that Run Command uses to act on your behalf when sending // notifications about command status changes on a per instance basis. @@ -11259,8 +12134,9 @@ type CommandInvocation struct { // targeted by the command). StatusDetails includes more information than Status // because it includes states resulting from error and concurrency control parameters. // StatusDetails can show different results than Status. For more information - // about these statuses, see Run Command Status (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-about-status.html). - // StatusDetails can be one of the following values: + // about these statuses, see Understanding Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // in the AWS Systems Manager User Guide. StatusDetails can be one of the following + // values: // // * Pending: The command has not been sent to the instance. // @@ -11313,6 +12189,12 @@ func (s CommandInvocation) GoString() string { return s.String() } +// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. +func (s *CommandInvocation) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *CommandInvocation { + s.CloudWatchOutputConfig = v + return s +} + // SetCommandId sets the CommandId field's value. func (s *CommandInvocation) SetCommandId(v string) *CommandInvocation { s.CommandId = &v @@ -11337,6 +12219,12 @@ func (s *CommandInvocation) SetDocumentName(v string) *CommandInvocation { return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *CommandInvocation) SetDocumentVersion(v string) *CommandInvocation { + s.DocumentVersion = &v + return s +} + // SetInstanceId sets the InstanceId field's value. func (s *CommandInvocation) SetInstanceId(v string) *CommandInvocation { s.InstanceId = &v @@ -11449,10 +12337,10 @@ type CommandPlugin struct { // The time the plugin stopped executing. Could stop prematurely if, for example, // a cancel command was sent. - ResponseFinishDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResponseFinishDateTime *time.Time `type:"timestamp"` // The time the plugin started executing. - ResponseStartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResponseStartDateTime *time.Time `type:"timestamp"` // The URL for the complete text written by the plugin to stderr. If execution // is not yet complete, then this string is empty. @@ -11469,8 +12357,10 @@ type CommandPlugin struct { // A detailed status of the plugin execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Run Command Status (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-about-status.html). - // StatusDetails can be one of the following values: + // For more information about these statuses, see Understanding Command Statuses + // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // in the AWS Systems Manager User Guide. StatusDetails can be one of the following + // values: // // * Pending: The command has not been sent to the instance. // @@ -11606,7 +12496,7 @@ type ComplianceExecutionSummary struct { // format: yyyy-MM-dd'T'HH:mm:ss'Z'. // // ExecutionTime is a required field - ExecutionTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + ExecutionTime *time.Time `type:"timestamp" required:"true"` // The type of execution. For example, Command is a valid execution type. ExecutionType *string `type:"string"` @@ -11671,7 +12561,7 @@ type ComplianceItem struct { ExecutionSummary *ComplianceExecutionSummary `type:"structure"` // An ID for the compliance item. For example, if the compliance item is a Windows - // patch, the ID could be the number of the KB article. Here's an example: KB4010320. + // patch, the ID could be the number of the KB article; for example: KB4010320. Id *string `min:"1" type:"string"` // An ID for the resource. For a managed instance, this is the instance ID. @@ -11689,8 +12579,8 @@ type ComplianceItem struct { Status *string `type:"string" enum:"ComplianceStatus"` // A title for the compliance item. For example, if the compliance item is a - // Windows patch, the title could be the title of the KB article for the patch. - // Here's an example: Security Update for Active Directory Federation Services. + // Windows patch, the title could be the title of the KB article for the patch; + // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } @@ -11781,8 +12671,8 @@ type ComplianceItemEntry struct { Status *string `type:"string" required:"true" enum:"ComplianceStatus"` // The title of the compliance item. For example, if the compliance item is - // a Windows patch, the title could be the title of the KB article for the patch. - // Here's an example: Security Update for Active Directory Federation Services. + // a Windows patch, the title could be the title of the KB article for the patch; + // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } @@ -11986,15 +12876,19 @@ type CreateActivationInput struct { // The name of the registered, managed instance as it will appear in the Amazon // EC2 console or when you use the AWS command line tools to list EC2 resources. + // + // Do not enter personally identifiable information in this field. DefaultInstanceName *string `type:"string"` - // A userdefined description of the resource that you want to register with + // A user-defined description of the resource that you want to register with // Amazon EC2. + // + // Do not enter personally identifiable information in this field. Description *string `type:"string"` // The date by which this activation request should expire. The default value // is 24 hours. - ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `type:"timestamp"` // The Amazon Identity and Access Management (IAM) role that you want to assign // to the managed instance. @@ -12730,12 +13624,16 @@ type CreatePatchBaselineInput struct { ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Defines the compliance level for approved patches. This means that if an // approved patch is reported as missing, this is the severity of the compliance - // violation. Valid compliance severity levels include the following: CRITICAL, - // HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED. The default value is UNSPECIFIED. + // violation. The default value is UNSPECIFIED. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates @@ -12762,6 +13660,11 @@ type CreatePatchBaselineInput struct { OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` // Information about the patches to use to update the instances, including target @@ -13143,6 +14046,139 @@ func (s DeleteDocumentOutput) GoString() string { return s.String() } +type DeleteInventoryInput struct { + _ struct{} `type:"structure"` + + // User-provided idempotency token. + ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // Use this option to view a summary of the deletion request without deleting + // any data or the data type. This option is useful when you only want to understand + // what will be deleted. Once you validate that the data to be deleted is what + // you intend to delete, you can run the same command without specifying the + // DryRun option. + DryRun *bool `type:"boolean"` + + // Use the SchemaDeleteOption to delete a custom inventory type (schema). If + // you don't choose this option, the system only deletes existing inventory + // data associated with the custom inventory type. Choose one of the following + // options: + // + // DisableSchema: If you choose this option, the system ignores all inventory + // data for the specified version, and any earlier versions. To enable this + // schema again, you must call the PutInventory action for a version greater + // than the disbled version. + // + // DeleteSchema: This option deletes the specified custom type from the Inventory + // service. You can recreate the schema later, if you want. + SchemaDeleteOption *string `type:"string" enum:"InventorySchemaDeleteOption"` + + // The name of the custom inventory type for which you want to delete either + // all previously collected data, or the inventory type itself. + // + // TypeName is a required field + TypeName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInventoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInventoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInventoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInventoryInput"} + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *DeleteInventoryInput) SetClientToken(v string) *DeleteInventoryInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteInventoryInput) SetDryRun(v bool) *DeleteInventoryInput { + s.DryRun = &v + return s +} + +// SetSchemaDeleteOption sets the SchemaDeleteOption field's value. +func (s *DeleteInventoryInput) SetSchemaDeleteOption(v string) *DeleteInventoryInput { + s.SchemaDeleteOption = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteInventoryInput) SetTypeName(v string) *DeleteInventoryInput { + s.TypeName = &v + return s +} + +type DeleteInventoryOutput struct { + _ struct{} `type:"structure"` + + // Every DeleteInventory action is assigned a unique ID. This option returns + // a unique ID. You can use this ID to query the status of a delete operation. + // This option is useful for ensuring that a delete operation has completed + // before you begin other actions. + DeletionId *string `type:"string"` + + // A summary of the delete operation. For more information about this summary, + // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) + // in the AWS Systems Manager User Guide. + DeletionSummary *InventoryDeletionSummary `type:"structure"` + + // The name of the inventory data type specified in the request. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteInventoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInventoryOutput) GoString() string { + return s.String() +} + +// SetDeletionId sets the DeletionId field's value. +func (s *DeleteInventoryOutput) SetDeletionId(v string) *DeleteInventoryOutput { + s.DeletionId = &v + return s +} + +// SetDeletionSummary sets the DeletionSummary field's value. +func (s *DeleteInventoryOutput) SetDeletionSummary(v *InventoryDeletionSummary) *DeleteInventoryOutput { + s.DeletionSummary = v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteInventoryOutput) SetTypeName(v string) *DeleteInventoryOutput { + s.TypeName = &v + return s +} + type DeleteMaintenanceWindowInput struct { _ struct{} `type:"structure"` @@ -13911,6 +14947,265 @@ func (s *DescribeActivationsOutput) SetNextToken(v string) *DescribeActivationsO return s } +type DescribeAssociationExecutionTargetsInput struct { + _ struct{} `type:"structure"` + + // The association ID that includes the execution for which you want to view + // details. + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // The execution ID for which you want to view details. + // + // ExecutionId is a required field + ExecutionId *string `type:"string" required:"true"` + + // Filters for the request. You can specify the following filters and values. + // + // Status (EQUAL) + // + // ResourceId (EQUAL) + // + // ResourceType (EQUAL) + Filters []*AssociationExecutionTargetsFilter `min:"1" type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAssociationExecutionTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAssociationExecutionTargetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAssociationExecutionTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionTargetsInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.ExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionId")) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetAssociationId(v string) *DescribeAssociationExecutionTargetsInput { + s.AssociationId = &v + return s +} + +// SetExecutionId sets the ExecutionId field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetExecutionId(v string) *DescribeAssociationExecutionTargetsInput { + s.ExecutionId = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetFilters(v []*AssociationExecutionTargetsFilter) *DescribeAssociationExecutionTargetsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetMaxResults(v int64) *DescribeAssociationExecutionTargetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetNextToken(v string) *DescribeAssociationExecutionTargetsInput { + s.NextToken = &v + return s +} + +type DescribeAssociationExecutionTargetsOutput struct { + _ struct{} `type:"structure"` + + // Information about the execution. + AssociationExecutionTargets []*AssociationExecutionTarget `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAssociationExecutionTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAssociationExecutionTargetsOutput) GoString() string { + return s.String() +} + +// SetAssociationExecutionTargets sets the AssociationExecutionTargets field's value. +func (s *DescribeAssociationExecutionTargetsOutput) SetAssociationExecutionTargets(v []*AssociationExecutionTarget) *DescribeAssociationExecutionTargetsOutput { + s.AssociationExecutionTargets = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionTargetsOutput) SetNextToken(v string) *DescribeAssociationExecutionTargetsOutput { + s.NextToken = &v + return s +} + +type DescribeAssociationExecutionsInput struct { + _ struct{} `type:"structure"` + + // The association ID for which you want to view execution history details. + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // Filters for the request. You can specify the following filters and values. + // + // ExecutionId (EQUAL) + // + // Status (EQUAL) + // + // CreatedTime (EQUAL, GREATER_THAN, LESS_THAN) + Filters []*AssociationExecutionFilter `min:"1" type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAssociationExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAssociationExecutionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAssociationExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionsInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DescribeAssociationExecutionsInput) SetAssociationId(v string) *DescribeAssociationExecutionsInput { + s.AssociationId = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeAssociationExecutionsInput) SetFilters(v []*AssociationExecutionFilter) *DescribeAssociationExecutionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAssociationExecutionsInput) SetMaxResults(v int64) *DescribeAssociationExecutionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionsInput) SetNextToken(v string) *DescribeAssociationExecutionsInput { + s.NextToken = &v + return s +} + +type DescribeAssociationExecutionsOutput struct { + _ struct{} `type:"structure"` + + // A list of the executions for the specified association ID. + AssociationExecutions []*AssociationExecution `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAssociationExecutionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAssociationExecutionsOutput) GoString() string { + return s.String() +} + +// SetAssociationExecutions sets the AssociationExecutions field's value. +func (s *DescribeAssociationExecutionsOutput) SetAssociationExecutions(v []*AssociationExecution) *DescribeAssociationExecutionsOutput { + s.AssociationExecutions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionsOutput) SetNextToken(v string) *DescribeAssociationExecutionsOutput { + s.NextToken = &v + return s +} + type DescribeAssociationInput struct { _ struct{} `type:"structure"` @@ -15218,6 +16513,96 @@ func (s *DescribeInstancePatchesOutput) SetPatches(v []*PatchComplianceData) *De return s } +type DescribeInventoryDeletionsInput struct { + _ struct{} `type:"structure"` + + // Specify the delete inventory ID for which you want information. This ID was + // returned by the DeleteInventory action. + DeletionId *string `type:"string"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeInventoryDeletionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInventoryDeletionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInventoryDeletionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInventoryDeletionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeletionId sets the DeletionId field's value. +func (s *DescribeInventoryDeletionsInput) SetDeletionId(v string) *DescribeInventoryDeletionsInput { + s.DeletionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeInventoryDeletionsInput) SetMaxResults(v int64) *DescribeInventoryDeletionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInventoryDeletionsInput) SetNextToken(v string) *DescribeInventoryDeletionsInput { + s.NextToken = &v + return s +} + +type DescribeInventoryDeletionsOutput struct { + _ struct{} `type:"structure"` + + // A list of status items for deleted inventory. + InventoryDeletions []*InventoryDeletionStatusItem `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeInventoryDeletionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInventoryDeletionsOutput) GoString() string { + return s.String() +} + +// SetInventoryDeletions sets the InventoryDeletions field's value. +func (s *DescribeInventoryDeletionsOutput) SetInventoryDeletions(v []*InventoryDeletionStatusItem) *DescribeInventoryDeletionsOutput { + s.InventoryDeletions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInventoryDeletionsOutput) SetNextToken(v string) *DescribeInventoryDeletionsOutput { + s.NextToken = &v + return s +} + type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { _ struct{} `type:"structure"` @@ -16408,7 +17793,7 @@ type DocumentDescription struct { _ struct{} `type:"structure"` // The date when the document was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The default version. DefaultVersion *string `type:"string"` @@ -16871,7 +18256,7 @@ type DocumentVersionInfo struct { _ struct{} `type:"structure"` // The date the document was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` @@ -17193,6 +18578,9 @@ func (s *GetCommandInvocationInput) SetPluginName(v string) *GetCommandInvocatio type GetCommandInvocationOutput struct { _ struct{} `type:"structure"` + // CloudWatch Logs information where Systems Manager sent the command output. + CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` + // The parent command ID of the invocation plugin. CommandId *string `min:"36" type:"string"` @@ -17202,6 +18590,9 @@ type GetCommandInvocationOutput struct { // The name of the document that was executed. For example, AWS-RunShellScript. DocumentName *string `type:"string"` + // The SSM document version used in the request. + DocumentVersion *string `type:"string"` + // Duration since ExecutionStartDateTime. ExecutionElapsedTime *string `type:"string"` @@ -17254,16 +18645,16 @@ type GetCommandInvocationOutput struct { // If an Amazon S3 bucket was not specified, then this string is empty. StandardOutputUrl *string `type:"string"` - // The status of the parent command for this invocation. This status can be - // different than StatusDetails. + // The status of this invocation plugin. This status can be different than StatusDetails. Status *string `type:"string" enum:"CommandInvocationStatus"` // A detailed status of the command execution for an invocation. StatusDetails // includes more information than Status because it includes states resulting // from error and concurrency control parameters. StatusDetails can show different - // results than Status. For more information about these statuses, see Run Command - // Status (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-about-status.html). - // StatusDetails can be one of the following values: + // results than Status. For more information about these statuses, see Understanding + // Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // in the AWS Systems Manager User Guide. StatusDetails can be one of the following + // values: // // * Pending: The command has not been sent to the instance. // @@ -17318,6 +18709,12 @@ func (s GetCommandInvocationOutput) GoString() string { return s.String() } +// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. +func (s *GetCommandInvocationOutput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *GetCommandInvocationOutput { + s.CloudWatchOutputConfig = v + return s +} + // SetCommandId sets the CommandId field's value. func (s *GetCommandInvocationOutput) SetCommandId(v string) *GetCommandInvocationOutput { s.CommandId = &v @@ -17336,6 +18733,12 @@ func (s *GetCommandInvocationOutput) SetDocumentName(v string) *GetCommandInvoca return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *GetCommandInvocationOutput) SetDocumentVersion(v string) *GetCommandInvocationOutput { + s.DocumentVersion = &v + return s +} + // SetExecutionElapsedTime sets the ExecutionElapsedTime field's value. func (s *GetCommandInvocationOutput) SetExecutionElapsedTime(v string) *GetCommandInvocationOutput { s.ExecutionElapsedTime = &v @@ -17991,10 +19394,10 @@ type GetMaintenanceWindowExecutionOutput struct { _ struct{} `type:"structure"` // The time the Maintenance Window finished executing. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the Maintenance Window started executing. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the Maintenance Window execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -18194,7 +19597,7 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { _ struct{} `type:"structure"` // The time that the task finished executing on the target. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The execution ID. ExecutionId *string `type:"string"` @@ -18210,7 +19613,7 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { Parameters *string `type:"string"` // The time that the task started executing on the target. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The task status for an invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -18319,7 +19722,7 @@ type GetMaintenanceWindowExecutionTaskOutput struct { _ struct{} `type:"structure"` // The time the task execution completed. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The defined maximum number of task executions that could be run in parallel. MaxConcurrency *string `min:"1" type:"string"` @@ -18335,7 +19738,7 @@ type GetMaintenanceWindowExecutionTaskOutput struct { ServiceRole *string `type:"string"` // The time the task execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -18350,8 +19753,14 @@ type GetMaintenanceWindowExecutionTaskOutput struct { // was retrieved. TaskExecutionId *string `min:"36" type:"string"` - // The parameters passed to the task when it was executed. The map has the following - // format: + // The parameters passed to the task when it was executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: // // Key: string, between 1 and 255 characters // @@ -18502,7 +19911,7 @@ type GetMaintenanceWindowOutput struct { AllowUnassociatedTargets *bool `type:"boolean"` // The date the Maintenance Window was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The number of hours before the end of the Maintenance Window that Systems // Manager stops scheduling new tasks for execution. @@ -18518,7 +19927,7 @@ type GetMaintenanceWindowOutput struct { Enabled *bool `type:"boolean"` // The date the Maintenance Window was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the Maintenance Window. Name *string `min:"3" type:"string"` @@ -18665,6 +20074,11 @@ type GetMaintenanceWindowTaskOutput struct { Description *string `min:"1" type:"string"` // The location in Amazon S3 where the task results are logged. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets allowed to run this task in parallel. @@ -18696,6 +20110,11 @@ type GetMaintenanceWindowTaskOutput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters to pass to the task when it executes. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task to execute. @@ -18996,16 +20415,24 @@ type GetParametersByPathInput struct { NextToken *string `type:"string"` // Filters to limit the request results. + // + // You can't filter using the parameter name. ParameterFilters []*ParameterStringFilter `type:"list"` // The hierarchy for the parameter. Hierarchies start with a forward slash (/) - // and end with the parameter name. A hierarchy can have a maximum of 15 levels. - // Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 + // and end with the parameter name. A parameter name hierarchy can have a maximum + // of 15 levels. Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 // // Path is a required field Path *string `min:"1" type:"string" required:"true"` // Retrieve all parameters within a hierarchy. + // + // If a user has access to a path, then the user can access all levels of that + // path. For example, if a user has permission to access path /a, then the user + // can also access /a/b. Even if a user has explicitly been denied access in + // IAM for parameter /a, they can still call the GetParametersByPath API action + // recursively and view /a/b. Recursive *bool `type:"boolean"` // Retrieve all parameters in a hierarchy with their value decrypted. @@ -19360,7 +20787,7 @@ type GetPatchBaselineOutput struct { BaselineId *string `min:"20" type:"string"` // The date the patch baseline was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A description of the patch baseline. Description *string `min:"1" type:"string"` @@ -19369,7 +20796,7 @@ type GetPatchBaselineOutput struct { GlobalFilters *PatchFilterGroup `type:"structure"` // The date the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` @@ -19652,7 +21079,7 @@ type InstanceAssociationStatusInfo struct { ErrorCode *string `type:"string"` // The date the instance association executed. - ExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionDate *time.Time `type:"timestamp"` // Summary information about association execution. ExecutionSummary *string `min:"1" type:"string"` @@ -19760,7 +21187,7 @@ type InstanceInformation struct { // The activation ID created by Systems Manager when the server or VM was registered. ActivationId *string `type:"string"` - // The version of the SSM Agent running on your Linux instance. + // The version of SSM Agent running on your Linux instance. AgentVersion *string `type:"string"` // Information about the association. @@ -19775,32 +21202,33 @@ type InstanceInformation struct { // The IP address of the managed instance. IPAddress *string `min:"1" type:"string"` - // The Amazon Identity and Access Management (IAM) role assigned to EC2 instances - // or managed instances. + // The Amazon Identity and Access Management (IAM) role assigned to the on-premises + // Systems Manager managed instances. This call does not return the IAM role + // for Amazon EC2 instances. IamRole *string `type:"string"` // The instance ID. InstanceId *string `type:"string"` - // Indicates whether latest version of the SSM Agent is running on your instance. + // Indicates whether latest version of SSM Agent is running on your instance. // Some older versions of Windows Server use the EC2Config service to process // SSM requests. For this reason, this field does not indicate whether or not // the latest version is installed on Windows managed instances. IsLatestVersion *bool `type:"boolean"` // The date the association was last executed. - LastAssociationExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAssociationExecutionDate *time.Time `type:"timestamp"` // The date and time when agent last pinged Systems Manager service. - LastPingDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastPingDateTime *time.Time `type:"timestamp"` // The last date the association was successfully run. - LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp"` // The name of the managed instance. Name *string `type:"string"` - // Connection status of the SSM Agent. + // Connection status of SSM Agent. PingStatus *string `type:"string" enum:"PingStatus"` // The name of the operating system platform running on your instance. @@ -19813,7 +21241,7 @@ type InstanceInformation struct { PlatformVersion *string `type:"string"` // The date the server or VM was registered with AWS as a managed instance. - RegistrationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + RegistrationDate *time.Time `type:"timestamp"` // The type of instance. Instances are either EC2 instances or managed instances. ResourceType *string `type:"string" enum:"ResourceType"` @@ -20107,14 +21535,14 @@ type InstancePatchState struct { // The time the most recent patching operation completed on the instance. // // OperationEndTime is a required field - OperationEndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OperationEndTime *time.Time `type:"timestamp" required:"true"` // The time the most recent patching operation was started on the instance. // // OperationStartTime is a required field - OperationStartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OperationStartTime *time.Time `type:"timestamp" required:"true"` - // Placeholder information, this field will always be empty in the current release + // Placeholder information. This field will always be empty in the current release // of the service. OwnerInformation *string `min:"1" type:"string"` @@ -20351,6 +21779,172 @@ func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { return s } +// Status information returned by the DeleteInventory action. +type InventoryDeletionStatusItem struct { + _ struct{} `type:"structure"` + + // The deletion ID returned by the DeleteInventory action. + DeletionId *string `type:"string"` + + // The UTC timestamp when the delete operation started. + DeletionStartTime *time.Time `type:"timestamp"` + + // Information about the delete operation. For more information about this summary, + // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) + // in the AWS Systems Manager User Guide. + DeletionSummary *InventoryDeletionSummary `type:"structure"` + + // The status of the operation. Possible values are InProgress and Complete. + LastStatus *string `type:"string" enum:"InventoryDeletionStatus"` + + // Information about the status. + LastStatusMessage *string `type:"string"` + + // The UTC timestamp of when the last status report. + LastStatusUpdateTime *time.Time `type:"timestamp"` + + // The name of the inventory data type. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InventoryDeletionStatusItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionStatusItem) GoString() string { + return s.String() +} + +// SetDeletionId sets the DeletionId field's value. +func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem { + s.DeletionId = &v + return s +} + +// SetDeletionStartTime sets the DeletionStartTime field's value. +func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem { + s.DeletionStartTime = &v + return s +} + +// SetDeletionSummary sets the DeletionSummary field's value. +func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem { + s.DeletionSummary = v + return s +} + +// SetLastStatus sets the LastStatus field's value. +func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem { + s.LastStatus = &v + return s +} + +// SetLastStatusMessage sets the LastStatusMessage field's value. +func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem { + s.LastStatusMessage = &v + return s +} + +// SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value. +func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem { + s.LastStatusUpdateTime = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem { + s.TypeName = &v + return s +} + +// Information about the delete operation. +type InventoryDeletionSummary struct { + _ struct{} `type:"structure"` + + // Remaining number of items to delete. + RemainingCount *int64 `type:"integer"` + + // A list of counts and versions for deleted items. + SummaryItems []*InventoryDeletionSummaryItem `type:"list"` + + // The total number of items to delete. This count does not change during the + // delete operation. + TotalCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s InventoryDeletionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionSummary) GoString() string { + return s.String() +} + +// SetRemainingCount sets the RemainingCount field's value. +func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary { + s.RemainingCount = &v + return s +} + +// SetSummaryItems sets the SummaryItems field's value. +func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary { + s.SummaryItems = v + return s +} + +// SetTotalCount sets the TotalCount field's value. +func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary { + s.TotalCount = &v + return s +} + +// Either a count, remaining count, or a version number in a delete inventory +// summary. +type InventoryDeletionSummaryItem struct { + _ struct{} `type:"structure"` + + // A count of the number of deleted items. + Count *int64 `type:"integer"` + + // The remaining number of items to delete. + RemainingCount *int64 `type:"integer"` + + // The inventory type version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s InventoryDeletionSummaryItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionSummaryItem) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem { + s.Count = &v + return s +} + +// SetRemainingCount sets the RemainingCount field's value. +func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem { + s.RemainingCount = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem { + s.Version = &v + return s +} + // One or more filters. Use a filter to return a more specific list of results. type InventoryFilter struct { _ struct{} `type:"structure"` @@ -22061,6 +23655,11 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut } // Information about an Amazon S3 bucket to write instance-level logs to. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. type LoggingInfo struct { _ struct{} `type:"structure"` @@ -22136,6 +23735,22 @@ type MaintenanceWindowAutomationParameters struct { DocumentVersion *string `type:"string"` // The parameters for the AUTOMATION task. + // + // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow + // and UpdateMaintenanceWindowTask. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // For AUTOMATION task types, Systems Manager ignores any values specified for + // these parameters. Parameters map[string][]*string `min:"1" type:"map"` } @@ -22179,10 +23794,10 @@ type MaintenanceWindowExecution struct { _ struct{} `type:"structure"` // The time the execution finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -22249,10 +23864,10 @@ type MaintenanceWindowExecutionTaskIdentity struct { _ struct{} `type:"structure"` // The time the task execution finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the task execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -22338,7 +23953,7 @@ type MaintenanceWindowExecutionTaskInvocationIdentity struct { _ struct{} `type:"structure"` // The time the invocation finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The ID of the action performed in the service that actually handled the task // invocation. If the task type is RUN_COMMAND, this value is the command ID. @@ -22356,7 +23971,7 @@ type MaintenanceWindowExecutionTaskInvocationIdentity struct { Parameters *string `type:"string"` // The time the invocation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -22578,6 +24193,22 @@ func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIden } // The parameters for a LAMBDA task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Lambda tasks, Systems Manager ignores any values specified for TaskParameters +// and LoggingInfo. type MaintenanceWindowLambdaParameters struct { _ struct{} `type:"structure"` @@ -22643,6 +24274,22 @@ func (s *MaintenanceWindowLambdaParameters) SetQualifier(v string) *MaintenanceW } // The parameters for a RUN_COMMAND task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Run Command tasks, Systems Manager uses specified values for TaskParameters +// and LoggingInfo only if no values are specified for TaskInvocationParameters. type MaintenanceWindowRunCommandParameters struct { _ struct{} `type:"structure"` @@ -22757,7 +24404,23 @@ func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *Main return s } -// The parameters for the STEP_FUNCTION execution. +// The parameters for a STEP_FUNCTION task. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Step Functions tasks, Systems Manager ignores any values specified for +// TaskParameters and LoggingInfo. type MaintenanceWindowStepFunctionsParameters struct { _ struct{} `type:"structure"` @@ -22891,6 +24554,11 @@ type MaintenanceWindowTask struct { Description *string `min:"1" type:"string"` // Information about an Amazon S3 bucket to write task-level logs to. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for in parallel. @@ -22921,6 +24589,11 @@ type MaintenanceWindowTask struct { TaskArn *string `min:"1" type:"string"` // The parameters that should be passed to the task when it is executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task. The type can be one of the following: RUN_COMMAND, AUTOMATION, @@ -23026,7 +24699,7 @@ func (s *MaintenanceWindowTask) SetWindowTaskId(v string) *MaintenanceWindowTask type MaintenanceWindowTaskInvocationParameters struct { _ struct{} `type:"structure"` - // The parameters for a AUTOMATION task type. + // The parameters for an AUTOMATION task type. Automation *MaintenanceWindowAutomationParameters `type:"structure"` // The parameters for a LAMBDA task type. @@ -23260,8 +24933,8 @@ type NotificationConfig struct { // The different events for which you can receive notifications. These events // include the following: All (events), InProgress, Success, TimedOut, Cancelled, - // Failed. To learn more about these events, see Setting Up Events and Notifications - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // Failed. To learn more about these events, see Configuring Amazon SNS Notifications + // for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the AWS Systems Manager User Guide. NotificationEvents []*string `type:"list"` @@ -23299,6 +24972,41 @@ func (s *NotificationConfig) SetNotificationType(v string) *NotificationConfig { return s } +// Information about the source where the association execution details are +// stored. +type OutputSource struct { + _ struct{} `type:"structure"` + + // The ID of the output source, for example the URL of an Amazon S3 bucket. + OutputSourceId *string `min:"36" type:"string"` + + // The type of source where the association execution details are stored, for + // example, Amazon S3. + OutputSourceType *string `type:"string"` +} + +// String returns the string representation +func (s OutputSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputSource) GoString() string { + return s.String() +} + +// SetOutputSourceId sets the OutputSourceId field's value. +func (s *OutputSource) SetOutputSourceId(v string) *OutputSource { + s.OutputSourceId = &v + return s +} + +// SetOutputSourceType sets the OutputSourceType field's value. +func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { + s.OutputSourceType = &v + return s +} + // An Amazon EC2 Systems Manager parameter in Parameter Store. type Parameter struct { _ struct{} `type:"structure"` @@ -23367,7 +25075,7 @@ type ParameterHistory struct { KeyId *string `min:"1" type:"string"` // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. LastModifiedUser *string `type:"string"` @@ -23466,7 +25174,7 @@ type ParameterMetadata struct { KeyId *string `min:"1" type:"string"` // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. LastModifiedUser *string `type:"string"` @@ -23541,6 +25249,8 @@ func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata { } // One or more filters. Use a filter to return a more specific list of results. +// +// The Name field can't be used with the GetParametersByPath API action. type ParameterStringFilter struct { _ struct{} `type:"structure"` @@ -23699,7 +25409,7 @@ type Patch struct { ProductFamily *string `type:"string"` // The date the patch was released. - ReleaseDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReleaseDate *time.Time `type:"timestamp"` // The title of the patch. Title *string `type:"string"` @@ -23873,7 +25583,7 @@ type PatchComplianceData struct { // operating systems provide this level of information. // // InstalledTime is a required field - InstalledTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + InstalledTime *time.Time `type:"timestamp" required:"true"` // The operating system-specific ID of the patch. // @@ -23986,6 +25696,10 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * WindowsServer2016 // +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// // Supported key:CLASSIFICATION // // Supported values: @@ -24037,6 +25751,10 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * Ubuntu16.04 // +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// // Supported key:PRIORITY // // Supported values: @@ -24090,6 +25808,54 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * AmazonLinux2017.09 // +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// +// Supported key:CLASSIFICATION +// +// Supported values: +// +// * Security +// +// * Bugfix +// +// * Enhancement +// +// * Recommended +// +// * Newpackage +// +// Supported key:SEVERITY +// +// Supported values: +// +// * Critical +// +// * Important +// +// * Medium +// +// * Low +// +// Amazon Linux 2 Operating Systems +// +// The supported keys for Amazon Linux 2 operating systems are PRODUCT, CLASSIFICATION, +// and SEVERITY. See the following lists for valid values for each of these +// keys. +// +// Supported key:PRODUCT +// +// Supported values: +// +// * AmazonLinux2 +// +// * AmazonLinux2.0 +// +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// // Supported key:CLASSIFICATION // // Supported values: @@ -24146,6 +25912,10 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * RedhatEnterpriseLinux7.4 // +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// // Supported key:CLASSIFICATION // // Supported values: @@ -24172,9 +25942,9 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * Low // -// SUSE Linux Enterprise Server (SUSE) Operating Systems +// SUSE Linux Enterprise Server (SLES) Operating Systems // -// The supported keys for SUSE operating systems are PRODUCT, CLASSIFICATION, +// The supported keys for SLES operating systems are PRODUCT, CLASSIFICATION, // and SEVERITY. See the following lists for valid values for each of these // keys. // @@ -24202,6 +25972,10 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * Suse12.9 // +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// // Supported key:CLASSIFICATION // // Supported values: @@ -24229,6 +26003,66 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // * Moderate // // * Low +// +// CentOS Operating Systems +// +// The supported keys for CentOS operating systems are PRODUCT, CLASSIFICATION, +// and SEVERITY. See the following lists for valid values for each of these +// keys. +// +// Supported key:PRODUCT +// +// Supported values: +// +// * CentOS6.5 +// +// * CentOS6.6 +// +// * CentOS6.7 +// +// * CentOS6.8 +// +// * CentOS6.9 +// +// * CentOS7.0 +// +// * CentOS7.1 +// +// * CentOS7.2 +// +// * CentOS7.3 +// +// * CentOS7.4 +// +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// +// Supported key:CLASSIFICATION +// +// Supported values: +// +// * Security +// +// * Bugfix +// +// * Enhancement +// +// * Recommended +// +// * Newpackage +// +// Supported key:SEVERITY +// +// Supported values: +// +// * Critical +// +// * Important +// +// * Medium +// +// * Low type PatchFilter struct { _ struct{} `type:"structure"` @@ -24423,7 +26257,8 @@ type PatchRule struct { _ struct{} `type:"structure"` // The number of days after the release date of each patch matched by the rule - // the patch is marked as approved in the patch baseline. + // that the patch is marked as approved in the patch baseline. For example, + // a value of 7 means that patches are approved seven days after they are released. // // ApproveAfterDays is a required field ApproveAfterDays *int64 `type:"integer" required:"true"` @@ -24561,7 +26396,7 @@ type PatchSource struct { // // keepcache=0 // - // debualevel=2 + // debuglevel=2 // // Configuration is a required field Configuration *string `min:"1" type:"string" required:"true"` @@ -24637,7 +26472,7 @@ type PatchStatus struct { _ struct{} `type:"structure"` // The date the patch was approved (or will be approved if the status is PENDING_APPROVAL). - ApprovalDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ApprovalDate *time.Time `type:"timestamp"` // The compliance severity level for a patch. ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` @@ -24892,6 +26727,9 @@ func (s *PutInventoryInput) SetItems(v []*InventoryItem) *PutInventoryInput { type PutInventoryOutput struct { _ struct{} `type:"structure"` + + // Information about the request. + Message *string `type:"string"` } // String returns the string representation @@ -24904,6 +26742,12 @@ func (s PutInventoryOutput) GoString() string { return s.String() } +// SetMessage sets the Message field's value. +func (s *PutInventoryOutput) SetMessage(v string) *PutInventoryOutput { + s.Message = &v + return s +} + type PutParameterInput struct { _ struct{} `type:"structure"` @@ -24912,20 +26756,49 @@ type PutParameterInput struct { // AllowedPattern=^\d+$ AllowedPattern *string `type:"string"` - // Information about the parameter that you want to add to the system. + // Information about the parameter that you want to add to the system. Optional + // but recommended. + // + // Do not enter personally identifiable information in this field. Description *string `type:"string"` - // The KMS Key ID that you want to use to encrypt a parameter when you choose - // the SecureString data type. If you don't specify a key ID, the system uses - // the default key associated with your AWS account. + // The KMS Key ID that you want to use to encrypt a parameter. Either the default + // AWS Key Management Service (AWS KMS) key automatically assigned to your AWS + // account or a custom key. Required for parameters that use the SecureString + // data type. + // + // If you don't specify a key ID, the system uses the default key associated + // with your AWS account. + // + // * To use your default AWS KMS key, choose the SecureString data type, + // and do not specify the Key ID when you create the parameter. The system + // automatically populates Key ID with your default KMS key. + // + // * To use a custom KMS key, choose the SecureString data type with the + // Key ID parameter. KeyId *string `min:"1" type:"string"` // The fully qualified name of the parameter that you want to add to the system. // The fully qualified name includes the complete hierarchy of the parameter // path and name. For example: /Dev/DBServer/MySQL/db-string13 // - // For information about parameter name requirements and restrictions, see About - // Creating Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-paramstore-su-create-about) + // Naming Constraints: + // + // * Parameter names are case sensitive. + // + // * A parameter name must be unique within an AWS Region + // + // * A parameter name can't be prefixed with "aws" or "ssm" (case-insensitive). + // + // * Parameter names can include only the following symbols and letters: + // a-zA-Z0-9_.-/ + // + // * A parameter name can't include spaces. + // + // * Parameter hierarchies are limited to a maximum depth of fifteen levels. + // + // For additional information about valid values for parameter names, see Requirements + // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. // // The maximum length constraint listed below includes capacity for additional @@ -24940,6 +26813,13 @@ type PutParameterInput struct { // The type of parameter that you want to add to the system. // + // Items in a StringList must be separated by a comma (,). You can't use other + // punctuation or special character to escape items in the list. If you have + // a parameter value that requires a comma, then use the String data type. + // + // SecureString is not currently supported for AWS CloudFormation templates + // or in the China Regions. + // // Type is a required field Type *string `type:"string" required:"true" enum:"ParameterType"` @@ -25232,8 +27112,17 @@ type RegisterTargetWithMaintenanceWindowInput struct { // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. + // The targets (either instances or tags). + // + // Specify instances using the following format: + // + // Key=InstanceIds,Values=, + // + // Specify tags using either of the following formats: + // + // Key=tag:,Values=, + // + // Key=tag-key,Values=, // // Targets is a required field Targets []*Target `type:"list" required:"true"` @@ -25374,6 +27263,11 @@ type RegisterTaskWithMaintenanceWindowInput struct { // A structure containing information about an Amazon S3 bucket to write instance-level // logs to. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for in parallel. @@ -25399,8 +27293,15 @@ type RegisterTaskWithMaintenanceWindowInput struct { // ServiceRoleArn is a required field ServiceRoleArn *string `type:"string" required:"true"` - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. + // The targets (either instances or Maintenance Window targets). + // + // Specify instances using the following format: + // + // Key=InstanceIds,Values=, + // + // Specify Maintenance Window targets using the following format: + // + // Key=,Values=, // // Targets is a required field Targets []*Target `type:"list" required:"true"` @@ -25415,6 +27316,11 @@ type RegisterTaskWithMaintenanceWindowInput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters that should be passed to the task when it is executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task being registered. @@ -25422,7 +27328,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { // TaskType is a required field TaskType *string `type:"string" required:"true" enum:"MaintenanceWindowTaskType"` - // The id of the Maintenance Window the task should be added to. + // The ID of the Maintenance Window the task should be added to. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` @@ -25620,13 +27526,30 @@ func (s *RegisterTaskWithMaintenanceWindowOutput) SetWindowTaskId(v string) *Reg type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` - // The resource ID for which you want to remove tags. + // The resource ID for which you want to remove tags. Use the ID of the resource. + // Here are some examples: + // + // ManagedInstance: mi-012345abcde + // + // MaintenanceWindow: mw-012345abcde + // + // PatchBaseline: pb-012345abcde + // + // For the Document and Parameter values, use the name of the resource. + // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // The type of resource of which you want to remove a tag. // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` @@ -25828,19 +27751,19 @@ type ResourceDataSyncItem struct { LastStatus *string `type:"string" enum:"LastResourceDataSyncStatus"` // The last time the sync operations returned a status of SUCCESSFUL (UTC). - LastSuccessfulSyncTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulSyncTime *time.Time `type:"timestamp"` // The status message details reported by the last sync. LastSyncStatusMessage *string `type:"string"` // The last time the configuration attempted to sync (UTC). - LastSyncTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSyncTime *time.Time `type:"timestamp"` // Configuration information for the target Amazon S3 bucket. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // The date and time the configuration was created (UTC). - SyncCreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + SyncCreatedTime *time.Time `type:"timestamp"` // The name of the Resource Data Sync. SyncName *string `min:"1" type:"string"` @@ -26212,6 +28135,9 @@ func (s SendAutomationSignalOutput) GoString() string { type SendCommandInput struct { _ struct{} `type:"structure"` + // Enables Systems Manager to send Run Command output to Amazon CloudWatch Logs. + CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` + // User-specified information about the command, such as a brief description // of what the command should do. Comment *string `type:"string"` @@ -26232,24 +28158,40 @@ type SendCommandInput struct { // DocumentName is a required field DocumentName *string `type:"string" required:"true"` + // The SSM document version to use in the request. You can specify $DEFAULT, + // $LATEST, or a specific version number. If you execute commands by using the + // AWS CLI, then you must escape the first two options by using a backslash. + // If you specify a version number, then you don't need to use the backslash. + // For example: + // + // --document-version "\$DEFAULT" + // + // --document-version "\$LATEST" + // + // --document-version "3" + DocumentVersion *string `type:"string"` + // The instance IDs where the command should execute. You can specify a maximum // of 50 IDs. If you prefer not to list individual instance IDs, you can instead // send commands to a fleet of instances using the Targets parameter, which // accepts EC2 tags. For more information about how to use Targets, see Sending - // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html). + // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) + // in the AWS Systems Manager User Guide. InstanceIds []*string `type:"list"` // (Optional) The maximum number of instances that are allowed to execute the // command at the same time. You can specify a number such as 10 or a percentage // such as 10%. The default value is 50. For more information about how to use - // MaxConcurrency, see Using Concurrency Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-velocity.html). + // MaxConcurrency, see Using Concurrency Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) + // in the AWS Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed without the command failing. When the // command fails one more time beyond the value of MaxErrors, the systems stops // sending the command to additional targets. You can specify a number like // 10 or a percentage like 10%. The default value is 0. For more information - // about how to use MaxErrors, see Using Error Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-maxerrors.html). + // about how to use MaxErrors, see Using Error Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors) + // in the AWS Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` // Configurations for sending notifications. @@ -26276,11 +28218,12 @@ type SendCommandInput struct { // (Optional) An array of search criteria that targets instances using a Key,Value // combination that you specify. Targets is required if you don't provide one // or more instance IDs in the call. For more information about how to use Targets, - // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html). + // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) + // in the AWS Systems Manager User Guide. Targets []*Target `type:"list"` // If this time is reached and the command has not already started executing, - // it will not execute. + // it will not run. TimeoutSeconds *int64 `min:"30" type:"integer"` } @@ -26315,6 +28258,11 @@ func (s *SendCommandInput) Validate() error { if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 { invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30)) } + if s.CloudWatchOutputConfig != nil { + if err := s.CloudWatchOutputConfig.Validate(); err != nil { + invalidParams.AddNested("CloudWatchOutputConfig", err.(request.ErrInvalidParams)) + } + } if s.Targets != nil { for i, v := range s.Targets { if v == nil { @@ -26332,6 +28280,12 @@ func (s *SendCommandInput) Validate() error { return nil } +// SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. +func (s *SendCommandInput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *SendCommandInput { + s.CloudWatchOutputConfig = v + return s +} + // SetComment sets the Comment field's value. func (s *SendCommandInput) SetComment(v string) *SendCommandInput { s.Comment = &v @@ -26356,6 +28310,12 @@ func (s *SendCommandInput) SetDocumentName(v string) *SendCommandInput { return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *SendCommandInput) SetDocumentVersion(v string) *SendCommandInput { + s.DocumentVersion = &v + return s +} + // SetInstanceIds sets the InstanceIds field's value. func (s *SendCommandInput) SetInstanceIds(v []*string) *SendCommandInput { s.InstanceIds = v @@ -26528,6 +28488,61 @@ func (s *SeveritySummary) SetUnspecifiedCount(v int64) *SeveritySummary { return s } +type StartAssociationsOnceInput struct { + _ struct{} `type:"structure"` + + // The association IDs that you want to execute immediately and only one time. + // + // AssociationIds is a required field + AssociationIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s StartAssociationsOnceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartAssociationsOnceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartAssociationsOnceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartAssociationsOnceInput"} + if s.AssociationIds == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationIds")) + } + if s.AssociationIds != nil && len(s.AssociationIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssociationIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *StartAssociationsOnceInput) SetAssociationIds(v []*string) *StartAssociationsOnceInput { + s.AssociationIds = v + return s +} + +type StartAssociationsOnceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartAssociationsOnceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartAssociationsOnceOutput) GoString() string { + return s.String() +} + type StartAutomationExecutionInput struct { _ struct{} `type:"structure"` @@ -26715,11 +28730,11 @@ type StepExecution struct { // If a step has finished execution, this contains the time the execution ended. // If the step has not yet concluded, this field is not populated. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // If a step has begun execution, this contains the time the step started. If // the step is in Pending status, this field is not populated. - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // Information about the Automation failure. FailureDetails *FailureDetails `type:"structure"` @@ -26730,10 +28745,23 @@ type StepExecution struct { // Fully-resolved values passed into the step before execution. Inputs map[string]*string `type:"map"` + // Enable this option to designate a step as critical for the successful completion + // of the Automation. If a step with this designation fails, then Automation + // reports the final status of the Automation as Failed. + IsCritical *bool `type:"boolean"` + + // Enable this option to stop an Automation execution at the end of a specific + // step. The Automation execution stops if the step execution failed or succeeded. + IsEnd *bool `type:"boolean"` + // The maximum number of tries to run the action of the step. The default value // is 1. MaxAttempts *int64 `type:"integer"` + // Specifies which step in an Automation to process next after successfully + // completing a step. + NextStep *string `type:"string"` + // The action to take if the step fails. The default value is Abort. OnFailure *string `type:"string"` @@ -26761,6 +28789,16 @@ type StepExecution struct { // The timeout seconds of the step. TimeoutSeconds *int64 `type:"long"` + + // ValidNextSteps offer different strategies for managing an Automation workflow + // when a step finishes. Automation dynamically processes ValidNextSteps when + // a step is completed. For example, you can specify Abort to stop the Automation + // when a step fails or Continue to ignore the failure of the current step and + // allow Automation to continue processing the next step. You can also specify + // step:step_name to jump to a designated step after a step succeeds. The result + // of the current step dynamically determines the ValidNextSteps. If a step + // finishes and no ValidNextStep is designated, then the Automation stops. + ValidNextSteps []*string `type:"list"` } // String returns the string representation @@ -26809,12 +28847,30 @@ func (s *StepExecution) SetInputs(v map[string]*string) *StepExecution { return s } +// SetIsCritical sets the IsCritical field's value. +func (s *StepExecution) SetIsCritical(v bool) *StepExecution { + s.IsCritical = &v + return s +} + +// SetIsEnd sets the IsEnd field's value. +func (s *StepExecution) SetIsEnd(v bool) *StepExecution { + s.IsEnd = &v + return s +} + // SetMaxAttempts sets the MaxAttempts field's value. func (s *StepExecution) SetMaxAttempts(v int64) *StepExecution { s.MaxAttempts = &v return s } +// SetNextStep sets the NextStep field's value. +func (s *StepExecution) SetNextStep(v string) *StepExecution { + s.NextStep = &v + return s +} + // SetOnFailure sets the OnFailure field's value. func (s *StepExecution) SetOnFailure(v string) *StepExecution { s.OnFailure = &v @@ -26869,6 +28925,12 @@ func (s *StepExecution) SetTimeoutSeconds(v int64) *StepExecution { return s } +// SetValidNextSteps sets the ValidNextSteps field's value. +func (s *StepExecution) SetValidNextSteps(v []*string) *StepExecution { + s.ValidNextSteps = v + return s +} + // A filter to limit the amount of step execution information returned by the // call. type StepExecutionFilter struct { @@ -27064,14 +29126,16 @@ type Target struct { // User-defined criteria for sending commands that target instances that meet // the criteria. Key can be tag: or InstanceIds. For more information // about how to send commands that target instances using Key,Value parameters, - // see Executing a Command Using Systems Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html). + // see Targeting Multiple Instances (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) + // in the AWS Systems Manager User Guide. Key *string `min:"1" type:"string"` // User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, // you could specify value:WebServer to execute a command on instances that // include Amazon EC2 tags of ServerRole,WebServer. For more information about // how to send commands that target instances using Key,Value parameters, see - // Executing a Command Using Systems Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html). + // Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) + // in the AWS Systems Manager User Guide. Values []*string `type:"list"` } @@ -27957,6 +30021,11 @@ type UpdateMaintenanceWindowTaskInput struct { Description *string `min:"1" type:"string"` // The new logging location in Amazon S3 to specify. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The new MaxConcurrency value you want to specify. MaxConcurrency is the number @@ -27995,7 +30064,14 @@ type UpdateMaintenanceWindowTaskInput struct { // fields that match the task type. All other fields should be empty. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - // The parameters to modify. The map has the following format: + // The parameters to modify. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: // // Key: string, between 1 and 255 characters // @@ -28171,6 +30247,11 @@ type UpdateMaintenanceWindowTaskOutput struct { Description *string `min:"1" type:"string"` // The updated logging information in Amazon S3. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The updated MaxConcurrency value. @@ -28198,6 +30279,11 @@ type UpdateMaintenanceWindowTaskOutput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The updated parameter values. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The ID of the Maintenance Window that was updated. @@ -28368,6 +30454,11 @@ type UpdatePatchBaselineInput struct { ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Assigns a new compliance severity level to an existing patch baseline. @@ -28393,6 +30484,11 @@ type UpdatePatchBaselineInput struct { Name *string `min:"3" type:"string"` // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` // If True, then all fields that are required by the CreatePatchBaseline action @@ -28545,7 +30641,7 @@ type UpdatePatchBaselineOutput struct { BaselineId *string `min:"20" type:"string"` // The date when the patch baseline was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A description of the Patch Baseline. Description *string `min:"1" type:"string"` @@ -28554,7 +30650,7 @@ type UpdatePatchBaselineOutput struct { GlobalFilters *PatchFilterGroup `type:"structure"` // The date when the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` @@ -28658,6 +30754,28 @@ func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBas return s } +const ( + // AssociationExecutionFilterKeyExecutionId is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyExecutionId = "ExecutionId" + + // AssociationExecutionFilterKeyStatus is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyStatus = "Status" + + // AssociationExecutionFilterKeyCreatedTime is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyCreatedTime = "CreatedTime" +) + +const ( + // AssociationExecutionTargetsFilterKeyStatus is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyStatus = "Status" + + // AssociationExecutionTargetsFilterKeyResourceId is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyResourceId = "ResourceId" + + // AssociationExecutionTargetsFilterKeyResourceType is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyResourceType = "ResourceType" +) + const ( // AssociationFilterKeyInstanceId is a AssociationFilterKey enum value AssociationFilterKeyInstanceId = "InstanceId" @@ -28681,6 +30799,17 @@ const ( AssociationFilterKeyAssociationName = "AssociationName" ) +const ( + // AssociationFilterOperatorTypeEqual is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeEqual = "EQUAL" + + // AssociationFilterOperatorTypeLessThan is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeLessThan = "LESS_THAN" + + // AssociationFilterOperatorTypeGreaterThan is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeGreaterThan = "GREATER_THAN" +) + const ( // AssociationStatusNamePending is a AssociationStatusName enum value AssociationStatusNamePending = "Pending" @@ -29012,6 +31141,14 @@ const ( InventoryAttributeDataTypeNumber = "number" ) +const ( + // InventoryDeletionStatusInProgress is a InventoryDeletionStatus enum value + InventoryDeletionStatusInProgress = "InProgress" + + // InventoryDeletionStatusComplete is a InventoryDeletionStatus enum value + InventoryDeletionStatusComplete = "Complete" +) + const ( // InventoryQueryOperatorTypeEqual is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeEqual = "Equal" @@ -29029,6 +31166,14 @@ const ( InventoryQueryOperatorTypeGreaterThan = "GreaterThan" ) +const ( + // InventorySchemaDeleteOptionDisableSchema is a InventorySchemaDeleteOption enum value + InventorySchemaDeleteOptionDisableSchema = "DisableSchema" + + // InventorySchemaDeleteOptionDeleteSchema is a InventorySchemaDeleteOption enum value + InventorySchemaDeleteOptionDeleteSchema = "DeleteSchema" +) + const ( // LastResourceDataSyncStatusSuccessful is a LastResourceDataSyncStatus enum value LastResourceDataSyncStatusSuccessful = "Successful" @@ -29120,6 +31265,9 @@ const ( // OperatingSystemAmazonLinux is a OperatingSystem enum value OperatingSystemAmazonLinux = "AMAZON_LINUX" + // OperatingSystemAmazonLinux2 is a OperatingSystem enum value + OperatingSystemAmazonLinux2 = "AMAZON_LINUX_2" + // OperatingSystemUbuntu is a OperatingSystem enum value OperatingSystemUbuntu = "UBUNTU" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go index 4f18dadcb..6964adba0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go @@ -15,7 +15,8 @@ // (http://docs.aws.amazon.com/systems-manager/latest/userguide/). // // To get started, verify prerequisites and configure managed instances. For -// more information, see Systems Manager Prerequisites (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html). +// more information, see Systems Manager Prerequisites (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) +// in the AWS Systems Manager User Guide. // // For information about other API actions you can perform on Amazon EC2 instances, // see the Amazon EC2 API Reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/). diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index 8c932a093..b95f36009 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -30,6 +30,12 @@ const ( // The specified association does not exist. ErrCodeAssociationDoesNotExist = "AssociationDoesNotExist" + // ErrCodeAssociationExecutionDoesNotExist for service response error code + // "AssociationExecutionDoesNotExist". + // + // The specified execution ID does not exist. Verify the ID number and try again. + ErrCodeAssociationExecutionDoesNotExist = "AssociationExecutionDoesNotExist" + // ErrCodeAssociationLimitExceeded for service response error code // "AssociationLimitExceeded". // @@ -150,8 +156,9 @@ const ( // ErrCodeHierarchyLevelLimitExceededException for service response error code // "HierarchyLevelLimitExceededException". // - // A hierarchy can have a maximum of 15 levels. For more information, see Working - // with Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html). + // A hierarchy can have a maximum of 15 levels. For more information, see Requirements + // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) + // in the AWS Systems Manager User Guide. ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException" // ErrCodeHierarchyTypeMismatchException for service response error code @@ -195,6 +202,12 @@ const ( // The request does not meet the regular expression requirement. ErrCodeInvalidAllowedPatternException = "InvalidAllowedPatternException" + // ErrCodeInvalidAssociation for service response error code + // "InvalidAssociation". + // + // The association is not valid or does not exist. + ErrCodeInvalidAssociation = "InvalidAssociation" + // ErrCodeInvalidAssociationVersion for service response error code // "InvalidAssociationVersion". // @@ -227,6 +240,20 @@ const ( // "InvalidCommandId". ErrCodeInvalidCommandId = "InvalidCommandId" + // ErrCodeInvalidDeleteInventoryParametersException for service response error code + // "InvalidDeleteInventoryParametersException". + // + // One or more of the parameters specified for the delete operation is not valid. + // Verify all parameters and try again. + ErrCodeInvalidDeleteInventoryParametersException = "InvalidDeleteInventoryParametersException" + + // ErrCodeInvalidDeletionIdException for service response error code + // "InvalidDeletionIdException". + // + // The ID specified for the delete operation does not exist or is not valide. + // Verify the ID and try again. + ErrCodeInvalidDeletionIdException = "InvalidDeletionIdException" + // ErrCodeInvalidDocument for service response error code // "InvalidDocument". // @@ -291,12 +318,12 @@ const ( // // You do not have permission to access the instance. // - // The SSM Agent is not running. On managed instances and Linux instances, verify + // SSM Agent is not running. On managed instances and Linux instances, verify // that the SSM Agent is running. On EC2 Windows instances, verify that the // EC2Config service is running. // - // The SSM Agent or EC2Config service is not registered to the SSM endpoint. - // Try reinstalling the SSM Agent or EC2Config service. + // SSM Agent or EC2Config service is not registered to the SSM endpoint. Try + // reinstalling SSM Agent or EC2Config service. // // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. @@ -315,6 +342,12 @@ const ( // Verify the keys and values, and try again. ErrCodeInvalidInventoryItemContextException = "InvalidInventoryItemContextException" + // ErrCodeInvalidInventoryRequestException for service response error code + // "InvalidInventoryRequestException". + // + // The request is not valid. + ErrCodeInvalidInventoryRequestException = "InvalidInventoryRequestException" + // ErrCodeInvalidItemContentException for service response error code // "InvalidItemContentException". // @@ -340,6 +373,13 @@ const ( // Resource Name (ARN) was provided for an Amazon SNS topic. ErrCodeInvalidNotificationConfig = "InvalidNotificationConfig" + // ErrCodeInvalidOptionException for service response error code + // "InvalidOptionException". + // + // The delete inventory option specified is not valid. Verify the option and + // try again. + ErrCodeInvalidOptionException = "InvalidOptionException" + // ErrCodeInvalidOutputFolder for service response error code // "InvalidOutputFolder". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go index d414fb7d8..9a6b8f71c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ssm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "ssm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SSM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SSM client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go new file mode 100644 index 000000000..0a366fb59 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -0,0 +1,15667 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +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" +) + +const opActivateGateway = "ActivateGateway" + +// ActivateGatewayRequest generates a "aws/request.Request" representing the +// client's request for the ActivateGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ActivateGateway for more information on using the ActivateGateway +// 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 ActivateGatewayRequest method. +// req, resp := client.ActivateGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway +func (c *StorageGateway) ActivateGatewayRequest(input *ActivateGatewayInput) (req *request.Request, output *ActivateGatewayOutput) { + op := &request.Operation{ + Name: opActivateGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ActivateGatewayInput{} + } + + output = &ActivateGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// ActivateGateway API operation for AWS Storage Gateway. +// +// Activates the gateway you previously deployed on your host. In the activation +// process, you specify information such as the region you want to use for storing +// snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot +// schedule window, an activation key, and a name for your gateway. The activation +// process also associates your gateway with your account; for more information, +// see UpdateGatewayInformation. +// +// You must turn on the gateway VM before you can activate your gateway. +// +// 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 Storage Gateway's +// API operation ActivateGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway +func (c *StorageGateway) ActivateGateway(input *ActivateGatewayInput) (*ActivateGatewayOutput, error) { + req, out := c.ActivateGatewayRequest(input) + return out, req.Send() +} + +// ActivateGatewayWithContext is the same as ActivateGateway with the addition of +// the ability to pass a context and additional request options. +// +// See ActivateGateway 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 *StorageGateway) ActivateGatewayWithContext(ctx aws.Context, input *ActivateGatewayInput, opts ...request.Option) (*ActivateGatewayOutput, error) { + req, out := c.ActivateGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddCache = "AddCache" + +// AddCacheRequest generates a "aws/request.Request" representing the +// client's request for the AddCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AddCache for more information on using the AddCache +// 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 AddCacheRequest method. +// req, resp := client.AddCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache +func (c *StorageGateway) AddCacheRequest(input *AddCacheInput) (req *request.Request, output *AddCacheOutput) { + op := &request.Operation{ + Name: opAddCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddCacheInput{} + } + + output = &AddCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddCache API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as cache for a gateway. This operation +// is only supported in the cached volume, tape and file gateway type (see Storage +// Gateway Concepts (http://docs.aws.amazon.com/storagegateway/latest/userguide/StorageGatewayConcepts.html)). +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add cache, and one or more disk IDs that you want to configure +// as cache. +// +// 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 Storage Gateway's +// API operation AddCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache +func (c *StorageGateway) AddCache(input *AddCacheInput) (*AddCacheOutput, error) { + req, out := c.AddCacheRequest(input) + return out, req.Send() +} + +// AddCacheWithContext is the same as AddCache with the addition of +// the ability to pass a context and additional request options. +// +// See AddCache 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 *StorageGateway) AddCacheWithContext(ctx aws.Context, input *AddCacheInput, opts ...request.Option) (*AddCacheOutput, error) { + req, out := c.AddCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +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 +// successfuly. +// +// 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/storagegateway-2013-06-30/AddTagsToResource +func (c *StorageGateway) 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 AWS Storage Gateway. +// +// Adds one or more tags to the specified resource. You use tags to add metadata +// to resources, which you can use to categorize these resources. For example, +// you can categorize resources by purpose, owner, environment, or team. Each +// tag consists of a key and a value, which you define. You can add tags to +// the following AWS Storage Gateway resources: +// +// * Storage gateways of all types +// +// * Storage Volumes +// +// * Virtual Tapes +// +// You can create a maximum of 10 tags for each resource. Virtual tapes and +// storage volumes that are recovered to a new gateway maintain their tags. +// +// 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 Storage Gateway's +// API operation AddTagsToResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource +func (c *StorageGateway) 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 *StorageGateway) 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 opAddUploadBuffer = "AddUploadBuffer" + +// AddUploadBufferRequest generates a "aws/request.Request" representing the +// client's request for the AddUploadBuffer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AddUploadBuffer for more information on using the AddUploadBuffer +// 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 AddUploadBufferRequest method. +// req, resp := client.AddUploadBufferRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer +func (c *StorageGateway) AddUploadBufferRequest(input *AddUploadBufferInput) (req *request.Request, output *AddUploadBufferOutput) { + op := &request.Operation{ + Name: opAddUploadBuffer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddUploadBufferInput{} + } + + output = &AddUploadBufferOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddUploadBuffer API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as upload buffer for a specified +// gateway. This operation is supported for the stored volume, cached volume +// and tape gateway types. +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add upload buffer, and one or more disk IDs that you want to +// configure as upload buffer. +// +// 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 Storage Gateway's +// API operation AddUploadBuffer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer +func (c *StorageGateway) AddUploadBuffer(input *AddUploadBufferInput) (*AddUploadBufferOutput, error) { + req, out := c.AddUploadBufferRequest(input) + return out, req.Send() +} + +// AddUploadBufferWithContext is the same as AddUploadBuffer with the addition of +// the ability to pass a context and additional request options. +// +// See AddUploadBuffer 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 *StorageGateway) AddUploadBufferWithContext(ctx aws.Context, input *AddUploadBufferInput, opts ...request.Option) (*AddUploadBufferOutput, error) { + req, out := c.AddUploadBufferRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddWorkingStorage = "AddWorkingStorage" + +// AddWorkingStorageRequest generates a "aws/request.Request" representing the +// client's request for the AddWorkingStorage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 AddWorkingStorage for more information on using the AddWorkingStorage +// 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 AddWorkingStorageRequest method. +// req, resp := client.AddWorkingStorageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage +func (c *StorageGateway) AddWorkingStorageRequest(input *AddWorkingStorageInput) (req *request.Request, output *AddWorkingStorageOutput) { + op := &request.Operation{ + Name: opAddWorkingStorage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddWorkingStorageInput{} + } + + output = &AddWorkingStorageOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddWorkingStorage API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as working storage for a gateway. +// This operation is only supported in the stored volume gateway type. This +// operation is deprecated in cached volume API version 20120630. Use AddUploadBuffer +// instead. +// +// Working storage is also referred to as upload buffer. You can also use the +// AddUploadBuffer operation to add upload buffer to a stored volume gateway. +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add working storage, and one or more disk IDs that you want to +// configure as working storage. +// +// 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 Storage Gateway's +// API operation AddWorkingStorage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage +func (c *StorageGateway) AddWorkingStorage(input *AddWorkingStorageInput) (*AddWorkingStorageOutput, error) { + req, out := c.AddWorkingStorageRequest(input) + return out, req.Send() +} + +// AddWorkingStorageWithContext is the same as AddWorkingStorage with the addition of +// the ability to pass a context and additional request options. +// +// See AddWorkingStorage 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 *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *AddWorkingStorageInput, opts ...request.Option) (*AddWorkingStorageOutput, error) { + req, out := c.AddWorkingStorageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelArchival = "CancelArchival" + +// CancelArchivalRequest generates a "aws/request.Request" representing the +// client's request for the CancelArchival operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CancelArchival for more information on using the CancelArchival +// 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 CancelArchivalRequest method. +// req, resp := client.CancelArchivalRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival +func (c *StorageGateway) CancelArchivalRequest(input *CancelArchivalInput) (req *request.Request, output *CancelArchivalOutput) { + op := &request.Operation{ + Name: opCancelArchival, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelArchivalInput{} + } + + output = &CancelArchivalOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelArchival API operation for AWS Storage Gateway. +// +// Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after +// the archiving process is initiated. This operation is only supported in the +// tape gateway type. +// +// 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 Storage Gateway's +// API operation CancelArchival for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival +func (c *StorageGateway) CancelArchival(input *CancelArchivalInput) (*CancelArchivalOutput, error) { + req, out := c.CancelArchivalRequest(input) + return out, req.Send() +} + +// CancelArchivalWithContext is the same as CancelArchival with the addition of +// the ability to pass a context and additional request options. +// +// See CancelArchival 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 *StorageGateway) CancelArchivalWithContext(ctx aws.Context, input *CancelArchivalInput, opts ...request.Option) (*CancelArchivalOutput, error) { + req, out := c.CancelArchivalRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelRetrieval = "CancelRetrieval" + +// CancelRetrievalRequest generates a "aws/request.Request" representing the +// client's request for the CancelRetrieval operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CancelRetrieval for more information on using the CancelRetrieval +// 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 CancelRetrievalRequest method. +// req, resp := client.CancelRetrievalRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval +func (c *StorageGateway) CancelRetrievalRequest(input *CancelRetrievalInput) (req *request.Request, output *CancelRetrievalOutput) { + op := &request.Operation{ + Name: opCancelRetrieval, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelRetrievalInput{} + } + + output = &CancelRetrievalOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelRetrieval API operation for AWS Storage Gateway. +// +// Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to +// a gateway after the retrieval process is initiated. The virtual tape is returned +// to the VTS. This operation is only supported in the tape gateway type. +// +// 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 Storage Gateway's +// API operation CancelRetrieval for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval +func (c *StorageGateway) CancelRetrieval(input *CancelRetrievalInput) (*CancelRetrievalOutput, error) { + req, out := c.CancelRetrievalRequest(input) + return out, req.Send() +} + +// CancelRetrievalWithContext is the same as CancelRetrieval with the addition of +// the ability to pass a context and additional request options. +// +// See CancelRetrieval 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 *StorageGateway) CancelRetrievalWithContext(ctx aws.Context, input *CancelRetrievalInput, opts ...request.Option) (*CancelRetrievalOutput, error) { + req, out := c.CancelRetrievalRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCachediSCSIVolume = "CreateCachediSCSIVolume" + +// CreateCachediSCSIVolumeRequest generates a "aws/request.Request" representing the +// client's request for the CreateCachediSCSIVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateCachediSCSIVolume for more information on using the CreateCachediSCSIVolume +// 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 CreateCachediSCSIVolumeRequest method. +// req, resp := client.CreateCachediSCSIVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume +func (c *StorageGateway) CreateCachediSCSIVolumeRequest(input *CreateCachediSCSIVolumeInput) (req *request.Request, output *CreateCachediSCSIVolumeOutput) { + op := &request.Operation{ + Name: opCreateCachediSCSIVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCachediSCSIVolumeInput{} + } + + output = &CreateCachediSCSIVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCachediSCSIVolume API operation for AWS Storage Gateway. +// +// Creates a cached volume on a specified cached volume gateway. This operation +// is only supported in the cached volume gateway type. +// +// Cache storage must be allocated to the gateway before you can create a cached +// volume. Use the AddCache operation to add cache storage to a gateway. +// +// In the request, you must specify the gateway, size of the volume in bytes, +// the iSCSI target name, an IP address on which to expose the target, and a +// unique client token. In response, the gateway creates the volume and returns +// information about it. This information includes the volume Amazon Resource +// Name (ARN), its size, and the iSCSI target ARN that initiators can use to +// connect to the volume target. +// +// Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN +// for this cached volume, which creates an exact copy of the existing volume’s +// latest recovery point. The VolumeSizeInBytes value must be equal to or larger +// than the size of the copied volume, in bytes. +// +// 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 Storage Gateway's +// API operation CreateCachediSCSIVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume +func (c *StorageGateway) CreateCachediSCSIVolume(input *CreateCachediSCSIVolumeInput) (*CreateCachediSCSIVolumeOutput, error) { + req, out := c.CreateCachediSCSIVolumeRequest(input) + return out, req.Send() +} + +// CreateCachediSCSIVolumeWithContext is the same as CreateCachediSCSIVolume with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCachediSCSIVolume 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 *StorageGateway) CreateCachediSCSIVolumeWithContext(ctx aws.Context, input *CreateCachediSCSIVolumeInput, opts ...request.Option) (*CreateCachediSCSIVolumeOutput, error) { + req, out := c.CreateCachediSCSIVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNFSFileShare = "CreateNFSFileShare" + +// CreateNFSFileShareRequest generates a "aws/request.Request" representing the +// client's request for the CreateNFSFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateNFSFileShare for more information on using the CreateNFSFileShare +// 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 CreateNFSFileShareRequest method. +// req, resp := client.CreateNFSFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare +func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInput) (req *request.Request, output *CreateNFSFileShareOutput) { + op := &request.Operation{ + Name: opCreateNFSFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNFSFileShareInput{} + } + + output = &CreateNFSFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNFSFileShare API operation for AWS Storage Gateway. +// +// Creates a Network File System (NFS) file share on an existing file gateway. +// In Storage Gateway, a file share is a file system mount point backed by Amazon +// S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. +// This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// 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 Storage Gateway's +// API operation CreateNFSFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare +func (c *StorageGateway) CreateNFSFileShare(input *CreateNFSFileShareInput) (*CreateNFSFileShareOutput, error) { + req, out := c.CreateNFSFileShareRequest(input) + return out, req.Send() +} + +// CreateNFSFileShareWithContext is the same as CreateNFSFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNFSFileShare 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 *StorageGateway) CreateNFSFileShareWithContext(ctx aws.Context, input *CreateNFSFileShareInput, opts ...request.Option) (*CreateNFSFileShareOutput, error) { + req, out := c.CreateNFSFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSMBFileShare = "CreateSMBFileShare" + +// CreateSMBFileShareRequest generates a "aws/request.Request" representing the +// client's request for the CreateSMBFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateSMBFileShare for more information on using the CreateSMBFileShare +// 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 CreateSMBFileShareRequest method. +// req, resp := client.CreateSMBFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare +func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInput) (req *request.Request, output *CreateSMBFileShareOutput) { + op := &request.Operation{ + Name: opCreateSMBFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSMBFileShareInput{} + } + + output = &CreateSMBFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSMBFileShare API operation for AWS Storage Gateway. +// +// Creates a Server Message Block (SMB) file share on an existing file gateway. +// In Storage Gateway, a file share is a file system mount point backed by Amazon +// S3 cloud storage. Storage Gateway expose file shares using a SMB interface. +// This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// 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 Storage Gateway's +// API operation CreateSMBFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare +func (c *StorageGateway) CreateSMBFileShare(input *CreateSMBFileShareInput) (*CreateSMBFileShareOutput, error) { + req, out := c.CreateSMBFileShareRequest(input) + return out, req.Send() +} + +// CreateSMBFileShareWithContext is the same as CreateSMBFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSMBFileShare 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 *StorageGateway) CreateSMBFileShareWithContext(ctx aws.Context, input *CreateSMBFileShareInput, opts ...request.Option) (*CreateSMBFileShareOutput, error) { + req, out := c.CreateSMBFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSnapshot = "CreateSnapshot" + +// CreateSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateSnapshot for more information on using the CreateSnapshot +// 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 CreateSnapshotRequest method. +// req, resp := client.CreateSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot +func (c *StorageGateway) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput) { + op := &request.Operation{ + Name: opCreateSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSnapshotInput{} + } + + output = &CreateSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSnapshot API operation for AWS Storage Gateway. +// +// Initiates a snapshot of a volume. +// +// AWS Storage Gateway provides the ability to back up point-in-time snapshots +// of your data to Amazon Simple Storage (S3) for durable off-site recovery, +// as well as import the data to an Amazon Elastic Block Store (EBS) volume +// in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway +// volume on a scheduled or ad-hoc basis. This API enables you to take ad-hoc +// snapshot. For more information, see Editing a Snapshot Schedule (http://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot). +// +// In the CreateSnapshot request you identify the volume by providing its Amazon +// Resource Name (ARN). You must also provide description for the snapshot. +// When AWS Storage Gateway takes the snapshot of specified volume, the snapshot +// and description appears in the AWS Storage Gateway Console. In response, +// AWS Storage Gateway returns you a snapshot ID. You can use this snapshot +// ID to check the snapshot progress or later use it when you want to create +// a volume from a snapshot. This operation is only supported in stored and +// cached volume gateway type. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, +// see DescribeSnapshots or DeleteSnapshot in the EC2 API reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Operations.html). +// +// Volume and snapshot IDs are changing to a longer length ID format. For more +// information, see the important note on the Welcome (http://docs.aws.amazon.com/storagegateway/latest/APIReference/Welcome.html) +// page. +// +// 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 Storage Gateway's +// API operation CreateSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// * ErrCodeServiceUnavailableError "ServiceUnavailableError" +// An internal server error has occurred because the service is unavailable. +// For more information, see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot +func (c *StorageGateway) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error) { + req, out := c.CreateSnapshotRequest(input) + return out, req.Send() +} + +// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSnapshot 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 *StorageGateway) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error) { + req, out := c.CreateSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSnapshotFromVolumeRecoveryPoint = "CreateSnapshotFromVolumeRecoveryPoint" + +// CreateSnapshotFromVolumeRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the CreateSnapshotFromVolumeRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateSnapshotFromVolumeRecoveryPoint for more information on using the CreateSnapshotFromVolumeRecoveryPoint +// 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 CreateSnapshotFromVolumeRecoveryPointRequest method. +// req, resp := client.CreateSnapshotFromVolumeRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint +func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointRequest(input *CreateSnapshotFromVolumeRecoveryPointInput) (req *request.Request, output *CreateSnapshotFromVolumeRecoveryPointOutput) { + op := &request.Operation{ + Name: opCreateSnapshotFromVolumeRecoveryPoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSnapshotFromVolumeRecoveryPointInput{} + } + + output = &CreateSnapshotFromVolumeRecoveryPointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSnapshotFromVolumeRecoveryPoint API operation for AWS Storage Gateway. +// +// Initiates a snapshot of a gateway from a volume recovery point. This operation +// is only supported in the cached volume gateway type. +// +// A volume recovery point is a point in time at which all data of the volume +// is consistent and from which you can create a snapshot. To get a list of +// volume recovery point for cached volume gateway, use ListVolumeRecoveryPoints. +// +// In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the volume +// by providing its Amazon Resource Name (ARN). You must also provide a description +// for the snapshot. When the gateway takes a snapshot of the specified volume, +// the snapshot and its description appear in the AWS Storage Gateway console. +// In response, the gateway returns you a snapshot ID. You can use this snapshot +// ID to check the snapshot progress or later use it when you want to create +// a volume from a snapshot. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, +// in Amazon Elastic Compute Cloud API Reference. +// +// 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 Storage Gateway's +// API operation CreateSnapshotFromVolumeRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// * ErrCodeServiceUnavailableError "ServiceUnavailableError" +// An internal server error has occurred because the service is unavailable. +// For more information, see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint +func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPoint(input *CreateSnapshotFromVolumeRecoveryPointInput) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { + req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) + return out, req.Send() +} + +// CreateSnapshotFromVolumeRecoveryPointWithContext is the same as CreateSnapshotFromVolumeRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSnapshotFromVolumeRecoveryPoint 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 *StorageGateway) CreateSnapshotFromVolumeRecoveryPointWithContext(ctx aws.Context, input *CreateSnapshotFromVolumeRecoveryPointInput, opts ...request.Option) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { + req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateStorediSCSIVolume = "CreateStorediSCSIVolume" + +// CreateStorediSCSIVolumeRequest generates a "aws/request.Request" representing the +// client's request for the CreateStorediSCSIVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateStorediSCSIVolume for more information on using the CreateStorediSCSIVolume +// 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 CreateStorediSCSIVolumeRequest method. +// req, resp := client.CreateStorediSCSIVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume +func (c *StorageGateway) CreateStorediSCSIVolumeRequest(input *CreateStorediSCSIVolumeInput) (req *request.Request, output *CreateStorediSCSIVolumeOutput) { + op := &request.Operation{ + Name: opCreateStorediSCSIVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateStorediSCSIVolumeInput{} + } + + output = &CreateStorediSCSIVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateStorediSCSIVolume API operation for AWS Storage Gateway. +// +// Creates a volume on a specified gateway. This operation is only supported +// in the stored volume gateway type. +// +// The size of the volume to create is inferred from the disk size. You can +// choose to preserve existing data on the disk, create volume from an existing +// snapshot, or create an empty volume. If you choose to create an empty gateway +// volume, then any existing data on the disk is erased. +// +// In the request you must specify the gateway and the disk information on which +// you are creating the volume. In response, the gateway creates the volume +// and returns volume information such as the volume Amazon Resource Name (ARN), +// its size, and the iSCSI target ARN that initiators can use to connect to +// the volume target. +// +// 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 Storage Gateway's +// API operation CreateStorediSCSIVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume +func (c *StorageGateway) CreateStorediSCSIVolume(input *CreateStorediSCSIVolumeInput) (*CreateStorediSCSIVolumeOutput, error) { + req, out := c.CreateStorediSCSIVolumeRequest(input) + return out, req.Send() +} + +// CreateStorediSCSIVolumeWithContext is the same as CreateStorediSCSIVolume with the addition of +// the ability to pass a context and additional request options. +// +// See CreateStorediSCSIVolume 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 *StorageGateway) CreateStorediSCSIVolumeWithContext(ctx aws.Context, input *CreateStorediSCSIVolumeInput, opts ...request.Option) (*CreateStorediSCSIVolumeOutput, error) { + req, out := c.CreateStorediSCSIVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTapeWithBarcode = "CreateTapeWithBarcode" + +// CreateTapeWithBarcodeRequest generates a "aws/request.Request" representing the +// client's request for the CreateTapeWithBarcode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateTapeWithBarcode for more information on using the CreateTapeWithBarcode +// 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 CreateTapeWithBarcodeRequest method. +// req, resp := client.CreateTapeWithBarcodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode +func (c *StorageGateway) CreateTapeWithBarcodeRequest(input *CreateTapeWithBarcodeInput) (req *request.Request, output *CreateTapeWithBarcodeOutput) { + op := &request.Operation{ + Name: opCreateTapeWithBarcode, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTapeWithBarcodeInput{} + } + + output = &CreateTapeWithBarcodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTapeWithBarcode API operation for AWS Storage Gateway. +// +// Creates a virtual tape by using your own barcode. You write data to the virtual +// tape and then archive the tape. A barcode is unique and can not be reused +// if it has already been used on a tape . This applies to barcodes used on +// deleted tapes. This operation is only supported in the tape gateway type. +// +// Cache storage must be allocated to the gateway before you can create a virtual +// tape. Use the AddCache operation to add cache storage to a gateway. +// +// 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 Storage Gateway's +// API operation CreateTapeWithBarcode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode +func (c *StorageGateway) CreateTapeWithBarcode(input *CreateTapeWithBarcodeInput) (*CreateTapeWithBarcodeOutput, error) { + req, out := c.CreateTapeWithBarcodeRequest(input) + return out, req.Send() +} + +// CreateTapeWithBarcodeWithContext is the same as CreateTapeWithBarcode with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTapeWithBarcode 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 *StorageGateway) CreateTapeWithBarcodeWithContext(ctx aws.Context, input *CreateTapeWithBarcodeInput, opts ...request.Option) (*CreateTapeWithBarcodeOutput, error) { + req, out := c.CreateTapeWithBarcodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTapes = "CreateTapes" + +// CreateTapesRequest generates a "aws/request.Request" representing the +// client's request for the CreateTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CreateTapes for more information on using the CreateTapes +// 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 CreateTapesRequest method. +// req, resp := client.CreateTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes +func (c *StorageGateway) CreateTapesRequest(input *CreateTapesInput) (req *request.Request, output *CreateTapesOutput) { + op := &request.Operation{ + Name: opCreateTapes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTapesInput{} + } + + output = &CreateTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTapes API operation for AWS Storage Gateway. +// +// Creates one or more virtual tapes. You write data to the virtual tapes and +// then archive the tapes. This operation is only supported in the tape gateway +// type. +// +// Cache storage must be allocated to the gateway before you can create virtual +// tapes. Use the AddCache operation to add cache storage to a gateway. +// +// 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 Storage Gateway's +// API operation CreateTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes +func (c *StorageGateway) CreateTapes(input *CreateTapesInput) (*CreateTapesOutput, error) { + req, out := c.CreateTapesRequest(input) + return out, req.Send() +} + +// CreateTapesWithContext is the same as CreateTapes with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTapes 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 *StorageGateway) CreateTapesWithContext(ctx aws.Context, input *CreateTapesInput, opts ...request.Option) (*CreateTapesOutput, error) { + req, out := c.CreateTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" + +// DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteBandwidthRateLimit for more information on using the DeleteBandwidthRateLimit +// 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 DeleteBandwidthRateLimitRequest method. +// req, resp := client.DeleteBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit +func (c *StorageGateway) DeleteBandwidthRateLimitRequest(input *DeleteBandwidthRateLimitInput) (req *request.Request, output *DeleteBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opDeleteBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBandwidthRateLimitInput{} + } + + output = &DeleteBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Deletes the bandwidth rate limits of a gateway. You can delete either the +// upload and download bandwidth rate limit, or you can delete both. If you +// delete only one of the limits, the other limit remains unchanged. To specify +// which gateway to work with, use the Amazon Resource Name (ARN) of the gateway +// in your request. +// +// 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 Storage Gateway's +// API operation DeleteBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit +func (c *StorageGateway) DeleteBandwidthRateLimit(input *DeleteBandwidthRateLimitInput) (*DeleteBandwidthRateLimitOutput, error) { + req, out := c.DeleteBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// DeleteBandwidthRateLimitWithContext is the same as DeleteBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBandwidthRateLimit 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 *StorageGateway) DeleteBandwidthRateLimitWithContext(ctx aws.Context, input *DeleteBandwidthRateLimitInput, opts ...request.Option) (*DeleteBandwidthRateLimitOutput, error) { + req, out := c.DeleteBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteChapCredentials = "DeleteChapCredentials" + +// DeleteChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteChapCredentials for more information on using the DeleteChapCredentials +// 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 DeleteChapCredentialsRequest method. +// req, resp := client.DeleteChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials +func (c *StorageGateway) DeleteChapCredentialsRequest(input *DeleteChapCredentialsInput) (req *request.Request, output *DeleteChapCredentialsOutput) { + op := &request.Operation{ + Name: opDeleteChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteChapCredentialsInput{} + } + + output = &DeleteChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteChapCredentials API operation for AWS Storage Gateway. +// +// Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for +// a specified iSCSI target and initiator pair. +// +// 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 Storage Gateway's +// API operation DeleteChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials +func (c *StorageGateway) DeleteChapCredentials(input *DeleteChapCredentialsInput) (*DeleteChapCredentialsOutput, error) { + req, out := c.DeleteChapCredentialsRequest(input) + return out, req.Send() +} + +// DeleteChapCredentialsWithContext is the same as DeleteChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteChapCredentials 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 *StorageGateway) DeleteChapCredentialsWithContext(ctx aws.Context, input *DeleteChapCredentialsInput, opts ...request.Option) (*DeleteChapCredentialsOutput, error) { + req, out := c.DeleteChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFileShare = "DeleteFileShare" + +// DeleteFileShareRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteFileShare for more information on using the DeleteFileShare +// 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 DeleteFileShareRequest method. +// req, resp := client.DeleteFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare +func (c *StorageGateway) DeleteFileShareRequest(input *DeleteFileShareInput) (req *request.Request, output *DeleteFileShareOutput) { + op := &request.Operation{ + Name: opDeleteFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFileShareInput{} + } + + output = &DeleteFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFileShare API operation for AWS Storage Gateway. +// +// Deletes a file share from a file gateway. This operation is only supported +// in the file gateway type. +// +// 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 Storage Gateway's +// API operation DeleteFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare +func (c *StorageGateway) DeleteFileShare(input *DeleteFileShareInput) (*DeleteFileShareOutput, error) { + req, out := c.DeleteFileShareRequest(input) + return out, req.Send() +} + +// DeleteFileShareWithContext is the same as DeleteFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFileShare 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 *StorageGateway) DeleteFileShareWithContext(ctx aws.Context, input *DeleteFileShareInput, opts ...request.Option) (*DeleteFileShareOutput, error) { + req, out := c.DeleteFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGateway = "DeleteGateway" + +// DeleteGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteGateway for more information on using the DeleteGateway +// 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 DeleteGatewayRequest method. +// req, resp := client.DeleteGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway +func (c *StorageGateway) DeleteGatewayRequest(input *DeleteGatewayInput) (req *request.Request, output *DeleteGatewayOutput) { + op := &request.Operation{ + Name: opDeleteGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGatewayInput{} + } + + output = &DeleteGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGateway API operation for AWS Storage Gateway. +// +// Deletes a gateway. To specify which gateway to delete, use the Amazon Resource +// Name (ARN) of the gateway in your request. The operation deletes the gateway; +// however, it does not delete the gateway virtual machine (VM) from your host +// computer. +// +// After you delete a gateway, you cannot reactivate it. Completed snapshots +// of the gateway volumes are not deleted upon deleting the gateway, however, +// pending snapshots will not complete. After you delete a gateway, your next +// step is to remove it from your environment. +// +// You no longer pay software charges after the gateway is deleted; however, +// your existing Amazon EBS snapshots persist and you will continue to be billed +// for these snapshots. You can choose to remove all remaining Amazon EBS snapshots +// by canceling your Amazon EC2 subscription.  If you prefer not to cancel your +// Amazon EC2 subscription, you can delete your snapshots using the Amazon EC2 +// console. For more information, see the AWS Storage Gateway Detail Page (http://aws.amazon.com/storagegateway). +// +// 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 Storage Gateway's +// API operation DeleteGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway +func (c *StorageGateway) DeleteGateway(input *DeleteGatewayInput) (*DeleteGatewayOutput, error) { + req, out := c.DeleteGatewayRequest(input) + return out, req.Send() +} + +// DeleteGatewayWithContext is the same as DeleteGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGateway 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 *StorageGateway) DeleteGatewayWithContext(ctx aws.Context, input *DeleteGatewayInput, opts ...request.Option) (*DeleteGatewayOutput, error) { + req, out := c.DeleteGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" + +// DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteSnapshotSchedule for more information on using the DeleteSnapshotSchedule +// 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 DeleteSnapshotScheduleRequest method. +// req, resp := client.DeleteSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule +func (c *StorageGateway) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opDeleteSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSnapshotScheduleInput{} + } + + output = &DeleteSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSnapshotSchedule API operation for AWS Storage Gateway. +// +// Deletes a snapshot of a volume. +// +// You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. +// This API action enables you to delete a snapshot schedule for a volume. For +// more information, see Working with Snapshots (http://docs.aws.amazon.com/storagegateway/latest/userguide/WorkingWithSnapshots.html). +// In the DeleteSnapshotSchedule request, you identify the volume by providing +// its Amazon Resource Name (ARN). This operation is only supported in stored +// and cached volume gateway types. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. in Amazon +// Elastic Compute Cloud API Reference. +// +// 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 Storage Gateway's +// API operation DeleteSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule +func (c *StorageGateway) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + return out, req.Send() +} + +// DeleteSnapshotScheduleWithContext is the same as DeleteSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSnapshotSchedule 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 *StorageGateway) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTape = "DeleteTape" + +// DeleteTapeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTape operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteTape for more information on using the DeleteTape +// 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 DeleteTapeRequest method. +// req, resp := client.DeleteTapeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape +func (c *StorageGateway) DeleteTapeRequest(input *DeleteTapeInput) (req *request.Request, output *DeleteTapeOutput) { + op := &request.Operation{ + Name: opDeleteTape, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTapeInput{} + } + + output = &DeleteTapeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTape API operation for AWS Storage Gateway. +// +// Deletes the specified virtual tape. This operation is only supported in the +// tape gateway type. +// +// 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 Storage Gateway's +// API operation DeleteTape for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape +func (c *StorageGateway) DeleteTape(input *DeleteTapeInput) (*DeleteTapeOutput, error) { + req, out := c.DeleteTapeRequest(input) + return out, req.Send() +} + +// DeleteTapeWithContext is the same as DeleteTape with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTape 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 *StorageGateway) DeleteTapeWithContext(ctx aws.Context, input *DeleteTapeInput, opts ...request.Option) (*DeleteTapeOutput, error) { + req, out := c.DeleteTapeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTapeArchive = "DeleteTapeArchive" + +// DeleteTapeArchiveRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTapeArchive operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteTapeArchive for more information on using the DeleteTapeArchive +// 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 DeleteTapeArchiveRequest method. +// req, resp := client.DeleteTapeArchiveRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive +func (c *StorageGateway) DeleteTapeArchiveRequest(input *DeleteTapeArchiveInput) (req *request.Request, output *DeleteTapeArchiveOutput) { + op := &request.Operation{ + Name: opDeleteTapeArchive, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTapeArchiveInput{} + } + + output = &DeleteTapeArchiveOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTapeArchive API operation for AWS Storage Gateway. +// +// Deletes the specified virtual tape from the virtual tape shelf (VTS). This +// operation is only supported in the tape gateway type. +// +// 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 Storage Gateway's +// API operation DeleteTapeArchive for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive +func (c *StorageGateway) DeleteTapeArchive(input *DeleteTapeArchiveInput) (*DeleteTapeArchiveOutput, error) { + req, out := c.DeleteTapeArchiveRequest(input) + return out, req.Send() +} + +// DeleteTapeArchiveWithContext is the same as DeleteTapeArchive with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTapeArchive 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 *StorageGateway) DeleteTapeArchiveWithContext(ctx aws.Context, input *DeleteTapeArchiveInput, opts ...request.Option) (*DeleteTapeArchiveOutput, error) { + req, out := c.DeleteTapeArchiveRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVolume = "DeleteVolume" + +// DeleteVolumeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeleteVolume for more information on using the DeleteVolume +// 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 DeleteVolumeRequest method. +// req, resp := client.DeleteVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume +func (c *StorageGateway) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) { + op := &request.Operation{ + Name: opDeleteVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVolumeInput{} + } + + output = &DeleteVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVolume API operation for AWS Storage Gateway. +// +// Deletes the specified storage volume that you previously created using the +// CreateCachediSCSIVolume or CreateStorediSCSIVolume API. This operation is +// only supported in the cached volume and stored volume types. For stored volume +// gateways, the local disk that was configured as the storage volume is not +// deleted. You can reuse the local disk to create another storage volume. +// +// Before you delete a volume, make sure there are no iSCSI connections to the +// volume you are deleting. You should also make sure there is no snapshot in +// progress. You can use the Amazon Elastic Compute Cloud (Amazon EC2) API to +// query snapshots on the volume you are deleting and check the snapshot status. +// For more information, go to DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) +// in the Amazon Elastic Compute Cloud API Reference. +// +// In the request, you must provide the Amazon Resource Name (ARN) of the storage +// volume you want to delete. +// +// 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 Storage Gateway's +// API operation DeleteVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume +func (c *StorageGateway) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) { + req, out := c.DeleteVolumeRequest(input) + return out, req.Send() +} + +// DeleteVolumeWithContext is the same as DeleteVolume with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVolume 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 *StorageGateway) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) { + req, out := c.DeleteVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBandwidthRateLimit = "DescribeBandwidthRateLimit" + +// DescribeBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeBandwidthRateLimit for more information on using the DescribeBandwidthRateLimit +// 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 DescribeBandwidthRateLimitRequest method. +// req, resp := client.DescribeBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit +func (c *StorageGateway) DescribeBandwidthRateLimitRequest(input *DescribeBandwidthRateLimitInput) (req *request.Request, output *DescribeBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opDescribeBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBandwidthRateLimitInput{} + } + + output = &DescribeBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Returns the bandwidth rate limits of a gateway. By default, these limits +// are not set, which means no bandwidth rate limiting is in effect. +// +// This operation only returns a value for a bandwidth rate limit only if the +// limit is set. If no limits are set for the gateway, then this operation returns +// only the gateway ARN in the response body. To specify which gateway to describe, +// use the Amazon Resource Name (ARN) of the gateway in your request. +// +// 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 Storage Gateway's +// API operation DescribeBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit +func (c *StorageGateway) DescribeBandwidthRateLimit(input *DescribeBandwidthRateLimitInput) (*DescribeBandwidthRateLimitOutput, error) { + req, out := c.DescribeBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// DescribeBandwidthRateLimitWithContext is the same as DescribeBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBandwidthRateLimit 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 *StorageGateway) DescribeBandwidthRateLimitWithContext(ctx aws.Context, input *DescribeBandwidthRateLimitInput, opts ...request.Option) (*DescribeBandwidthRateLimitOutput, error) { + req, out := c.DescribeBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCache = "DescribeCache" + +// DescribeCacheRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeCache for more information on using the DescribeCache +// 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 DescribeCacheRequest method. +// req, resp := client.DescribeCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache +func (c *StorageGateway) DescribeCacheRequest(input *DescribeCacheInput) (req *request.Request, output *DescribeCacheOutput) { + op := &request.Operation{ + Name: opDescribeCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCacheInput{} + } + + output = &DescribeCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCache API operation for AWS Storage Gateway. +// +// Returns information about the cache of a gateway. This operation is only +// supported in the cached volume, tape and file gateway types. +// +// The response includes disk IDs that are configured as cache, and it includes +// the amount of cache allocated and used. +// +// 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 Storage Gateway's +// API operation DescribeCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache +func (c *StorageGateway) DescribeCache(input *DescribeCacheInput) (*DescribeCacheOutput, error) { + req, out := c.DescribeCacheRequest(input) + return out, req.Send() +} + +// DescribeCacheWithContext is the same as DescribeCache with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCache 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 *StorageGateway) DescribeCacheWithContext(ctx aws.Context, input *DescribeCacheInput, opts ...request.Option) (*DescribeCacheOutput, error) { + req, out := c.DescribeCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCachediSCSIVolumes = "DescribeCachediSCSIVolumes" + +// DescribeCachediSCSIVolumesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCachediSCSIVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeCachediSCSIVolumes for more information on using the DescribeCachediSCSIVolumes +// 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 DescribeCachediSCSIVolumesRequest method. +// req, resp := client.DescribeCachediSCSIVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes +func (c *StorageGateway) DescribeCachediSCSIVolumesRequest(input *DescribeCachediSCSIVolumesInput) (req *request.Request, output *DescribeCachediSCSIVolumesOutput) { + op := &request.Operation{ + Name: opDescribeCachediSCSIVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCachediSCSIVolumesInput{} + } + + output = &DescribeCachediSCSIVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCachediSCSIVolumes API operation for AWS Storage Gateway. +// +// Returns a description of the gateway volumes specified in the request. This +// operation is only supported in the cached volume gateway types. +// +// The list of gateway volumes in the request must be from one gateway. In the +// response Amazon Storage Gateway returns volume information sorted by volume +// Amazon Resource Name (ARN). +// +// 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 Storage Gateway's +// API operation DescribeCachediSCSIVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes +func (c *StorageGateway) DescribeCachediSCSIVolumes(input *DescribeCachediSCSIVolumesInput) (*DescribeCachediSCSIVolumesOutput, error) { + req, out := c.DescribeCachediSCSIVolumesRequest(input) + return out, req.Send() +} + +// DescribeCachediSCSIVolumesWithContext is the same as DescribeCachediSCSIVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCachediSCSIVolumes 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 *StorageGateway) DescribeCachediSCSIVolumesWithContext(ctx aws.Context, input *DescribeCachediSCSIVolumesInput, opts ...request.Option) (*DescribeCachediSCSIVolumesOutput, error) { + req, out := c.DescribeCachediSCSIVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeChapCredentials = "DescribeChapCredentials" + +// DescribeChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeChapCredentials for more information on using the DescribeChapCredentials +// 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 DescribeChapCredentialsRequest method. +// req, resp := client.DescribeChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials +func (c *StorageGateway) DescribeChapCredentialsRequest(input *DescribeChapCredentialsInput) (req *request.Request, output *DescribeChapCredentialsOutput) { + op := &request.Operation{ + Name: opDescribeChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeChapCredentialsInput{} + } + + output = &DescribeChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeChapCredentials API operation for AWS Storage Gateway. +// +// Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials +// information for a specified iSCSI target, one for each target-initiator pair. +// +// 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 Storage Gateway's +// API operation DescribeChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials +func (c *StorageGateway) DescribeChapCredentials(input *DescribeChapCredentialsInput) (*DescribeChapCredentialsOutput, error) { + req, out := c.DescribeChapCredentialsRequest(input) + return out, req.Send() +} + +// DescribeChapCredentialsWithContext is the same as DescribeChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeChapCredentials 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 *StorageGateway) DescribeChapCredentialsWithContext(ctx aws.Context, input *DescribeChapCredentialsInput, opts ...request.Option) (*DescribeChapCredentialsOutput, error) { + req, out := c.DescribeChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeGatewayInformation = "DescribeGatewayInformation" + +// DescribeGatewayInformationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGatewayInformation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeGatewayInformation for more information on using the DescribeGatewayInformation +// 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 DescribeGatewayInformationRequest method. +// req, resp := client.DescribeGatewayInformationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation +func (c *StorageGateway) DescribeGatewayInformationRequest(input *DescribeGatewayInformationInput) (req *request.Request, output *DescribeGatewayInformationOutput) { + op := &request.Operation{ + Name: opDescribeGatewayInformation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGatewayInformationInput{} + } + + output = &DescribeGatewayInformationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGatewayInformation API operation for AWS Storage Gateway. +// +// Returns metadata about a gateway such as its name, network interfaces, configured +// time zone, and the state (whether the gateway is running or not). To specify +// which gateway to describe, use the Amazon Resource Name (ARN) of the gateway +// in your request. +// +// 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 Storage Gateway's +// API operation DescribeGatewayInformation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation +func (c *StorageGateway) DescribeGatewayInformation(input *DescribeGatewayInformationInput) (*DescribeGatewayInformationOutput, error) { + req, out := c.DescribeGatewayInformationRequest(input) + return out, req.Send() +} + +// DescribeGatewayInformationWithContext is the same as DescribeGatewayInformation with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGatewayInformation 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 *StorageGateway) DescribeGatewayInformationWithContext(ctx aws.Context, input *DescribeGatewayInformationInput, opts ...request.Option) (*DescribeGatewayInformationOutput, error) { + req, out := c.DescribeGatewayInformationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeMaintenanceStartTime = "DescribeMaintenanceStartTime" + +// DescribeMaintenanceStartTimeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceStartTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeMaintenanceStartTime for more information on using the DescribeMaintenanceStartTime +// 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 DescribeMaintenanceStartTimeRequest method. +// req, resp := client.DescribeMaintenanceStartTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime +func (c *StorageGateway) DescribeMaintenanceStartTimeRequest(input *DescribeMaintenanceStartTimeInput) (req *request.Request, output *DescribeMaintenanceStartTimeOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceStartTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceStartTimeInput{} + } + + output = &DescribeMaintenanceStartTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceStartTime API operation for AWS Storage Gateway. +// +// Returns your gateway's weekly maintenance start time including the day and +// time of the week. Note that values are in terms of the gateway's time zone. +// +// 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 Storage Gateway's +// API operation DescribeMaintenanceStartTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime +func (c *StorageGateway) DescribeMaintenanceStartTime(input *DescribeMaintenanceStartTimeInput) (*DescribeMaintenanceStartTimeOutput, error) { + req, out := c.DescribeMaintenanceStartTimeRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceStartTimeWithContext is the same as DescribeMaintenanceStartTime with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceStartTime 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 *StorageGateway) DescribeMaintenanceStartTimeWithContext(ctx aws.Context, input *DescribeMaintenanceStartTimeInput, opts ...request.Option) (*DescribeMaintenanceStartTimeOutput, error) { + req, out := c.DescribeMaintenanceStartTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeNFSFileShares = "DescribeNFSFileShares" + +// DescribeNFSFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNFSFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeNFSFileShares for more information on using the DescribeNFSFileShares +// 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 DescribeNFSFileSharesRequest method. +// req, resp := client.DescribeNFSFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares +func (c *StorageGateway) DescribeNFSFileSharesRequest(input *DescribeNFSFileSharesInput) (req *request.Request, output *DescribeNFSFileSharesOutput) { + op := &request.Operation{ + Name: opDescribeNFSFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeNFSFileSharesInput{} + } + + output = &DescribeNFSFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNFSFileShares API operation for AWS Storage Gateway. +// +// Gets a description for one or more Network File System (NFS) file shares +// from a file gateway. This operation is only supported in the file gateway +// type. +// +// 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 Storage Gateway's +// API operation DescribeNFSFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares +func (c *StorageGateway) DescribeNFSFileShares(input *DescribeNFSFileSharesInput) (*DescribeNFSFileSharesOutput, error) { + req, out := c.DescribeNFSFileSharesRequest(input) + return out, req.Send() +} + +// DescribeNFSFileSharesWithContext is the same as DescribeNFSFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNFSFileShares 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 *StorageGateway) DescribeNFSFileSharesWithContext(ctx aws.Context, input *DescribeNFSFileSharesInput, opts ...request.Option) (*DescribeNFSFileSharesOutput, error) { + req, out := c.DescribeNFSFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSMBFileShares = "DescribeSMBFileShares" + +// DescribeSMBFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSMBFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeSMBFileShares for more information on using the DescribeSMBFileShares +// 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 DescribeSMBFileSharesRequest method. +// req, resp := client.DescribeSMBFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares +func (c *StorageGateway) DescribeSMBFileSharesRequest(input *DescribeSMBFileSharesInput) (req *request.Request, output *DescribeSMBFileSharesOutput) { + op := &request.Operation{ + Name: opDescribeSMBFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSMBFileSharesInput{} + } + + output = &DescribeSMBFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSMBFileShares API operation for AWS Storage Gateway. +// +// Gets a description for one or more Server Message Block (SMB) file shares +// from a file gateway. This operation is only supported in the file gateway +// type. +// +// 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 Storage Gateway's +// API operation DescribeSMBFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares +func (c *StorageGateway) DescribeSMBFileShares(input *DescribeSMBFileSharesInput) (*DescribeSMBFileSharesOutput, error) { + req, out := c.DescribeSMBFileSharesRequest(input) + return out, req.Send() +} + +// DescribeSMBFileSharesWithContext is the same as DescribeSMBFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSMBFileShares 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 *StorageGateway) DescribeSMBFileSharesWithContext(ctx aws.Context, input *DescribeSMBFileSharesInput, opts ...request.Option) (*DescribeSMBFileSharesOutput, error) { + req, out := c.DescribeSMBFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSMBSettings = "DescribeSMBSettings" + +// DescribeSMBSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSMBSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeSMBSettings for more information on using the DescribeSMBSettings +// 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 DescribeSMBSettingsRequest method. +// req, resp := client.DescribeSMBSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings +func (c *StorageGateway) DescribeSMBSettingsRequest(input *DescribeSMBSettingsInput) (req *request.Request, output *DescribeSMBSettingsOutput) { + op := &request.Operation{ + Name: opDescribeSMBSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSMBSettingsInput{} + } + + output = &DescribeSMBSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSMBSettings API operation for AWS Storage Gateway. +// +// Gets a description of a Server Message Block (SMB) file share settings from +// a file gateway. This operation is only supported in the file gateway type. +// +// 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 Storage Gateway's +// API operation DescribeSMBSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings +func (c *StorageGateway) DescribeSMBSettings(input *DescribeSMBSettingsInput) (*DescribeSMBSettingsOutput, error) { + req, out := c.DescribeSMBSettingsRequest(input) + return out, req.Send() +} + +// DescribeSMBSettingsWithContext is the same as DescribeSMBSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSMBSettings 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 *StorageGateway) DescribeSMBSettingsWithContext(ctx aws.Context, input *DescribeSMBSettingsInput, opts ...request.Option) (*DescribeSMBSettingsOutput, error) { + req, out := c.DescribeSMBSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSnapshotSchedule = "DescribeSnapshotSchedule" + +// DescribeSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeSnapshotSchedule for more information on using the DescribeSnapshotSchedule +// 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 DescribeSnapshotScheduleRequest method. +// req, resp := client.DescribeSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule +func (c *StorageGateway) DescribeSnapshotScheduleRequest(input *DescribeSnapshotScheduleInput) (req *request.Request, output *DescribeSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opDescribeSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSnapshotScheduleInput{} + } + + output = &DescribeSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSnapshotSchedule API operation for AWS Storage Gateway. +// +// Describes the snapshot schedule for the specified gateway volume. The snapshot +// schedule information includes intervals at which snapshots are automatically +// initiated on the volume. This operation is only supported in the cached volume +// and stored volume types. +// +// 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 Storage Gateway's +// API operation DescribeSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule +func (c *StorageGateway) DescribeSnapshotSchedule(input *DescribeSnapshotScheduleInput) (*DescribeSnapshotScheduleOutput, error) { + req, out := c.DescribeSnapshotScheduleRequest(input) + return out, req.Send() +} + +// DescribeSnapshotScheduleWithContext is the same as DescribeSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSnapshotSchedule 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 *StorageGateway) DescribeSnapshotScheduleWithContext(ctx aws.Context, input *DescribeSnapshotScheduleInput, opts ...request.Option) (*DescribeSnapshotScheduleOutput, error) { + req, out := c.DescribeSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeStorediSCSIVolumes = "DescribeStorediSCSIVolumes" + +// DescribeStorediSCSIVolumesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStorediSCSIVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeStorediSCSIVolumes for more information on using the DescribeStorediSCSIVolumes +// 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 DescribeStorediSCSIVolumesRequest method. +// req, resp := client.DescribeStorediSCSIVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes +func (c *StorageGateway) DescribeStorediSCSIVolumesRequest(input *DescribeStorediSCSIVolumesInput) (req *request.Request, output *DescribeStorediSCSIVolumesOutput) { + op := &request.Operation{ + Name: opDescribeStorediSCSIVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeStorediSCSIVolumesInput{} + } + + output = &DescribeStorediSCSIVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStorediSCSIVolumes API operation for AWS Storage Gateway. +// +// Returns the description of the gateway volumes specified in the request. +// The list of gateway volumes in the request must be from one gateway. In the +// response Amazon Storage Gateway returns volume information sorted by volume +// ARNs. This operation is only supported in stored volume gateway type. +// +// 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 Storage Gateway's +// API operation DescribeStorediSCSIVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes +func (c *StorageGateway) DescribeStorediSCSIVolumes(input *DescribeStorediSCSIVolumesInput) (*DescribeStorediSCSIVolumesOutput, error) { + req, out := c.DescribeStorediSCSIVolumesRequest(input) + return out, req.Send() +} + +// DescribeStorediSCSIVolumesWithContext is the same as DescribeStorediSCSIVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStorediSCSIVolumes 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 *StorageGateway) DescribeStorediSCSIVolumesWithContext(ctx aws.Context, input *DescribeStorediSCSIVolumesInput, opts ...request.Option) (*DescribeStorediSCSIVolumesOutput, error) { + req, out := c.DescribeStorediSCSIVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTapeArchives = "DescribeTapeArchives" + +// DescribeTapeArchivesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapeArchives operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeTapeArchives for more information on using the DescribeTapeArchives +// 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 DescribeTapeArchivesRequest method. +// req, resp := client.DescribeTapeArchivesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives +func (c *StorageGateway) DescribeTapeArchivesRequest(input *DescribeTapeArchivesInput) (req *request.Request, output *DescribeTapeArchivesOutput) { + op := &request.Operation{ + Name: opDescribeTapeArchives, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapeArchivesInput{} + } + + output = &DescribeTapeArchivesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapeArchives API operation for AWS Storage Gateway. +// +// Returns a description of specified virtual tapes in the virtual tape shelf +// (VTS). This operation is only supported in the tape gateway type. +// +// If a specific TapeARN is not specified, AWS Storage Gateway returns a description +// of all virtual tapes found in the VTS associated with your 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 AWS Storage Gateway's +// API operation DescribeTapeArchives for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives +func (c *StorageGateway) DescribeTapeArchives(input *DescribeTapeArchivesInput) (*DescribeTapeArchivesOutput, error) { + req, out := c.DescribeTapeArchivesRequest(input) + return out, req.Send() +} + +// DescribeTapeArchivesWithContext is the same as DescribeTapeArchives with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapeArchives 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 *StorageGateway) DescribeTapeArchivesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, opts ...request.Option) (*DescribeTapeArchivesOutput, error) { + req, out := c.DescribeTapeArchivesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapeArchivesPages iterates over the pages of a DescribeTapeArchives operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapeArchives 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 DescribeTapeArchives operation. +// pageNum := 0 +// err := client.DescribeTapeArchivesPages(params, +// func(page *DescribeTapeArchivesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapeArchivesPages(input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool) error { + return c.DescribeTapeArchivesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapeArchivesPagesWithContext same as DescribeTapeArchivesPages 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 *StorageGateway) DescribeTapeArchivesPagesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapeArchivesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapeArchivesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapeArchivesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTapeRecoveryPoints = "DescribeTapeRecoveryPoints" + +// DescribeTapeRecoveryPointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapeRecoveryPoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeTapeRecoveryPoints for more information on using the DescribeTapeRecoveryPoints +// 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 DescribeTapeRecoveryPointsRequest method. +// req, resp := client.DescribeTapeRecoveryPointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints +func (c *StorageGateway) DescribeTapeRecoveryPointsRequest(input *DescribeTapeRecoveryPointsInput) (req *request.Request, output *DescribeTapeRecoveryPointsOutput) { + op := &request.Operation{ + Name: opDescribeTapeRecoveryPoints, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapeRecoveryPointsInput{} + } + + output = &DescribeTapeRecoveryPointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapeRecoveryPoints API operation for AWS Storage Gateway. +// +// Returns a list of virtual tape recovery points that are available for the +// specified tape gateway. +// +// A recovery point is a point-in-time view of a virtual tape at which all the +// data on the virtual tape is consistent. If your gateway crashes, virtual +// tapes that have recovery points can be recovered to a new gateway. This operation +// is only supported in the tape gateway type. +// +// 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 Storage Gateway's +// API operation DescribeTapeRecoveryPoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints +func (c *StorageGateway) DescribeTapeRecoveryPoints(input *DescribeTapeRecoveryPointsInput) (*DescribeTapeRecoveryPointsOutput, error) { + req, out := c.DescribeTapeRecoveryPointsRequest(input) + return out, req.Send() +} + +// DescribeTapeRecoveryPointsWithContext is the same as DescribeTapeRecoveryPoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapeRecoveryPoints 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 *StorageGateway) DescribeTapeRecoveryPointsWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, opts ...request.Option) (*DescribeTapeRecoveryPointsOutput, error) { + req, out := c.DescribeTapeRecoveryPointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapeRecoveryPointsPages iterates over the pages of a DescribeTapeRecoveryPoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapeRecoveryPoints 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 DescribeTapeRecoveryPoints operation. +// pageNum := 0 +// err := client.DescribeTapeRecoveryPointsPages(params, +// func(page *DescribeTapeRecoveryPointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapeRecoveryPointsPages(input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool) error { + return c.DescribeTapeRecoveryPointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapeRecoveryPointsPagesWithContext same as DescribeTapeRecoveryPointsPages 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 *StorageGateway) DescribeTapeRecoveryPointsPagesWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapeRecoveryPointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapeRecoveryPointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapeRecoveryPointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTapes = "DescribeTapes" + +// DescribeTapesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeTapes for more information on using the DescribeTapes +// 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 DescribeTapesRequest method. +// req, resp := client.DescribeTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes +func (c *StorageGateway) DescribeTapesRequest(input *DescribeTapesInput) (req *request.Request, output *DescribeTapesOutput) { + op := &request.Operation{ + Name: opDescribeTapes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapesInput{} + } + + output = &DescribeTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapes API operation for AWS Storage Gateway. +// +// Returns a description of the specified Amazon Resource Name (ARN) of virtual +// tapes. If a TapeARN is not specified, returns a description of all virtual +// tapes associated with the specified gateway. This operation is only supported +// in the tape gateway type. +// +// 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 Storage Gateway's +// API operation DescribeTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes +func (c *StorageGateway) DescribeTapes(input *DescribeTapesInput) (*DescribeTapesOutput, error) { + req, out := c.DescribeTapesRequest(input) + return out, req.Send() +} + +// DescribeTapesWithContext is the same as DescribeTapes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapes 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 *StorageGateway) DescribeTapesWithContext(ctx aws.Context, input *DescribeTapesInput, opts ...request.Option) (*DescribeTapesOutput, error) { + req, out := c.DescribeTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapesPages iterates over the pages of a DescribeTapes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapes 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 DescribeTapes operation. +// pageNum := 0 +// err := client.DescribeTapesPages(params, +// func(page *DescribeTapesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapesPages(input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool) error { + return c.DescribeTapesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapesPagesWithContext same as DescribeTapesPages 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 *StorageGateway) DescribeTapesPagesWithContext(ctx aws.Context, input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeUploadBuffer = "DescribeUploadBuffer" + +// DescribeUploadBufferRequest generates a "aws/request.Request" representing the +// client's request for the DescribeUploadBuffer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeUploadBuffer for more information on using the DescribeUploadBuffer +// 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 DescribeUploadBufferRequest method. +// req, resp := client.DescribeUploadBufferRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer +func (c *StorageGateway) DescribeUploadBufferRequest(input *DescribeUploadBufferInput) (req *request.Request, output *DescribeUploadBufferOutput) { + op := &request.Operation{ + Name: opDescribeUploadBuffer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeUploadBufferInput{} + } + + output = &DescribeUploadBufferOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeUploadBuffer API operation for AWS Storage Gateway. +// +// Returns information about the upload buffer of a gateway. This operation +// is supported for the stored volume, cached volume and tape gateway types. +// +// The response includes disk IDs that are configured as upload buffer space, +// and it includes the amount of upload buffer space allocated and used. +// +// 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 Storage Gateway's +// API operation DescribeUploadBuffer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer +func (c *StorageGateway) DescribeUploadBuffer(input *DescribeUploadBufferInput) (*DescribeUploadBufferOutput, error) { + req, out := c.DescribeUploadBufferRequest(input) + return out, req.Send() +} + +// DescribeUploadBufferWithContext is the same as DescribeUploadBuffer with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeUploadBuffer 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 *StorageGateway) DescribeUploadBufferWithContext(ctx aws.Context, input *DescribeUploadBufferInput, opts ...request.Option) (*DescribeUploadBufferOutput, error) { + req, out := c.DescribeUploadBufferRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVTLDevices = "DescribeVTLDevices" + +// DescribeVTLDevicesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVTLDevices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeVTLDevices for more information on using the DescribeVTLDevices +// 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 DescribeVTLDevicesRequest method. +// req, resp := client.DescribeVTLDevicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices +func (c *StorageGateway) DescribeVTLDevicesRequest(input *DescribeVTLDevicesInput) (req *request.Request, output *DescribeVTLDevicesOutput) { + op := &request.Operation{ + Name: opDescribeVTLDevices, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeVTLDevicesInput{} + } + + output = &DescribeVTLDevicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVTLDevices API operation for AWS Storage Gateway. +// +// Returns a description of virtual tape library (VTL) devices for the specified +// tape gateway. In the response, AWS Storage Gateway returns VTL device information. +// +// This operation is only supported in the tape gateway type. +// +// 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 Storage Gateway's +// API operation DescribeVTLDevices for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices +func (c *StorageGateway) DescribeVTLDevices(input *DescribeVTLDevicesInput) (*DescribeVTLDevicesOutput, error) { + req, out := c.DescribeVTLDevicesRequest(input) + return out, req.Send() +} + +// DescribeVTLDevicesWithContext is the same as DescribeVTLDevices with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVTLDevices 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 *StorageGateway) DescribeVTLDevicesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, opts ...request.Option) (*DescribeVTLDevicesOutput, error) { + req, out := c.DescribeVTLDevicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeVTLDevicesPages iterates over the pages of a DescribeVTLDevices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeVTLDevices 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 DescribeVTLDevices operation. +// pageNum := 0 +// err := client.DescribeVTLDevicesPages(params, +// func(page *DescribeVTLDevicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeVTLDevicesPages(input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool) error { + return c.DescribeVTLDevicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeVTLDevicesPagesWithContext same as DescribeVTLDevicesPages 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 *StorageGateway) DescribeVTLDevicesPagesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeVTLDevicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeVTLDevicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeVTLDevicesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkingStorage = "DescribeWorkingStorage" + +// DescribeWorkingStorageRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkingStorage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeWorkingStorage for more information on using the DescribeWorkingStorage +// 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 DescribeWorkingStorageRequest method. +// req, resp := client.DescribeWorkingStorageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage +func (c *StorageGateway) DescribeWorkingStorageRequest(input *DescribeWorkingStorageInput) (req *request.Request, output *DescribeWorkingStorageOutput) { + op := &request.Operation{ + Name: opDescribeWorkingStorage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkingStorageInput{} + } + + output = &DescribeWorkingStorageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkingStorage API operation for AWS Storage Gateway. +// +// Returns information about the working storage of a gateway. This operation +// is only supported in the stored volumes gateway type. This operation is deprecated +// in cached volumes API version (20120630). Use DescribeUploadBuffer instead. +// +// Working storage is also referred to as upload buffer. You can also use the +// DescribeUploadBuffer operation to add upload buffer to a stored volume gateway. +// +// The response includes disk IDs that are configured as working storage, and +// it includes the amount of working storage allocated and used. +// +// 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 Storage Gateway's +// API operation DescribeWorkingStorage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage +func (c *StorageGateway) DescribeWorkingStorage(input *DescribeWorkingStorageInput) (*DescribeWorkingStorageOutput, error) { + req, out := c.DescribeWorkingStorageRequest(input) + return out, req.Send() +} + +// DescribeWorkingStorageWithContext is the same as DescribeWorkingStorage with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkingStorage 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 *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, input *DescribeWorkingStorageInput, opts ...request.Option) (*DescribeWorkingStorageOutput, error) { + req, out := c.DescribeWorkingStorageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableGateway = "DisableGateway" + +// DisableGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DisableGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DisableGateway for more information on using the DisableGateway +// 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 DisableGatewayRequest method. +// req, resp := client.DisableGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway +func (c *StorageGateway) DisableGatewayRequest(input *DisableGatewayInput) (req *request.Request, output *DisableGatewayOutput) { + op := &request.Operation{ + Name: opDisableGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableGatewayInput{} + } + + output = &DisableGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableGateway API operation for AWS Storage Gateway. +// +// Disables a tape gateway when the gateway is no longer functioning. For example, +// if your gateway VM is damaged, you can disable the gateway so you can recover +// virtual tapes. +// +// Use this operation for a tape gateway that is not reachable or not functioning. +// This operation is only supported in the tape gateway type. +// +// Once a gateway is disabled it cannot be enabled. +// +// 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 Storage Gateway's +// API operation DisableGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway +func (c *StorageGateway) DisableGateway(input *DisableGatewayInput) (*DisableGatewayOutput, error) { + req, out := c.DisableGatewayRequest(input) + return out, req.Send() +} + +// DisableGatewayWithContext is the same as DisableGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DisableGateway 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 *StorageGateway) DisableGatewayWithContext(ctx aws.Context, input *DisableGatewayInput, opts ...request.Option) (*DisableGatewayOutput, error) { + req, out := c.DisableGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opJoinDomain = "JoinDomain" + +// JoinDomainRequest generates a "aws/request.Request" representing the +// client's request for the JoinDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 JoinDomain for more information on using the JoinDomain +// 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 JoinDomainRequest method. +// req, resp := client.JoinDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain +func (c *StorageGateway) JoinDomainRequest(input *JoinDomainInput) (req *request.Request, output *JoinDomainOutput) { + op := &request.Operation{ + Name: opJoinDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &JoinDomainInput{} + } + + output = &JoinDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// JoinDomain API operation for AWS Storage Gateway. +// +// Adds a file gateway to an Active Directory domain. This operation is only +// supported in the file gateway type that supports the SMB file protocol. +// +// 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 Storage Gateway's +// API operation JoinDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain +func (c *StorageGateway) JoinDomain(input *JoinDomainInput) (*JoinDomainOutput, error) { + req, out := c.JoinDomainRequest(input) + return out, req.Send() +} + +// JoinDomainWithContext is the same as JoinDomain with the addition of +// the ability to pass a context and additional request options. +// +// See JoinDomain 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 *StorageGateway) JoinDomainWithContext(ctx aws.Context, input *JoinDomainInput, opts ...request.Option) (*JoinDomainOutput, error) { + req, out := c.JoinDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFileShares = "ListFileShares" + +// ListFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the ListFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListFileShares for more information on using the ListFileShares +// 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 ListFileSharesRequest method. +// req, resp := client.ListFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares +func (c *StorageGateway) ListFileSharesRequest(input *ListFileSharesInput) (req *request.Request, output *ListFileSharesOutput) { + op := &request.Operation{ + Name: opListFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListFileSharesInput{} + } + + output = &ListFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFileShares API operation for AWS Storage Gateway. +// +// Gets a list of the file shares for a specific file gateway, or the list of +// file shares that belong to the calling user account. This operation is only +// supported in the file gateway type. +// +// 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 Storage Gateway's +// API operation ListFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares +func (c *StorageGateway) ListFileShares(input *ListFileSharesInput) (*ListFileSharesOutput, error) { + req, out := c.ListFileSharesRequest(input) + return out, req.Send() +} + +// ListFileSharesWithContext is the same as ListFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See ListFileShares 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 *StorageGateway) ListFileSharesWithContext(ctx aws.Context, input *ListFileSharesInput, opts ...request.Option) (*ListFileSharesOutput, error) { + req, out := c.ListFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGateways = "ListGateways" + +// ListGatewaysRequest generates a "aws/request.Request" representing the +// client's request for the ListGateways operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListGateways for more information on using the ListGateways +// 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 ListGatewaysRequest method. +// req, resp := client.ListGatewaysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways +func (c *StorageGateway) ListGatewaysRequest(input *ListGatewaysInput) (req *request.Request, output *ListGatewaysOutput) { + op := &request.Operation{ + Name: opListGateways, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListGatewaysInput{} + } + + output = &ListGatewaysOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGateways API operation for AWS Storage Gateway. +// +// Lists gateways owned by an AWS account in a region specified in the request. +// The returned list is ordered by gateway Amazon Resource Name (ARN). +// +// By default, the operation returns a maximum of 100 gateways. This operation +// supports pagination that allows you to optionally reduce the number of gateways +// returned in a response. +// +// If you have more gateways than are returned in a response (that is, the response +// returns only a truncated list of your gateways), the response contains a +// marker that you can specify in your next request to fetch the next page of +// gateways. +// +// 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 Storage Gateway's +// API operation ListGateways for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways +func (c *StorageGateway) ListGateways(input *ListGatewaysInput) (*ListGatewaysOutput, error) { + req, out := c.ListGatewaysRequest(input) + return out, req.Send() +} + +// ListGatewaysWithContext is the same as ListGateways with the addition of +// the ability to pass a context and additional request options. +// +// See ListGateways 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 *StorageGateway) ListGatewaysWithContext(ctx aws.Context, input *ListGatewaysInput, opts ...request.Option) (*ListGatewaysOutput, error) { + req, out := c.ListGatewaysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListGatewaysPages iterates over the pages of a ListGateways operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListGateways 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 ListGateways operation. +// pageNum := 0 +// err := client.ListGatewaysPages(params, +// func(page *ListGatewaysOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) ListGatewaysPages(input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool) error { + return c.ListGatewaysPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListGatewaysPagesWithContext same as ListGatewaysPages 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 *StorageGateway) ListGatewaysPagesWithContext(ctx aws.Context, input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGatewaysInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGatewaysRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListGatewaysOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLocalDisks = "ListLocalDisks" + +// ListLocalDisksRequest generates a "aws/request.Request" representing the +// client's request for the ListLocalDisks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListLocalDisks for more information on using the ListLocalDisks +// 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 ListLocalDisksRequest method. +// req, resp := client.ListLocalDisksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks +func (c *StorageGateway) ListLocalDisksRequest(input *ListLocalDisksInput) (req *request.Request, output *ListLocalDisksOutput) { + op := &request.Operation{ + Name: opListLocalDisks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLocalDisksInput{} + } + + output = &ListLocalDisksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLocalDisks API operation for AWS Storage Gateway. +// +// Returns a list of the gateway's local disks. To specify which gateway to +// describe, you use the Amazon Resource Name (ARN) of the gateway in the body +// of the request. +// +// The request returns a list of all disks, specifying which are configured +// as working storage, cache storage, or stored volume or not configured at +// all. The response includes a DiskStatus field. This field can have a value +// of present (the disk is available to use), missing (the disk is no longer +// connected to the gateway), or mismatch (the disk node is occupied by a disk +// that has incorrect metadata or the disk content is corrupted). +// +// 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 Storage Gateway's +// API operation ListLocalDisks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks +func (c *StorageGateway) ListLocalDisks(input *ListLocalDisksInput) (*ListLocalDisksOutput, error) { + req, out := c.ListLocalDisksRequest(input) + return out, req.Send() +} + +// ListLocalDisksWithContext is the same as ListLocalDisks with the addition of +// the ability to pass a context and additional request options. +// +// See ListLocalDisks 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 *StorageGateway) ListLocalDisksWithContext(ctx aws.Context, input *ListLocalDisksInput, opts ...request.Option) (*ListLocalDisksOutput, error) { + req, out := c.ListLocalDisksRequest(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 +// successfuly. +// +// 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/storagegateway-2013-06-30/ListTagsForResource +func (c *StorageGateway) 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 Storage Gateway. +// +// Lists the tags that have been added to the specified resource. This operation +// is only supported in the cached volume, stored volume and tape gateway type. +// +// 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 Storage Gateway's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource +func (c *StorageGateway) 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 *StorageGateway) 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 opListTapes = "ListTapes" + +// ListTapesRequest generates a "aws/request.Request" representing the +// client's request for the ListTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListTapes for more information on using the ListTapes +// 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 ListTapesRequest method. +// req, resp := client.ListTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes +func (c *StorageGateway) ListTapesRequest(input *ListTapesInput) (req *request.Request, output *ListTapesOutput) { + op := &request.Operation{ + Name: opListTapes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTapesInput{} + } + + output = &ListTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTapes API operation for AWS Storage Gateway. +// +// Lists virtual tapes in your virtual tape library (VTL) and your virtual tape +// shelf (VTS). You specify the tapes to list by specifying one or more tape +// Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation +// lists all virtual tapes in both your VTL and VTS. +// +// This operation supports pagination. By default, the operation returns a maximum +// of up to 100 tapes. You can optionally specify the Limit parameter in the +// body to limit the number of tapes in the response. If the number of tapes +// returned in the response is truncated, the response includes a Marker element +// that you can use in your subsequent request to retrieve the next set of tapes. +// This operation is only supported in the tape gateway type. +// +// 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 Storage Gateway's +// API operation ListTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes +func (c *StorageGateway) ListTapes(input *ListTapesInput) (*ListTapesOutput, error) { + req, out := c.ListTapesRequest(input) + return out, req.Send() +} + +// ListTapesWithContext is the same as ListTapes with the addition of +// the ability to pass a context and additional request options. +// +// See ListTapes 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 *StorageGateway) ListTapesWithContext(ctx aws.Context, input *ListTapesInput, opts ...request.Option) (*ListTapesOutput, error) { + req, out := c.ListTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumeInitiators = "ListVolumeInitiators" + +// ListVolumeInitiatorsRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumeInitiators operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListVolumeInitiators for more information on using the ListVolumeInitiators +// 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 ListVolumeInitiatorsRequest method. +// req, resp := client.ListVolumeInitiatorsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators +func (c *StorageGateway) ListVolumeInitiatorsRequest(input *ListVolumeInitiatorsInput) (req *request.Request, output *ListVolumeInitiatorsOutput) { + op := &request.Operation{ + Name: opListVolumeInitiators, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVolumeInitiatorsInput{} + } + + output = &ListVolumeInitiatorsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumeInitiators API operation for AWS Storage Gateway. +// +// Lists iSCSI initiators that are connected to a volume. You can use this operation +// to determine whether a volume is being used or not. This operation is only +// supported in the cached volume and stored volume gateway types. +// +// 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 Storage Gateway's +// API operation ListVolumeInitiators for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators +func (c *StorageGateway) ListVolumeInitiators(input *ListVolumeInitiatorsInput) (*ListVolumeInitiatorsOutput, error) { + req, out := c.ListVolumeInitiatorsRequest(input) + return out, req.Send() +} + +// ListVolumeInitiatorsWithContext is the same as ListVolumeInitiators with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumeInitiators 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 *StorageGateway) ListVolumeInitiatorsWithContext(ctx aws.Context, input *ListVolumeInitiatorsInput, opts ...request.Option) (*ListVolumeInitiatorsOutput, error) { + req, out := c.ListVolumeInitiatorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumeRecoveryPoints = "ListVolumeRecoveryPoints" + +// ListVolumeRecoveryPointsRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumeRecoveryPoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListVolumeRecoveryPoints for more information on using the ListVolumeRecoveryPoints +// 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 ListVolumeRecoveryPointsRequest method. +// req, resp := client.ListVolumeRecoveryPointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints +func (c *StorageGateway) ListVolumeRecoveryPointsRequest(input *ListVolumeRecoveryPointsInput) (req *request.Request, output *ListVolumeRecoveryPointsOutput) { + op := &request.Operation{ + Name: opListVolumeRecoveryPoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVolumeRecoveryPointsInput{} + } + + output = &ListVolumeRecoveryPointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumeRecoveryPoints API operation for AWS Storage Gateway. +// +// Lists the recovery points for a specified gateway. This operation is only +// supported in the cached volume gateway type. +// +// Each cache volume has one recovery point. A volume recovery point is a point +// in time at which all data of the volume is consistent and from which you +// can create a snapshot or clone a new cached volume from a source volume. +// To create a snapshot from a volume recovery point use the CreateSnapshotFromVolumeRecoveryPoint +// operation. +// +// 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 Storage Gateway's +// API operation ListVolumeRecoveryPoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints +func (c *StorageGateway) ListVolumeRecoveryPoints(input *ListVolumeRecoveryPointsInput) (*ListVolumeRecoveryPointsOutput, error) { + req, out := c.ListVolumeRecoveryPointsRequest(input) + return out, req.Send() +} + +// ListVolumeRecoveryPointsWithContext is the same as ListVolumeRecoveryPoints with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumeRecoveryPoints 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 *StorageGateway) ListVolumeRecoveryPointsWithContext(ctx aws.Context, input *ListVolumeRecoveryPointsInput, opts ...request.Option) (*ListVolumeRecoveryPointsOutput, error) { + req, out := c.ListVolumeRecoveryPointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumes = "ListVolumes" + +// ListVolumesRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListVolumes for more information on using the ListVolumes +// 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 ListVolumesRequest method. +// req, resp := client.ListVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes +func (c *StorageGateway) ListVolumesRequest(input *ListVolumesInput) (req *request.Request, output *ListVolumesOutput) { + op := &request.Operation{ + Name: opListVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListVolumesInput{} + } + + output = &ListVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumes API operation for AWS Storage Gateway. +// +// Lists the iSCSI stored volumes of a gateway. Results are sorted by volume +// ARN. The response includes only the volume ARNs. If you want additional volume +// information, use the DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes +// API. +// +// The operation supports pagination. By default, the operation returns a maximum +// of up to 100 volumes. You can optionally specify the Limit field in the body +// to limit the number of volumes in the response. If the number of volumes +// returned in the response is truncated, the response includes a Marker field. +// You can use this Marker value in your subsequent request to retrieve the +// next set of volumes. This operation is only supported in the cached volume +// and stored volume gateway types. +// +// 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 Storage Gateway's +// API operation ListVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes +func (c *StorageGateway) ListVolumes(input *ListVolumesInput) (*ListVolumesOutput, error) { + req, out := c.ListVolumesRequest(input) + return out, req.Send() +} + +// ListVolumesWithContext is the same as ListVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumes 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 *StorageGateway) ListVolumesWithContext(ctx aws.Context, input *ListVolumesInput, opts ...request.Option) (*ListVolumesOutput, error) { + req, out := c.ListVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListVolumesPages iterates over the pages of a ListVolumes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListVolumes 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 ListVolumes operation. +// pageNum := 0 +// err := client.ListVolumesPages(params, +// func(page *ListVolumesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) ListVolumesPages(input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool) error { + return c.ListVolumesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListVolumesPagesWithContext same as ListVolumesPages 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 *StorageGateway) ListVolumesPagesWithContext(ctx aws.Context, input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListVolumesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListVolumesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListVolumesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opNotifyWhenUploaded = "NotifyWhenUploaded" + +// NotifyWhenUploadedRequest generates a "aws/request.Request" representing the +// client's request for the NotifyWhenUploaded operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 NotifyWhenUploaded for more information on using the NotifyWhenUploaded +// 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 NotifyWhenUploadedRequest method. +// req, resp := client.NotifyWhenUploadedRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded +func (c *StorageGateway) NotifyWhenUploadedRequest(input *NotifyWhenUploadedInput) (req *request.Request, output *NotifyWhenUploadedOutput) { + op := &request.Operation{ + Name: opNotifyWhenUploaded, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &NotifyWhenUploadedInput{} + } + + output = &NotifyWhenUploadedOutput{} + req = c.newRequest(op, input, output) + return +} + +// NotifyWhenUploaded API operation for AWS Storage Gateway. +// +// Sends you notification through CloudWatch Events when all files written to +// your NFS file share have been uploaded to Amazon S3. +// +// AWS Storage Gateway can send a notification through Amazon CloudWatch Events +// when all files written to your file share up to that point in time have been +// uploaded to Amazon S3. These files include files written to the NFS file +// share up to the time that you make a request for notification. When the upload +// is done, Storage Gateway sends you notification through an Amazon CloudWatch +// Event. You can configure CloudWatch Events to send the notification through +// event targets such as Amazon SNS or AWS Lambda function. This operation is +// only supported in the file gateway type. +// +// For more information, see Getting File Upload Notification in the Storage +// Gateway User Guide (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-upload-notification). +// +// 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 Storage Gateway's +// API operation NotifyWhenUploaded for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded +func (c *StorageGateway) NotifyWhenUploaded(input *NotifyWhenUploadedInput) (*NotifyWhenUploadedOutput, error) { + req, out := c.NotifyWhenUploadedRequest(input) + return out, req.Send() +} + +// NotifyWhenUploadedWithContext is the same as NotifyWhenUploaded with the addition of +// the ability to pass a context and additional request options. +// +// See NotifyWhenUploaded 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 *StorageGateway) NotifyWhenUploadedWithContext(ctx aws.Context, input *NotifyWhenUploadedInput, opts ...request.Option) (*NotifyWhenUploadedOutput, error) { + req, out := c.NotifyWhenUploadedRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRefreshCache = "RefreshCache" + +// RefreshCacheRequest generates a "aws/request.Request" representing the +// client's request for the RefreshCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RefreshCache for more information on using the RefreshCache +// 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 RefreshCacheRequest method. +// req, resp := client.RefreshCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache +func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *request.Request, output *RefreshCacheOutput) { + op := &request.Operation{ + Name: opRefreshCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RefreshCacheInput{} + } + + output = &RefreshCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// RefreshCache API operation for AWS Storage Gateway. +// +// Refreshes the cache for the specified file share. This operation finds objects +// in the Amazon S3 bucket that were added, removed or replaced since the gateway +// last listed the bucket's contents and cached the results. This operation +// is only supported in the file gateway type. +// +// 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 Storage Gateway's +// API operation RefreshCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache +func (c *StorageGateway) RefreshCache(input *RefreshCacheInput) (*RefreshCacheOutput, error) { + req, out := c.RefreshCacheRequest(input) + return out, req.Send() +} + +// RefreshCacheWithContext is the same as RefreshCache with the addition of +// the ability to pass a context and additional request options. +// +// See RefreshCache 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 *StorageGateway) RefreshCacheWithContext(ctx aws.Context, input *RefreshCacheInput, opts ...request.Option) (*RefreshCacheOutput, error) { + req, out := c.RefreshCacheRequest(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 +// successfuly. +// +// 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/storagegateway-2013-06-30/RemoveTagsFromResource +func (c *StorageGateway) 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 AWS Storage Gateway. +// +// Removes one or more tags from the specified resource. This operation is only +// supported in the cached volume, stored volume and tape gateway types. +// +// 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 Storage Gateway's +// API operation RemoveTagsFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource +func (c *StorageGateway) 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 *StorageGateway) 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() +} + +const opResetCache = "ResetCache" + +// ResetCacheRequest generates a "aws/request.Request" representing the +// client's request for the ResetCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ResetCache for more information on using the ResetCache +// 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 ResetCacheRequest method. +// req, resp := client.ResetCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache +func (c *StorageGateway) ResetCacheRequest(input *ResetCacheInput) (req *request.Request, output *ResetCacheOutput) { + op := &request.Operation{ + Name: opResetCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetCacheInput{} + } + + output = &ResetCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetCache API operation for AWS Storage Gateway. +// +// Resets all cache disks that have encountered a error and makes the disks +// available for reconfiguration as cache storage. If your cache disk encounters +// a error, the gateway prevents read and write operations on virtual tapes +// in the gateway. For example, an error can occur when a disk is corrupted +// or removed from the gateway. When a cache is reset, the gateway loses its +// cache storage. At this point you can reconfigure the disks as cache disks. +// This operation is only supported in the cached volume and tape types. +// +// If the cache disk you are resetting contains data that has not been uploaded +// to Amazon S3 yet, that data can be lost. After you reset cache disks, there +// will be no configured cache disks left in the gateway, so you must configure +// at least one new cache disk for your gateway to function properly. +// +// 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 Storage Gateway's +// API operation ResetCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache +func (c *StorageGateway) ResetCache(input *ResetCacheInput) (*ResetCacheOutput, error) { + req, out := c.ResetCacheRequest(input) + return out, req.Send() +} + +// ResetCacheWithContext is the same as ResetCache with the addition of +// the ability to pass a context and additional request options. +// +// See ResetCache 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 *StorageGateway) ResetCacheWithContext(ctx aws.Context, input *ResetCacheInput, opts ...request.Option) (*ResetCacheOutput, error) { + req, out := c.ResetCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRetrieveTapeArchive = "RetrieveTapeArchive" + +// RetrieveTapeArchiveRequest generates a "aws/request.Request" representing the +// client's request for the RetrieveTapeArchive operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RetrieveTapeArchive for more information on using the RetrieveTapeArchive +// 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 RetrieveTapeArchiveRequest method. +// req, resp := client.RetrieveTapeArchiveRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive +func (c *StorageGateway) RetrieveTapeArchiveRequest(input *RetrieveTapeArchiveInput) (req *request.Request, output *RetrieveTapeArchiveOutput) { + op := &request.Operation{ + Name: opRetrieveTapeArchive, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetrieveTapeArchiveInput{} + } + + output = &RetrieveTapeArchiveOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetrieveTapeArchive API operation for AWS Storage Gateway. +// +// Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a +// tape gateway. Virtual tapes archived in the VTS are not associated with any +// gateway. However after a tape is retrieved, it is associated with a gateway, +// even though it is also listed in the VTS, that is, archive. This operation +// is only supported in the tape gateway type. +// +// Once a tape is successfully retrieved to a gateway, it cannot be retrieved +// again to another gateway. You must archive the tape again before you can +// retrieve it to another gateway. This operation is only supported in the tape +// gateway type. +// +// 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 Storage Gateway's +// API operation RetrieveTapeArchive for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive +func (c *StorageGateway) RetrieveTapeArchive(input *RetrieveTapeArchiveInput) (*RetrieveTapeArchiveOutput, error) { + req, out := c.RetrieveTapeArchiveRequest(input) + return out, req.Send() +} + +// RetrieveTapeArchiveWithContext is the same as RetrieveTapeArchive with the addition of +// the ability to pass a context and additional request options. +// +// See RetrieveTapeArchive 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 *StorageGateway) RetrieveTapeArchiveWithContext(ctx aws.Context, input *RetrieveTapeArchiveInput, opts ...request.Option) (*RetrieveTapeArchiveOutput, error) { + req, out := c.RetrieveTapeArchiveRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRetrieveTapeRecoveryPoint = "RetrieveTapeRecoveryPoint" + +// RetrieveTapeRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the RetrieveTapeRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RetrieveTapeRecoveryPoint for more information on using the RetrieveTapeRecoveryPoint +// 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 RetrieveTapeRecoveryPointRequest method. +// req, resp := client.RetrieveTapeRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint +func (c *StorageGateway) RetrieveTapeRecoveryPointRequest(input *RetrieveTapeRecoveryPointInput) (req *request.Request, output *RetrieveTapeRecoveryPointOutput) { + op := &request.Operation{ + Name: opRetrieveTapeRecoveryPoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetrieveTapeRecoveryPointInput{} + } + + output = &RetrieveTapeRecoveryPointOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetrieveTapeRecoveryPoint API operation for AWS Storage Gateway. +// +// Retrieves the recovery point for the specified virtual tape. This operation +// is only supported in the tape gateway type. +// +// A recovery point is a point in time view of a virtual tape at which all the +// data on the tape is consistent. If your gateway crashes, virtual tapes that +// have recovery points can be recovered to a new gateway. +// +// The virtual tape can be retrieved to only one gateway. The retrieved tape +// is read-only. The virtual tape can be retrieved to only a tape gateway. There +// is no charge for retrieving recovery points. +// +// 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 Storage Gateway's +// API operation RetrieveTapeRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint +func (c *StorageGateway) RetrieveTapeRecoveryPoint(input *RetrieveTapeRecoveryPointInput) (*RetrieveTapeRecoveryPointOutput, error) { + req, out := c.RetrieveTapeRecoveryPointRequest(input) + return out, req.Send() +} + +// RetrieveTapeRecoveryPointWithContext is the same as RetrieveTapeRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See RetrieveTapeRecoveryPoint 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 *StorageGateway) RetrieveTapeRecoveryPointWithContext(ctx aws.Context, input *RetrieveTapeRecoveryPointInput, opts ...request.Option) (*RetrieveTapeRecoveryPointOutput, error) { + req, out := c.RetrieveTapeRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetLocalConsolePassword = "SetLocalConsolePassword" + +// SetLocalConsolePasswordRequest generates a "aws/request.Request" representing the +// client's request for the SetLocalConsolePassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 SetLocalConsolePassword for more information on using the SetLocalConsolePassword +// 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 SetLocalConsolePasswordRequest method. +// req, resp := client.SetLocalConsolePasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword +func (c *StorageGateway) SetLocalConsolePasswordRequest(input *SetLocalConsolePasswordInput) (req *request.Request, output *SetLocalConsolePasswordOutput) { + op := &request.Operation{ + Name: opSetLocalConsolePassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetLocalConsolePasswordInput{} + } + + output = &SetLocalConsolePasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// SetLocalConsolePassword API operation for AWS Storage Gateway. +// +// Sets the password for your VM local console. When you log in to the local +// console for the first time, you log in to the VM with the default credentials. +// We recommend that you set a new password. You don't need to know the default +// password to set a new password. +// +// 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 Storage Gateway's +// API operation SetLocalConsolePassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword +func (c *StorageGateway) SetLocalConsolePassword(input *SetLocalConsolePasswordInput) (*SetLocalConsolePasswordOutput, error) { + req, out := c.SetLocalConsolePasswordRequest(input) + return out, req.Send() +} + +// SetLocalConsolePasswordWithContext is the same as SetLocalConsolePassword with the addition of +// the ability to pass a context and additional request options. +// +// See SetLocalConsolePassword 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 *StorageGateway) SetLocalConsolePasswordWithContext(ctx aws.Context, input *SetLocalConsolePasswordInput, opts ...request.Option) (*SetLocalConsolePasswordOutput, error) { + req, out := c.SetLocalConsolePasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetSMBGuestPassword = "SetSMBGuestPassword" + +// SetSMBGuestPasswordRequest generates a "aws/request.Request" representing the +// client's request for the SetSMBGuestPassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 SetSMBGuestPassword for more information on using the SetSMBGuestPassword +// 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 SetSMBGuestPasswordRequest method. +// req, resp := client.SetSMBGuestPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword +func (c *StorageGateway) SetSMBGuestPasswordRequest(input *SetSMBGuestPasswordInput) (req *request.Request, output *SetSMBGuestPasswordOutput) { + op := &request.Operation{ + Name: opSetSMBGuestPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetSMBGuestPasswordInput{} + } + + output = &SetSMBGuestPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// SetSMBGuestPassword API operation for AWS Storage Gateway. +// +// Sets the password for the guest user “smbguest”. "smbguest" is the user when +// the Authentication method for the file share is “GuestAccess”. +// +// 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 Storage Gateway's +// API operation SetSMBGuestPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword +func (c *StorageGateway) SetSMBGuestPassword(input *SetSMBGuestPasswordInput) (*SetSMBGuestPasswordOutput, error) { + req, out := c.SetSMBGuestPasswordRequest(input) + return out, req.Send() +} + +// SetSMBGuestPasswordWithContext is the same as SetSMBGuestPassword with the addition of +// the ability to pass a context and additional request options. +// +// See SetSMBGuestPassword 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 *StorageGateway) SetSMBGuestPasswordWithContext(ctx aws.Context, input *SetSMBGuestPasswordInput, opts ...request.Option) (*SetSMBGuestPasswordOutput, error) { + req, out := c.SetSMBGuestPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opShutdownGateway = "ShutdownGateway" + +// ShutdownGatewayRequest generates a "aws/request.Request" representing the +// client's request for the ShutdownGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ShutdownGateway for more information on using the ShutdownGateway +// 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 ShutdownGatewayRequest method. +// req, resp := client.ShutdownGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway +func (c *StorageGateway) ShutdownGatewayRequest(input *ShutdownGatewayInput) (req *request.Request, output *ShutdownGatewayOutput) { + op := &request.Operation{ + Name: opShutdownGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ShutdownGatewayInput{} + } + + output = &ShutdownGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// ShutdownGateway API operation for AWS Storage Gateway. +// +// Shuts down a gateway. To specify which gateway to shut down, use the Amazon +// Resource Name (ARN) of the gateway in the body of your request. +// +// The operation shuts down the gateway service component running in the gateway's +// virtual machine (VM) and not the host VM. +// +// If you want to shut down the VM, it is recommended that you first shut down +// the gateway component in the VM to avoid unpredictable conditions. +// +// After the gateway is shutdown, you cannot call any other API except StartGateway, +// DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. +// Your applications cannot read from or write to the gateway's storage volumes, +// and there are no snapshots taken. +// +// When you make a shutdown request, you will get a 200 OK success response +// immediately. However, it might take some time for the gateway to shut down. +// You can call the DescribeGatewayInformation API to check the status. For +// more information, see ActivateGateway. +// +// If do not intend to use the gateway again, you must delete the gateway (using +// DeleteGateway) to no longer pay software charges associated with the gateway. +// +// 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 Storage Gateway's +// API operation ShutdownGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway +func (c *StorageGateway) ShutdownGateway(input *ShutdownGatewayInput) (*ShutdownGatewayOutput, error) { + req, out := c.ShutdownGatewayRequest(input) + return out, req.Send() +} + +// ShutdownGatewayWithContext is the same as ShutdownGateway with the addition of +// the ability to pass a context and additional request options. +// +// See ShutdownGateway 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 *StorageGateway) ShutdownGatewayWithContext(ctx aws.Context, input *ShutdownGatewayInput, opts ...request.Option) (*ShutdownGatewayOutput, error) { + req, out := c.ShutdownGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartGateway = "StartGateway" + +// StartGatewayRequest generates a "aws/request.Request" representing the +// client's request for the StartGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 StartGateway for more information on using the StartGateway +// 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 StartGatewayRequest method. +// req, resp := client.StartGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway +func (c *StorageGateway) StartGatewayRequest(input *StartGatewayInput) (req *request.Request, output *StartGatewayOutput) { + op := &request.Operation{ + Name: opStartGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartGatewayInput{} + } + + output = &StartGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartGateway API operation for AWS Storage Gateway. +// +// Starts a gateway that you previously shut down (see ShutdownGateway). After +// the gateway starts, you can then make other API calls, your applications +// can read from or write to the gateway's storage volumes and you will be able +// to take snapshot backups. +// +// When you make a request, you will get a 200 OK success response immediately. +// However, it might take some time for the gateway to be ready. You should +// call DescribeGatewayInformation and check the status before making any additional +// API calls. For more information, see ActivateGateway. +// +// To specify which gateway to start, use the Amazon Resource Name (ARN) of +// the gateway in your request. +// +// 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 Storage Gateway's +// API operation StartGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway +func (c *StorageGateway) StartGateway(input *StartGatewayInput) (*StartGatewayOutput, error) { + req, out := c.StartGatewayRequest(input) + return out, req.Send() +} + +// StartGatewayWithContext is the same as StartGateway with the addition of +// the ability to pass a context and additional request options. +// +// See StartGateway 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 *StorageGateway) StartGatewayWithContext(ctx aws.Context, input *StartGatewayInput, opts ...request.Option) (*StartGatewayOutput, error) { + req, out := c.StartGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" + +// UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateBandwidthRateLimit for more information on using the UpdateBandwidthRateLimit +// 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 UpdateBandwidthRateLimitRequest method. +// req, resp := client.UpdateBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit +func (c *StorageGateway) UpdateBandwidthRateLimitRequest(input *UpdateBandwidthRateLimitInput) (req *request.Request, output *UpdateBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opUpdateBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateBandwidthRateLimitInput{} + } + + output = &UpdateBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Updates the bandwidth rate limits of a gateway. You can update both the upload +// and download bandwidth rate limit or specify only one of the two. If you +// don't set a bandwidth rate limit, the existing rate limit remains. +// +// By default, a gateway's bandwidth rate limits are not set. If you don't set +// any limit, the gateway does not have any limitations on its bandwidth usage +// and could potentially use the maximum available bandwidth. +// +// To specify which gateway to update, use the Amazon Resource Name (ARN) of +// the gateway in your request. +// +// 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 Storage Gateway's +// API operation UpdateBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit +func (c *StorageGateway) UpdateBandwidthRateLimit(input *UpdateBandwidthRateLimitInput) (*UpdateBandwidthRateLimitOutput, error) { + req, out := c.UpdateBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// UpdateBandwidthRateLimitWithContext is the same as UpdateBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBandwidthRateLimit 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 *StorageGateway) UpdateBandwidthRateLimitWithContext(ctx aws.Context, input *UpdateBandwidthRateLimitInput, opts ...request.Option) (*UpdateBandwidthRateLimitOutput, error) { + req, out := c.UpdateBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateChapCredentials = "UpdateChapCredentials" + +// UpdateChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateChapCredentials for more information on using the UpdateChapCredentials +// 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 UpdateChapCredentialsRequest method. +// req, resp := client.UpdateChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials +func (c *StorageGateway) UpdateChapCredentialsRequest(input *UpdateChapCredentialsInput) (req *request.Request, output *UpdateChapCredentialsOutput) { + op := &request.Operation{ + Name: opUpdateChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateChapCredentialsInput{} + } + + output = &UpdateChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateChapCredentials API operation for AWS Storage Gateway. +// +// Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials +// for a specified iSCSI target. By default, a gateway does not have CHAP enabled; +// however, for added security, you might use it. +// +// When you update CHAP credentials, all existing connections on the target +// are closed and initiators must reconnect with the new credentials. +// +// 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 Storage Gateway's +// API operation UpdateChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials +func (c *StorageGateway) UpdateChapCredentials(input *UpdateChapCredentialsInput) (*UpdateChapCredentialsOutput, error) { + req, out := c.UpdateChapCredentialsRequest(input) + return out, req.Send() +} + +// UpdateChapCredentialsWithContext is the same as UpdateChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateChapCredentials 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 *StorageGateway) UpdateChapCredentialsWithContext(ctx aws.Context, input *UpdateChapCredentialsInput, opts ...request.Option) (*UpdateChapCredentialsOutput, error) { + req, out := c.UpdateChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGatewayInformation = "UpdateGatewayInformation" + +// UpdateGatewayInformationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGatewayInformation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateGatewayInformation for more information on using the UpdateGatewayInformation +// 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 UpdateGatewayInformationRequest method. +// req, resp := client.UpdateGatewayInformationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation +func (c *StorageGateway) UpdateGatewayInformationRequest(input *UpdateGatewayInformationInput) (req *request.Request, output *UpdateGatewayInformationOutput) { + op := &request.Operation{ + Name: opUpdateGatewayInformation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGatewayInformationInput{} + } + + output = &UpdateGatewayInformationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGatewayInformation API operation for AWS Storage Gateway. +// +// Updates a gateway's metadata, which includes the gateway's name and time +// zone. To specify which gateway to update, use the Amazon Resource Name (ARN) +// of the gateway in your request. +// +// For Gateways activated after September 2, 2015, the gateway's ARN contains +// the gateway ID rather than the gateway name. However, changing the name of +// the gateway has no effect on the gateway's ARN. +// +// 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 Storage Gateway's +// API operation UpdateGatewayInformation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation +func (c *StorageGateway) UpdateGatewayInformation(input *UpdateGatewayInformationInput) (*UpdateGatewayInformationOutput, error) { + req, out := c.UpdateGatewayInformationRequest(input) + return out, req.Send() +} + +// UpdateGatewayInformationWithContext is the same as UpdateGatewayInformation with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGatewayInformation 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 *StorageGateway) UpdateGatewayInformationWithContext(ctx aws.Context, input *UpdateGatewayInformationInput, opts ...request.Option) (*UpdateGatewayInformationOutput, error) { + req, out := c.UpdateGatewayInformationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGatewaySoftwareNow = "UpdateGatewaySoftwareNow" + +// UpdateGatewaySoftwareNowRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGatewaySoftwareNow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateGatewaySoftwareNow for more information on using the UpdateGatewaySoftwareNow +// 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 UpdateGatewaySoftwareNowRequest method. +// req, resp := client.UpdateGatewaySoftwareNowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow +func (c *StorageGateway) UpdateGatewaySoftwareNowRequest(input *UpdateGatewaySoftwareNowInput) (req *request.Request, output *UpdateGatewaySoftwareNowOutput) { + op := &request.Operation{ + Name: opUpdateGatewaySoftwareNow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGatewaySoftwareNowInput{} + } + + output = &UpdateGatewaySoftwareNowOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGatewaySoftwareNow API operation for AWS Storage Gateway. +// +// Updates the gateway virtual machine (VM) software. The request immediately +// triggers the software update. +// +// When you make this request, you get a 200 OK success response immediately. +// However, it might take some time for the update to complete. You can call +// DescribeGatewayInformation to verify the gateway is in the STATE_RUNNING +// state. +// +// A software update forces a system restart of your gateway. You can minimize +// the chance of any disruption to your applications by increasing your iSCSI +// Initiators' timeouts. For more information about increasing iSCSI Initiator +// timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings +// (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorWindowsClient.html#CustomizeWindowsiSCSISettings) +// and Customizing Your Linux iSCSI Settings (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorRedHatClient.html#CustomizeLinuxiSCSISettings), +// respectively. +// +// 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 Storage Gateway's +// API operation UpdateGatewaySoftwareNow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow +func (c *StorageGateway) UpdateGatewaySoftwareNow(input *UpdateGatewaySoftwareNowInput) (*UpdateGatewaySoftwareNowOutput, error) { + req, out := c.UpdateGatewaySoftwareNowRequest(input) + return out, req.Send() +} + +// UpdateGatewaySoftwareNowWithContext is the same as UpdateGatewaySoftwareNow with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGatewaySoftwareNow 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 *StorageGateway) UpdateGatewaySoftwareNowWithContext(ctx aws.Context, input *UpdateGatewaySoftwareNowInput, opts ...request.Option) (*UpdateGatewaySoftwareNowOutput, error) { + req, out := c.UpdateGatewaySoftwareNowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateMaintenanceStartTime = "UpdateMaintenanceStartTime" + +// UpdateMaintenanceStartTimeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateMaintenanceStartTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateMaintenanceStartTime for more information on using the UpdateMaintenanceStartTime +// 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 UpdateMaintenanceStartTimeRequest method. +// req, resp := client.UpdateMaintenanceStartTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime +func (c *StorageGateway) UpdateMaintenanceStartTimeRequest(input *UpdateMaintenanceStartTimeInput) (req *request.Request, output *UpdateMaintenanceStartTimeOutput) { + op := &request.Operation{ + Name: opUpdateMaintenanceStartTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateMaintenanceStartTimeInput{} + } + + output = &UpdateMaintenanceStartTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateMaintenanceStartTime API operation for AWS Storage Gateway. +// +// Updates a gateway's weekly maintenance start time information, including +// day and time of the week. The maintenance time is the time in your gateway's +// time zone. +// +// 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 Storage Gateway's +// API operation UpdateMaintenanceStartTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime +func (c *StorageGateway) UpdateMaintenanceStartTime(input *UpdateMaintenanceStartTimeInput) (*UpdateMaintenanceStartTimeOutput, error) { + req, out := c.UpdateMaintenanceStartTimeRequest(input) + return out, req.Send() +} + +// UpdateMaintenanceStartTimeWithContext is the same as UpdateMaintenanceStartTime with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateMaintenanceStartTime 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 *StorageGateway) UpdateMaintenanceStartTimeWithContext(ctx aws.Context, input *UpdateMaintenanceStartTimeInput, opts ...request.Option) (*UpdateMaintenanceStartTimeOutput, error) { + req, out := c.UpdateMaintenanceStartTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNFSFileShare = "UpdateNFSFileShare" + +// UpdateNFSFileShareRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNFSFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateNFSFileShare for more information on using the UpdateNFSFileShare +// 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 UpdateNFSFileShareRequest method. +// req, resp := client.UpdateNFSFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare +func (c *StorageGateway) UpdateNFSFileShareRequest(input *UpdateNFSFileShareInput) (req *request.Request, output *UpdateNFSFileShareOutput) { + op := &request.Operation{ + Name: opUpdateNFSFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNFSFileShareInput{} + } + + output = &UpdateNFSFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateNFSFileShare API operation for AWS Storage Gateway. +// +// Updates a Network File System (NFS) file share. This operation is only supported +// in the file gateway type. +// +// To leave a file share field unchanged, set the corresponding input field +// to null. +// +// Updates the following file share setting: +// +// * Default storage class for your S3 bucket +// +// * Metadata defaults for your S3 bucket +// +// * Allowed NFS clients for your file share +// +// * Squash settings +// +// * Write status of your file share +// +// To leave a file share field unchanged, set the corresponding input field +// to null. This operation is only supported in file gateways. +// +// 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 Storage Gateway's +// API operation UpdateNFSFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare +func (c *StorageGateway) UpdateNFSFileShare(input *UpdateNFSFileShareInput) (*UpdateNFSFileShareOutput, error) { + req, out := c.UpdateNFSFileShareRequest(input) + return out, req.Send() +} + +// UpdateNFSFileShareWithContext is the same as UpdateNFSFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNFSFileShare 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 *StorageGateway) UpdateNFSFileShareWithContext(ctx aws.Context, input *UpdateNFSFileShareInput, opts ...request.Option) (*UpdateNFSFileShareOutput, error) { + req, out := c.UpdateNFSFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSMBFileShare = "UpdateSMBFileShare" + +// UpdateSMBFileShareRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSMBFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateSMBFileShare for more information on using the UpdateSMBFileShare +// 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 UpdateSMBFileShareRequest method. +// req, resp := client.UpdateSMBFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare +func (c *StorageGateway) UpdateSMBFileShareRequest(input *UpdateSMBFileShareInput) (req *request.Request, output *UpdateSMBFileShareOutput) { + op := &request.Operation{ + Name: opUpdateSMBFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSMBFileShareInput{} + } + + output = &UpdateSMBFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSMBFileShare API operation for AWS Storage Gateway. +// +// Updates a Server Message Block (SMB) file share. This operation is only supported +// in the file gateway type. +// +// To leave a file share field unchanged, set the corresponding input field +// to null. This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// 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 Storage Gateway's +// API operation UpdateSMBFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare +func (c *StorageGateway) UpdateSMBFileShare(input *UpdateSMBFileShareInput) (*UpdateSMBFileShareOutput, error) { + req, out := c.UpdateSMBFileShareRequest(input) + return out, req.Send() +} + +// UpdateSMBFileShareWithContext is the same as UpdateSMBFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSMBFileShare 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 *StorageGateway) UpdateSMBFileShareWithContext(ctx aws.Context, input *UpdateSMBFileShareInput, opts ...request.Option) (*UpdateSMBFileShareOutput, error) { + req, out := c.UpdateSMBFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSnapshotSchedule = "UpdateSnapshotSchedule" + +// UpdateSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateSnapshotSchedule for more information on using the UpdateSnapshotSchedule +// 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 UpdateSnapshotScheduleRequest method. +// req, resp := client.UpdateSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule +func (c *StorageGateway) UpdateSnapshotScheduleRequest(input *UpdateSnapshotScheduleInput) (req *request.Request, output *UpdateSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opUpdateSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSnapshotScheduleInput{} + } + + output = &UpdateSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSnapshotSchedule API operation for AWS Storage Gateway. +// +// Updates a snapshot schedule configured for a gateway volume. This operation +// is only supported in the cached volume and stored volume gateway types. +// +// The default snapshot schedule for volume is once every 24 hours, starting +// at the creation time of the volume. You can use this API to change the snapshot +// schedule configured for the volume. +// +// In the request you must identify the gateway volume whose snapshot schedule +// you want to update, and the schedule information, including when you want +// the snapshot to begin on a day and the frequency (in hours) of snapshots. +// +// 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 Storage Gateway's +// API operation UpdateSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule +func (c *StorageGateway) UpdateSnapshotSchedule(input *UpdateSnapshotScheduleInput) (*UpdateSnapshotScheduleOutput, error) { + req, out := c.UpdateSnapshotScheduleRequest(input) + return out, req.Send() +} + +// UpdateSnapshotScheduleWithContext is the same as UpdateSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSnapshotSchedule 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 *StorageGateway) UpdateSnapshotScheduleWithContext(ctx aws.Context, input *UpdateSnapshotScheduleInput, opts ...request.Option) (*UpdateSnapshotScheduleOutput, error) { + req, out := c.UpdateSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVTLDeviceType = "UpdateVTLDeviceType" + +// UpdateVTLDeviceTypeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVTLDeviceType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 UpdateVTLDeviceType for more information on using the UpdateVTLDeviceType +// 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 UpdateVTLDeviceTypeRequest method. +// req, resp := client.UpdateVTLDeviceTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType +func (c *StorageGateway) UpdateVTLDeviceTypeRequest(input *UpdateVTLDeviceTypeInput) (req *request.Request, output *UpdateVTLDeviceTypeOutput) { + op := &request.Operation{ + Name: opUpdateVTLDeviceType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVTLDeviceTypeInput{} + } + + output = &UpdateVTLDeviceTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVTLDeviceType API operation for AWS Storage Gateway. +// +// Updates the type of medium changer in a tape gateway. When you activate a +// tape gateway, you select a medium changer type for the tape gateway. This +// operation enables you to select a different type of medium changer after +// a tape gateway is activated. This operation is only supported in the tape +// gateway type. +// +// 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 Storage Gateway's +// API operation UpdateVTLDeviceType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType +func (c *StorageGateway) UpdateVTLDeviceType(input *UpdateVTLDeviceTypeInput) (*UpdateVTLDeviceTypeOutput, error) { + req, out := c.UpdateVTLDeviceTypeRequest(input) + return out, req.Send() +} + +// UpdateVTLDeviceTypeWithContext is the same as UpdateVTLDeviceType with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVTLDeviceType 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 *StorageGateway) UpdateVTLDeviceTypeWithContext(ctx aws.Context, input *UpdateVTLDeviceTypeInput, opts ...request.Option) (*UpdateVTLDeviceTypeOutput, error) { + req, out := c.UpdateVTLDeviceTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A JSON object containing one or more of the following fields: +// +// * ActivateGatewayInput$ActivationKey +// +// * ActivateGatewayInput$GatewayName +// +// * ActivateGatewayInput$GatewayRegion +// +// * ActivateGatewayInput$GatewayTimezone +// +// * ActivateGatewayInput$GatewayType +// +// * ActivateGatewayInput$TapeDriveType +// +// * ActivateGatewayInput$MediumChangerType +type ActivateGatewayInput struct { + _ struct{} `type:"structure"` + + // Your gateway activation key. You can obtain the activation key by sending + // an HTTP GET request with redirects enabled to the gateway IP address (port + // 80). The redirect URL returned in the response provides you the activation + // key for your gateway in the query string parameter activationKey. It may + // also include other activation-related parameters, however, these are merely + // defaults -- the arguments you pass to the ActivateGateway API call determine + // the actual configuration of your gateway. + // + // For more information, see https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html + // in the Storage Gateway User Guide. + // + // ActivationKey is a required field + ActivationKey *string `min:"1" type:"string" required:"true"` + + // The name you configured for your gateway. + // + // GatewayName is a required field + GatewayName *string `min:"2" type:"string" required:"true"` + + // A value that indicates the region where you want to store your data. The + // gateway region specified must be the same region as the region in your Host + // header in the request. For more information about available regions and endpoints + // for AWS Storage Gateway, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) + // in the Amazon Web Services Glossary. + // + // Valid Values: "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", + // "eu-west-1", "eu-central-1", "eu-west-2", "eu-west-3", "ap-northeast-1", + // "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1" + // + // GatewayRegion is a required field + GatewayRegion *string `min:"1" type:"string" required:"true"` + + // A value that indicates the time zone you want to set for the gateway. The + // time zone is of the format "GMT-hr:mm" or "GMT+hr:mm". For example, GMT-4:00 + // indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is + // 2 hours ahead of GMT. The time zone is used, for example, for scheduling + // snapshots and your gateway's maintenance schedule. + // + // GatewayTimezone is a required field + GatewayTimezone *string `min:"3" type:"string" required:"true"` + + // A value that defines the type of gateway to activate. The type specified + // is critical to all later functions of the gateway and cannot be changed after + // activation. The default value is STORED. + // + // Valid Values: "STORED", "CACHED", "VTL", "FILE_S3" + GatewayType *string `min:"2" type:"string"` + + // The value that indicates the type of medium changer to use for tape gateway. + // This field is optional. + // + // Valid Values: "STK-L700", "AWS-Gateway-VTL" + MediumChangerType *string `min:"2" type:"string"` + + // The value that indicates the type of tape drive to use for tape gateway. + // This field is optional. + // + // Valid Values: "IBM-ULT3580-TD5" + TapeDriveType *string `min:"2" type:"string"` +} + +// String returns the string representation +func (s ActivateGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivateGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivateGatewayInput"} + if s.ActivationKey == nil { + invalidParams.Add(request.NewErrParamRequired("ActivationKey")) + } + if s.ActivationKey != nil && len(*s.ActivationKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActivationKey", 1)) + } + if s.GatewayName == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayName")) + } + if s.GatewayName != nil && len(*s.GatewayName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) + } + if s.GatewayRegion == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayRegion")) + } + if s.GatewayRegion != nil && len(*s.GatewayRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GatewayRegion", 1)) + } + if s.GatewayTimezone == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayTimezone")) + } + if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) + } + if s.GatewayType != nil && len(*s.GatewayType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayType", 2)) + } + if s.MediumChangerType != nil && len(*s.MediumChangerType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("MediumChangerType", 2)) + } + if s.TapeDriveType != nil && len(*s.TapeDriveType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("TapeDriveType", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivationKey sets the ActivationKey field's value. +func (s *ActivateGatewayInput) SetActivationKey(v string) *ActivateGatewayInput { + s.ActivationKey = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *ActivateGatewayInput) SetGatewayName(v string) *ActivateGatewayInput { + s.GatewayName = &v + return s +} + +// SetGatewayRegion sets the GatewayRegion field's value. +func (s *ActivateGatewayInput) SetGatewayRegion(v string) *ActivateGatewayInput { + s.GatewayRegion = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *ActivateGatewayInput) SetGatewayTimezone(v string) *ActivateGatewayInput { + s.GatewayTimezone = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *ActivateGatewayInput) SetGatewayType(v string) *ActivateGatewayInput { + s.GatewayType = &v + return s +} + +// SetMediumChangerType sets the MediumChangerType field's value. +func (s *ActivateGatewayInput) SetMediumChangerType(v string) *ActivateGatewayInput { + s.MediumChangerType = &v + return s +} + +// SetTapeDriveType sets the TapeDriveType field's value. +func (s *ActivateGatewayInput) SetTapeDriveType(v string) *ActivateGatewayInput { + s.TapeDriveType = &v + return s +} + +// AWS Storage Gateway returns the Amazon Resource Name (ARN) of the activated +// gateway. It is a string made of information such as your account, gateway +// name, and region. This ARN is used to reference the gateway in other API +// operations as well as resource-based authorization. +// +// For gateways activated prior to September 02, 2015, the gateway ARN contains +// the gateway name rather than the gateway ID. Changing the name of the gateway +// has no effect on the gateway ARN. +type ActivateGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ActivateGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ActivateGatewayOutput) SetGatewayARN(v string) *ActivateGatewayOutput { + s.GatewayARN = &v + return s +} + +type AddCacheInput struct { + _ struct{} `type:"structure"` + + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddCacheInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddCacheInput) SetDiskIds(v []*string) *AddCacheInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddCacheInput) SetGatewayARN(v string) *AddCacheInput { + s.GatewayARN = &v + return s +} + +type AddCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddCacheOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddCacheOutput) SetGatewayARN(v string) *AddCacheOutput { + s.GatewayARN = &v + return s +} + +// AddTagsToResourceInput +type AddTagsToResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to add tags to. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" type:"string" required:"true"` + + // The key-value pair that represents the tag you want to add to the resource. + // The value can be an empty string. + // + // Valid characters for key and value are letters, spaces, and numbers representable + // in UTF-8 format, and the following special characters: + - = . _ : / @. + // + // Tags is a required field + Tags []*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.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + 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 *AddTagsToResourceInput) SetResourceARN(v string) *AddTagsToResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { + s.Tags = v + return s +} + +// AddTagsToResourceOutput +type AddTagsToResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to add tags to. + ResourceARN *string `min:"50" type:"string"` +} + +// 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() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *AddTagsToResourceOutput) SetResourceARN(v string) *AddTagsToResourceOutput { + s.ResourceARN = &v + return s +} + +type AddUploadBufferInput struct { + _ struct{} `type:"structure"` + + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddUploadBufferInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddUploadBufferInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddUploadBufferInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddUploadBufferInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddUploadBufferInput) SetDiskIds(v []*string) *AddUploadBufferInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddUploadBufferInput) SetGatewayARN(v string) *AddUploadBufferInput { + s.GatewayARN = &v + return s +} + +type AddUploadBufferOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddUploadBufferOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddUploadBufferOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddUploadBufferOutput) SetGatewayARN(v string) *AddUploadBufferOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * AddWorkingStorageInput$DiskIds +type AddWorkingStorageInput struct { + _ struct{} `type:"structure"` + + // An array of strings that identify disks that are to be configured as working + // storage. Each string have a minimum length of 1 and maximum length of 300. + // You can get the disk IDs from the ListLocalDisks API. + // + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddWorkingStorageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddWorkingStorageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddWorkingStorageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddWorkingStorageInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddWorkingStorageInput) SetDiskIds(v []*string) *AddWorkingStorageInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddWorkingStorageInput) SetGatewayARN(v string) *AddWorkingStorageInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway for which working storage was +// configured. +type AddWorkingStorageOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddWorkingStorageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddWorkingStorageOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddWorkingStorageOutput) SetGatewayARN(v string) *AddWorkingStorageOutput { + s.GatewayARN = &v + return s +} + +// Describes an iSCSI cached volume. +type CachediSCSIVolume struct { + _ struct{} `type:"structure"` + + // The date the volume was created. Volumes created prior to March 28, 2017 + // don’t have this time stamp. + CreatedDate *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // If the cached volume was created from a snapshot, this field contains the + // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. + SourceSnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the storage volume. + VolumeARN *string `min:"50" type:"string"` + + // The unique identifier of the volume, e.g. vol-AE4B946D. + VolumeId *string `min:"12" type:"string"` + + // Represents the percentage complete if the volume is restoring or bootstrapping + // that represents the percent of data transferred. This field does not appear + // in the response if the cached volume is not restoring or bootstrapping. + VolumeProgress *float64 `type:"double"` + + // The size, in bytes, of the volume capacity. + VolumeSizeInBytes *int64 `type:"long"` + + // One of the VolumeStatus values that indicates the state of the storage volume. + VolumeStatus *string `min:"3" type:"string"` + + // One of the VolumeType enumeration values that describes the type of the volume. + VolumeType *string `min:"3" type:"string"` + + // The size of the data stored on the volume in bytes. + // + // This value is not available for volumes created prior to May 13, 2015, until + // you store data on the volume. + VolumeUsedInBytes *int64 `type:"long"` + + // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes + // for one stored volume. + VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` +} + +// String returns the string representation +func (s CachediSCSIVolume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CachediSCSIVolume) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CachediSCSIVolume) SetCreatedDate(v time.Time) *CachediSCSIVolume { + s.CreatedDate = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CachediSCSIVolume) SetKMSKey(v string) *CachediSCSIVolume { + s.KMSKey = &v + return s +} + +// SetSourceSnapshotId sets the SourceSnapshotId field's value. +func (s *CachediSCSIVolume) SetSourceSnapshotId(v string) *CachediSCSIVolume { + s.SourceSnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CachediSCSIVolume) SetVolumeARN(v string) *CachediSCSIVolume { + s.VolumeARN = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *CachediSCSIVolume) SetVolumeId(v string) *CachediSCSIVolume { + s.VolumeId = &v + return s +} + +// SetVolumeProgress sets the VolumeProgress field's value. +func (s *CachediSCSIVolume) SetVolumeProgress(v float64) *CachediSCSIVolume { + s.VolumeProgress = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CachediSCSIVolume) SetVolumeSizeInBytes(v int64) *CachediSCSIVolume { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeStatus sets the VolumeStatus field's value. +func (s *CachediSCSIVolume) SetVolumeStatus(v string) *CachediSCSIVolume { + s.VolumeStatus = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *CachediSCSIVolume) SetVolumeType(v string) *CachediSCSIVolume { + s.VolumeType = &v + return s +} + +// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. +func (s *CachediSCSIVolume) SetVolumeUsedInBytes(v int64) *CachediSCSIVolume { + s.VolumeUsedInBytes = &v + return s +} + +// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. +func (s *CachediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *CachediSCSIVolume { + s.VolumeiSCSIAttributes = v + return s +} + +// CancelArchivalInput +type CancelArchivalInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to cancel archiving + // for. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelArchivalInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelArchivalInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelArchivalInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelArchivalInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CancelArchivalInput) SetGatewayARN(v string) *CancelArchivalInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelArchivalInput) SetTapeARN(v string) *CancelArchivalInput { + s.TapeARN = &v + return s +} + +// CancelArchivalOutput +type CancelArchivalOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which archiving was + // canceled. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CancelArchivalOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelArchivalOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelArchivalOutput) SetTapeARN(v string) *CancelArchivalOutput { + s.TapeARN = &v + return s +} + +// CancelRetrievalInput +type CancelRetrievalInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to cancel retrieval + // for. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelRetrievalInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRetrievalInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelRetrievalInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelRetrievalInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CancelRetrievalInput) SetGatewayARN(v string) *CancelRetrievalInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelRetrievalInput) SetTapeARN(v string) *CancelRetrievalInput { + s.TapeARN = &v + return s +} + +// CancelRetrievalOutput +type CancelRetrievalOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which retrieval was + // canceled. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CancelRetrievalOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRetrievalOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelRetrievalOutput) SetTapeARN(v string) *CancelRetrievalOutput { + s.TapeARN = &v + return s +} + +// Describes Challenge-Handshake Authentication Protocol (CHAP) information +// that supports authentication between your gateway and iSCSI initiators. +type ChapInfo struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + InitiatorName *string `min:"1" type:"string"` + + // The secret key that the initiator (for example, the Windows client) must + // provide to participate in mutual CHAP with the target. + SecretToAuthenticateInitiator *string `min:"1" type:"string"` + + // The secret key that the target must provide to participate in mutual CHAP + // with the initiator (e.g. Windows client). + SecretToAuthenticateTarget *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the volume. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ChapInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChapInfo) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *ChapInfo) SetInitiatorName(v string) *ChapInfo { + s.InitiatorName = &v + return s +} + +// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. +func (s *ChapInfo) SetSecretToAuthenticateInitiator(v string) *ChapInfo { + s.SecretToAuthenticateInitiator = &v + return s +} + +// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. +func (s *ChapInfo) SetSecretToAuthenticateTarget(v string) *ChapInfo { + s.SecretToAuthenticateTarget = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *ChapInfo) SetTargetARN(v string) *ChapInfo { + s.TargetARN = &v + return s +} + +type CreateCachediSCSIVolumeInput struct { + _ struct{} `type:"structure"` + + // A unique identifier that you use to retry a request. If you retry a request, + // use the same ClientToken you specified in the initial request. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the + // new cached volume. Specify this field if you want to create the iSCSI storage + // volume from a snapshot otherwise do not include this field. To list snapshots + // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) + // in the Amazon Elastic Compute Cloud API Reference. + SnapshotId *string `type:"string"` + + // The ARN for an existing volume. Specifying this ARN makes the new volume + // into an exact copy of the specified existing volume's latest recovery point. + // The VolumeSizeInBytes value for this new volume must be equal to or larger + // than the size of the existing volume, in bytes. + SourceVolumeARN *string `min:"50" type:"string"` + + // The name of the iSCSI target used by initiators to connect to the target + // and as a suffix for the target ARN. For example, specifying TargetName as + // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes of a gateway. + // + // TargetName is a required field + TargetName *string `min:"1" type:"string" required:"true"` + + // The size of the volume in bytes. + // + // VolumeSizeInBytes is a required field + VolumeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateCachediSCSIVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCachediSCSIVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCachediSCSIVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCachediSCSIVolumeInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.SourceVolumeARN != nil && len(*s.SourceVolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("SourceVolumeARN", 50)) + } + if s.TargetName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetName")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + if s.VolumeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateCachediSCSIVolumeInput) SetClientToken(v string) *CreateCachediSCSIVolumeInput { + s.ClientToken = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateCachediSCSIVolumeInput) SetGatewayARN(v string) *CreateCachediSCSIVolumeInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateCachediSCSIVolumeInput) SetKMSEncrypted(v bool) *CreateCachediSCSIVolumeInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateCachediSCSIVolumeInput) SetKMSKey(v string) *CreateCachediSCSIVolumeInput { + s.KMSKey = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateCachediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateCachediSCSIVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateCachediSCSIVolumeInput) SetSnapshotId(v string) *CreateCachediSCSIVolumeInput { + s.SnapshotId = &v + return s +} + +// SetSourceVolumeARN sets the SourceVolumeARN field's value. +func (s *CreateCachediSCSIVolumeInput) SetSourceVolumeARN(v string) *CreateCachediSCSIVolumeInput { + s.SourceVolumeARN = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *CreateCachediSCSIVolumeInput) SetTargetName(v string) *CreateCachediSCSIVolumeInput { + s.TargetName = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CreateCachediSCSIVolumeInput) SetVolumeSizeInBytes(v int64) *CreateCachediSCSIVolumeInput { + s.VolumeSizeInBytes = &v + return s +} + +type CreateCachediSCSIVolumeOutput struct { + _ struct{} `type:"structure"` + + // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // name that initiators can use to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the configured volume. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateCachediSCSIVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCachediSCSIVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *CreateCachediSCSIVolumeOutput) SetTargetARN(v string) *CreateCachediSCSIVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateCachediSCSIVolumeOutput) SetVolumeARN(v string) *CreateCachediSCSIVolumeOutput { + s.VolumeARN = &v + return s +} + +// CreateNFSFileShareInput +type CreateNFSFileShareInput struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // A unique string value that you supply that is used by file gateway to ensure + // idempotent file share creation. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file gateway on which you want to create + // a file share. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backed storage used for storing file data. + // + // LocationARN is a required field + LocationARN *string `min:"16" type:"string" required:"true"` + + // File share default values. Optional. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the AWS Identity and Access Management (IAM) role that a file + // gateway assumes when it accesses the underlying storage. + // + // Role is a required field + Role *string `min:"20" type:"string" required:"true"` + + // Maps a user to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user. + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s CreateNFSFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNFSFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNFSFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNFSFileShareInput"} + if s.ClientList != nil && len(s.ClientList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) + } + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.LocationARN == nil { + invalidParams.Add(request.NewErrParamRequired("LocationARN")) + } + if s.LocationARN != nil && len(*s.LocationARN) < 16 { + invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) + } + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } + if s.Squash != nil && len(*s.Squash) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) + } + if s.NFSFileShareDefaults != nil { + if err := s.NFSFileShareDefaults.Validate(); err != nil { + invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientList sets the ClientList field's value. +func (s *CreateNFSFileShareInput) SetClientList(v []*string) *CreateNFSFileShareInput { + s.ClientList = v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateNFSFileShareInput) SetClientToken(v string) *CreateNFSFileShareInput { + s.ClientToken = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *CreateNFSFileShareInput) SetDefaultStorageClass(v string) *CreateNFSFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateNFSFileShareInput) SetGatewayARN(v string) *CreateNFSFileShareInput { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *CreateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateNFSFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateNFSFileShareInput) SetKMSEncrypted(v bool) *CreateNFSFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateNFSFileShareInput) SetKMSKey(v string) *CreateNFSFileShareInput { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *CreateNFSFileShareInput) SetLocationARN(v string) *CreateNFSFileShareInput { + s.LocationARN = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *CreateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *CreateNFSFileShareInput { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *CreateNFSFileShareInput) SetObjectACL(v string) *CreateNFSFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *CreateNFSFileShareInput) SetReadOnly(v bool) *CreateNFSFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *CreateNFSFileShareInput) SetRequesterPays(v bool) *CreateNFSFileShareInput { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateNFSFileShareInput) SetRole(v string) *CreateNFSFileShareInput { + s.Role = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *CreateNFSFileShareInput) SetSquash(v string) *CreateNFSFileShareInput { + s.Squash = &v + return s +} + +// CreateNFSFileShareOutput +type CreateNFSFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the newly created file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateNFSFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNFSFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *CreateNFSFileShareOutput) SetFileShareARN(v string) *CreateNFSFileShareOutput { + s.FileShareARN = &v + return s +} + +// CreateSMBFileShareInput +type CreateSMBFileShareInput struct { + _ struct{} `type:"structure"` + + // The authentication method that users use to access the file share. + // + // Valid values: "ActiveDirectory" or "GuestAccess". The default is "ActiveDirectory". + Authentication *string `min:"5" type:"string"` + + // A unique string value that you supply that is used by file gateway to ensure + // idempotent file share creation. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file gateway on which you want to create + // a file share. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backed storage used for storing file data. + // + // LocationARN is a required field + LocationARN *string `min:"16" type:"string" required:"true"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the AWS Identity and Access Management (IAM) role that a file + // gateway assumes when it accesses the underlying storage. + // + // Role is a required field + Role *string `min:"20" type:"string" required:"true"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s CreateSMBFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSMBFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSMBFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSMBFileShareInput"} + if s.Authentication != nil && len(*s.Authentication) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Authentication", 5)) + } + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.LocationARN == nil { + invalidParams.Add(request.NewErrParamRequired("LocationARN")) + } + if s.LocationARN != nil && len(*s.LocationARN) < 16 { + invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) + } + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthentication sets the Authentication field's value. +func (s *CreateSMBFileShareInput) SetAuthentication(v string) *CreateSMBFileShareInput { + s.Authentication = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateSMBFileShareInput) SetClientToken(v string) *CreateSMBFileShareInput { + s.ClientToken = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *CreateSMBFileShareInput) SetDefaultStorageClass(v string) *CreateSMBFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateSMBFileShareInput) SetGatewayARN(v string) *CreateSMBFileShareInput { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *CreateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateSMBFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *CreateSMBFileShareInput) SetInvalidUserList(v []*string) *CreateSMBFileShareInput { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateSMBFileShareInput) SetKMSEncrypted(v bool) *CreateSMBFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateSMBFileShareInput) SetKMSKey(v string) *CreateSMBFileShareInput { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *CreateSMBFileShareInput) SetLocationARN(v string) *CreateSMBFileShareInput { + s.LocationARN = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *CreateSMBFileShareInput) SetObjectACL(v string) *CreateSMBFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *CreateSMBFileShareInput) SetReadOnly(v bool) *CreateSMBFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *CreateSMBFileShareInput) SetRequesterPays(v bool) *CreateSMBFileShareInput { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateSMBFileShareInput) SetRole(v string) *CreateSMBFileShareInput { + s.Role = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *CreateSMBFileShareInput) SetValidUserList(v []*string) *CreateSMBFileShareInput { + s.ValidUserList = v + return s +} + +// CreateSMBFileShareOutput +type CreateSMBFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the newly created file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateSMBFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSMBFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *CreateSMBFileShareOutput) SetFileShareARN(v string) *CreateSMBFileShareOutput { + s.FileShareARN = &v + return s +} + +type CreateSnapshotFromVolumeRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // SnapshotDescription is a required field + SnapshotDescription *string `min:"1" type:"string" required:"true"` + + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotFromVolumeRecoveryPointInput"} + if s.SnapshotDescription == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) + } + if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotDescription sets the SnapshotDescription field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetSnapshotDescription(v string) *CreateSnapshotFromVolumeRecoveryPointInput { + s.SnapshotDescription = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointInput { + s.VolumeARN = &v + return s +} + +type CreateSnapshotFromVolumeRecoveryPointOutput struct { + _ struct{} `type:"structure"` + + SnapshotId *string `type:"string"` + + VolumeARN *string `min:"50" type:"string"` + + VolumeRecoveryPointTime *string `type:"string"` +} + +// String returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointOutput) GoString() string { + return s.String() +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetSnapshotId(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.SnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.VolumeARN = &v + return s +} + +// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeRecoveryPointTime(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.VolumeRecoveryPointTime = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * CreateSnapshotInput$SnapshotDescription +// +// * CreateSnapshotInput$VolumeARN +type CreateSnapshotInput struct { + _ struct{} `type:"structure"` + + // Textual description of the snapshot that appears in the Amazon EC2 console, + // Elastic Block Store snapshots panel in the Description field, and in the + // AWS Storage Gateway snapshot Details pane, Description field + // + // SnapshotDescription is a required field + SnapshotDescription *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.SnapshotDescription == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) + } + if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotDescription sets the SnapshotDescription field's value. +func (s *CreateSnapshotInput) SetSnapshotDescription(v string) *CreateSnapshotInput { + s.SnapshotDescription = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotInput) SetVolumeARN(v string) *CreateSnapshotInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the following fields: +type CreateSnapshotOutput struct { + _ struct{} `type:"structure"` + + // The snapshot ID that is used to refer to the snapshot in future operations + // such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots) + // or creating a volume from a snapshot (CreateStorediSCSIVolume). + SnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the volume of which the snapshot was taken. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotOutput) GoString() string { + return s.String() +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { + s.SnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotOutput) SetVolumeARN(v string) *CreateSnapshotOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * CreateStorediSCSIVolumeInput$DiskId +// +// * CreateStorediSCSIVolumeInput$NetworkInterfaceId +// +// * CreateStorediSCSIVolumeInput$PreserveExistingData +// +// * CreateStorediSCSIVolumeInput$SnapshotId +// +// * CreateStorediSCSIVolumeInput$TargetName +type CreateStorediSCSIVolumeInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the gateway local disk that is configured as a + // stored volume. Use ListLocalDisks (http://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html) + // to list disk IDs for a gateway. + // + // DiskId is a required field + DiskId *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // Specify this field as true if you want to preserve the data on the local + // disk. Otherwise, specifying this field as false creates an empty volume. + // + // Valid Values: true, false + // + // PreserveExistingData is a required field + PreserveExistingData *bool `type:"boolean" required:"true"` + + // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the + // new stored volume. Specify this field if you want to create the iSCSI storage + // volume from a snapshot otherwise do not include this field. To list snapshots + // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) + // in the Amazon Elastic Compute Cloud API Reference. + SnapshotId *string `type:"string"` + + // The name of the iSCSI target used by initiators to connect to the target + // and as a suffix for the target ARN. For example, specifying TargetName as + // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes of a gateway. + // + // TargetName is a required field + TargetName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateStorediSCSIVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStorediSCSIVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStorediSCSIVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStorediSCSIVolumeInput"} + if s.DiskId == nil { + invalidParams.Add(request.NewErrParamRequired("DiskId")) + } + if s.DiskId != nil && len(*s.DiskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.PreserveExistingData == nil { + invalidParams.Add(request.NewErrParamRequired("PreserveExistingData")) + } + if s.TargetName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetName")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskId sets the DiskId field's value. +func (s *CreateStorediSCSIVolumeInput) SetDiskId(v string) *CreateStorediSCSIVolumeInput { + s.DiskId = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateStorediSCSIVolumeInput) SetGatewayARN(v string) *CreateStorediSCSIVolumeInput { + s.GatewayARN = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateStorediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateStorediSCSIVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetPreserveExistingData sets the PreserveExistingData field's value. +func (s *CreateStorediSCSIVolumeInput) SetPreserveExistingData(v bool) *CreateStorediSCSIVolumeInput { + s.PreserveExistingData = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateStorediSCSIVolumeInput) SetSnapshotId(v string) *CreateStorediSCSIVolumeInput { + s.SnapshotId = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCSIVolumeInput { + s.TargetName = &v + return s +} + +// A JSON object containing the following fields: +type CreateStorediSCSIVolumeOutput struct { + _ struct{} `type:"structure"` + + // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // name that initiators can use to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the configured volume. + VolumeARN *string `min:"50" type:"string"` + + // The size of the volume in bytes. + VolumeSizeInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s CreateStorediSCSIVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStorediSCSIVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *CreateStorediSCSIVolumeOutput) SetTargetARN(v string) *CreateStorediSCSIVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateStorediSCSIVolumeOutput) SetVolumeARN(v string) *CreateStorediSCSIVolumeOutput { + s.VolumeARN = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CreateStorediSCSIVolumeOutput) SetVolumeSizeInBytes(v int64) *CreateStorediSCSIVolumeOutput { + s.VolumeSizeInBytes = &v + return s +} + +// CreateTapeWithBarcodeInput +type CreateTapeWithBarcodeInput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name (ARN) that represents the gateway to associate + // the virtual tape with. Use the ListGateways operation to return a list of + // gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS Key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The barcode that you want to assign to the tape. + // + // Barcodes cannot be reused. This includes barcodes used for tapes that have + // been deleted. + // + // TapeBarcode is a required field + TapeBarcode *string `min:"7" type:"string" required:"true"` + + // The size, in bytes, of the virtual tape that you want to create. + // + // The size must be aligned by gigabyte (1024*1024*1024 byte). + // + // TapeSizeInBytes is a required field + TapeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateTapeWithBarcodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapeWithBarcodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTapeWithBarcodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTapeWithBarcodeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.TapeBarcode == nil { + invalidParams.Add(request.NewErrParamRequired("TapeBarcode")) + } + if s.TapeBarcode != nil && len(*s.TapeBarcode) < 7 { + invalidParams.Add(request.NewErrParamMinLen("TapeBarcode", 7)) + } + if s.TapeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateTapeWithBarcodeInput) SetGatewayARN(v string) *CreateTapeWithBarcodeInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateTapeWithBarcodeInput) SetKMSEncrypted(v bool) *CreateTapeWithBarcodeInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateTapeWithBarcodeInput) SetKMSKey(v string) *CreateTapeWithBarcodeInput { + s.KMSKey = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *CreateTapeWithBarcodeInput) SetTapeBarcode(v string) *CreateTapeWithBarcodeInput { + s.TapeBarcode = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *CreateTapeWithBarcodeInput) SetTapeSizeInBytes(v int64) *CreateTapeWithBarcodeInput { + s.TapeSizeInBytes = &v + return s +} + +// CreateTapeOutput +type CreateTapeWithBarcodeOutput struct { + _ struct{} `type:"structure"` + + // A unique Amazon Resource Name (ARN) that represents the virtual tape that + // was created. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateTapeWithBarcodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapeWithBarcodeOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CreateTapeWithBarcodeOutput) SetTapeARN(v string) *CreateTapeWithBarcodeOutput { + s.TapeARN = &v + return s +} + +// CreateTapesInput +type CreateTapesInput struct { + _ struct{} `type:"structure"` + + // A unique identifier that you use to retry a request. If you retry a request, + // use the same ClientToken you specified in the initial request. + // + // Using the same ClientToken prevents creating the tape multiple times. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The unique Amazon Resource Name (ARN) that represents the gateway to associate + // the virtual tapes with. Use the ListGateways operation to return a list of + // gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The number of virtual tapes that you want to create. + // + // NumTapesToCreate is a required field + NumTapesToCreate *int64 `min:"1" type:"integer" required:"true"` + + // A prefix that you append to the barcode of the virtual tape you are creating. + // This prefix makes the barcode unique. + // + // The prefix must be 1 to 4 characters in length and must be one of the uppercase + // letters from A to Z. + // + // TapeBarcodePrefix is a required field + TapeBarcodePrefix *string `min:"1" type:"string" required:"true"` + + // The size, in bytes, of the virtual tapes that you want to create. + // + // The size must be aligned by gigabyte (1024*1024*1024 byte). + // + // TapeSizeInBytes is a required field + TapeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTapesInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.NumTapesToCreate == nil { + invalidParams.Add(request.NewErrParamRequired("NumTapesToCreate")) + } + if s.NumTapesToCreate != nil && *s.NumTapesToCreate < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumTapesToCreate", 1)) + } + if s.TapeBarcodePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("TapeBarcodePrefix")) + } + if s.TapeBarcodePrefix != nil && len(*s.TapeBarcodePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TapeBarcodePrefix", 1)) + } + if s.TapeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTapesInput) SetClientToken(v string) *CreateTapesInput { + s.ClientToken = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateTapesInput) SetGatewayARN(v string) *CreateTapesInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateTapesInput) SetKMSEncrypted(v bool) *CreateTapesInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateTapesInput) SetKMSKey(v string) *CreateTapesInput { + s.KMSKey = &v + return s +} + +// SetNumTapesToCreate sets the NumTapesToCreate field's value. +func (s *CreateTapesInput) SetNumTapesToCreate(v int64) *CreateTapesInput { + s.NumTapesToCreate = &v + return s +} + +// SetTapeBarcodePrefix sets the TapeBarcodePrefix field's value. +func (s *CreateTapesInput) SetTapeBarcodePrefix(v string) *CreateTapesInput { + s.TapeBarcodePrefix = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *CreateTapesInput) SetTapeSizeInBytes(v int64) *CreateTapesInput { + s.TapeSizeInBytes = &v + return s +} + +// CreateTapeOutput +type CreateTapesOutput struct { + _ struct{} `type:"structure"` + + // A list of unique Amazon Resource Names (ARNs) that represents the virtual + // tapes that were created. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s CreateTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapesOutput) GoString() string { + return s.String() +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *CreateTapesOutput) SetTapeARNs(v []*string) *CreateTapesOutput { + s.TapeARNs = v + return s +} + +// A JSON object containing the following fields: +// +// * DeleteBandwidthRateLimitInput$BandwidthType +type DeleteBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // One of the BandwidthType values that indicates the gateway bandwidth rate + // limit to delete. + // + // Valid Values: Upload, Download, All. + // + // BandwidthType is a required field + BandwidthType *string `min:"3" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBandwidthRateLimitInput"} + if s.BandwidthType == nil { + invalidParams.Add(request.NewErrParamRequired("BandwidthType")) + } + if s.BandwidthType != nil && len(*s.BandwidthType) < 3 { + invalidParams.Add(request.NewErrParamMinLen("BandwidthType", 3)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidthType sets the BandwidthType field's value. +func (s *DeleteBandwidthRateLimitInput) SetBandwidthType(v string) *DeleteBandwidthRateLimitInput { + s.BandwidthType = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteBandwidthRateLimitInput) SetGatewayARN(v string) *DeleteBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway whose bandwidth rate information +// was deleted. +type DeleteBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteBandwidthRateLimitOutput) SetGatewayARN(v string) *DeleteBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * DeleteChapCredentialsInput$InitiatorName +// +// * DeleteChapCredentialsInput$TargetARN +type DeleteChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + // + // InitiatorName is a required field + InitiatorName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return to retrieve the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteChapCredentialsInput"} + if s.InitiatorName == nil { + invalidParams.Add(request.NewErrParamRequired("InitiatorName")) + } + if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) + } + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *DeleteChapCredentialsInput) SetInitiatorName(v string) *DeleteChapCredentialsInput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeleteChapCredentialsInput) SetTargetARN(v string) *DeleteChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing the following fields: +type DeleteChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + InitiatorName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *DeleteChapCredentialsOutput) SetInitiatorName(v string) *DeleteChapCredentialsOutput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeleteChapCredentialsOutput) SetTargetARN(v string) *DeleteChapCredentialsOutput { + s.TargetARN = &v + return s +} + +// DeleteFileShareInput +type DeleteFileShareInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share to be deleted. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // If this value is set to true, the operation deletes a file share immediately + // and aborts all data uploads to AWS. Otherwise, the file share is not deleted + // until all data is uploaded to AWS. This process aborts the data upload process, + // and the file share enters the FORCE_DELETING status. + ForceDelete *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileShareInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *DeleteFileShareInput) SetFileShareARN(v string) *DeleteFileShareInput { + s.FileShareARN = &v + return s +} + +// SetForceDelete sets the ForceDelete field's value. +func (s *DeleteFileShareInput) SetForceDelete(v bool) *DeleteFileShareInput { + s.ForceDelete = &v + return s +} + +// DeleteFileShareOutput +type DeleteFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the deleted file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *DeleteFileShareOutput) SetFileShareARN(v string) *DeleteFileShareOutput { + s.FileShareARN = &v + return s +} + +// A JSON object containing the ID of the gateway to delete. +type DeleteGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteGatewayInput) SetGatewayARN(v string) *DeleteGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the ID of the deleted gateway. +type DeleteGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteGatewayOutput) SetGatewayARN(v string) *DeleteGatewayOutput { + s.GatewayARN = &v + return s +} + +type DeleteSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotScheduleInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteSnapshotScheduleInput) SetVolumeARN(v string) *DeleteSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +type DeleteSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteSnapshotScheduleOutput) SetVolumeARN(v string) *DeleteSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +// DeleteTapeArchiveInput +type DeleteTapeArchiveInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape to delete from the virtual + // tape shelf (VTS). + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTapeArchiveInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeArchiveInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTapeArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTapeArchiveInput"} + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeArchiveInput) SetTapeARN(v string) *DeleteTapeArchiveInput { + s.TapeARN = &v + return s +} + +// DeleteTapeArchiveOutput +type DeleteTapeArchiveOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape that was deleted from + // the virtual tape shelf (VTS). + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteTapeArchiveOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeArchiveOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeArchiveOutput) SetTapeARN(v string) *DeleteTapeArchiveOutput { + s.TapeARN = &v + return s +} + +// DeleteTapeInput +type DeleteTapeInput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name (ARN) of the gateway that the virtual tape + // to delete is associated with. Use the ListGateways operation to return a + // list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape to delete. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTapeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTapeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTapeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteTapeInput) SetGatewayARN(v string) *DeleteTapeInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeInput) SetTapeARN(v string) *DeleteTapeInput { + s.TapeARN = &v + return s +} + +// DeleteTapeOutput +type DeleteTapeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the deleted virtual tape. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteTapeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeOutput) SetTapeARN(v string) *DeleteTapeOutput { + s.TapeARN = &v + return s +} + +// A JSON object containing the DeleteVolumeInput$VolumeARN to delete. +type DeleteVolumeInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteVolumeInput) SetVolumeARN(v string) *DeleteVolumeInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the storage volume that was deleted +type DeleteVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the storage volume that was deleted. It + // is the same ARN you provided in the request. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteVolumeOutput) SetVolumeARN(v string) *DeleteVolumeOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the gateway. +type DescribeBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBandwidthRateLimitInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeBandwidthRateLimitInput) SetGatewayARN(v string) *DescribeBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The average download bandwidth rate limit in bits per second. This field + // does not appear in the response if the download rate limit is not set. + AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` + + // The average upload bandwidth rate limit in bits per second. This field does + // not appear in the response if the upload rate limit is not set. + AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. +func (s *DescribeBandwidthRateLimitOutput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { + s.AverageDownloadRateLimitInBitsPerSec = &v + return s +} + +// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. +func (s *DescribeBandwidthRateLimitOutput) SetAverageUploadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { + s.AverageUploadRateLimitInBitsPerSec = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeBandwidthRateLimitOutput) SetGatewayARN(v string) *DescribeBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +type DescribeCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCacheInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeCacheInput) SetGatewayARN(v string) *DescribeCacheInput { + s.GatewayARN = &v + return s +} + +type DescribeCacheOutput struct { + _ struct{} `type:"structure"` + + CacheAllocatedInBytes *int64 `type:"long"` + + CacheDirtyPercentage *float64 `type:"double"` + + CacheHitPercentage *float64 `type:"double"` + + CacheMissPercentage *float64 `type:"double"` + + CacheUsedPercentage *float64 `type:"double"` + + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCacheOutput) GoString() string { + return s.String() +} + +// SetCacheAllocatedInBytes sets the CacheAllocatedInBytes field's value. +func (s *DescribeCacheOutput) SetCacheAllocatedInBytes(v int64) *DescribeCacheOutput { + s.CacheAllocatedInBytes = &v + return s +} + +// SetCacheDirtyPercentage sets the CacheDirtyPercentage field's value. +func (s *DescribeCacheOutput) SetCacheDirtyPercentage(v float64) *DescribeCacheOutput { + s.CacheDirtyPercentage = &v + return s +} + +// SetCacheHitPercentage sets the CacheHitPercentage field's value. +func (s *DescribeCacheOutput) SetCacheHitPercentage(v float64) *DescribeCacheOutput { + s.CacheHitPercentage = &v + return s +} + +// SetCacheMissPercentage sets the CacheMissPercentage field's value. +func (s *DescribeCacheOutput) SetCacheMissPercentage(v float64) *DescribeCacheOutput { + s.CacheMissPercentage = &v + return s +} + +// SetCacheUsedPercentage sets the CacheUsedPercentage field's value. +func (s *DescribeCacheOutput) SetCacheUsedPercentage(v float64) *DescribeCacheOutput { + s.CacheUsedPercentage = &v + return s +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeCacheOutput) SetDiskIds(v []*string) *DescribeCacheOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeCacheOutput) SetGatewayARN(v string) *DescribeCacheOutput { + s.GatewayARN = &v + return s +} + +type DescribeCachediSCSIVolumesInput struct { + _ struct{} `type:"structure"` + + // VolumeARNs is a required field + VolumeARNs []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeCachediSCSIVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCachediSCSIVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCachediSCSIVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCachediSCSIVolumesInput"} + if s.VolumeARNs == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARNs sets the VolumeARNs field's value. +func (s *DescribeCachediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeCachediSCSIVolumesInput { + s.VolumeARNs = v + return s +} + +// A JSON object containing the following fields: +type DescribeCachediSCSIVolumesOutput struct { + _ struct{} `type:"structure"` + + // An array of objects where each object contains metadata about one cached + // volume. + CachediSCSIVolumes []*CachediSCSIVolume `type:"list"` +} + +// String returns the string representation +func (s DescribeCachediSCSIVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCachediSCSIVolumesOutput) GoString() string { + return s.String() +} + +// SetCachediSCSIVolumes sets the CachediSCSIVolumes field's value. +func (s *DescribeCachediSCSIVolumesOutput) SetCachediSCSIVolumes(v []*CachediSCSIVolume) *DescribeCachediSCSIVolumesOutput { + s.CachediSCSIVolumes = v + return s +} + +// A JSON object containing the Amazon Resource Name (ARN) of the iSCSI volume +// target. +type DescribeChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return to retrieve the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeChapCredentialsInput"} + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DescribeChapCredentialsInput) SetTargetARN(v string) *DescribeChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing a . +type DescribeChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // An array of ChapInfo objects that represent CHAP credentials. Each object + // in the array contains CHAP credential information for one target-initiator + // pair. If no CHAP credentials are set, an empty array is returned. CHAP credential + // information is provided in a JSON object with the following fields: + // + // * InitiatorName: The iSCSI initiator that connects to the target. + // + // * SecretToAuthenticateInitiator: The secret key that the initiator (for + // example, the Windows client) must provide to participate in mutual CHAP + // with the target. + // + // * SecretToAuthenticateTarget: The secret key that the target must provide + // to participate in mutual CHAP with the initiator (e.g. Windows client). + // + // * TargetARN: The Amazon Resource Name (ARN) of the storage volume. + ChapCredentials []*ChapInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetChapCredentials sets the ChapCredentials field's value. +func (s *DescribeChapCredentialsOutput) SetChapCredentials(v []*ChapInfo) *DescribeChapCredentialsOutput { + s.ChapCredentials = v + return s +} + +// A JSON object containing the ID of the gateway. +type DescribeGatewayInformationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeGatewayInformationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGatewayInformationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGatewayInformationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGatewayInformationInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeGatewayInformationInput) SetGatewayARN(v string) *DescribeGatewayInformationInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeGatewayInformationOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + GatewayId *string `min:"12" type:"string"` + + // The name you configured for your gateway. + GatewayName *string `type:"string"` + + // A NetworkInterface array that contains descriptions of the gateway network + // interfaces. + GatewayNetworkInterfaces []*NetworkInterface `type:"list"` + + // A value that indicates the operating state of the gateway. + GatewayState *string `min:"2" type:"string"` + + // A value that indicates the time zone configured for the gateway. + GatewayTimezone *string `min:"3" type:"string"` + + // The type of the gateway. + GatewayType *string `min:"2" type:"string"` + + // The date on which the last software update was applied to the gateway. If + // the gateway has never been updated, this field does not return a value in + // the response. + LastSoftwareUpdate *string `min:"1" type:"string"` + + // The date on which an update to the gateway is available. This date is in + // the time zone of the gateway. If the gateway is not available for an update + // this field is not returned in the response. + NextUpdateAvailabilityDate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeGatewayInformationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGatewayInformationOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayARN(v string) *DescribeGatewayInformationOutput { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayId(v string) *DescribeGatewayInformationOutput { + s.GatewayId = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayName(v string) *DescribeGatewayInformationOutput { + s.GatewayName = &v + return s +} + +// SetGatewayNetworkInterfaces sets the GatewayNetworkInterfaces field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayNetworkInterfaces(v []*NetworkInterface) *DescribeGatewayInformationOutput { + s.GatewayNetworkInterfaces = v + return s +} + +// SetGatewayState sets the GatewayState field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayState(v string) *DescribeGatewayInformationOutput { + s.GatewayState = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayTimezone(v string) *DescribeGatewayInformationOutput { + s.GatewayTimezone = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayType(v string) *DescribeGatewayInformationOutput { + s.GatewayType = &v + return s +} + +// SetLastSoftwareUpdate sets the LastSoftwareUpdate field's value. +func (s *DescribeGatewayInformationOutput) SetLastSoftwareUpdate(v string) *DescribeGatewayInformationOutput { + s.LastSoftwareUpdate = &v + return s +} + +// SetNextUpdateAvailabilityDate sets the NextUpdateAvailabilityDate field's value. +func (s *DescribeGatewayInformationOutput) SetNextUpdateAvailabilityDate(v string) *DescribeGatewayInformationOutput { + s.NextUpdateAvailabilityDate = &v + return s +} + +// A JSON object containing the of the gateway. +type DescribeMaintenanceStartTimeInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeMaintenanceStartTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceStartTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceStartTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceStartTimeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeMaintenanceStartTimeInput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +// +// * DescribeMaintenanceStartTimeOutput$DayOfWeek +// +// * DescribeMaintenanceStartTimeOutput$HourOfDay +// +// * DescribeMaintenanceStartTimeOutput$MinuteOfHour +// +// * DescribeMaintenanceStartTimeOutput$Timezone +type DescribeMaintenanceStartTimeOutput struct { + _ struct{} `type:"structure"` + + // An ordinal number between 0 and 6 that represents the day of the week, where + // 0 represents Sunday and 6 represents Saturday. The day of week is in the + // time zone of the gateway. + DayOfWeek *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The hour component of the maintenance start time represented as hh, where + // hh is the hour (0 to 23). The hour of the day is in the time zone of the + // gateway. + HourOfDay *int64 `type:"integer"` + + // The minute component of the maintenance start time represented as mm, where + // mm is the minute (0 to 59). The minute of the hour is in the time zone of + // the gateway. + MinuteOfHour *int64 `type:"integer"` + + Timezone *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s DescribeMaintenanceStartTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceStartTimeOutput) GoString() string { + return s.String() +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetDayOfWeek(v int64) *DescribeMaintenanceStartTimeOutput { + s.DayOfWeek = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeOutput { + s.GatewayARN = &v + return s +} + +// SetHourOfDay sets the HourOfDay field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetHourOfDay(v int64) *DescribeMaintenanceStartTimeOutput { + s.HourOfDay = &v + return s +} + +// SetMinuteOfHour sets the MinuteOfHour field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetMinuteOfHour(v int64) *DescribeMaintenanceStartTimeOutput { + s.MinuteOfHour = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetTimezone(v string) *DescribeMaintenanceStartTimeOutput { + s.Timezone = &v + return s +} + +// DescribeNFSFileSharesInput +type DescribeNFSFileSharesInput struct { + _ struct{} `type:"structure"` + + // An array containing the Amazon Resource Name (ARN) of each file share to + // be described. + // + // FileShareARNList is a required field + FileShareARNList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeNFSFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNFSFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNFSFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNFSFileSharesInput"} + if s.FileShareARNList == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) + } + if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARNList sets the FileShareARNList field's value. +func (s *DescribeNFSFileSharesInput) SetFileShareARNList(v []*string) *DescribeNFSFileSharesInput { + s.FileShareARNList = v + return s +} + +// DescribeNFSFileSharesOutput +type DescribeNFSFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array containing a description for each requested file share. + NFSFileShareInfoList []*NFSFileShareInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeNFSFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNFSFileSharesOutput) GoString() string { + return s.String() +} + +// SetNFSFileShareInfoList sets the NFSFileShareInfoList field's value. +func (s *DescribeNFSFileSharesOutput) SetNFSFileShareInfoList(v []*NFSFileShareInfo) *DescribeNFSFileSharesOutput { + s.NFSFileShareInfoList = v + return s +} + +// DescribeSMBFileSharesInput +type DescribeSMBFileSharesInput struct { + _ struct{} `type:"structure"` + + // An array containing the Amazon Resource Name (ARN) of each file share to + // be described. + // + // FileShareARNList is a required field + FileShareARNList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeSMBFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSMBFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSMBFileSharesInput"} + if s.FileShareARNList == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) + } + if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARNList sets the FileShareARNList field's value. +func (s *DescribeSMBFileSharesInput) SetFileShareARNList(v []*string) *DescribeSMBFileSharesInput { + s.FileShareARNList = v + return s +} + +// DescribeSMBFileSharesOutput +type DescribeSMBFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array containing a description for each requested file share. + SMBFileShareInfoList []*SMBFileShareInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeSMBFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBFileSharesOutput) GoString() string { + return s.String() +} + +// SetSMBFileShareInfoList sets the SMBFileShareInfoList field's value. +func (s *DescribeSMBFileSharesOutput) SetSMBFileShareInfoList(v []*SMBFileShareInfo) *DescribeSMBFileSharesOutput { + s.SMBFileShareInfoList = v + return s +} + +type DescribeSMBSettingsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSMBSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSMBSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSMBSettingsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeSMBSettingsInput) SetGatewayARN(v string) *DescribeSMBSettingsInput { + s.GatewayARN = &v + return s +} + +type DescribeSMBSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the domain that the gateway is joined to. + DomainName *string `type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // This value is true if a password for the guest user “smbguest” is set, and + // otherwise false. + SMBGuestPasswordSet *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeSMBSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBSettingsOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeSMBSettingsOutput) SetDomainName(v string) *DescribeSMBSettingsOutput { + s.DomainName = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeSMBSettingsOutput) SetGatewayARN(v string) *DescribeSMBSettingsOutput { + s.GatewayARN = &v + return s +} + +// SetSMBGuestPasswordSet sets the SMBGuestPasswordSet field's value. +func (s *DescribeSMBSettingsOutput) SetSMBGuestPasswordSet(v bool) *DescribeSMBSettingsOutput { + s.SMBGuestPasswordSet = &v + return s +} + +// A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN of the +// volume. +type DescribeSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotScheduleInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DescribeSnapshotScheduleInput) SetVolumeARN(v string) *DescribeSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +type DescribeSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + Description *string `min:"1" type:"string"` + + RecurrenceInHours *int64 `min:"1" type:"integer"` + + StartAt *int64 `type:"integer"` + + Timezone *string `min:"3" type:"string"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *DescribeSnapshotScheduleOutput) SetDescription(v string) *DescribeSnapshotScheduleOutput { + s.Description = &v + return s +} + +// SetRecurrenceInHours sets the RecurrenceInHours field's value. +func (s *DescribeSnapshotScheduleOutput) SetRecurrenceInHours(v int64) *DescribeSnapshotScheduleOutput { + s.RecurrenceInHours = &v + return s +} + +// SetStartAt sets the StartAt field's value. +func (s *DescribeSnapshotScheduleOutput) SetStartAt(v int64) *DescribeSnapshotScheduleOutput { + s.StartAt = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DescribeSnapshotScheduleOutput) SetTimezone(v string) *DescribeSnapshotScheduleOutput { + s.Timezone = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DescribeSnapshotScheduleOutput) SetVolumeARN(v string) *DescribeSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs. +type DescribeStorediSCSIVolumesInput struct { + _ struct{} `type:"structure"` + + // An array of strings where each string represents the Amazon Resource Name + // (ARN) of a stored volume. All of the specified stored volumes must from the + // same gateway. Use ListVolumes to get volume ARNs for a gateway. + // + // VolumeARNs is a required field + VolumeARNs []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeStorediSCSIVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorediSCSIVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStorediSCSIVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStorediSCSIVolumesInput"} + if s.VolumeARNs == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARNs sets the VolumeARNs field's value. +func (s *DescribeStorediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeStorediSCSIVolumesInput { + s.VolumeARNs = v + return s +} + +type DescribeStorediSCSIVolumesOutput struct { + _ struct{} `type:"structure"` + + StorediSCSIVolumes []*StorediSCSIVolume `type:"list"` +} + +// String returns the string representation +func (s DescribeStorediSCSIVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorediSCSIVolumesOutput) GoString() string { + return s.String() +} + +// SetStorediSCSIVolumes sets the StorediSCSIVolumes field's value. +func (s *DescribeStorediSCSIVolumesOutput) SetStorediSCSIVolumes(v []*StorediSCSIVolume) *DescribeStorediSCSIVolumesOutput { + s.StorediSCSIVolumes = v + return s +} + +// DescribeTapeArchivesInput +type DescribeTapeArchivesInput struct { + _ struct{} `type:"structure"` + + // Specifies that the number of virtual tapes descried be limited to the specified + // number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // virtual tapes. + Marker *string `min:"1" type:"string"` + + // Specifies one or more unique Amazon Resource Names (ARNs) that represent + // the virtual tapes you want to describe. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeArchivesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeArchivesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapeArchivesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapeArchivesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapeArchivesInput) SetLimit(v int64) *DescribeTapeArchivesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeArchivesInput) SetMarker(v string) *DescribeTapeArchivesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *DescribeTapeArchivesInput) SetTapeARNs(v []*string) *DescribeTapeArchivesInput { + s.TapeARNs = v + return s +} + +// DescribeTapeArchivesOutput +type DescribeTapeArchivesOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which the virtual tapes that + // were fetched for description ended. Use this marker in your next request + // to fetch the next set of virtual tapes in the virtual tape shelf (VTS). If + // there are no more virtual tapes to describe, this field does not appear in + // the response. + Marker *string `min:"1" type:"string"` + + // An array of virtual tape objects in the virtual tape shelf (VTS). The description + // includes of the Amazon Resource Name(ARN) of the virtual tapes. The information + // returned includes the Amazon Resource Names (ARNs) of the tapes, size of + // the tapes, status of the tapes, progress of the description and tape barcode. + TapeArchives []*TapeArchive `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeArchivesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeArchivesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeArchivesOutput) SetMarker(v string) *DescribeTapeArchivesOutput { + s.Marker = &v + return s +} + +// SetTapeArchives sets the TapeArchives field's value. +func (s *DescribeTapeArchivesOutput) SetTapeArchives(v []*TapeArchive) *DescribeTapeArchivesOutput { + s.TapeArchives = v + return s +} + +// DescribeTapeRecoveryPointsInput +type DescribeTapeRecoveryPointsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of virtual tape recovery points that are described + // be limited to the specified number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // the virtual tape recovery points. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeTapeRecoveryPointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeRecoveryPointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapeRecoveryPointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapeRecoveryPointsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapeRecoveryPointsInput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapeRecoveryPointsInput) SetLimit(v int64) *DescribeTapeRecoveryPointsInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeRecoveryPointsInput) SetMarker(v string) *DescribeTapeRecoveryPointsInput { + s.Marker = &v + return s +} + +// DescribeTapeRecoveryPointsOutput +type DescribeTapeRecoveryPointsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // An opaque string that indicates the position at which the virtual tape recovery + // points that were listed for description ended. + // + // Use this marker in your next request to list the next set of virtual tape + // recovery points in the list. If there are no more recovery points to describe, + // this field does not appear in the response. + Marker *string `min:"1" type:"string"` + + // An array of TapeRecoveryPointInfos that are available for the specified gateway. + TapeRecoveryPointInfos []*TapeRecoveryPointInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeRecoveryPointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeRecoveryPointsOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetMarker(v string) *DescribeTapeRecoveryPointsOutput { + s.Marker = &v + return s +} + +// SetTapeRecoveryPointInfos sets the TapeRecoveryPointInfos field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetTapeRecoveryPointInfos(v []*TapeRecoveryPointInfo) *DescribeTapeRecoveryPointsOutput { + s.TapeRecoveryPointInfos = v + return s +} + +// DescribeTapesInput +type DescribeTapesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of virtual tapes described be limited to the specified + // number. + // + // Amazon Web Services may impose its own limit, if this field is not set. + Limit *int64 `min:"1" type:"integer"` + + // A marker value, obtained in a previous call to DescribeTapes. This marker + // indicates which page of results to retrieve. + // + // If not specified, the first page of results is retrieved. + Marker *string `min:"1" type:"string"` + + // Specifies one or more unique Amazon Resource Names (ARNs) that represent + // the virtual tapes you want to describe. If this parameter is not specified, + // Tape gateway returns a description of all virtual tapes associated with the + // specified gateway. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapesInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapesInput) SetGatewayARN(v string) *DescribeTapesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapesInput) SetLimit(v int64) *DescribeTapesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapesInput) SetMarker(v string) *DescribeTapesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *DescribeTapesInput) SetTapeARNs(v []*string) *DescribeTapesInput { + s.TapeARNs = v + return s +} + +// DescribeTapesOutput +type DescribeTapesOutput struct { + _ struct{} `type:"structure"` + + // An opaque string which can be used as part of a subsequent DescribeTapes + // call to retrieve the next page of results. + // + // If a response does not contain a marker, then there are no more results to + // be retrieved. + Marker *string `min:"1" type:"string"` + + // An array of virtual tape descriptions. + Tapes []*Tape `type:"list"` +} + +// String returns the string representation +func (s DescribeTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapesOutput) SetMarker(v string) *DescribeTapesOutput { + s.Marker = &v + return s +} + +// SetTapes sets the Tapes field's value. +func (s *DescribeTapesOutput) SetTapes(v []*Tape) *DescribeTapesOutput { + s.Tapes = v + return s +} + +type DescribeUploadBufferInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeUploadBufferInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUploadBufferInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeUploadBufferInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeUploadBufferInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeUploadBufferInput) SetGatewayARN(v string) *DescribeUploadBufferInput { + s.GatewayARN = &v + return s +} + +type DescribeUploadBufferOutput struct { + _ struct{} `type:"structure"` + + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + UploadBufferAllocatedInBytes *int64 `type:"long"` + + UploadBufferUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DescribeUploadBufferOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUploadBufferOutput) GoString() string { + return s.String() +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeUploadBufferOutput) SetDiskIds(v []*string) *DescribeUploadBufferOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeUploadBufferOutput) SetGatewayARN(v string) *DescribeUploadBufferOutput { + s.GatewayARN = &v + return s +} + +// SetUploadBufferAllocatedInBytes sets the UploadBufferAllocatedInBytes field's value. +func (s *DescribeUploadBufferOutput) SetUploadBufferAllocatedInBytes(v int64) *DescribeUploadBufferOutput { + s.UploadBufferAllocatedInBytes = &v + return s +} + +// SetUploadBufferUsedInBytes sets the UploadBufferUsedInBytes field's value. +func (s *DescribeUploadBufferOutput) SetUploadBufferUsedInBytes(v int64) *DescribeUploadBufferOutput { + s.UploadBufferUsedInBytes = &v + return s +} + +// DescribeVTLDevicesInput +type DescribeVTLDevicesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of VTL devices described be limited to the specified + // number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // the VTL devices. + Marker *string `min:"1" type:"string"` + + // An array of strings, where each string represents the Amazon Resource Name + // (ARN) of a VTL device. + // + // All of the specified VTL devices must be from the same gateway. If no VTL + // devices are specified, the result will contain all devices on the specified + // gateway. + VTLDeviceARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeVTLDevicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVTLDevicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVTLDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVTLDevicesInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeVTLDevicesInput) SetGatewayARN(v string) *DescribeVTLDevicesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeVTLDevicesInput) SetLimit(v int64) *DescribeVTLDevicesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeVTLDevicesInput) SetMarker(v string) *DescribeVTLDevicesInput { + s.Marker = &v + return s +} + +// SetVTLDeviceARNs sets the VTLDeviceARNs field's value. +func (s *DescribeVTLDevicesInput) SetVTLDeviceARNs(v []*string) *DescribeVTLDevicesInput { + s.VTLDeviceARNs = v + return s +} + +// DescribeVTLDevicesOutput +type DescribeVTLDevicesOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // An opaque string that indicates the position at which the VTL devices that + // were fetched for description ended. Use the marker in your next request to + // fetch the next set of VTL devices in the list. If there are no more VTL devices + // to describe, this field does not appear in the response. + Marker *string `min:"1" type:"string"` + + // An array of VTL device objects composed of the Amazon Resource Name(ARN) + // of the VTL devices. + VTLDevices []*VTLDevice `type:"list"` +} + +// String returns the string representation +func (s DescribeVTLDevicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVTLDevicesOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeVTLDevicesOutput) SetGatewayARN(v string) *DescribeVTLDevicesOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeVTLDevicesOutput) SetMarker(v string) *DescribeVTLDevicesOutput { + s.Marker = &v + return s +} + +// SetVTLDevices sets the VTLDevices field's value. +func (s *DescribeVTLDevicesOutput) SetVTLDevices(v []*VTLDevice) *DescribeVTLDevicesOutput { + s.VTLDevices = v + return s +} + +// A JSON object containing the of the gateway. +type DescribeWorkingStorageInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkingStorageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkingStorageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkingStorageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkingStorageInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeWorkingStorageInput) SetGatewayARN(v string) *DescribeWorkingStorageInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeWorkingStorageOutput struct { + _ struct{} `type:"structure"` + + // An array of the gateway's local disk IDs that are configured as working storage. + // Each local disk ID is specified as a string (minimum length of 1 and maximum + // length of 300). If no local disks are configured as working storage, then + // the DiskIds array is empty. + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The total working storage in bytes allocated for the gateway. If no working + // storage is configured for the gateway, this field returns 0. + WorkingStorageAllocatedInBytes *int64 `type:"long"` + + // The total working storage in bytes in use by the gateway. If no working storage + // is configured for the gateway, this field returns 0. + WorkingStorageUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DescribeWorkingStorageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkingStorageOutput) GoString() string { + return s.String() +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeWorkingStorageOutput) SetDiskIds(v []*string) *DescribeWorkingStorageOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeWorkingStorageOutput) SetGatewayARN(v string) *DescribeWorkingStorageOutput { + s.GatewayARN = &v + return s +} + +// SetWorkingStorageAllocatedInBytes sets the WorkingStorageAllocatedInBytes field's value. +func (s *DescribeWorkingStorageOutput) SetWorkingStorageAllocatedInBytes(v int64) *DescribeWorkingStorageOutput { + s.WorkingStorageAllocatedInBytes = &v + return s +} + +// SetWorkingStorageUsedInBytes sets the WorkingStorageUsedInBytes field's value. +func (s *DescribeWorkingStorageOutput) SetWorkingStorageUsedInBytes(v int64) *DescribeWorkingStorageOutput { + s.WorkingStorageUsedInBytes = &v + return s +} + +// Lists iSCSI information about a VTL device. +type DeviceiSCSIAttributes struct { + _ struct{} `type:"structure"` + + // Indicates whether mutual CHAP is enabled for the iSCSI target. + ChapEnabled *bool `type:"boolean"` + + // The network interface identifier of the VTL device. + NetworkInterfaceId *string `type:"string"` + + // The port used to communicate with iSCSI VTL device targets. + NetworkInterfacePort *int64 `type:"integer"` + + // Specifies the unique Amazon Resource Name(ARN) that encodes the iSCSI qualified + // name(iqn) of a tape drive or media changer target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeviceiSCSIAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceiSCSIAttributes) GoString() string { + return s.String() +} + +// SetChapEnabled sets the ChapEnabled field's value. +func (s *DeviceiSCSIAttributes) SetChapEnabled(v bool) *DeviceiSCSIAttributes { + s.ChapEnabled = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DeviceiSCSIAttributes) SetNetworkInterfaceId(v string) *DeviceiSCSIAttributes { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. +func (s *DeviceiSCSIAttributes) SetNetworkInterfacePort(v int64) *DeviceiSCSIAttributes { + s.NetworkInterfacePort = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeviceiSCSIAttributes) SetTargetARN(v string) *DeviceiSCSIAttributes { + s.TargetARN = &v + return s +} + +// DisableGatewayInput +type DisableGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DisableGatewayInput) SetGatewayARN(v string) *DisableGatewayInput { + s.GatewayARN = &v + return s +} + +// DisableGatewayOutput +type DisableGatewayOutput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name of the disabled gateway. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DisableGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DisableGatewayOutput) SetGatewayARN(v string) *DisableGatewayOutput { + s.GatewayARN = &v + return s +} + +type Disk struct { + _ struct{} `type:"structure"` + + DiskAllocationResource *string `type:"string"` + + DiskAllocationType *string `min:"3" type:"string"` + + DiskId *string `min:"1" type:"string"` + + DiskNode *string `type:"string"` + + DiskPath *string `type:"string"` + + DiskSizeInBytes *int64 `type:"long"` + + DiskStatus *string `type:"string"` +} + +// String returns the string representation +func (s Disk) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Disk) GoString() string { + return s.String() +} + +// SetDiskAllocationResource sets the DiskAllocationResource field's value. +func (s *Disk) SetDiskAllocationResource(v string) *Disk { + s.DiskAllocationResource = &v + return s +} + +// SetDiskAllocationType sets the DiskAllocationType field's value. +func (s *Disk) SetDiskAllocationType(v string) *Disk { + s.DiskAllocationType = &v + return s +} + +// SetDiskId sets the DiskId field's value. +func (s *Disk) SetDiskId(v string) *Disk { + s.DiskId = &v + return s +} + +// SetDiskNode sets the DiskNode field's value. +func (s *Disk) SetDiskNode(v string) *Disk { + s.DiskNode = &v + return s +} + +// SetDiskPath sets the DiskPath field's value. +func (s *Disk) SetDiskPath(v string) *Disk { + s.DiskPath = &v + return s +} + +// SetDiskSizeInBytes sets the DiskSizeInBytes field's value. +func (s *Disk) SetDiskSizeInBytes(v int64) *Disk { + s.DiskSizeInBytes = &v + return s +} + +// SetDiskStatus sets the DiskStatus field's value. +func (s *Disk) SetDiskStatus(v string) *Disk { + s.DiskStatus = &v + return s +} + +// Provides additional information about an error that was returned by the service +// as an or. See the errorCode and errorDetails members for more information +// about the error. +type Error struct { + _ struct{} `type:"structure"` + + // Additional information about the error. + ErrorCode *string `locationName:"errorCode" type:"string" enum:"ErrorCode"` + + // Human-readable text that provides detail about the error that occurred. + ErrorDetails map[string]*string `locationName:"errorDetails" type:"map"` +} + +// String returns the string representation +func (s Error) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Error) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *Error) SetErrorCode(v string) *Error { + s.ErrorCode = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *Error) SetErrorDetails(v map[string]*string) *Error { + s.ErrorDetails = v + return s +} + +// Describes a file share. +type FileShareInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The type of the file share. + FileShareType *string `type:"string" enum:"FileShareType"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s FileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileShareInfo) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *FileShareInfo) SetFileShareARN(v string) *FileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *FileShareInfo) SetFileShareId(v string) *FileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *FileShareInfo) SetFileShareStatus(v string) *FileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetFileShareType sets the FileShareType field's value. +func (s *FileShareInfo) SetFileShareType(v string) *FileShareInfo { + s.FileShareType = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *FileShareInfo) SetGatewayARN(v string) *FileShareInfo { + s.GatewayARN = &v + return s +} + +// Describes a gateway object. +type GatewayInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + GatewayId *string `min:"12" type:"string"` + + // The name of the gateway. + GatewayName *string `type:"string"` + + // The state of the gateway. + // + // Valid Values: DISABLED or ACTIVE + GatewayOperationalState *string `min:"2" type:"string"` + + // The type of the gateway. + GatewayType *string `min:"2" type:"string"` +} + +// String returns the string representation +func (s GatewayInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GatewayInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *GatewayInfo) SetGatewayARN(v string) *GatewayInfo { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *GatewayInfo) SetGatewayId(v string) *GatewayInfo { + s.GatewayId = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *GatewayInfo) SetGatewayName(v string) *GatewayInfo { + s.GatewayName = &v + return s +} + +// SetGatewayOperationalState sets the GatewayOperationalState field's value. +func (s *GatewayInfo) SetGatewayOperationalState(v string) *GatewayInfo { + s.GatewayOperationalState = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { + s.GatewayType = &v + return s +} + +// JoinDomainInput +type JoinDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want the gateway to join. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The unique Amazon Resource Name of the file gateway you want to add to the + // Active Directory domain. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Sets the password of the user who has permission to add the gateway to the + // Active Directory domain. + // + // Password is a required field + Password *string `type:"string" required:"true"` + + // Sets the user name of user who has permission to add the gateway to the Active + // Directory domain. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s JoinDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JoinDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *JoinDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JoinDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *JoinDomainInput) SetDomainName(v string) *JoinDomainInput { + s.DomainName = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *JoinDomainInput) SetGatewayARN(v string) *JoinDomainInput { + s.GatewayARN = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput { + s.Password = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *JoinDomainInput) SetUserName(v string) *JoinDomainInput { + s.UserName = &v + return s +} + +// JoinDomainOutput +type JoinDomainOutput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name of the gateway that joined the domain. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s JoinDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JoinDomainOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *JoinDomainOutput) SetGatewayARN(v string) *JoinDomainOutput { + s.GatewayARN = &v + return s +} + +// ListFileShareInput +type ListFileSharesInput struct { + _ struct{} `type:"structure"` + + // The Amazon resource Name (ARN) of the gateway whose file shares you want + // to list. If this field is not present, all file shares under your account + // are listed. + GatewayARN *string `min:"50" type:"string"` + + // The maximum number of file shares to return in the response. The value must + // be an integer with a value greater than zero. Optional. + Limit *int64 `min:"1" type:"integer"` + + // Opaque pagination token returned from a previous ListFileShares operation. + // If present, Marker specifies where to continue the list from after a previous + // call to ListFileShares. Optional. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFileSharesInput"} + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListFileSharesInput) SetGatewayARN(v string) *ListFileSharesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListFileSharesInput) SetLimit(v int64) *ListFileSharesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListFileSharesInput) SetMarker(v string) *ListFileSharesInput { + s.Marker = &v + return s +} + +// ListFileShareOutput +type ListFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array of information about the file gateway's file shares. + FileShareInfoList []*FileShareInfo `type:"list"` + + // If the request includes Marker, the response returns that value in this field. + Marker *string `min:"1" type:"string"` + + // If a value is present, there are more file shares to return. In a subsequent + // request, use NextMarker as the value for Marker to retrieve the next set + // of file shares. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFileSharesOutput) GoString() string { + return s.String() +} + +// SetFileShareInfoList sets the FileShareInfoList field's value. +func (s *ListFileSharesOutput) SetFileShareInfoList(v []*FileShareInfo) *ListFileSharesOutput { + s.FileShareInfoList = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListFileSharesOutput) SetMarker(v string) *ListFileSharesOutput { + s.Marker = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListFileSharesOutput) SetNextMarker(v string) *ListFileSharesOutput { + s.NextMarker = &v + return s +} + +// A JSON object containing zero or more of the following fields: +// +// * ListGatewaysInput$Limit +// +// * ListGatewaysInput$Marker +type ListGatewaysInput struct { + _ struct{} `type:"structure"` + + // Specifies that the list of gateways returned be limited to the specified + // number of items. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin the returned + // list of gateways. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGatewaysInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGatewaysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGatewaysInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListGatewaysInput) SetLimit(v int64) *ListGatewaysInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListGatewaysInput) SetMarker(v string) *ListGatewaysInput { + s.Marker = &v + return s +} + +type ListGatewaysOutput struct { + _ struct{} `type:"structure"` + + Gateways []*GatewayInfo `type:"list"` + + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGatewaysOutput) GoString() string { + return s.String() +} + +// SetGateways sets the Gateways field's value. +func (s *ListGatewaysOutput) SetGateways(v []*GatewayInfo) *ListGatewaysOutput { + s.Gateways = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListGatewaysOutput) SetMarker(v string) *ListGatewaysOutput { + s.Marker = &v + return s +} + +// A JSON object containing the of the gateway. +type ListLocalDisksInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListLocalDisksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocalDisksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLocalDisksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLocalDisksInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListLocalDisksInput) SetGatewayARN(v string) *ListLocalDisksInput { + s.GatewayARN = &v + return s +} + +type ListLocalDisksOutput struct { + _ struct{} `type:"structure"` + + Disks []*Disk `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ListLocalDisksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocalDisksOutput) GoString() string { + return s.String() +} + +// SetDisks sets the Disks field's value. +func (s *ListLocalDisksOutput) SetDisks(v []*Disk) *ListLocalDisksOutput { + s.Disks = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListLocalDisksOutput) SetGatewayARN(v string) *ListLocalDisksOutput { + s.GatewayARN = &v + return s +} + +// ListTagsForResourceInput +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // Specifies that the list of tags returned be limited to the specified number + // of items. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin returning + // the list of tags. + Marker *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the resource for which you want to list + // tags. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" 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.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListTagsForResourceInput) SetMarker(v string) *ListTagsForResourceInput { + s.Marker = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +// ListTagsForResourceOutput +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which to stop returning the + // list of tags. + Marker *string `min:"1" type:"string"` + + // he Amazon Resource Name (ARN) of the resource for which you want to list + // tags. + ResourceARN *string `min:"50" type:"string"` + + // An array that contains the tags for the specified resource. + Tags []*Tag `type:"list"` +} + +// 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() +} + +// SetMarker sets the Marker field's value. +func (s *ListTagsForResourceOutput) SetMarker(v string) *ListTagsForResourceOutput { + s.Marker = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceOutput) SetResourceARN(v string) *ListTagsForResourceOutput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// A JSON object that contains one or more of the following fields: +// +// * ListTapesInput$Limit +// +// * ListTapesInput$Marker +// +// * ListTapesInput$TapeARNs +type ListTapesInput struct { + _ struct{} `type:"structure"` + + // An optional number limit for the tapes in the list returned by this call. + Limit *int64 `min:"1" type:"integer"` + + // A string that indicates the position at which to begin the returned list + // of tapes. + Marker *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of each of the tapes you want to list. If + // you don't specify a tape ARN, the response lists all tapes in both your VTL + // and VTS. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s ListTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTapesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListTapesInput) SetLimit(v int64) *ListTapesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListTapesInput) SetMarker(v string) *ListTapesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *ListTapesInput) SetTapeARNs(v []*string) *ListTapesInput { + s.TapeARNs = v + return s +} + +// A JSON object containing the following fields: +// +// * ListTapesOutput$Marker +// +// * ListTapesOutput$VolumeInfos +type ListTapesOutput struct { + _ struct{} `type:"structure"` + + // A string that indicates the position at which to begin returning the next + // list of tapes. Use the marker in your next request to continue pagination + // of tapes. If there are no more tapes to list, this element does not appear + // in the response body. + Marker *string `min:"1" type:"string"` + + // An array of TapeInfo objects, where each object describes an a single tape. + // If there not tapes in the tape library or VTS, then the TapeInfos is an empty + // array. + TapeInfos []*TapeInfo `type:"list"` +} + +// String returns the string representation +func (s ListTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTapesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListTapesOutput) SetMarker(v string) *ListTapesOutput { + s.Marker = &v + return s +} + +// SetTapeInfos sets the TapeInfos field's value. +func (s *ListTapesOutput) SetTapeInfos(v []*TapeInfo) *ListTapesOutput { + s.TapeInfos = v + return s +} + +// ListVolumeInitiatorsInput +type ListVolumeInitiatorsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes for the gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListVolumeInitiatorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeInitiatorsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumeInitiatorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumeInitiatorsInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *ListVolumeInitiatorsInput) SetVolumeARN(v string) *ListVolumeInitiatorsInput { + s.VolumeARN = &v + return s +} + +// ListVolumeInitiatorsOutput +type ListVolumeInitiatorsOutput struct { + _ struct{} `type:"structure"` + + // The host names and port numbers of all iSCSI initiators that are connected + // to the gateway. + Initiators []*string `type:"list"` +} + +// String returns the string representation +func (s ListVolumeInitiatorsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeInitiatorsOutput) GoString() string { + return s.String() +} + +// SetInitiators sets the Initiators field's value. +func (s *ListVolumeInitiatorsOutput) SetInitiators(v []*string) *ListVolumeInitiatorsOutput { + s.Initiators = v + return s +} + +type ListVolumeRecoveryPointsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListVolumeRecoveryPointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeRecoveryPointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumeRecoveryPointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumeRecoveryPointsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumeRecoveryPointsInput) SetGatewayARN(v string) *ListVolumeRecoveryPointsInput { + s.GatewayARN = &v + return s +} + +type ListVolumeRecoveryPointsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + VolumeRecoveryPointInfos []*VolumeRecoveryPointInfo `type:"list"` +} + +// String returns the string representation +func (s ListVolumeRecoveryPointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeRecoveryPointsOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumeRecoveryPointsOutput) SetGatewayARN(v string) *ListVolumeRecoveryPointsOutput { + s.GatewayARN = &v + return s +} + +// SetVolumeRecoveryPointInfos sets the VolumeRecoveryPointInfos field's value. +func (s *ListVolumeRecoveryPointsOutput) SetVolumeRecoveryPointInfos(v []*VolumeRecoveryPointInfo) *ListVolumeRecoveryPointsOutput { + s.VolumeRecoveryPointInfos = v + return s +} + +// A JSON object that contains one or more of the following fields: +// +// * ListVolumesInput$Limit +// +// * ListVolumesInput$Marker +type ListVolumesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Specifies that the list of volumes returned be limited to the specified number + // of items. + Limit *int64 `min:"1" type:"integer"` + + // A string that indicates the position at which to begin the returned list + // of volumes. Obtain the marker from the response of a previous List iSCSI + // Volumes request. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumesInput"} + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumesInput) SetGatewayARN(v string) *ListVolumesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListVolumesInput) SetLimit(v int64) *ListVolumesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListVolumesInput) SetMarker(v string) *ListVolumesInput { + s.Marker = &v + return s +} + +type ListVolumesOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + Marker *string `min:"1" type:"string"` + + VolumeInfos []*VolumeInfo `type:"list"` +} + +// String returns the string representation +func (s ListVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumesOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumesOutput) SetGatewayARN(v string) *ListVolumesOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListVolumesOutput) SetMarker(v string) *ListVolumesOutput { + s.Marker = &v + return s +} + +// SetVolumeInfos sets the VolumeInfos field's value. +func (s *ListVolumesOutput) SetVolumeInfos(v []*VolumeInfo) *ListVolumesOutput { + s.VolumeInfos = v + return s +} + +// Describes Network File System (NFS) file share default values. Files and +// folders stored as Amazon S3 objects in S3 buckets don't, by default, have +// Unix file permissions assigned to them. Upon discovery in an S3 bucket by +// Storage Gateway, the S3 objects that represent files and folders are assigned +// these default Unix permissions. This operation is only supported in the file +// gateway type. +type NFSFileShareDefaults struct { + _ struct{} `type:"structure"` + + // The Unix directory mode in the form "nnnn". For example, "0666" represents + // the default access mode for all directories inside the file share. The default + // value is 0777. + DirectoryMode *string `min:"1" type:"string"` + + // The Unix file mode in the form "nnnn". For example, "0666" represents the + // default file mode inside the file share. The default value is 0666. + FileMode *string `min:"1" type:"string"` + + // The default group ID for the file share (unless the files have another group + // ID specified). The default value is nfsnobody. + GroupId *int64 `type:"long"` + + // The default owner ID for files in the file share (unless the files have another + // owner ID specified). The default value is nfsnobody. + OwnerId *int64 `type:"long"` +} + +// String returns the string representation +func (s NFSFileShareDefaults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NFSFileShareDefaults) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NFSFileShareDefaults) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NFSFileShareDefaults"} + if s.DirectoryMode != nil && len(*s.DirectoryMode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DirectoryMode", 1)) + } + if s.FileMode != nil && len(*s.FileMode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileMode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryMode sets the DirectoryMode field's value. +func (s *NFSFileShareDefaults) SetDirectoryMode(v string) *NFSFileShareDefaults { + s.DirectoryMode = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *NFSFileShareDefaults) SetFileMode(v string) *NFSFileShareDefaults { + s.FileMode = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *NFSFileShareDefaults) SetGroupId(v int64) *NFSFileShareDefaults { + s.GroupId = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *NFSFileShareDefaults) SetOwnerId(v int64) *NFSFileShareDefaults { + s.OwnerId = &v + return s +} + +// The Unix file permissions and ownership information assigned, by default, +// to native S3 objects when file gateway discovers them in S3 buckets. This +// operation is only supported in file gateways. +type NFSFileShareInfo struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own KMS key, or false + // to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backend storage used for storing file data. + LocationARN *string `min:"16" type:"string"` + + // Describes Network File System (NFS) file share default values. Files and + // folders stored as Amazon S3 objects in S3 buckets don't, by default, have + // Unix file permissions assigned to them. Upon discovery in an S3 bucket by + // Storage Gateway, the S3 objects that represent files and folders are assigned + // these default Unix permissions. This operation is only supported in the file + // gateway type. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // The file share path used by the NFS client to identify the mount point. + Path *string `type:"string"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the IAM role that file gateway assumes when it accesses the underlying + // storage. + Role *string `min:"20" type:"string"` + + // The user mapped to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s NFSFileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NFSFileShareInfo) GoString() string { + return s.String() +} + +// SetClientList sets the ClientList field's value. +func (s *NFSFileShareInfo) SetClientList(v []*string) *NFSFileShareInfo { + s.ClientList = v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *NFSFileShareInfo) SetDefaultStorageClass(v string) *NFSFileShareInfo { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NFSFileShareInfo) SetFileShareARN(v string) *NFSFileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *NFSFileShareInfo) SetFileShareId(v string) *NFSFileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *NFSFileShareInfo) SetFileShareStatus(v string) *NFSFileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *NFSFileShareInfo) SetGatewayARN(v string) *NFSFileShareInfo { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *NFSFileShareInfo) SetGuessMIMETypeEnabled(v bool) *NFSFileShareInfo { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *NFSFileShareInfo) SetKMSEncrypted(v bool) *NFSFileShareInfo { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *NFSFileShareInfo) SetKMSKey(v string) *NFSFileShareInfo { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *NFSFileShareInfo) SetLocationARN(v string) *NFSFileShareInfo { + s.LocationARN = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *NFSFileShareInfo) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *NFSFileShareInfo { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *NFSFileShareInfo) SetObjectACL(v string) *NFSFileShareInfo { + s.ObjectACL = &v + return s +} + +// SetPath sets the Path field's value. +func (s *NFSFileShareInfo) SetPath(v string) *NFSFileShareInfo { + s.Path = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *NFSFileShareInfo) SetReadOnly(v bool) *NFSFileShareInfo { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *NFSFileShareInfo) SetRequesterPays(v bool) *NFSFileShareInfo { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *NFSFileShareInfo) SetRole(v string) *NFSFileShareInfo { + s.Role = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *NFSFileShareInfo) SetSquash(v string) *NFSFileShareInfo { + s.Squash = &v + return s +} + +// Describes a gateway's network interface. +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The Internet Protocol version 4 (IPv4) address of the interface. + Ipv4Address *string `type:"string"` + + // The Internet Protocol version 6 (IPv6) address of the interface. Currently + // not supported. + Ipv6Address *string `type:"string"` + + // The Media Access Control (MAC) address of the interface. + // + // This is currently unsupported and will not be returned in output. + MacAddress *string `type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetIpv4Address sets the Ipv4Address field's value. +func (s *NetworkInterface) SetIpv4Address(v string) *NetworkInterface { + s.Ipv4Address = &v + return s +} + +// SetIpv6Address sets the Ipv6Address field's value. +func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { + s.Ipv6Address = &v + return s +} + +// SetMacAddress sets the MacAddress field's value. +func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { + s.MacAddress = &v + return s +} + +type NotifyWhenUploadedInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s NotifyWhenUploadedInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotifyWhenUploadedInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotifyWhenUploadedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotifyWhenUploadedInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NotifyWhenUploadedInput) SetFileShareARN(v string) *NotifyWhenUploadedInput { + s.FileShareARN = &v + return s +} + +type NotifyWhenUploadedOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The randomly generated ID of the notification that was sent. This ID is in + // UUID format. + NotificationId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s NotifyWhenUploadedOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotifyWhenUploadedOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NotifyWhenUploadedOutput) SetFileShareARN(v string) *NotifyWhenUploadedOutput { + s.FileShareARN = &v + return s +} + +// SetNotificationId sets the NotificationId field's value. +func (s *NotifyWhenUploadedOutput) SetNotificationId(v string) *NotifyWhenUploadedOutput { + s.NotificationId = &v + return s +} + +type RefreshCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RefreshCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RefreshCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RefreshCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RefreshCacheInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *RefreshCacheInput) SetFileShareARN(v string) *RefreshCacheInput { + s.FileShareARN = &v + return s +} + +type RefreshCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RefreshCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RefreshCacheOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *RefreshCacheOutput) SetFileShareARN(v string) *RefreshCacheOutput { + s.FileShareARN = &v + return s +} + +// RemoveTagsFromResourceInput +type RemoveTagsFromResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to remove the tags + // from. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" type:"string" required:"true"` + + // The keys of the tags you want to remove from the specified resource. A tag + // is composed of a key/value pair. + // + // TagKeys is a required field + TagKeys []*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.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + 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 *RemoveTagsFromResourceInput) SetResourceARN(v string) *RemoveTagsFromResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { + s.TagKeys = v + return s +} + +// RemoveTagsFromResourceOutput +type RemoveTagsFromResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that the tags were removed + // from. + ResourceARN *string `min:"50" type:"string"` +} + +// 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() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *RemoveTagsFromResourceOutput) SetResourceARN(v string) *RemoveTagsFromResourceOutput { + s.ResourceARN = &v + return s +} + +type ResetCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ResetCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetCacheInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ResetCacheInput) SetGatewayARN(v string) *ResetCacheInput { + s.GatewayARN = &v + return s +} + +type ResetCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ResetCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetCacheOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ResetCacheOutput) SetGatewayARN(v string) *ResetCacheOutput { + s.GatewayARN = &v + return s +} + +// RetrieveTapeArchiveInput +type RetrieveTapeArchiveInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway you want to retrieve the virtual + // tape to. Use the ListGateways operation to return a list of gateways for + // your account and region. + // + // You retrieve archived virtual tapes to only one gateway and the gateway must + // be a tape gateway. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to retrieve from + // the virtual tape shelf (VTS). + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RetrieveTapeArchiveInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeArchiveInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveTapeArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeArchiveInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *RetrieveTapeArchiveInput) SetGatewayARN(v string) *RetrieveTapeArchiveInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeArchiveInput) SetTapeARN(v string) *RetrieveTapeArchiveInput { + s.TapeARN = &v + return s +} + +// RetrieveTapeArchiveOutput +type RetrieveTapeArchiveOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the retrieved virtual tape. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RetrieveTapeArchiveOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeArchiveOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeArchiveOutput) SetTapeARN(v string) *RetrieveTapeArchiveOutput { + s.TapeARN = &v + return s +} + +// RetrieveTapeRecoveryPointInput +type RetrieveTapeRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape for which you want to + // retrieve the recovery point. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RetrieveTapeRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveTapeRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeRecoveryPointInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *RetrieveTapeRecoveryPointInput) SetGatewayARN(v string) *RetrieveTapeRecoveryPointInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeRecoveryPointInput) SetTapeARN(v string) *RetrieveTapeRecoveryPointInput { + s.TapeARN = &v + return s +} + +// RetrieveTapeRecoveryPointOutput +type RetrieveTapeRecoveryPointOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which the recovery + // point was retrieved. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RetrieveTapeRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeRecoveryPointOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeRecoveryPointOutput) SetTapeARN(v string) *RetrieveTapeRecoveryPointOutput { + s.TapeARN = &v + return s +} + +// The Windows file permissions and ownership information assigned, by default, +// to native S3 objects when file gateway discovers them in S3 buckets. This +// operation is only supported in file gateways. +type SMBFileShareInfo struct { + _ struct{} `type:"structure"` + + // The authentication method of the file share. Valid values: "ActiveDirectory" + // or "GuestAccess". The default is "ActiveDirectory". + Authentication *string `min:"5" type:"string"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own KMS key, or false + // to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backend storage used for storing file data. + LocationARN *string `min:"16" type:"string"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // The file share path used by the SMB client to identify the mount point. + Path *string `type:"string"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the IAM role that file gateway assumes when it accesses the underlying + // storage. + Role *string `min:"20" type:"string"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s SMBFileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMBFileShareInfo) GoString() string { + return s.String() +} + +// SetAuthentication sets the Authentication field's value. +func (s *SMBFileShareInfo) SetAuthentication(v string) *SMBFileShareInfo { + s.Authentication = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *SMBFileShareInfo) SetDefaultStorageClass(v string) *SMBFileShareInfo { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *SMBFileShareInfo) SetFileShareARN(v string) *SMBFileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *SMBFileShareInfo) SetFileShareId(v string) *SMBFileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *SMBFileShareInfo) SetFileShareStatus(v string) *SMBFileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SMBFileShareInfo) SetGatewayARN(v string) *SMBFileShareInfo { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *SMBFileShareInfo) SetGuessMIMETypeEnabled(v bool) *SMBFileShareInfo { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *SMBFileShareInfo) SetInvalidUserList(v []*string) *SMBFileShareInfo { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *SMBFileShareInfo) SetKMSEncrypted(v bool) *SMBFileShareInfo { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *SMBFileShareInfo) SetKMSKey(v string) *SMBFileShareInfo { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *SMBFileShareInfo) SetLocationARN(v string) *SMBFileShareInfo { + s.LocationARN = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *SMBFileShareInfo) SetObjectACL(v string) *SMBFileShareInfo { + s.ObjectACL = &v + return s +} + +// SetPath sets the Path field's value. +func (s *SMBFileShareInfo) SetPath(v string) *SMBFileShareInfo { + s.Path = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *SMBFileShareInfo) SetReadOnly(v bool) *SMBFileShareInfo { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *SMBFileShareInfo) SetRequesterPays(v bool) *SMBFileShareInfo { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *SMBFileShareInfo) SetRole(v string) *SMBFileShareInfo { + s.Role = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *SMBFileShareInfo) SetValidUserList(v []*string) *SMBFileShareInfo { + s.ValidUserList = v + return s +} + +// SetLocalConsolePasswordInput +type SetLocalConsolePasswordInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The password you want to set for your VM local console. + // + // LocalConsolePassword is a required field + LocalConsolePassword *string `min:"6" type:"string" required:"true"` +} + +// String returns the string representation +func (s SetLocalConsolePasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLocalConsolePasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLocalConsolePasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLocalConsolePasswordInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.LocalConsolePassword == nil { + invalidParams.Add(request.NewErrParamRequired("LocalConsolePassword")) + } + if s.LocalConsolePassword != nil && len(*s.LocalConsolePassword) < 6 { + invalidParams.Add(request.NewErrParamMinLen("LocalConsolePassword", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetLocalConsolePasswordInput) SetGatewayARN(v string) *SetLocalConsolePasswordInput { + s.GatewayARN = &v + return s +} + +// SetLocalConsolePassword sets the LocalConsolePassword field's value. +func (s *SetLocalConsolePasswordInput) SetLocalConsolePassword(v string) *SetLocalConsolePasswordInput { + s.LocalConsolePassword = &v + return s +} + +type SetLocalConsolePasswordOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s SetLocalConsolePasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLocalConsolePasswordOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetLocalConsolePasswordOutput) SetGatewayARN(v string) *SetLocalConsolePasswordOutput { + s.GatewayARN = &v + return s +} + +// SetSMBGuestPasswordInput +type SetSMBGuestPasswordInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file gateway the SMB file share is + // associated with. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The password you want to set for your SMB Server. + // + // Password is a required field + Password *string `min:"6" type:"string" required:"true"` +} + +// String returns the string representation +func (s SetSMBGuestPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetSMBGuestPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetSMBGuestPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetSMBGuestPasswordInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 6 { + invalidParams.Add(request.NewErrParamMinLen("Password", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetSMBGuestPasswordInput) SetGatewayARN(v string) *SetSMBGuestPasswordInput { + s.GatewayARN = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *SetSMBGuestPasswordInput) SetPassword(v string) *SetSMBGuestPasswordInput { + s.Password = &v + return s +} + +type SetSMBGuestPasswordOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s SetSMBGuestPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetSMBGuestPasswordOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetSMBGuestPasswordOutput) SetGatewayARN(v string) *SetSMBGuestPasswordOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway to shut down. +type ShutdownGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ShutdownGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShutdownGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShutdownGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShutdownGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ShutdownGatewayInput) SetGatewayARN(v string) *ShutdownGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was shut down. +type ShutdownGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ShutdownGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShutdownGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ShutdownGatewayOutput) SetGatewayARN(v string) *ShutdownGatewayOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway to start. +type StartGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *StartGatewayInput) SetGatewayARN(v string) *StartGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was restarted. +type StartGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s StartGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *StartGatewayOutput) SetGatewayARN(v string) *StartGatewayOutput { + s.GatewayARN = &v + return s +} + +// Describes an iSCSI stored volume. +type StorediSCSIVolume struct { + _ struct{} `type:"structure"` + + // The date the volume was created. Volumes created prior to March 28, 2017 + // don’t have this time stamp. + CreatedDate *time.Time `type:"timestamp"` + + // Indicates if when the stored volume was created, existing data on the underlying + // local disk was preserved. + // + // Valid Values: true, false + PreservedExistingData *bool `type:"boolean"` + + // If the stored volume was created from a snapshot, this field contains the + // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. + SourceSnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the storage volume. + VolumeARN *string `min:"50" type:"string"` + + // The ID of the local disk that was specified in the CreateStorediSCSIVolume + // operation. + VolumeDiskId *string `min:"1" type:"string"` + + // The unique identifier of the volume, e.g. vol-AE4B946D. + VolumeId *string `min:"12" type:"string"` + + // Represents the percentage complete if the volume is restoring or bootstrapping + // that represents the percent of data transferred. This field does not appear + // in the response if the stored volume is not restoring or bootstrapping. + VolumeProgress *float64 `type:"double"` + + // The size of the volume in bytes. + VolumeSizeInBytes *int64 `type:"long"` + + // One of the VolumeStatus values that indicates the state of the storage volume. + VolumeStatus *string `min:"3" type:"string"` + + // One of the VolumeType enumeration values describing the type of the volume. + VolumeType *string `min:"3" type:"string"` + + // The size of the data stored on the volume in bytes. + // + // This value is not available for volumes created prior to May 13, 2015, until + // you store data on the volume. + VolumeUsedInBytes *int64 `type:"long"` + + // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes + // for one stored volume. + VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` +} + +// String returns the string representation +func (s StorediSCSIVolume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StorediSCSIVolume) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *StorediSCSIVolume) SetCreatedDate(v time.Time) *StorediSCSIVolume { + s.CreatedDate = &v + return s +} + +// SetPreservedExistingData sets the PreservedExistingData field's value. +func (s *StorediSCSIVolume) SetPreservedExistingData(v bool) *StorediSCSIVolume { + s.PreservedExistingData = &v + return s +} + +// SetSourceSnapshotId sets the SourceSnapshotId field's value. +func (s *StorediSCSIVolume) SetSourceSnapshotId(v string) *StorediSCSIVolume { + s.SourceSnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *StorediSCSIVolume) SetVolumeARN(v string) *StorediSCSIVolume { + s.VolumeARN = &v + return s +} + +// SetVolumeDiskId sets the VolumeDiskId field's value. +func (s *StorediSCSIVolume) SetVolumeDiskId(v string) *StorediSCSIVolume { + s.VolumeDiskId = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *StorediSCSIVolume) SetVolumeId(v string) *StorediSCSIVolume { + s.VolumeId = &v + return s +} + +// SetVolumeProgress sets the VolumeProgress field's value. +func (s *StorediSCSIVolume) SetVolumeProgress(v float64) *StorediSCSIVolume { + s.VolumeProgress = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *StorediSCSIVolume) SetVolumeSizeInBytes(v int64) *StorediSCSIVolume { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeStatus sets the VolumeStatus field's value. +func (s *StorediSCSIVolume) SetVolumeStatus(v string) *StorediSCSIVolume { + s.VolumeStatus = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *StorediSCSIVolume) SetVolumeType(v string) *StorediSCSIVolume { + s.VolumeType = &v + return s +} + +// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. +func (s *StorediSCSIVolume) SetVolumeUsedInBytes(v int64) *StorediSCSIVolume { + s.VolumeUsedInBytes = &v + return s +} + +// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. +func (s *StorediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *StorediSCSIVolume { + s.VolumeiSCSIAttributes = v + return s +} + +type Tag struct { + _ struct{} `type:"structure"` + + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // 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 +} + +// Describes a virtual tape object. +type Tape struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // For archiving virtual tapes, indicates how much data remains to be uploaded + // before archiving is complete. + // + // Range: 0 (not started) to 100 (complete). + Progress *float64 `type:"double"` + + // The Amazon Resource Name (ARN) of the virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies a specific virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The date the virtual tape was created. + TapeCreatedDate *time.Time `type:"timestamp"` + + // The size, in bytes, of the virtual tape capacity. + TapeSizeInBytes *int64 `type:"long"` + + // The current state of the virtual tape. + TapeStatus *string `type:"string"` + + // The size, in bytes, of data stored on the virtual tape. + // + // This value is not available for tapes created prior to May 13, 2015. + TapeUsedInBytes *int64 `type:"long"` + + // The virtual tape library (VTL) device that the virtual tape is associated + // with. + VTLDevice *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s Tape) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tape) GoString() string { + return s.String() +} + +// SetKMSKey sets the KMSKey field's value. +func (s *Tape) SetKMSKey(v string) *Tape { + s.KMSKey = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *Tape) SetProgress(v float64) *Tape { + s.Progress = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *Tape) SetTapeARN(v string) *Tape { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *Tape) SetTapeBarcode(v string) *Tape { + s.TapeBarcode = &v + return s +} + +// SetTapeCreatedDate sets the TapeCreatedDate field's value. +func (s *Tape) SetTapeCreatedDate(v time.Time) *Tape { + s.TapeCreatedDate = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *Tape) SetTapeSizeInBytes(v int64) *Tape { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *Tape) SetTapeStatus(v string) *Tape { + s.TapeStatus = &v + return s +} + +// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. +func (s *Tape) SetTapeUsedInBytes(v int64) *Tape { + s.TapeUsedInBytes = &v + return s +} + +// SetVTLDevice sets the VTLDevice field's value. +func (s *Tape) SetVTLDevice(v string) *Tape { + s.VTLDevice = &v + return s +} + +// Represents a virtual tape that is archived in the virtual tape shelf (VTS). +type TapeArchive struct { + _ struct{} `type:"structure"` + + // The time that the archiving of the virtual tape was completed. + // + // The default time stamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' + // format. + CompletionTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The Amazon Resource Name (ARN) of the tape gateway that the virtual tape + // is being retrieved to. + // + // The virtual tape is retrieved from the virtual tape shelf (VTS). + RetrievedTo *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of an archived virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies the archived virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The date the virtual tape was created. + TapeCreatedDate *time.Time `type:"timestamp"` + + // The size, in bytes, of the archived virtual tape. + TapeSizeInBytes *int64 `type:"long"` + + // The current state of the archived virtual tape. + TapeStatus *string `type:"string"` + + // The size, in bytes, of data stored on the virtual tape. + // + // This value is not available for tapes created prior to May 13, 2015. + TapeUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s TapeArchive) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeArchive) GoString() string { + return s.String() +} + +// SetCompletionTime sets the CompletionTime field's value. +func (s *TapeArchive) SetCompletionTime(v time.Time) *TapeArchive { + s.CompletionTime = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *TapeArchive) SetKMSKey(v string) *TapeArchive { + s.KMSKey = &v + return s +} + +// SetRetrievedTo sets the RetrievedTo field's value. +func (s *TapeArchive) SetRetrievedTo(v string) *TapeArchive { + s.RetrievedTo = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeArchive) SetTapeARN(v string) *TapeArchive { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *TapeArchive) SetTapeBarcode(v string) *TapeArchive { + s.TapeBarcode = &v + return s +} + +// SetTapeCreatedDate sets the TapeCreatedDate field's value. +func (s *TapeArchive) SetTapeCreatedDate(v time.Time) *TapeArchive { + s.TapeCreatedDate = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeArchive) SetTapeSizeInBytes(v int64) *TapeArchive { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeArchive) SetTapeStatus(v string) *TapeArchive { + s.TapeStatus = &v + return s +} + +// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. +func (s *TapeArchive) SetTapeUsedInBytes(v int64) *TapeArchive { + s.TapeUsedInBytes = &v + return s +} + +// Describes a virtual tape. +type TapeInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of a virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies a specific virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The size, in bytes, of a virtual tape. + TapeSizeInBytes *int64 `type:"long"` + + // The status of the tape. + TapeStatus *string `type:"string"` +} + +// String returns the string representation +func (s TapeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *TapeInfo) SetGatewayARN(v string) *TapeInfo { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeInfo) SetTapeARN(v string) *TapeInfo { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *TapeInfo) SetTapeBarcode(v string) *TapeInfo { + s.TapeBarcode = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeInfo) SetTapeSizeInBytes(v int64) *TapeInfo { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeInfo) SetTapeStatus(v string) *TapeInfo { + s.TapeStatus = &v + return s +} + +// Describes a recovery point. +type TapeRecoveryPointInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The time when the point-in-time view of the virtual tape was replicated for + // later recovery. + // + // The default time stamp format of the tape recovery point time is in the ISO8601 + // extended YYYY-MM-DD'T'HH:MM:SS'Z' format. + TapeRecoveryPointTime *time.Time `type:"timestamp"` + + // The size, in bytes, of the virtual tapes to recover. + TapeSizeInBytes *int64 `type:"long"` + + TapeStatus *string `type:"string"` +} + +// String returns the string representation +func (s TapeRecoveryPointInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeRecoveryPointInfo) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeRecoveryPointInfo) SetTapeARN(v string) *TapeRecoveryPointInfo { + s.TapeARN = &v + return s +} + +// SetTapeRecoveryPointTime sets the TapeRecoveryPointTime field's value. +func (s *TapeRecoveryPointInfo) SetTapeRecoveryPointTime(v time.Time) *TapeRecoveryPointInfo { + s.TapeRecoveryPointTime = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeRecoveryPointInfo) SetTapeSizeInBytes(v int64) *TapeRecoveryPointInfo { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeRecoveryPointInfo) SetTapeStatus(v string) *TapeRecoveryPointInfo { + s.TapeStatus = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateBandwidthRateLimitInput$AverageDownloadRateLimitInBitsPerSec +// +// * UpdateBandwidthRateLimitInput$AverageUploadRateLimitInBitsPerSec +type UpdateBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // The average download bandwidth rate limit in bits per second. + AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` + + // The average upload bandwidth rate limit in bits per second. + AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBandwidthRateLimitInput"} + if s.AverageDownloadRateLimitInBitsPerSec != nil && *s.AverageDownloadRateLimitInBitsPerSec < 102400 { + invalidParams.Add(request.NewErrParamMinValue("AverageDownloadRateLimitInBitsPerSec", 102400)) + } + if s.AverageUploadRateLimitInBitsPerSec != nil && *s.AverageUploadRateLimitInBitsPerSec < 51200 { + invalidParams.Add(request.NewErrParamMinValue("AverageUploadRateLimitInBitsPerSec", 51200)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. +func (s *UpdateBandwidthRateLimitInput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { + s.AverageDownloadRateLimitInBitsPerSec = &v + return s +} + +// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. +func (s *UpdateBandwidthRateLimitInput) SetAverageUploadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { + s.AverageUploadRateLimitInBitsPerSec = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateBandwidthRateLimitInput) SetGatewayARN(v string) *UpdateBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway whose throttle information was +// updated. +type UpdateBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateBandwidthRateLimitOutput) SetGatewayARN(v string) *UpdateBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateChapCredentialsInput$InitiatorName +// +// * UpdateChapCredentialsInput$SecretToAuthenticateInitiator +// +// * UpdateChapCredentialsInput$SecretToAuthenticateTarget +// +// * UpdateChapCredentialsInput$TargetARN +type UpdateChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + // + // InitiatorName is a required field + InitiatorName *string `min:"1" type:"string" required:"true"` + + // The secret key that the initiator (for example, the Windows client) must + // provide to participate in mutual CHAP with the target. + // + // The secret key must be between 12 and 16 bytes when encoded in UTF-8. + // + // SecretToAuthenticateInitiator is a required field + SecretToAuthenticateInitiator *string `min:"1" type:"string" required:"true"` + + // The secret key that the target must provide to participate in mutual CHAP + // with the initiator (e.g. Windows client). + // + // Byte constraints: Minimum bytes of 12. Maximum bytes of 16. + // + // The secret key must be between 12 and 16 bytes when encoded in UTF-8. + SecretToAuthenticateTarget *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateChapCredentialsInput"} + if s.InitiatorName == nil { + invalidParams.Add(request.NewErrParamRequired("InitiatorName")) + } + if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) + } + if s.SecretToAuthenticateInitiator == nil { + invalidParams.Add(request.NewErrParamRequired("SecretToAuthenticateInitiator")) + } + if s.SecretToAuthenticateInitiator != nil && len(*s.SecretToAuthenticateInitiator) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateInitiator", 1)) + } + if s.SecretToAuthenticateTarget != nil && len(*s.SecretToAuthenticateTarget) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateTarget", 1)) + } + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *UpdateChapCredentialsInput) SetInitiatorName(v string) *UpdateChapCredentialsInput { + s.InitiatorName = &v + return s +} + +// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. +func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateInitiator(v string) *UpdateChapCredentialsInput { + s.SecretToAuthenticateInitiator = &v + return s +} + +// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. +func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateTarget(v string) *UpdateChapCredentialsInput { + s.SecretToAuthenticateTarget = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *UpdateChapCredentialsInput) SetTargetARN(v string) *UpdateChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing the following fields: +type UpdateChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. This is the same initiator + // name specified in the request. + InitiatorName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the target. This is the same target specified + // in the request. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *UpdateChapCredentialsOutput) SetInitiatorName(v string) *UpdateChapCredentialsOutput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *UpdateChapCredentialsOutput) SetTargetARN(v string) *UpdateChapCredentialsOutput { + s.TargetARN = &v + return s +} + +type UpdateGatewayInformationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The name you configured for your gateway. + GatewayName *string `min:"2" type:"string"` + + GatewayTimezone *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s UpdateGatewayInformationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewayInformationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGatewayInformationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGatewayInformationInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.GatewayName != nil && len(*s.GatewayName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) + } + if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewayInformationInput) SetGatewayARN(v string) *UpdateGatewayInformationInput { + s.GatewayARN = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *UpdateGatewayInformationInput) SetGatewayName(v string) *UpdateGatewayInformationInput { + s.GatewayName = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *UpdateGatewayInformationInput) SetGatewayTimezone(v string) *UpdateGatewayInformationInput { + s.GatewayTimezone = &v + return s +} + +// A JSON object containing the ARN of the gateway that was updated. +type UpdateGatewayInformationOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + GatewayName *string `type:"string"` +} + +// String returns the string representation +func (s UpdateGatewayInformationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewayInformationOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewayInformationOutput) SetGatewayARN(v string) *UpdateGatewayInformationOutput { + s.GatewayARN = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *UpdateGatewayInformationOutput) SetGatewayName(v string) *UpdateGatewayInformationOutput { + s.GatewayName = &v + return s +} + +// A JSON object containing the of the gateway to update. +type UpdateGatewaySoftwareNowInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateGatewaySoftwareNowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewaySoftwareNowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGatewaySoftwareNowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGatewaySoftwareNowInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewaySoftwareNowInput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was updated. +type UpdateGatewaySoftwareNowOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateGatewaySoftwareNowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewaySoftwareNowOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewaySoftwareNowOutput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +// +// * UpdateMaintenanceStartTimeInput$DayOfWeek +// +// * UpdateMaintenanceStartTimeInput$HourOfDay +// +// * UpdateMaintenanceStartTimeInput$MinuteOfHour +type UpdateMaintenanceStartTimeInput struct { + _ struct{} `type:"structure"` + + // The maintenance start time day of the week represented as an ordinal number + // from 0 to 6, where 0 represents Sunday and 6 Saturday. + // + // DayOfWeek is a required field + DayOfWeek *int64 `type:"integer" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The hour component of the maintenance start time represented as hh, where + // hh is the hour (00 to 23). The hour of the day is in the time zone of the + // gateway. + // + // HourOfDay is a required field + HourOfDay *int64 `type:"integer" required:"true"` + + // The minute component of the maintenance start time represented as mm, where + // mm is the minute (00 to 59). The minute of the hour is in the time zone of + // the gateway. + // + // MinuteOfHour is a required field + MinuteOfHour *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s UpdateMaintenanceStartTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMaintenanceStartTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateMaintenanceStartTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceStartTimeInput"} + if s.DayOfWeek == nil { + invalidParams.Add(request.NewErrParamRequired("DayOfWeek")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.HourOfDay == nil { + invalidParams.Add(request.NewErrParamRequired("HourOfDay")) + } + if s.MinuteOfHour == nil { + invalidParams.Add(request.NewErrParamRequired("MinuteOfHour")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *UpdateMaintenanceStartTimeInput) SetDayOfWeek(v int64) *UpdateMaintenanceStartTimeInput { + s.DayOfWeek = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateMaintenanceStartTimeInput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeInput { + s.GatewayARN = &v + return s +} + +// SetHourOfDay sets the HourOfDay field's value. +func (s *UpdateMaintenanceStartTimeInput) SetHourOfDay(v int64) *UpdateMaintenanceStartTimeInput { + s.HourOfDay = &v + return s +} + +// SetMinuteOfHour sets the MinuteOfHour field's value. +func (s *UpdateMaintenanceStartTimeInput) SetMinuteOfHour(v int64) *UpdateMaintenanceStartTimeInput { + s.MinuteOfHour = &v + return s +} + +// A JSON object containing the of the gateway whose maintenance start time +// is updated. +type UpdateMaintenanceStartTimeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateMaintenanceStartTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMaintenanceStartTimeOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateMaintenanceStartTimeOutput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeOutput { + s.GatewayARN = &v + return s +} + +// UpdateNFSFileShareInput +type UpdateNFSFileShareInput struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // The default storage class for objects put into an Amazon S3 bucket by a file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share to be updated. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The default values for the file share. Optional. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The user mapped to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s UpdateNFSFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNFSFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNFSFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNFSFileShareInput"} + if s.ClientList != nil && len(s.ClientList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.Squash != nil && len(*s.Squash) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) + } + if s.NFSFileShareDefaults != nil { + if err := s.NFSFileShareDefaults.Validate(); err != nil { + invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientList sets the ClientList field's value. +func (s *UpdateNFSFileShareInput) SetClientList(v []*string) *UpdateNFSFileShareInput { + s.ClientList = v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *UpdateNFSFileShareInput) SetDefaultStorageClass(v string) *UpdateNFSFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateNFSFileShareInput) SetFileShareARN(v string) *UpdateNFSFileShareInput { + s.FileShareARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *UpdateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateNFSFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *UpdateNFSFileShareInput) SetKMSEncrypted(v bool) *UpdateNFSFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *UpdateNFSFileShareInput) SetKMSKey(v string) *UpdateNFSFileShareInput { + s.KMSKey = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *UpdateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *UpdateNFSFileShareInput { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *UpdateNFSFileShareInput) SetObjectACL(v string) *UpdateNFSFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *UpdateNFSFileShareInput) SetReadOnly(v bool) *UpdateNFSFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *UpdateNFSFileShareInput) SetRequesterPays(v bool) *UpdateNFSFileShareInput { + s.RequesterPays = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *UpdateNFSFileShareInput) SetSquash(v string) *UpdateNFSFileShareInput { + s.Squash = &v + return s +} + +// UpdateNFSFileShareOutput +type UpdateNFSFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the updated file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateNFSFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNFSFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateNFSFileShareOutput) SetFileShareARN(v string) *UpdateNFSFileShareOutput { + s.FileShareARN = &v + return s +} + +// UpdateSMBFileShareInput +type UpdateSMBFileShareInput struct { + _ struct{} `type:"structure"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the SMB file share you want to update. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateSMBFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSMBFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSMBFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSMBFileShareInput"} + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *UpdateSMBFileShareInput) SetDefaultStorageClass(v string) *UpdateSMBFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateSMBFileShareInput) SetFileShareARN(v string) *UpdateSMBFileShareInput { + s.FileShareARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *UpdateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateSMBFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *UpdateSMBFileShareInput) SetInvalidUserList(v []*string) *UpdateSMBFileShareInput { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *UpdateSMBFileShareInput) SetKMSEncrypted(v bool) *UpdateSMBFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *UpdateSMBFileShareInput) SetKMSKey(v string) *UpdateSMBFileShareInput { + s.KMSKey = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *UpdateSMBFileShareInput) SetObjectACL(v string) *UpdateSMBFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *UpdateSMBFileShareInput) SetReadOnly(v bool) *UpdateSMBFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *UpdateSMBFileShareInput) SetRequesterPays(v bool) *UpdateSMBFileShareInput { + s.RequesterPays = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *UpdateSMBFileShareInput) SetValidUserList(v []*string) *UpdateSMBFileShareInput { + s.ValidUserList = v + return s +} + +// UpdateSMBFileShareOutput +type UpdateSMBFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the updated SMB file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateSMBFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSMBFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateSMBFileShareOutput) SetFileShareARN(v string) *UpdateSMBFileShareOutput { + s.FileShareARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateSnapshotScheduleInput$Description +// +// * UpdateSnapshotScheduleInput$RecurrenceInHours +// +// * UpdateSnapshotScheduleInput$StartAt +// +// * UpdateSnapshotScheduleInput$VolumeARN +type UpdateSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // Optional description of the snapshot that overwrites the existing description. + Description *string `min:"1" type:"string"` + + // Frequency of snapshots. Specify the number of hours between snapshots. + // + // RecurrenceInHours is a required field + RecurrenceInHours *int64 `min:"1" type:"integer" required:"true"` + + // The hour of the day at which the snapshot schedule begins represented as + // hh, where hh is the hour (0 to 23). The hour of the day is in the time zone + // of the gateway. + // + // StartAt is a required field + StartAt *int64 `type:"integer" required:"true"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSnapshotScheduleInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.RecurrenceInHours == nil { + invalidParams.Add(request.NewErrParamRequired("RecurrenceInHours")) + } + if s.RecurrenceInHours != nil && *s.RecurrenceInHours < 1 { + invalidParams.Add(request.NewErrParamMinValue("RecurrenceInHours", 1)) + } + if s.StartAt == nil { + invalidParams.Add(request.NewErrParamRequired("StartAt")) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateSnapshotScheduleInput) SetDescription(v string) *UpdateSnapshotScheduleInput { + s.Description = &v + return s +} + +// SetRecurrenceInHours sets the RecurrenceInHours field's value. +func (s *UpdateSnapshotScheduleInput) SetRecurrenceInHours(v int64) *UpdateSnapshotScheduleInput { + s.RecurrenceInHours = &v + return s +} + +// SetStartAt sets the StartAt field's value. +func (s *UpdateSnapshotScheduleInput) SetStartAt(v int64) *UpdateSnapshotScheduleInput { + s.StartAt = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *UpdateSnapshotScheduleInput) SetVolumeARN(v string) *UpdateSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the updated storage volume. +type UpdateSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *UpdateSnapshotScheduleOutput) SetVolumeARN(v string) *UpdateSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +type UpdateVTLDeviceTypeInput struct { + _ struct{} `type:"structure"` + + // The type of medium changer you want to select. + // + // Valid Values: "STK-L700", "AWS-Gateway-VTL" + // + // DeviceType is a required field + DeviceType *string `min:"2" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the medium changer you want to select. + // + // VTLDeviceARN is a required field + VTLDeviceARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVTLDeviceTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVTLDeviceTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVTLDeviceTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVTLDeviceTypeInput"} + if s.DeviceType == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceType")) + } + if s.DeviceType != nil && len(*s.DeviceType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("DeviceType", 2)) + } + if s.VTLDeviceARN == nil { + invalidParams.Add(request.NewErrParamRequired("VTLDeviceARN")) + } + if s.VTLDeviceARN != nil && len(*s.VTLDeviceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VTLDeviceARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceType sets the DeviceType field's value. +func (s *UpdateVTLDeviceTypeInput) SetDeviceType(v string) *UpdateVTLDeviceTypeInput { + s.DeviceType = &v + return s +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *UpdateVTLDeviceTypeInput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeInput { + s.VTLDeviceARN = &v + return s +} + +// UpdateVTLDeviceTypeOutput +type UpdateVTLDeviceTypeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the medium changer you have selected. + VTLDeviceARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateVTLDeviceTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVTLDeviceTypeOutput) GoString() string { + return s.String() +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *UpdateVTLDeviceTypeOutput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeOutput { + s.VTLDeviceARN = &v + return s +} + +// Represents a device object associated with a tape gateway. +type VTLDevice struct { + _ struct{} `type:"structure"` + + // A list of iSCSI information about a VTL device. + DeviceiSCSIAttributes *DeviceiSCSIAttributes `type:"structure"` + + // Specifies the unique Amazon Resource Name (ARN) of the device (tape drive + // or media changer). + VTLDeviceARN *string `min:"50" type:"string"` + + VTLDeviceProductIdentifier *string `type:"string"` + + VTLDeviceType *string `type:"string"` + + VTLDeviceVendor *string `type:"string"` +} + +// String returns the string representation +func (s VTLDevice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VTLDevice) GoString() string { + return s.String() +} + +// SetDeviceiSCSIAttributes sets the DeviceiSCSIAttributes field's value. +func (s *VTLDevice) SetDeviceiSCSIAttributes(v *DeviceiSCSIAttributes) *VTLDevice { + s.DeviceiSCSIAttributes = v + return s +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *VTLDevice) SetVTLDeviceARN(v string) *VTLDevice { + s.VTLDeviceARN = &v + return s +} + +// SetVTLDeviceProductIdentifier sets the VTLDeviceProductIdentifier field's value. +func (s *VTLDevice) SetVTLDeviceProductIdentifier(v string) *VTLDevice { + s.VTLDeviceProductIdentifier = &v + return s +} + +// SetVTLDeviceType sets the VTLDeviceType field's value. +func (s *VTLDevice) SetVTLDeviceType(v string) *VTLDevice { + s.VTLDeviceType = &v + return s +} + +// SetVTLDeviceVendor sets the VTLDeviceVendor field's value. +func (s *VTLDevice) SetVTLDeviceVendor(v string) *VTLDevice { + s.VTLDeviceVendor = &v + return s +} + +// Describes a storage volume object. +type VolumeInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + GatewayId *string `min:"12" type:"string"` + + // The Amazon Resource Name (ARN) for the storage volume. For example, the following + // is a valid ARN: + // + // arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeARN *string `min:"50" type:"string"` + + // The unique identifier assigned to the volume. This ID becomes part of the + // volume Amazon Resource Name (ARN), which you use as input for other operations. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeId *string `min:"12" type:"string"` + + // The size of the volume in bytes. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeSizeInBytes *int64 `type:"long"` + + VolumeType *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s VolumeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *VolumeInfo) SetGatewayARN(v string) *VolumeInfo { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *VolumeInfo) SetGatewayId(v string) *VolumeInfo { + s.GatewayId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *VolumeInfo) SetVolumeARN(v string) *VolumeInfo { + s.VolumeARN = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *VolumeInfo) SetVolumeId(v string) *VolumeInfo { + s.VolumeId = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *VolumeInfo) SetVolumeSizeInBytes(v int64) *VolumeInfo { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *VolumeInfo) SetVolumeType(v string) *VolumeInfo { + s.VolumeType = &v + return s +} + +type VolumeRecoveryPointInfo struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` + + VolumeRecoveryPointTime *string `type:"string"` + + VolumeSizeInBytes *int64 `type:"long"` + + VolumeUsageInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s VolumeRecoveryPointInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeRecoveryPointInfo) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeARN(v string) *VolumeRecoveryPointInfo { + s.VolumeARN = &v + return s +} + +// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeRecoveryPointTime(v string) *VolumeRecoveryPointInfo { + s.VolumeRecoveryPointTime = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeSizeInBytes(v int64) *VolumeRecoveryPointInfo { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeUsageInBytes sets the VolumeUsageInBytes field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeUsageInBytes(v int64) *VolumeRecoveryPointInfo { + s.VolumeUsageInBytes = &v + return s +} + +// Lists iSCSI information about a volume. +type VolumeiSCSIAttributes struct { + _ struct{} `type:"structure"` + + // Indicates whether mutual CHAP is enabled for the iSCSI target. + ChapEnabled *bool `type:"boolean"` + + // The logical disk number. + LunNumber *int64 `min:"1" type:"integer"` + + // The network interface identifier. + NetworkInterfaceId *string `type:"string"` + + // The port used to communicate with iSCSI targets. + NetworkInterfacePort *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) of the volume target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s VolumeiSCSIAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeiSCSIAttributes) GoString() string { + return s.String() +} + +// SetChapEnabled sets the ChapEnabled field's value. +func (s *VolumeiSCSIAttributes) SetChapEnabled(v bool) *VolumeiSCSIAttributes { + s.ChapEnabled = &v + return s +} + +// SetLunNumber sets the LunNumber field's value. +func (s *VolumeiSCSIAttributes) SetLunNumber(v int64) *VolumeiSCSIAttributes { + s.LunNumber = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *VolumeiSCSIAttributes) SetNetworkInterfaceId(v string) *VolumeiSCSIAttributes { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. +func (s *VolumeiSCSIAttributes) SetNetworkInterfacePort(v int64) *VolumeiSCSIAttributes { + s.NetworkInterfacePort = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *VolumeiSCSIAttributes) SetTargetARN(v string) *VolumeiSCSIAttributes { + s.TargetARN = &v + return s +} + +const ( + // ErrorCodeActivationKeyExpired is a ErrorCode enum value + ErrorCodeActivationKeyExpired = "ActivationKeyExpired" + + // ErrorCodeActivationKeyInvalid is a ErrorCode enum value + ErrorCodeActivationKeyInvalid = "ActivationKeyInvalid" + + // ErrorCodeActivationKeyNotFound is a ErrorCode enum value + ErrorCodeActivationKeyNotFound = "ActivationKeyNotFound" + + // ErrorCodeGatewayInternalError is a ErrorCode enum value + ErrorCodeGatewayInternalError = "GatewayInternalError" + + // ErrorCodeGatewayNotConnected is a ErrorCode enum value + ErrorCodeGatewayNotConnected = "GatewayNotConnected" + + // ErrorCodeGatewayNotFound is a ErrorCode enum value + ErrorCodeGatewayNotFound = "GatewayNotFound" + + // ErrorCodeGatewayProxyNetworkConnectionBusy is a ErrorCode enum value + ErrorCodeGatewayProxyNetworkConnectionBusy = "GatewayProxyNetworkConnectionBusy" + + // ErrorCodeAuthenticationFailure is a ErrorCode enum value + ErrorCodeAuthenticationFailure = "AuthenticationFailure" + + // ErrorCodeBandwidthThrottleScheduleNotFound is a ErrorCode enum value + ErrorCodeBandwidthThrottleScheduleNotFound = "BandwidthThrottleScheduleNotFound" + + // ErrorCodeBlocked is a ErrorCode enum value + ErrorCodeBlocked = "Blocked" + + // ErrorCodeCannotExportSnapshot is a ErrorCode enum value + ErrorCodeCannotExportSnapshot = "CannotExportSnapshot" + + // ErrorCodeChapCredentialNotFound is a ErrorCode enum value + ErrorCodeChapCredentialNotFound = "ChapCredentialNotFound" + + // ErrorCodeDiskAlreadyAllocated is a ErrorCode enum value + ErrorCodeDiskAlreadyAllocated = "DiskAlreadyAllocated" + + // ErrorCodeDiskDoesNotExist is a ErrorCode enum value + ErrorCodeDiskDoesNotExist = "DiskDoesNotExist" + + // ErrorCodeDiskSizeGreaterThanVolumeMaxSize is a ErrorCode enum value + ErrorCodeDiskSizeGreaterThanVolumeMaxSize = "DiskSizeGreaterThanVolumeMaxSize" + + // ErrorCodeDiskSizeLessThanVolumeSize is a ErrorCode enum value + ErrorCodeDiskSizeLessThanVolumeSize = "DiskSizeLessThanVolumeSize" + + // ErrorCodeDiskSizeNotGigAligned is a ErrorCode enum value + ErrorCodeDiskSizeNotGigAligned = "DiskSizeNotGigAligned" + + // ErrorCodeDuplicateCertificateInfo is a ErrorCode enum value + ErrorCodeDuplicateCertificateInfo = "DuplicateCertificateInfo" + + // ErrorCodeDuplicateSchedule is a ErrorCode enum value + ErrorCodeDuplicateSchedule = "DuplicateSchedule" + + // ErrorCodeEndpointNotFound is a ErrorCode enum value + ErrorCodeEndpointNotFound = "EndpointNotFound" + + // ErrorCodeIamnotSupported is a ErrorCode enum value + ErrorCodeIamnotSupported = "IAMNotSupported" + + // ErrorCodeInitiatorInvalid is a ErrorCode enum value + ErrorCodeInitiatorInvalid = "InitiatorInvalid" + + // ErrorCodeInitiatorNotFound is a ErrorCode enum value + ErrorCodeInitiatorNotFound = "InitiatorNotFound" + + // ErrorCodeInternalError is a ErrorCode enum value + ErrorCodeInternalError = "InternalError" + + // ErrorCodeInvalidGateway is a ErrorCode enum value + ErrorCodeInvalidGateway = "InvalidGateway" + + // ErrorCodeInvalidEndpoint is a ErrorCode enum value + ErrorCodeInvalidEndpoint = "InvalidEndpoint" + + // ErrorCodeInvalidParameters is a ErrorCode enum value + ErrorCodeInvalidParameters = "InvalidParameters" + + // ErrorCodeInvalidSchedule is a ErrorCode enum value + ErrorCodeInvalidSchedule = "InvalidSchedule" + + // ErrorCodeLocalStorageLimitExceeded is a ErrorCode enum value + ErrorCodeLocalStorageLimitExceeded = "LocalStorageLimitExceeded" + + // ErrorCodeLunAlreadyAllocated is a ErrorCode enum value + ErrorCodeLunAlreadyAllocated = "LunAlreadyAllocated " + + // ErrorCodeLunInvalid is a ErrorCode enum value + ErrorCodeLunInvalid = "LunInvalid" + + // ErrorCodeMaximumContentLengthExceeded is a ErrorCode enum value + ErrorCodeMaximumContentLengthExceeded = "MaximumContentLengthExceeded" + + // ErrorCodeMaximumTapeCartridgeCountExceeded is a ErrorCode enum value + ErrorCodeMaximumTapeCartridgeCountExceeded = "MaximumTapeCartridgeCountExceeded" + + // ErrorCodeMaximumVolumeCountExceeded is a ErrorCode enum value + ErrorCodeMaximumVolumeCountExceeded = "MaximumVolumeCountExceeded" + + // ErrorCodeNetworkConfigurationChanged is a ErrorCode enum value + ErrorCodeNetworkConfigurationChanged = "NetworkConfigurationChanged" + + // ErrorCodeNoDisksAvailable is a ErrorCode enum value + ErrorCodeNoDisksAvailable = "NoDisksAvailable" + + // ErrorCodeNotImplemented is a ErrorCode enum value + ErrorCodeNotImplemented = "NotImplemented" + + // ErrorCodeNotSupported is a ErrorCode enum value + ErrorCodeNotSupported = "NotSupported" + + // ErrorCodeOperationAborted is a ErrorCode enum value + ErrorCodeOperationAborted = "OperationAborted" + + // ErrorCodeOutdatedGateway is a ErrorCode enum value + ErrorCodeOutdatedGateway = "OutdatedGateway" + + // ErrorCodeParametersNotImplemented is a ErrorCode enum value + ErrorCodeParametersNotImplemented = "ParametersNotImplemented" + + // ErrorCodeRegionInvalid is a ErrorCode enum value + ErrorCodeRegionInvalid = "RegionInvalid" + + // ErrorCodeRequestTimeout is a ErrorCode enum value + ErrorCodeRequestTimeout = "RequestTimeout" + + // ErrorCodeServiceUnavailable is a ErrorCode enum value + ErrorCodeServiceUnavailable = "ServiceUnavailable" + + // ErrorCodeSnapshotDeleted is a ErrorCode enum value + ErrorCodeSnapshotDeleted = "SnapshotDeleted" + + // ErrorCodeSnapshotIdInvalid is a ErrorCode enum value + ErrorCodeSnapshotIdInvalid = "SnapshotIdInvalid" + + // ErrorCodeSnapshotInProgress is a ErrorCode enum value + ErrorCodeSnapshotInProgress = "SnapshotInProgress" + + // ErrorCodeSnapshotNotFound is a ErrorCode enum value + ErrorCodeSnapshotNotFound = "SnapshotNotFound" + + // ErrorCodeSnapshotScheduleNotFound is a ErrorCode enum value + ErrorCodeSnapshotScheduleNotFound = "SnapshotScheduleNotFound" + + // ErrorCodeStagingAreaFull is a ErrorCode enum value + ErrorCodeStagingAreaFull = "StagingAreaFull" + + // ErrorCodeStorageFailure is a ErrorCode enum value + ErrorCodeStorageFailure = "StorageFailure" + + // ErrorCodeTapeCartridgeNotFound is a ErrorCode enum value + ErrorCodeTapeCartridgeNotFound = "TapeCartridgeNotFound" + + // ErrorCodeTargetAlreadyExists is a ErrorCode enum value + ErrorCodeTargetAlreadyExists = "TargetAlreadyExists" + + // ErrorCodeTargetInvalid is a ErrorCode enum value + ErrorCodeTargetInvalid = "TargetInvalid" + + // ErrorCodeTargetNotFound is a ErrorCode enum value + ErrorCodeTargetNotFound = "TargetNotFound" + + // ErrorCodeUnauthorizedOperation is a ErrorCode enum value + ErrorCodeUnauthorizedOperation = "UnauthorizedOperation" + + // ErrorCodeVolumeAlreadyExists is a ErrorCode enum value + ErrorCodeVolumeAlreadyExists = "VolumeAlreadyExists" + + // ErrorCodeVolumeIdInvalid is a ErrorCode enum value + ErrorCodeVolumeIdInvalid = "VolumeIdInvalid" + + // ErrorCodeVolumeInUse is a ErrorCode enum value + ErrorCodeVolumeInUse = "VolumeInUse" + + // ErrorCodeVolumeNotFound is a ErrorCode enum value + ErrorCodeVolumeNotFound = "VolumeNotFound" + + // ErrorCodeVolumeNotReady is a ErrorCode enum value + ErrorCodeVolumeNotReady = "VolumeNotReady" +) + +// The type of the file share. +const ( + // FileShareTypeNfs is a FileShareType enum value + FileShareTypeNfs = "NFS" + + // FileShareTypeSmb is a FileShareType enum value + FileShareTypeSmb = "SMB" +) + +// Sets the access control list permission for objects in the S3 bucket that +// a file gateway puts objects into. The default value is "private". +const ( + // ObjectACLPrivate is a ObjectACL enum value + ObjectACLPrivate = "private" + + // ObjectACLPublicRead is a ObjectACL enum value + ObjectACLPublicRead = "public-read" + + // ObjectACLPublicReadWrite is a ObjectACL enum value + ObjectACLPublicReadWrite = "public-read-write" + + // ObjectACLAuthenticatedRead is a ObjectACL enum value + ObjectACLAuthenticatedRead = "authenticated-read" + + // ObjectACLBucketOwnerRead is a ObjectACL enum value + ObjectACLBucketOwnerRead = "bucket-owner-read" + + // ObjectACLBucketOwnerFullControl is a ObjectACL enum value + ObjectACLBucketOwnerFullControl = "bucket-owner-full-control" + + // ObjectACLAwsExecRead is a ObjectACL enum value + ObjectACLAwsExecRead = "aws-exec-read" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go new file mode 100644 index 000000000..12f57f240 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go @@ -0,0 +1,79 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package storagegateway provides the client and types for making API +// requests to AWS Storage Gateway. +// +// AWS Storage Gateway is the service that connects an on-premises software +// appliance with cloud-based storage to provide seamless and secure integration +// between an organization's on-premises IT environment and AWS's storage infrastructure. +// The service enables you to securely upload data to the AWS cloud for cost +// effective backup and rapid disaster recovery. +// +// Use the following links to get started using the AWS Storage Gateway Service +// API Reference: +// +// * AWS Storage Gateway Required Request Headers (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewayHTTPRequestsHeaders): +// Describes the required headers that you must send with every POST request +// to AWS Storage Gateway. +// +// * Signing Requests (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewaySigningRequests): +// AWS Storage Gateway requires that you authenticate every request you send; +// this topic describes how sign such a request. +// +// * Error Responses (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#APIErrorResponses): +// Provides reference information about AWS Storage Gateway errors. +// +// * Operations in AWS Storage Gateway (http://docs.aws.amazon.com/storagegateway/latest/APIReference/API_Operations.html): +// Contains detailed descriptions of all AWS Storage Gateway operations, +// their request parameters, response elements, possible errors, and examples +// of requests and responses. +// +// * AWS Storage Gateway Regions and Endpoints: (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) +// Provides a list of each region and endpoints available for use with AWS +// Storage Gateway. +// +// AWS Storage Gateway resource IDs are in uppercase. When you use these resource +// IDs with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must +// change your resource ID to lowercase to use it with the EC2 API. For example, +// in Storage Gateway the ID for a volume might be vol-AA22BB012345DAF670. When +// you use this ID with the EC2 API, you must change it to vol-aa22bb012345daf670. +// Otherwise, the EC2 API might not behave as expected. +// +// IDs for Storage Gateway volumes and Amazon EBS snapshots created from gateway +// volumes are changing to a longer format. Starting in December 2016, all new +// volumes and snapshots will be created with a 17-character string. Starting +// in April 2016, you will be able to use these longer IDs so you can test your +// systems with the new format. For more information, see Longer EC2 and EBS +// Resource IDs (https://aws.amazon.com/ec2/faqs/#longer-ids). +// +// For example, a volume Amazon Resource Name (ARN) with the longer volume +// ID format looks like the following: +// +// arn:aws:storagegateway:us-west-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABBCCDDEEFFG. +// +// A snapshot ID with the longer ID format looks like the following: snap-78e226633445566ee. +// +// For more information, see Announcement: Heads-up – Longer AWS Storage Gateway +// volume and snapshot IDs coming in 2016 (https://forums.aws.amazon.com/ann.jspa?annID=3557). +// +// See https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30 for more information on this service. +// +// See storagegateway package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/ +// +// Using the Client +// +// To contact AWS Storage Gateway 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 Storage Gateway client StorageGateway for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/#New +package storagegateway diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go new file mode 100644 index 000000000..01b9816e3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go @@ -0,0 +1,27 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +const ( + + // ErrCodeInternalServerError for service response error code + // "InternalServerError". + // + // An internal server error has occurred during the request. For more information, + // see the error and message fields. + ErrCodeInternalServerError = "InternalServerError" + + // ErrCodeInvalidGatewayRequestException for service response error code + // "InvalidGatewayRequestException". + // + // An exception occurred because an invalid gateway request was issued to the + // service. For more information, see the error and message fields. + ErrCodeInvalidGatewayRequestException = "InvalidGatewayRequestException" + + // ErrCodeServiceUnavailableError for service response error code + // "ServiceUnavailableError". + // + // An internal server error has occurred because the service is unavailable. + // For more information, see the error and message fields. + ErrCodeServiceUnavailableError = "ServiceUnavailableError" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go new file mode 100644 index 000000000..9a0c08f69 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +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/jsonrpc" +) + +// StorageGateway provides the API operation methods for making requests to +// AWS Storage Gateway. See this package's package overview docs +// for details on the service. +// +// StorageGateway methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type StorageGateway 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 = "storagegateway" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Storage Gateway" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the StorageGateway client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a StorageGateway client from just a session. +// svc := storagegateway.New(mySession) +// +// // Create a StorageGateway client with additional configuration +// svc := storagegateway.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *StorageGateway { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *StorageGateway { + svc := &StorageGateway{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2013-06-30", + JSONVersion: "1.1", + TargetPrefix: "StorageGateway_20130630", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a StorageGateway operation and runs any +// custom request initialization. +func (c *StorageGateway) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index b46da12ca..6f89a796e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -1908,7 +1908,7 @@ type Credentials struct { // The date on which the current credentials expire. // // Expiration is a required field - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Expiration *time.Time `type:"timestamp" required:"true"` // The secret access key that can be used to sign requests. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go index 1ee5839e0..185c914d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sts" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "sts" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "STS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the STS client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go new file mode 100644 index 000000000..66ac2df99 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go @@ -0,0 +1,15446 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package swf + +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 opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions" + +// CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the CountClosedWorkflowExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CountClosedWorkflowExecutions for more information on using the CountClosedWorkflowExecutions +// 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 CountClosedWorkflowExecutionsRequest method. +// req, resp := client.CountClosedWorkflowExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) CountClosedWorkflowExecutionsRequest(input *CountClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) { + op := &request.Operation{ + Name: opCountClosedWorkflowExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CountClosedWorkflowExecutionsInput{} + } + + output = &WorkflowExecutionCount{} + req = c.newRequest(op, input, output) + return +} + +// CountClosedWorkflowExecutions API operation for Amazon Simple Workflow Service. +// +// Returns the number of closed workflow executions within the given domain +// that meet the specified filtering criteria. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. +// +// typeFilter.name: String constraint. The key is swf:typeFilter.name. +// +// typeFilter.version: String constraint. The key is swf:typeFilter.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation CountClosedWorkflowExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) CountClosedWorkflowExecutions(input *CountClosedWorkflowExecutionsInput) (*WorkflowExecutionCount, error) { + req, out := c.CountClosedWorkflowExecutionsRequest(input) + return out, req.Send() +} + +// CountClosedWorkflowExecutionsWithContext is the same as CountClosedWorkflowExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See CountClosedWorkflowExecutions 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 *SWF) CountClosedWorkflowExecutionsWithContext(ctx aws.Context, input *CountClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) { + req, out := c.CountClosedWorkflowExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions" + +// CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the CountOpenWorkflowExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CountOpenWorkflowExecutions for more information on using the CountOpenWorkflowExecutions +// 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 CountOpenWorkflowExecutionsRequest method. +// req, resp := client.CountOpenWorkflowExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) CountOpenWorkflowExecutionsRequest(input *CountOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) { + op := &request.Operation{ + Name: opCountOpenWorkflowExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CountOpenWorkflowExecutionsInput{} + } + + output = &WorkflowExecutionCount{} + req = c.newRequest(op, input, output) + return +} + +// CountOpenWorkflowExecutions API operation for Amazon Simple Workflow Service. +// +// Returns the number of open workflow executions within the given domain that +// meet the specified filtering criteria. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. +// +// typeFilter.name: String constraint. The key is swf:typeFilter.name. +// +// typeFilter.version: String constraint. The key is swf:typeFilter.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation CountOpenWorkflowExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) CountOpenWorkflowExecutions(input *CountOpenWorkflowExecutionsInput) (*WorkflowExecutionCount, error) { + req, out := c.CountOpenWorkflowExecutionsRequest(input) + return out, req.Send() +} + +// CountOpenWorkflowExecutionsWithContext is the same as CountOpenWorkflowExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See CountOpenWorkflowExecutions 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 *SWF) CountOpenWorkflowExecutionsWithContext(ctx aws.Context, input *CountOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) { + req, out := c.CountOpenWorkflowExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCountPendingActivityTasks = "CountPendingActivityTasks" + +// CountPendingActivityTasksRequest generates a "aws/request.Request" representing the +// client's request for the CountPendingActivityTasks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CountPendingActivityTasks for more information on using the CountPendingActivityTasks +// 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 CountPendingActivityTasksRequest method. +// req, resp := client.CountPendingActivityTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) CountPendingActivityTasksRequest(input *CountPendingActivityTasksInput) (req *request.Request, output *PendingTaskCount) { + op := &request.Operation{ + Name: opCountPendingActivityTasks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CountPendingActivityTasksInput{} + } + + output = &PendingTaskCount{} + req = c.newRequest(op, input, output) + return +} + +// CountPendingActivityTasks API operation for Amazon Simple Workflow Service. +// +// Returns the estimated number of activity tasks in the specified task list. +// The count returned is an approximation and isn't guaranteed to be exact. +// If you specify a task list that no activity task was ever scheduled in then +// 0 is returned. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the taskList.name parameter by using a Condition element with +// the swf:taskList.name key to allow the action to access only certain task +// lists. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation CountPendingActivityTasks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) CountPendingActivityTasks(input *CountPendingActivityTasksInput) (*PendingTaskCount, error) { + req, out := c.CountPendingActivityTasksRequest(input) + return out, req.Send() +} + +// CountPendingActivityTasksWithContext is the same as CountPendingActivityTasks with the addition of +// the ability to pass a context and additional request options. +// +// See CountPendingActivityTasks 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 *SWF) CountPendingActivityTasksWithContext(ctx aws.Context, input *CountPendingActivityTasksInput, opts ...request.Option) (*PendingTaskCount, error) { + req, out := c.CountPendingActivityTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCountPendingDecisionTasks = "CountPendingDecisionTasks" + +// CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the +// client's request for the CountPendingDecisionTasks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 CountPendingDecisionTasks for more information on using the CountPendingDecisionTasks +// 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 CountPendingDecisionTasksRequest method. +// req, resp := client.CountPendingDecisionTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) CountPendingDecisionTasksRequest(input *CountPendingDecisionTasksInput) (req *request.Request, output *PendingTaskCount) { + op := &request.Operation{ + Name: opCountPendingDecisionTasks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CountPendingDecisionTasksInput{} + } + + output = &PendingTaskCount{} + req = c.newRequest(op, input, output) + return +} + +// CountPendingDecisionTasks API operation for Amazon Simple Workflow Service. +// +// Returns the estimated number of decision tasks in the specified task list. +// The count returned is an approximation and isn't guaranteed to be exact. +// If you specify a task list that no decision task was ever scheduled in then +// 0 is returned. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the taskList.name parameter by using a Condition element with +// the swf:taskList.name key to allow the action to access only certain task +// lists. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation CountPendingDecisionTasks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) CountPendingDecisionTasks(input *CountPendingDecisionTasksInput) (*PendingTaskCount, error) { + req, out := c.CountPendingDecisionTasksRequest(input) + return out, req.Send() +} + +// CountPendingDecisionTasksWithContext is the same as CountPendingDecisionTasks with the addition of +// the ability to pass a context and additional request options. +// +// See CountPendingDecisionTasks 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 *SWF) CountPendingDecisionTasksWithContext(ctx aws.Context, input *CountPendingDecisionTasksInput, opts ...request.Option) (*PendingTaskCount, error) { + req, out := c.CountPendingDecisionTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeprecateActivityType = "DeprecateActivityType" + +// DeprecateActivityTypeRequest generates a "aws/request.Request" representing the +// client's request for the DeprecateActivityType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeprecateActivityType for more information on using the DeprecateActivityType +// 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 DeprecateActivityTypeRequest method. +// req, resp := client.DeprecateActivityTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DeprecateActivityTypeRequest(input *DeprecateActivityTypeInput) (req *request.Request, output *DeprecateActivityTypeOutput) { + op := &request.Operation{ + Name: opDeprecateActivityType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeprecateActivityTypeInput{} + } + + output = &DeprecateActivityTypeOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeprecateActivityType API operation for Amazon Simple Workflow Service. +// +// Deprecates the specified activity type. After an activity type has been deprecated, +// you cannot create new tasks of that activity type. Tasks of this type that +// were scheduled before the type was deprecated continue to run. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// activityType.name: String constraint. The key is swf:activityType.name. +// +// activityType.version: String constraint. The key is swf:activityType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DeprecateActivityType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" +// Returned when the specified activity or workflow type was already deprecated. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DeprecateActivityType(input *DeprecateActivityTypeInput) (*DeprecateActivityTypeOutput, error) { + req, out := c.DeprecateActivityTypeRequest(input) + return out, req.Send() +} + +// DeprecateActivityTypeWithContext is the same as DeprecateActivityType with the addition of +// the ability to pass a context and additional request options. +// +// See DeprecateActivityType 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 *SWF) DeprecateActivityTypeWithContext(ctx aws.Context, input *DeprecateActivityTypeInput, opts ...request.Option) (*DeprecateActivityTypeOutput, error) { + req, out := c.DeprecateActivityTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeprecateDomain = "DeprecateDomain" + +// DeprecateDomainRequest generates a "aws/request.Request" representing the +// client's request for the DeprecateDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeprecateDomain for more information on using the DeprecateDomain +// 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 DeprecateDomainRequest method. +// req, resp := client.DeprecateDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DeprecateDomainRequest(input *DeprecateDomainInput) (req *request.Request, output *DeprecateDomainOutput) { + op := &request.Operation{ + Name: opDeprecateDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeprecateDomainInput{} + } + + output = &DeprecateDomainOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeprecateDomain API operation for Amazon Simple Workflow Service. +// +// Deprecates the specified domain. After a domain has been deprecated it cannot +// be used to create new workflow executions or register new types. However, +// you can still use visibility actions on this domain. Deprecating a domain +// also deprecates all activity and workflow types registered in the domain. +// Executions that were started before the domain was deprecated continues to +// run. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DeprecateDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeDomainDeprecatedFault "DomainDeprecatedFault" +// Returned when the specified domain has been deprecated. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DeprecateDomain(input *DeprecateDomainInput) (*DeprecateDomainOutput, error) { + req, out := c.DeprecateDomainRequest(input) + return out, req.Send() +} + +// DeprecateDomainWithContext is the same as DeprecateDomain with the addition of +// the ability to pass a context and additional request options. +// +// See DeprecateDomain 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 *SWF) DeprecateDomainWithContext(ctx aws.Context, input *DeprecateDomainInput, opts ...request.Option) (*DeprecateDomainOutput, error) { + req, out := c.DeprecateDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeprecateWorkflowType = "DeprecateWorkflowType" + +// DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the +// client's request for the DeprecateWorkflowType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DeprecateWorkflowType for more information on using the DeprecateWorkflowType +// 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 DeprecateWorkflowTypeRequest method. +// req, resp := client.DeprecateWorkflowTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DeprecateWorkflowTypeRequest(input *DeprecateWorkflowTypeInput) (req *request.Request, output *DeprecateWorkflowTypeOutput) { + op := &request.Operation{ + Name: opDeprecateWorkflowType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeprecateWorkflowTypeInput{} + } + + output = &DeprecateWorkflowTypeOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeprecateWorkflowType API operation for Amazon Simple Workflow Service. +// +// Deprecates the specified workflow type. After a workflow type has been deprecated, +// you cannot create new executions of that type. Executions that were started +// before the type was deprecated continues to run. A deprecated workflow type +// may still be used when calling visibility actions. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// workflowType.name: String constraint. The key is swf:workflowType.name. +// +// workflowType.version: String constraint. The key is swf:workflowType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DeprecateWorkflowType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" +// Returned when the specified activity or workflow type was already deprecated. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DeprecateWorkflowType(input *DeprecateWorkflowTypeInput) (*DeprecateWorkflowTypeOutput, error) { + req, out := c.DeprecateWorkflowTypeRequest(input) + return out, req.Send() +} + +// DeprecateWorkflowTypeWithContext is the same as DeprecateWorkflowType with the addition of +// the ability to pass a context and additional request options. +// +// See DeprecateWorkflowType 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 *SWF) DeprecateWorkflowTypeWithContext(ctx aws.Context, input *DeprecateWorkflowTypeInput, opts ...request.Option) (*DeprecateWorkflowTypeOutput, error) { + req, out := c.DeprecateWorkflowTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeActivityType = "DescribeActivityType" + +// DescribeActivityTypeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeActivityType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeActivityType for more information on using the DescribeActivityType +// 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 DescribeActivityTypeRequest method. +// req, resp := client.DescribeActivityTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DescribeActivityTypeRequest(input *DescribeActivityTypeInput) (req *request.Request, output *DescribeActivityTypeOutput) { + op := &request.Operation{ + Name: opDescribeActivityType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeActivityTypeInput{} + } + + output = &DescribeActivityTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeActivityType API operation for Amazon Simple Workflow Service. +// +// Returns information about the specified activity type. This includes configuration +// settings provided when the type was registered and other general information +// about the type. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// activityType.name: String constraint. The key is swf:activityType.name. +// +// activityType.version: String constraint. The key is swf:activityType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DescribeActivityType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DescribeActivityType(input *DescribeActivityTypeInput) (*DescribeActivityTypeOutput, error) { + req, out := c.DescribeActivityTypeRequest(input) + return out, req.Send() +} + +// DescribeActivityTypeWithContext is the same as DescribeActivityType with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeActivityType 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 *SWF) DescribeActivityTypeWithContext(ctx aws.Context, input *DescribeActivityTypeInput, opts ...request.Option) (*DescribeActivityTypeOutput, error) { + req, out := c.DescribeActivityTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDomain = "DescribeDomain" + +// DescribeDomainRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeDomain for more information on using the DescribeDomain +// 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 DescribeDomainRequest method. +// req, resp := client.DescribeDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DescribeDomainRequest(input *DescribeDomainInput) (req *request.Request, output *DescribeDomainOutput) { + op := &request.Operation{ + Name: opDescribeDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDomainInput{} + } + + output = &DescribeDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDomain API operation for Amazon Simple Workflow Service. +// +// Returns information about the specified domain, including description and +// status. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DescribeDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DescribeDomain(input *DescribeDomainInput) (*DescribeDomainOutput, error) { + req, out := c.DescribeDomainRequest(input) + return out, req.Send() +} + +// DescribeDomainWithContext is the same as DescribeDomain with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDomain 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 *SWF) DescribeDomainWithContext(ctx aws.Context, input *DescribeDomainInput, opts ...request.Option) (*DescribeDomainOutput, error) { + req, out := c.DescribeDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWorkflowExecution = "DescribeWorkflowExecution" + +// DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkflowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeWorkflowExecution for more information on using the DescribeWorkflowExecution +// 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 DescribeWorkflowExecutionRequest method. +// req, resp := client.DescribeWorkflowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DescribeWorkflowExecutionRequest(input *DescribeWorkflowExecutionInput) (req *request.Request, output *DescribeWorkflowExecutionOutput) { + op := &request.Operation{ + Name: opDescribeWorkflowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkflowExecutionInput{} + } + + output = &DescribeWorkflowExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkflowExecution API operation for Amazon Simple Workflow Service. +// +// Returns information about the specified workflow execution including its +// type and some statistics. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DescribeWorkflowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DescribeWorkflowExecution(input *DescribeWorkflowExecutionInput) (*DescribeWorkflowExecutionOutput, error) { + req, out := c.DescribeWorkflowExecutionRequest(input) + return out, req.Send() +} + +// DescribeWorkflowExecutionWithContext is the same as DescribeWorkflowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkflowExecution 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 *SWF) DescribeWorkflowExecutionWithContext(ctx aws.Context, input *DescribeWorkflowExecutionInput, opts ...request.Option) (*DescribeWorkflowExecutionOutput, error) { + req, out := c.DescribeWorkflowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWorkflowType = "DescribeWorkflowType" + +// DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkflowType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 DescribeWorkflowType for more information on using the DescribeWorkflowType +// 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 DescribeWorkflowTypeRequest method. +// req, resp := client.DescribeWorkflowTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) DescribeWorkflowTypeRequest(input *DescribeWorkflowTypeInput) (req *request.Request, output *DescribeWorkflowTypeOutput) { + op := &request.Operation{ + Name: opDescribeWorkflowType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkflowTypeInput{} + } + + output = &DescribeWorkflowTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkflowType API operation for Amazon Simple Workflow Service. +// +// Returns information about the specified workflow type. This includes configuration +// settings specified when the type was registered and other information such +// as creation date, current status, etc. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// workflowType.name: String constraint. The key is swf:workflowType.name. +// +// workflowType.version: String constraint. The key is swf:workflowType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation DescribeWorkflowType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) DescribeWorkflowType(input *DescribeWorkflowTypeInput) (*DescribeWorkflowTypeOutput, error) { + req, out := c.DescribeWorkflowTypeRequest(input) + return out, req.Send() +} + +// DescribeWorkflowTypeWithContext is the same as DescribeWorkflowType with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkflowType 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 *SWF) DescribeWorkflowTypeWithContext(ctx aws.Context, input *DescribeWorkflowTypeInput, opts ...request.Option) (*DescribeWorkflowTypeOutput, error) { + req, out := c.DescribeWorkflowTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory" + +// GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the +// client's request for the GetWorkflowExecutionHistory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 GetWorkflowExecutionHistory for more information on using the GetWorkflowExecutionHistory +// 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 GetWorkflowExecutionHistoryRequest method. +// req, resp := client.GetWorkflowExecutionHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) GetWorkflowExecutionHistoryRequest(input *GetWorkflowExecutionHistoryInput) (req *request.Request, output *GetWorkflowExecutionHistoryOutput) { + op := &request.Operation{ + Name: opGetWorkflowExecutionHistory, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetWorkflowExecutionHistoryInput{} + } + + output = &GetWorkflowExecutionHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetWorkflowExecutionHistory API operation for Amazon Simple Workflow Service. +// +// Returns the history of the specified workflow execution. The results may +// be split into multiple pages. To retrieve subsequent pages, make the call +// again using the nextPageToken returned by the initial call. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation GetWorkflowExecutionHistory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) GetWorkflowExecutionHistory(input *GetWorkflowExecutionHistoryInput) (*GetWorkflowExecutionHistoryOutput, error) { + req, out := c.GetWorkflowExecutionHistoryRequest(input) + return out, req.Send() +} + +// GetWorkflowExecutionHistoryWithContext is the same as GetWorkflowExecutionHistory with the addition of +// the ability to pass a context and additional request options. +// +// See GetWorkflowExecutionHistory 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 *SWF) GetWorkflowExecutionHistoryWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, opts ...request.Option) (*GetWorkflowExecutionHistoryOutput, error) { + req, out := c.GetWorkflowExecutionHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetWorkflowExecutionHistoryPages iterates over the pages of a GetWorkflowExecutionHistory operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetWorkflowExecutionHistory 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 GetWorkflowExecutionHistory operation. +// pageNum := 0 +// err := client.GetWorkflowExecutionHistoryPages(params, +// func(page *GetWorkflowExecutionHistoryOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) GetWorkflowExecutionHistoryPages(input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool) error { + return c.GetWorkflowExecutionHistoryPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetWorkflowExecutionHistoryPagesWithContext same as GetWorkflowExecutionHistoryPages 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 *SWF) GetWorkflowExecutionHistoryPagesWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetWorkflowExecutionHistoryInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetWorkflowExecutionHistoryRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListActivityTypes = "ListActivityTypes" + +// ListActivityTypesRequest generates a "aws/request.Request" representing the +// client's request for the ListActivityTypes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListActivityTypes for more information on using the ListActivityTypes +// 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 ListActivityTypesRequest method. +// req, resp := client.ListActivityTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) ListActivityTypesRequest(input *ListActivityTypesInput) (req *request.Request, output *ListActivityTypesOutput) { + op := &request.Operation{ + Name: opListActivityTypes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListActivityTypesInput{} + } + + output = &ListActivityTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListActivityTypes API operation for Amazon Simple Workflow Service. +// +// Returns information about all activities registered in the specified domain +// that match the specified name and registration status. The result includes +// information like creation date, current status of the activity, etc. The +// results may be split into multiple pages. To retrieve subsequent pages, make +// the call again using the nextPageToken returned by the initial call. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation ListActivityTypes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +func (c *SWF) ListActivityTypes(input *ListActivityTypesInput) (*ListActivityTypesOutput, error) { + req, out := c.ListActivityTypesRequest(input) + return out, req.Send() +} + +// ListActivityTypesWithContext is the same as ListActivityTypes with the addition of +// the ability to pass a context and additional request options. +// +// See ListActivityTypes 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 *SWF) ListActivityTypesWithContext(ctx aws.Context, input *ListActivityTypesInput, opts ...request.Option) (*ListActivityTypesOutput, error) { + req, out := c.ListActivityTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListActivityTypesPages iterates over the pages of a ListActivityTypes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListActivityTypes 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 ListActivityTypes operation. +// pageNum := 0 +// err := client.ListActivityTypesPages(params, +// func(page *ListActivityTypesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) ListActivityTypesPages(input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool) error { + return c.ListActivityTypesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListActivityTypesPagesWithContext same as ListActivityTypesPages 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 *SWF) ListActivityTypesPagesWithContext(ctx aws.Context, input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListActivityTypesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListActivityTypesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions" + +// ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the ListClosedWorkflowExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListClosedWorkflowExecutions for more information on using the ListClosedWorkflowExecutions +// 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 ListClosedWorkflowExecutionsRequest method. +// req, resp := client.ListClosedWorkflowExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) ListClosedWorkflowExecutionsRequest(input *ListClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) { + op := &request.Operation{ + Name: opListClosedWorkflowExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListClosedWorkflowExecutionsInput{} + } + + output = &WorkflowExecutionInfos{} + req = c.newRequest(op, input, output) + return +} + +// ListClosedWorkflowExecutions API operation for Amazon Simple Workflow Service. +// +// Returns a list of closed workflow executions in the specified domain that +// meet the filtering criteria. The results may be split into multiple pages. +// To retrieve subsequent pages, make the call again using the nextPageToken +// returned by the initial call. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. +// +// typeFilter.name: String constraint. The key is swf:typeFilter.name. +// +// typeFilter.version: String constraint. The key is swf:typeFilter.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation ListClosedWorkflowExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) ListClosedWorkflowExecutions(input *ListClosedWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) { + req, out := c.ListClosedWorkflowExecutionsRequest(input) + return out, req.Send() +} + +// ListClosedWorkflowExecutionsWithContext is the same as ListClosedWorkflowExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See ListClosedWorkflowExecutions 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 *SWF) ListClosedWorkflowExecutionsWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) { + req, out := c.ListClosedWorkflowExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListClosedWorkflowExecutionsPages iterates over the pages of a ListClosedWorkflowExecutions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListClosedWorkflowExecutions 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 ListClosedWorkflowExecutions operation. +// pageNum := 0 +// err := client.ListClosedWorkflowExecutionsPages(params, +// func(page *WorkflowExecutionInfos, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) ListClosedWorkflowExecutionsPages(input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error { + return c.ListClosedWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListClosedWorkflowExecutionsPagesWithContext same as ListClosedWorkflowExecutionsPages 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 *SWF) ListClosedWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListClosedWorkflowExecutionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListClosedWorkflowExecutionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) + } + return p.Err() +} + +const opListDomains = "ListDomains" + +// ListDomainsRequest generates a "aws/request.Request" representing the +// client's request for the ListDomains operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListDomains for more information on using the ListDomains +// 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 ListDomainsRequest method. +// req, resp := client.ListDomainsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) { + op := &request.Operation{ + Name: opListDomains, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDomainsInput{} + } + + output = &ListDomainsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDomains API operation for Amazon Simple Workflow Service. +// +// Returns the list of domains registered in the account. The results may be +// split into multiple pages. To retrieve subsequent pages, make the call again +// using the nextPageToken returned by the initial call. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. The element must be set to arn:aws:swf::AccountID:domain/*, +// where AccountID is the account ID, with no dashes. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation ListDomains for usage and error information. +// +// Returned Error Codes: +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) { + req, out := c.ListDomainsRequest(input) + return out, req.Send() +} + +// ListDomainsWithContext is the same as ListDomains with the addition of +// the ability to pass a context and additional request options. +// +// See ListDomains 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 *SWF) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) { + req, out := c.ListDomainsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDomainsPages iterates over the pages of a ListDomains operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDomains 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 ListDomains operation. +// pageNum := 0 +// err := client.ListDomainsPages(params, +// func(page *ListDomainsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error { + return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDomainsPagesWithContext same as ListDomainsPages 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 *SWF) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDomainsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDomainsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions" + +// ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the ListOpenWorkflowExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListOpenWorkflowExecutions for more information on using the ListOpenWorkflowExecutions +// 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 ListOpenWorkflowExecutionsRequest method. +// req, resp := client.ListOpenWorkflowExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) ListOpenWorkflowExecutionsRequest(input *ListOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) { + op := &request.Operation{ + Name: opListOpenWorkflowExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOpenWorkflowExecutionsInput{} + } + + output = &WorkflowExecutionInfos{} + req = c.newRequest(op, input, output) + return +} + +// ListOpenWorkflowExecutions API operation for Amazon Simple Workflow Service. +// +// Returns a list of open workflow executions in the specified domain that meet +// the filtering criteria. The results may be split into multiple pages. To +// retrieve subsequent pages, make the call again using the nextPageToken returned +// by the initial call. +// +// This operation is eventually consistent. The results are best effort and +// may not exactly reflect recent updates and changes. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagFilter.tag: String constraint. The key is swf:tagFilter.tag. +// +// typeFilter.name: String constraint. The key is swf:typeFilter.name. +// +// typeFilter.version: String constraint. The key is swf:typeFilter.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation ListOpenWorkflowExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) ListOpenWorkflowExecutions(input *ListOpenWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) { + req, out := c.ListOpenWorkflowExecutionsRequest(input) + return out, req.Send() +} + +// ListOpenWorkflowExecutionsWithContext is the same as ListOpenWorkflowExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See ListOpenWorkflowExecutions 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 *SWF) ListOpenWorkflowExecutionsWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) { + req, out := c.ListOpenWorkflowExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOpenWorkflowExecutionsPages iterates over the pages of a ListOpenWorkflowExecutions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListOpenWorkflowExecutions 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 ListOpenWorkflowExecutions operation. +// pageNum := 0 +// err := client.ListOpenWorkflowExecutionsPages(params, +// func(page *WorkflowExecutionInfos, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) ListOpenWorkflowExecutionsPages(input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error { + return c.ListOpenWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOpenWorkflowExecutionsPagesWithContext same as ListOpenWorkflowExecutionsPages 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 *SWF) ListOpenWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOpenWorkflowExecutionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOpenWorkflowExecutionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) + } + return p.Err() +} + +const opListWorkflowTypes = "ListWorkflowTypes" + +// ListWorkflowTypesRequest generates a "aws/request.Request" representing the +// client's request for the ListWorkflowTypes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 ListWorkflowTypes for more information on using the ListWorkflowTypes +// 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 ListWorkflowTypesRequest method. +// req, resp := client.ListWorkflowTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) ListWorkflowTypesRequest(input *ListWorkflowTypesInput) (req *request.Request, output *ListWorkflowTypesOutput) { + op := &request.Operation{ + Name: opListWorkflowTypes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListWorkflowTypesInput{} + } + + output = &ListWorkflowTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListWorkflowTypes API operation for Amazon Simple Workflow Service. +// +// Returns information about workflow types in the specified domain. The results +// may be split into multiple pages that can be retrieved by making the call +// repeatedly. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation ListWorkflowTypes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +func (c *SWF) ListWorkflowTypes(input *ListWorkflowTypesInput) (*ListWorkflowTypesOutput, error) { + req, out := c.ListWorkflowTypesRequest(input) + return out, req.Send() +} + +// ListWorkflowTypesWithContext is the same as ListWorkflowTypes with the addition of +// the ability to pass a context and additional request options. +// +// See ListWorkflowTypes 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 *SWF) ListWorkflowTypesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, opts ...request.Option) (*ListWorkflowTypesOutput, error) { + req, out := c.ListWorkflowTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListWorkflowTypesPages iterates over the pages of a ListWorkflowTypes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListWorkflowTypes 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 ListWorkflowTypes operation. +// pageNum := 0 +// err := client.ListWorkflowTypesPages(params, +// func(page *ListWorkflowTypesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) ListWorkflowTypesPages(input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool) error { + return c.ListWorkflowTypesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListWorkflowTypesPagesWithContext same as ListWorkflowTypesPages 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 *SWF) ListWorkflowTypesPagesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListWorkflowTypesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListWorkflowTypesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPollForActivityTask = "PollForActivityTask" + +// PollForActivityTaskRequest generates a "aws/request.Request" representing the +// client's request for the PollForActivityTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PollForActivityTask for more information on using the PollForActivityTask +// 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 PollForActivityTaskRequest method. +// req, resp := client.PollForActivityTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) PollForActivityTaskRequest(input *PollForActivityTaskInput) (req *request.Request, output *PollForActivityTaskOutput) { + op := &request.Operation{ + Name: opPollForActivityTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PollForActivityTaskInput{} + } + + output = &PollForActivityTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// PollForActivityTask API operation for Amazon Simple Workflow Service. +// +// Used by workers to get an ActivityTask from the specified activity taskList. +// This initiates a long poll, where the service holds the HTTP connection open +// and responds as soon as a task becomes available. The maximum time the service +// holds on to the request before responding is 60 seconds. If no task is available +// within 60 seconds, the poll returns an empty result. An empty result, in +// this context, means that an ActivityTask is returned, but that the value +// of taskToken is an empty string. If a task is returned, the worker should +// use its type to identify and process it correctly. +// +// Workers should set their client side socket timeout to at least 70 seconds +// (10 seconds higher than the maximum time service may hold the poll request). +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the taskList.name parameter by using a Condition element with +// the swf:taskList.name key to allow the action to access only certain task +// lists. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation PollForActivityTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +func (c *SWF) PollForActivityTask(input *PollForActivityTaskInput) (*PollForActivityTaskOutput, error) { + req, out := c.PollForActivityTaskRequest(input) + return out, req.Send() +} + +// PollForActivityTaskWithContext is the same as PollForActivityTask with the addition of +// the ability to pass a context and additional request options. +// +// See PollForActivityTask 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 *SWF) PollForActivityTaskWithContext(ctx aws.Context, input *PollForActivityTaskInput, opts ...request.Option) (*PollForActivityTaskOutput, error) { + req, out := c.PollForActivityTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPollForDecisionTask = "PollForDecisionTask" + +// PollForDecisionTaskRequest generates a "aws/request.Request" representing the +// client's request for the PollForDecisionTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 PollForDecisionTask for more information on using the PollForDecisionTask +// 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 PollForDecisionTaskRequest method. +// req, resp := client.PollForDecisionTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) PollForDecisionTaskRequest(input *PollForDecisionTaskInput) (req *request.Request, output *PollForDecisionTaskOutput) { + op := &request.Operation{ + Name: opPollForDecisionTask, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextPageToken"}, + OutputTokens: []string{"nextPageToken"}, + LimitToken: "maximumPageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &PollForDecisionTaskInput{} + } + + output = &PollForDecisionTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// PollForDecisionTask API operation for Amazon Simple Workflow Service. +// +// Used by deciders to get a DecisionTask from the specified decision taskList. +// A decision task may be returned for any open workflow execution that is using +// the specified task list. The task includes a paginated view of the history +// of the workflow execution. The decider should use the workflow type and the +// history to determine how to properly handle the task. +// +// This action initiates a long poll, where the service holds the HTTP connection +// open and responds as soon a task becomes available. If no decision task is +// available in the specified task list before the timeout of 60 seconds expires, +// an empty result is returned. An empty result, in this context, means that +// a DecisionTask is returned, but that the value of taskToken is an empty string. +// +// Deciders should set their client side socket timeout to at least 70 seconds +// (10 seconds higher than the timeout). +// +// Because the number of workflow history events for a single workflow execution +// might be very large, the result returned might be split up across a number +// of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask +// using the nextPageToken returned by the initial call. Note that you do not +// call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask +// again. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the taskList.name parameter by using a Condition element with +// the swf:taskList.name key to allow the action to access only certain task +// lists. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation PollForDecisionTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +func (c *SWF) PollForDecisionTask(input *PollForDecisionTaskInput) (*PollForDecisionTaskOutput, error) { + req, out := c.PollForDecisionTaskRequest(input) + return out, req.Send() +} + +// PollForDecisionTaskWithContext is the same as PollForDecisionTask with the addition of +// the ability to pass a context and additional request options. +// +// See PollForDecisionTask 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 *SWF) PollForDecisionTaskWithContext(ctx aws.Context, input *PollForDecisionTaskInput, opts ...request.Option) (*PollForDecisionTaskOutput, error) { + req, out := c.PollForDecisionTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// PollForDecisionTaskPages iterates over the pages of a PollForDecisionTask operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See PollForDecisionTask 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 PollForDecisionTask operation. +// pageNum := 0 +// err := client.PollForDecisionTaskPages(params, +// func(page *PollForDecisionTaskOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SWF) PollForDecisionTaskPages(input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool) error { + return c.PollForDecisionTaskPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// PollForDecisionTaskPagesWithContext same as PollForDecisionTaskPages 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 *SWF) PollForDecisionTaskPagesWithContext(ctx aws.Context, input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *PollForDecisionTaskInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.PollForDecisionTaskRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat" + +// RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the +// client's request for the RecordActivityTaskHeartbeat operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RecordActivityTaskHeartbeat for more information on using the RecordActivityTaskHeartbeat +// 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 RecordActivityTaskHeartbeatRequest method. +// req, resp := client.RecordActivityTaskHeartbeatRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RecordActivityTaskHeartbeatRequest(input *RecordActivityTaskHeartbeatInput) (req *request.Request, output *RecordActivityTaskHeartbeatOutput) { + op := &request.Operation{ + Name: opRecordActivityTaskHeartbeat, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RecordActivityTaskHeartbeatInput{} + } + + output = &RecordActivityTaskHeartbeatOutput{} + req = c.newRequest(op, input, output) + return +} + +// RecordActivityTaskHeartbeat API operation for Amazon Simple Workflow Service. +// +// Used by activity workers to report to the service that the ActivityTask represented +// by the specified taskToken is still making progress. The worker can also +// specify details of the progress, for example percent complete, using the +// details parameter. This action can also be used by the worker as a mechanism +// to check if cancellation is being requested for the activity task. If a cancellation +// is being attempted for the specified task, then the boolean cancelRequested +// flag returned by the service is set to true. +// +// This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout +// is specified in RegisterActivityType. +// +// This action doesn't in itself create an event in the workflow execution history. +// However, if the task times out, the workflow execution history contains a +// ActivityTaskTimedOut event that contains the information from the last heartbeat +// generated by the activity worker. +// +// The taskStartToCloseTimeout of an activity type is the maximum duration of +// an activity task, regardless of the number of RecordActivityTaskHeartbeat +// requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType. +// +// This operation is only useful for long-lived activities to report liveliness +// of the task and to determine if a cancellation is being attempted. +// +// If the cancelRequested flag returns true, a cancellation is being attempted. +// If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled. +// Otherwise, it should ignore the cancellation request. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RecordActivityTaskHeartbeat for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RecordActivityTaskHeartbeat(input *RecordActivityTaskHeartbeatInput) (*RecordActivityTaskHeartbeatOutput, error) { + req, out := c.RecordActivityTaskHeartbeatRequest(input) + return out, req.Send() +} + +// RecordActivityTaskHeartbeatWithContext is the same as RecordActivityTaskHeartbeat with the addition of +// the ability to pass a context and additional request options. +// +// See RecordActivityTaskHeartbeat 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 *SWF) RecordActivityTaskHeartbeatWithContext(ctx aws.Context, input *RecordActivityTaskHeartbeatInput, opts ...request.Option) (*RecordActivityTaskHeartbeatOutput, error) { + req, out := c.RecordActivityTaskHeartbeatRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterActivityType = "RegisterActivityType" + +// RegisterActivityTypeRequest generates a "aws/request.Request" representing the +// client's request for the RegisterActivityType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RegisterActivityType for more information on using the RegisterActivityType +// 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 RegisterActivityTypeRequest method. +// req, resp := client.RegisterActivityTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RegisterActivityTypeRequest(input *RegisterActivityTypeInput) (req *request.Request, output *RegisterActivityTypeOutput) { + op := &request.Operation{ + Name: opRegisterActivityType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterActivityTypeInput{} + } + + output = &RegisterActivityTypeOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RegisterActivityType API operation for Amazon Simple Workflow Service. +// +// Registers a new activity type along with its configuration settings in the +// specified domain. +// +// A TypeAlreadyExists fault is returned if the type already exists in the domain. +// You cannot change any configuration settings of the type after its registration, +// and it must be registered as a new version. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name. +// +// name: String constraint. The key is swf:name. +// +// version: String constraint. The key is swf:version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RegisterActivityType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault" +// Returned if the type already exists in the specified domain. You get this +// fault even if the existing type is in deprecated status. You can specify +// another version if the intent is to create a new distinct version of the +// type. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RegisterActivityType(input *RegisterActivityTypeInput) (*RegisterActivityTypeOutput, error) { + req, out := c.RegisterActivityTypeRequest(input) + return out, req.Send() +} + +// RegisterActivityTypeWithContext is the same as RegisterActivityType with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterActivityType 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 *SWF) RegisterActivityTypeWithContext(ctx aws.Context, input *RegisterActivityTypeInput, opts ...request.Option) (*RegisterActivityTypeOutput, error) { + req, out := c.RegisterActivityTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterDomain = "RegisterDomain" + +// RegisterDomainRequest generates a "aws/request.Request" representing the +// client's request for the RegisterDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RegisterDomain for more information on using the RegisterDomain +// 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 RegisterDomainRequest method. +// req, resp := client.RegisterDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Request, output *RegisterDomainOutput) { + op := &request.Operation{ + Name: opRegisterDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterDomainInput{} + } + + output = &RegisterDomainOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RegisterDomain API operation for Amazon Simple Workflow Service. +// +// Registers a new domain. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * You cannot use an IAM policy to control domain access for this action. +// The name of the domain being registered is available as the resource of +// this action. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RegisterDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDomainAlreadyExistsFault "DomainAlreadyExistsFault" +// Returned if the specified domain already exists. You get this fault even +// if the existing domain is in deprecated status. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RegisterDomain(input *RegisterDomainInput) (*RegisterDomainOutput, error) { + req, out := c.RegisterDomainRequest(input) + return out, req.Send() +} + +// RegisterDomainWithContext is the same as RegisterDomain with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterDomain 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 *SWF) RegisterDomainWithContext(ctx aws.Context, input *RegisterDomainInput, opts ...request.Option) (*RegisterDomainOutput, error) { + req, out := c.RegisterDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterWorkflowType = "RegisterWorkflowType" + +// RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the +// client's request for the RegisterWorkflowType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RegisterWorkflowType for more information on using the RegisterWorkflowType +// 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 RegisterWorkflowTypeRequest method. +// req, resp := client.RegisterWorkflowTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RegisterWorkflowTypeRequest(input *RegisterWorkflowTypeInput) (req *request.Request, output *RegisterWorkflowTypeOutput) { + op := &request.Operation{ + Name: opRegisterWorkflowType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterWorkflowTypeInput{} + } + + output = &RegisterWorkflowTypeOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RegisterWorkflowType API operation for Amazon Simple Workflow Service. +// +// Registers a new workflow type and its configuration settings in the specified +// domain. +// +// The retention period for the workflow history is set by the RegisterDomain +// action. +// +// If the type already exists, then a TypeAlreadyExists fault is returned. You +// cannot change the configuration settings of a workflow type once it is registered +// and it must be registered as a new version. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name. +// +// name: String constraint. The key is swf:name. +// +// version: String constraint. The key is swf:version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RegisterWorkflowType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault" +// Returned if the type already exists in the specified domain. You get this +// fault even if the existing type is in deprecated status. You can specify +// another version if the intent is to create a new distinct version of the +// type. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RegisterWorkflowType(input *RegisterWorkflowTypeInput) (*RegisterWorkflowTypeOutput, error) { + req, out := c.RegisterWorkflowTypeRequest(input) + return out, req.Send() +} + +// RegisterWorkflowTypeWithContext is the same as RegisterWorkflowType with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterWorkflowType 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 *SWF) RegisterWorkflowTypeWithContext(ctx aws.Context, input *RegisterWorkflowTypeInput, opts ...request.Option) (*RegisterWorkflowTypeOutput, error) { + req, out := c.RegisterWorkflowTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution" + +// RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the RequestCancelWorkflowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RequestCancelWorkflowExecution for more information on using the RequestCancelWorkflowExecution +// 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 RequestCancelWorkflowExecutionRequest method. +// req, resp := client.RequestCancelWorkflowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RequestCancelWorkflowExecutionRequest(input *RequestCancelWorkflowExecutionInput) (req *request.Request, output *RequestCancelWorkflowExecutionOutput) { + op := &request.Operation{ + Name: opRequestCancelWorkflowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RequestCancelWorkflowExecutionInput{} + } + + output = &RequestCancelWorkflowExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RequestCancelWorkflowExecution API operation for Amazon Simple Workflow Service. +// +// Records a WorkflowExecutionCancelRequested event in the currently running +// workflow execution identified by the given domain, workflowId, and runId. +// This logically requests the cancellation of the workflow execution as a whole. +// It is up to the decider to take appropriate actions when it receives an execution +// history with this event. +// +// If the runId isn't specified, the WorkflowExecutionCancelRequested event +// is recorded in the history of the current open workflow execution with the +// specified workflowId in the domain. +// +// Because this action allows the workflow to properly clean up and gracefully +// close, it should be used instead of TerminateWorkflowExecution when possible. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RequestCancelWorkflowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RequestCancelWorkflowExecution(input *RequestCancelWorkflowExecutionInput) (*RequestCancelWorkflowExecutionOutput, error) { + req, out := c.RequestCancelWorkflowExecutionRequest(input) + return out, req.Send() +} + +// RequestCancelWorkflowExecutionWithContext is the same as RequestCancelWorkflowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See RequestCancelWorkflowExecution 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 *SWF) RequestCancelWorkflowExecutionWithContext(ctx aws.Context, input *RequestCancelWorkflowExecutionInput, opts ...request.Option) (*RequestCancelWorkflowExecutionOutput, error) { + req, out := c.RequestCancelWorkflowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled" + +// RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the +// client's request for the RespondActivityTaskCanceled operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RespondActivityTaskCanceled for more information on using the RespondActivityTaskCanceled +// 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 RespondActivityTaskCanceledRequest method. +// req, resp := client.RespondActivityTaskCanceledRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RespondActivityTaskCanceledRequest(input *RespondActivityTaskCanceledInput) (req *request.Request, output *RespondActivityTaskCanceledOutput) { + op := &request.Operation{ + Name: opRespondActivityTaskCanceled, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RespondActivityTaskCanceledInput{} + } + + output = &RespondActivityTaskCanceledOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RespondActivityTaskCanceled API operation for Amazon Simple Workflow Service. +// +// Used by workers to tell the service that the ActivityTask identified by the +// taskToken was successfully canceled. Additional details can be provided using +// the details argument. +// +// These details (if provided) appear in the ActivityTaskCanceled event added +// to the workflow history. +// +// Only use this operation if the canceled flag of a RecordActivityTaskHeartbeat +// request returns true and if the activity can be safely undone or abandoned. +// +// A task is considered open from the time that it is scheduled until it is +// closed. Therefore a task is reported as open while a worker is processing +// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, +// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed +// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RespondActivityTaskCanceled for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RespondActivityTaskCanceled(input *RespondActivityTaskCanceledInput) (*RespondActivityTaskCanceledOutput, error) { + req, out := c.RespondActivityTaskCanceledRequest(input) + return out, req.Send() +} + +// RespondActivityTaskCanceledWithContext is the same as RespondActivityTaskCanceled with the addition of +// the ability to pass a context and additional request options. +// +// See RespondActivityTaskCanceled 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 *SWF) RespondActivityTaskCanceledWithContext(ctx aws.Context, input *RespondActivityTaskCanceledInput, opts ...request.Option) (*RespondActivityTaskCanceledOutput, error) { + req, out := c.RespondActivityTaskCanceledRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted" + +// RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the +// client's request for the RespondActivityTaskCompleted operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RespondActivityTaskCompleted for more information on using the RespondActivityTaskCompleted +// 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 RespondActivityTaskCompletedRequest method. +// req, resp := client.RespondActivityTaskCompletedRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RespondActivityTaskCompletedRequest(input *RespondActivityTaskCompletedInput) (req *request.Request, output *RespondActivityTaskCompletedOutput) { + op := &request.Operation{ + Name: opRespondActivityTaskCompleted, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RespondActivityTaskCompletedInput{} + } + + output = &RespondActivityTaskCompletedOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RespondActivityTaskCompleted API operation for Amazon Simple Workflow Service. +// +// Used by workers to tell the service that the ActivityTask identified by the +// taskToken completed successfully with a result (if provided). The result +// appears in the ActivityTaskCompleted event in the workflow history. +// +// If the requested task doesn't complete successfully, use RespondActivityTaskFailed +// instead. If the worker finds that the task is canceled through the canceled +// flag returned by RecordActivityTaskHeartbeat, it should cancel the task, +// clean up and then call RespondActivityTaskCanceled. +// +// A task is considered open from the time that it is scheduled until it is +// closed. Therefore a task is reported as open while a worker is processing +// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, +// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed +// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RespondActivityTaskCompleted for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RespondActivityTaskCompleted(input *RespondActivityTaskCompletedInput) (*RespondActivityTaskCompletedOutput, error) { + req, out := c.RespondActivityTaskCompletedRequest(input) + return out, req.Send() +} + +// RespondActivityTaskCompletedWithContext is the same as RespondActivityTaskCompleted with the addition of +// the ability to pass a context and additional request options. +// +// See RespondActivityTaskCompleted 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 *SWF) RespondActivityTaskCompletedWithContext(ctx aws.Context, input *RespondActivityTaskCompletedInput, opts ...request.Option) (*RespondActivityTaskCompletedOutput, error) { + req, out := c.RespondActivityTaskCompletedRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRespondActivityTaskFailed = "RespondActivityTaskFailed" + +// RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the +// client's request for the RespondActivityTaskFailed operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RespondActivityTaskFailed for more information on using the RespondActivityTaskFailed +// 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 RespondActivityTaskFailedRequest method. +// req, resp := client.RespondActivityTaskFailedRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RespondActivityTaskFailedRequest(input *RespondActivityTaskFailedInput) (req *request.Request, output *RespondActivityTaskFailedOutput) { + op := &request.Operation{ + Name: opRespondActivityTaskFailed, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RespondActivityTaskFailedInput{} + } + + output = &RespondActivityTaskFailedOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RespondActivityTaskFailed API operation for Amazon Simple Workflow Service. +// +// Used by workers to tell the service that the ActivityTask identified by the +// taskToken has failed with reason (if specified). The reason and details appear +// in the ActivityTaskFailed event added to the workflow history. +// +// A task is considered open from the time that it is scheduled until it is +// closed. Therefore a task is reported as open while a worker is processing +// it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, +// RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed +// out (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types). +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RespondActivityTaskFailed for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RespondActivityTaskFailed(input *RespondActivityTaskFailedInput) (*RespondActivityTaskFailedOutput, error) { + req, out := c.RespondActivityTaskFailedRequest(input) + return out, req.Send() +} + +// RespondActivityTaskFailedWithContext is the same as RespondActivityTaskFailed with the addition of +// the ability to pass a context and additional request options. +// +// See RespondActivityTaskFailed 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 *SWF) RespondActivityTaskFailedWithContext(ctx aws.Context, input *RespondActivityTaskFailedInput, opts ...request.Option) (*RespondActivityTaskFailedOutput, error) { + req, out := c.RespondActivityTaskFailedRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted" + +// RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the +// client's request for the RespondDecisionTaskCompleted operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 RespondDecisionTaskCompleted for more information on using the RespondDecisionTaskCompleted +// 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 RespondDecisionTaskCompletedRequest method. +// req, resp := client.RespondDecisionTaskCompletedRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) RespondDecisionTaskCompletedRequest(input *RespondDecisionTaskCompletedInput) (req *request.Request, output *RespondDecisionTaskCompletedOutput) { + op := &request.Operation{ + Name: opRespondDecisionTaskCompleted, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RespondDecisionTaskCompletedInput{} + } + + output = &RespondDecisionTaskCompletedOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RespondDecisionTaskCompleted API operation for Amazon Simple Workflow Service. +// +// Used by deciders to tell the service that the DecisionTask identified by +// the taskToken has successfully completed. The decisions argument specifies +// the list of decisions made while processing the task. +// +// A DecisionTaskCompleted event is added to the workflow history. The executionContext +// specified is attached to the event in the workflow execution history. +// +// Access Control +// +// If an IAM policy grants permission to use RespondDecisionTaskCompleted, it +// can express permissions for the list of decisions in the decisions parameter. +// Each of the decisions has one or more parameters, much like a regular API +// call. To allow for policies to be as readable as possible, you can express +// permissions on decisions as if they were actual API calls, including applying +// conditions to some parameters. For more information, see Using IAM to Manage +// Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation RespondDecisionTaskCompleted for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) RespondDecisionTaskCompleted(input *RespondDecisionTaskCompletedInput) (*RespondDecisionTaskCompletedOutput, error) { + req, out := c.RespondDecisionTaskCompletedRequest(input) + return out, req.Send() +} + +// RespondDecisionTaskCompletedWithContext is the same as RespondDecisionTaskCompleted with the addition of +// the ability to pass a context and additional request options. +// +// See RespondDecisionTaskCompleted 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 *SWF) RespondDecisionTaskCompletedWithContext(ctx aws.Context, input *RespondDecisionTaskCompletedInput, opts ...request.Option) (*RespondDecisionTaskCompletedOutput, error) { + req, out := c.RespondDecisionTaskCompletedRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSignalWorkflowExecution = "SignalWorkflowExecution" + +// SignalWorkflowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the SignalWorkflowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 SignalWorkflowExecution for more information on using the SignalWorkflowExecution +// 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 SignalWorkflowExecutionRequest method. +// req, resp := client.SignalWorkflowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) SignalWorkflowExecutionRequest(input *SignalWorkflowExecutionInput) (req *request.Request, output *SignalWorkflowExecutionOutput) { + op := &request.Operation{ + Name: opSignalWorkflowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SignalWorkflowExecutionInput{} + } + + output = &SignalWorkflowExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// SignalWorkflowExecution API operation for Amazon Simple Workflow Service. +// +// Records a WorkflowExecutionSignaled event in the workflow execution history +// and creates a decision task for the workflow execution identified by the +// given domain, workflowId and runId. The event is recorded with the specified +// user defined signalName and input (if provided). +// +// If a runId isn't specified, then the WorkflowExecutionSignaled event is recorded +// in the history of the current open workflow with the matching workflowId +// in the domain. +// +// If the specified workflow execution isn't open, this method fails with UnknownResource. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation SignalWorkflowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) SignalWorkflowExecution(input *SignalWorkflowExecutionInput) (*SignalWorkflowExecutionOutput, error) { + req, out := c.SignalWorkflowExecutionRequest(input) + return out, req.Send() +} + +// SignalWorkflowExecutionWithContext is the same as SignalWorkflowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See SignalWorkflowExecution 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 *SWF) SignalWorkflowExecutionWithContext(ctx aws.Context, input *SignalWorkflowExecutionInput, opts ...request.Option) (*SignalWorkflowExecutionOutput, error) { + req, out := c.SignalWorkflowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartWorkflowExecution = "StartWorkflowExecution" + +// StartWorkflowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the StartWorkflowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 StartWorkflowExecution for more information on using the StartWorkflowExecution +// 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 StartWorkflowExecutionRequest method. +// req, resp := client.StartWorkflowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) StartWorkflowExecutionRequest(input *StartWorkflowExecutionInput) (req *request.Request, output *StartWorkflowExecutionOutput) { + op := &request.Operation{ + Name: opStartWorkflowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartWorkflowExecutionInput{} + } + + output = &StartWorkflowExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartWorkflowExecution API operation for Amazon Simple Workflow Service. +// +// Starts an execution of the workflow type in the specified domain using the +// provided workflowId and input data. +// +// This action returns the newly started workflow execution. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagList.member.0: The key is swf:tagList.member.0. +// +// tagList.member.1: The key is swf:tagList.member.1. +// +// tagList.member.2: The key is swf:tagList.member.2. +// +// tagList.member.3: The key is swf:tagList.member.3. +// +// tagList.member.4: The key is swf:tagList.member.4. +// +// taskList: String constraint. The key is swf:taskList.name. +// +// workflowType.name: String constraint. The key is swf:workflowType.name. +// +// workflowType.version: String constraint. The key is swf:workflowType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation StartWorkflowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault" +// Returned when the specified activity or workflow type was already deprecated. +// +// * ErrCodeWorkflowExecutionAlreadyStartedFault "WorkflowExecutionAlreadyStartedFault" +// Returned by StartWorkflowExecution when an open execution with the same workflowId +// is already running in the specified domain. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// Returned by any operation if a system imposed limitation has been reached. +// To address this fault you should either clean up unused resources or increase +// the limit by contacting AWS. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +// * ErrCodeDefaultUndefinedFault "DefaultUndefinedFault" +// The StartWorkflowExecution API action was called without the required parameters +// set. +// +// Some workflow execution parameters, such as the decision taskList, must be +// set to start the execution. However, these parameters might have been set +// as defaults when the workflow type was registered. In this case, you can +// omit these parameters from the StartWorkflowExecution call and Amazon SWF +// uses the values defined in the workflow type. +// +// If these parameters aren't set and no default parameters were defined in +// the workflow type, this error is displayed. +// +func (c *SWF) StartWorkflowExecution(input *StartWorkflowExecutionInput) (*StartWorkflowExecutionOutput, error) { + req, out := c.StartWorkflowExecutionRequest(input) + return out, req.Send() +} + +// StartWorkflowExecutionWithContext is the same as StartWorkflowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See StartWorkflowExecution 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 *SWF) StartWorkflowExecutionWithContext(ctx aws.Context, input *StartWorkflowExecutionInput, opts ...request.Option) (*StartWorkflowExecutionOutput, error) { + req, out := c.StartWorkflowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTerminateWorkflowExecution = "TerminateWorkflowExecution" + +// TerminateWorkflowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the TerminateWorkflowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// 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 TerminateWorkflowExecution for more information on using the TerminateWorkflowExecution +// 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 TerminateWorkflowExecutionRequest method. +// req, resp := client.TerminateWorkflowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *SWF) TerminateWorkflowExecutionRequest(input *TerminateWorkflowExecutionInput) (req *request.Request, output *TerminateWorkflowExecutionOutput) { + op := &request.Operation{ + Name: opTerminateWorkflowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateWorkflowExecutionInput{} + } + + output = &TerminateWorkflowExecutionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TerminateWorkflowExecution API operation for Amazon Simple Workflow Service. +// +// Records a WorkflowExecutionTerminated event and forces closure of the workflow +// execution identified by the given domain, runId, and workflowId. The child +// policy, registered with the workflow type or specified when starting this +// execution, is applied to any open child workflow executions of this workflow +// execution. +// +// If the identified workflow execution was in progress, it is terminated immediately. +// +// If a runId isn't specified, then the WorkflowExecutionTerminated event is +// recorded in the history of the current open workflow with the matching workflowId +// in the domain. +// +// You should consider using RequestCancelWorkflowExecution action instead because +// it allows the workflow to gracefully close while TerminateWorkflowExecution +// doesn't. +// +// Access Control +// +// You can use IAM policies to control this action's access to Amazon SWF resources +// as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF 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 Simple Workflow Service's +// API operation TerminateWorkflowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceFault "UnknownResourceFault" +// Returned when the named resource cannot be found with in the scope of this +// operation (region or domain). This could happen if the named resource was +// never created or is no longer available for this operation. +// +// * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault" +// Returned when the caller doesn't have sufficient permissions to invoke the +// action. +// +func (c *SWF) TerminateWorkflowExecution(input *TerminateWorkflowExecutionInput) (*TerminateWorkflowExecutionOutput, error) { + req, out := c.TerminateWorkflowExecutionRequest(input) + return out, req.Send() +} + +// TerminateWorkflowExecutionWithContext is the same as TerminateWorkflowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateWorkflowExecution 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 *SWF) TerminateWorkflowExecutionWithContext(ctx aws.Context, input *TerminateWorkflowExecutionInput, opts ...request.Option) (*TerminateWorkflowExecutionOutput, error) { + req, out := c.TerminateWorkflowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Provides the details of the ActivityTaskCancelRequested event. +type ActivityTaskCancelRequestedEventAttributes struct { + _ struct{} `type:"structure"` + + // The unique ID of the task. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RequestCancelActivityTask decision for this cancellation + // request. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ActivityTaskCancelRequestedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskCancelRequestedEventAttributes) GoString() string { + return s.String() +} + +// SetActivityId sets the ActivityId field's value. +func (s *ActivityTaskCancelRequestedEventAttributes) SetActivityId(v string) *ActivityTaskCancelRequestedEventAttributes { + s.ActivityId = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *ActivityTaskCancelRequestedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ActivityTaskCancelRequestedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// Provides the details of the ActivityTaskCanceled event. +type ActivityTaskCanceledEventAttributes struct { + _ struct{} `type:"structure"` + + // Details of the cancellation. + Details *string `locationName:"details" type:"string"` + + // If set, contains the ID of the last ActivityTaskCancelRequested event recorded + // for this activity task. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + LatestCancelRequestedEventId *int64 `locationName:"latestCancelRequestedEventId" type:"long"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the ActivityTaskStarted event recorded when this activity task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ActivityTaskCanceledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskCanceledEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ActivityTaskCanceledEventAttributes) SetDetails(v string) *ActivityTaskCanceledEventAttributes { + s.Details = &v + return s +} + +// SetLatestCancelRequestedEventId sets the LatestCancelRequestedEventId field's value. +func (s *ActivityTaskCanceledEventAttributes) SetLatestCancelRequestedEventId(v int64) *ActivityTaskCanceledEventAttributes { + s.LatestCancelRequestedEventId = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *ActivityTaskCanceledEventAttributes) SetScheduledEventId(v int64) *ActivityTaskCanceledEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ActivityTaskCanceledEventAttributes) SetStartedEventId(v int64) *ActivityTaskCanceledEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides the details of the ActivityTaskCompleted event. +type ActivityTaskCompletedEventAttributes struct { + _ struct{} `type:"structure"` + + // The results of the activity task. + Result *string `locationName:"result" type:"string"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the ActivityTaskStarted event recorded when this activity task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ActivityTaskCompletedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskCompletedEventAttributes) GoString() string { + return s.String() +} + +// SetResult sets the Result field's value. +func (s *ActivityTaskCompletedEventAttributes) SetResult(v string) *ActivityTaskCompletedEventAttributes { + s.Result = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *ActivityTaskCompletedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskCompletedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ActivityTaskCompletedEventAttributes) SetStartedEventId(v int64) *ActivityTaskCompletedEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides the details of the ActivityTaskFailed event. +type ActivityTaskFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The details of the failure. + Details *string `locationName:"details" type:"string"` + + // The reason provided for the failure. + Reason *string `locationName:"reason" type:"string"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the ActivityTaskStarted event recorded when this activity task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ActivityTaskFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskFailedEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ActivityTaskFailedEventAttributes) SetDetails(v string) *ActivityTaskFailedEventAttributes { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *ActivityTaskFailedEventAttributes) SetReason(v string) *ActivityTaskFailedEventAttributes { + s.Reason = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *ActivityTaskFailedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskFailedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ActivityTaskFailedEventAttributes) SetStartedEventId(v int64) *ActivityTaskFailedEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides the details of the ActivityTaskScheduled event. +type ActivityTaskScheduledEventAttributes struct { + _ struct{} `type:"structure"` + + // The unique ID of the activity task. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The type of the activity task. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // Data attached to the event that can be used by the decider in subsequent + // workflow tasks. This data isn't sent to the activity. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision that + // resulted in the scheduling of this activity task. This information can be + // useful for diagnosing problems by tracing back the chain of events leading + // up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The maximum time before which the worker processing this task must report + // progress by calling RecordActivityTaskHeartbeat. If the timeout is exceeded, + // the activity task is automatically timed out. If the worker subsequently + // attempts to record a heartbeat or return a result, it is ignored. + HeartbeatTimeout *string `locationName:"heartbeatTimeout" type:"string"` + + // The input provided to the activity task. + Input *string `locationName:"input" type:"string"` + + // The maximum amount of time for this activity task. + ScheduleToCloseTimeout *string `locationName:"scheduleToCloseTimeout" type:"string"` + + // The maximum amount of time the activity task can wait to be assigned to a + // worker. + ScheduleToStartTimeout *string `locationName:"scheduleToStartTimeout" type:"string"` + + // The maximum amount of time a worker may take to process the activity task. + StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` + + // The task list in which the activity task has been scheduled. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // The priority to assign to the scheduled activity task. If set, this overrides + // any default priority value that was assigned when the activity type was registered. + // + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` +} + +// String returns the string representation +func (s ActivityTaskScheduledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskScheduledEventAttributes) GoString() string { + return s.String() +} + +// SetActivityId sets the ActivityId field's value. +func (s *ActivityTaskScheduledEventAttributes) SetActivityId(v string) *ActivityTaskScheduledEventAttributes { + s.ActivityId = &v + return s +} + +// SetActivityType sets the ActivityType field's value. +func (s *ActivityTaskScheduledEventAttributes) SetActivityType(v *ActivityType) *ActivityTaskScheduledEventAttributes { + s.ActivityType = v + return s +} + +// SetControl sets the Control field's value. +func (s *ActivityTaskScheduledEventAttributes) SetControl(v string) *ActivityTaskScheduledEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *ActivityTaskScheduledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ActivityTaskScheduledEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. +func (s *ActivityTaskScheduledEventAttributes) SetHeartbeatTimeout(v string) *ActivityTaskScheduledEventAttributes { + s.HeartbeatTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *ActivityTaskScheduledEventAttributes) SetInput(v string) *ActivityTaskScheduledEventAttributes { + s.Input = &v + return s +} + +// SetScheduleToCloseTimeout sets the ScheduleToCloseTimeout field's value. +func (s *ActivityTaskScheduledEventAttributes) SetScheduleToCloseTimeout(v string) *ActivityTaskScheduledEventAttributes { + s.ScheduleToCloseTimeout = &v + return s +} + +// SetScheduleToStartTimeout sets the ScheduleToStartTimeout field's value. +func (s *ActivityTaskScheduledEventAttributes) SetScheduleToStartTimeout(v string) *ActivityTaskScheduledEventAttributes { + s.ScheduleToStartTimeout = &v + return s +} + +// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. +func (s *ActivityTaskScheduledEventAttributes) SetStartToCloseTimeout(v string) *ActivityTaskScheduledEventAttributes { + s.StartToCloseTimeout = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *ActivityTaskScheduledEventAttributes) SetTaskList(v *TaskList) *ActivityTaskScheduledEventAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *ActivityTaskScheduledEventAttributes) SetTaskPriority(v string) *ActivityTaskScheduledEventAttributes { + s.TaskPriority = &v + return s +} + +// Provides the details of the ActivityTaskStarted event. +type ActivityTaskStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // Identity of the worker that was assigned this task. This aids diagnostics + // when problems arise. The form of this identity is user defined. + Identity *string `locationName:"identity" type:"string"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ActivityTaskStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskStartedEventAttributes) GoString() string { + return s.String() +} + +// SetIdentity sets the Identity field's value. +func (s *ActivityTaskStartedEventAttributes) SetIdentity(v string) *ActivityTaskStartedEventAttributes { + s.Identity = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *ActivityTaskStartedEventAttributes) SetScheduledEventId(v int64) *ActivityTaskStartedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// Provides the details of the ActivityTaskTimedOut event. +type ActivityTaskTimedOutEventAttributes struct { + _ struct{} `type:"structure"` + + // Contains the content of the details parameter for the last call made by the + // activity to RecordActivityTaskHeartbeat. + Details *string `locationName:"details" type:"string"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the ActivityTaskStarted event recorded when this activity task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The type of the timeout that caused this event. + // + // TimeoutType is a required field + TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"ActivityTaskTimeoutType"` +} + +// String returns the string representation +func (s ActivityTaskTimedOutEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTaskTimedOutEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ActivityTaskTimedOutEventAttributes) SetDetails(v string) *ActivityTaskTimedOutEventAttributes { + s.Details = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *ActivityTaskTimedOutEventAttributes) SetScheduledEventId(v int64) *ActivityTaskTimedOutEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ActivityTaskTimedOutEventAttributes) SetStartedEventId(v int64) *ActivityTaskTimedOutEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimeoutType sets the TimeoutType field's value. +func (s *ActivityTaskTimedOutEventAttributes) SetTimeoutType(v string) *ActivityTaskTimedOutEventAttributes { + s.TimeoutType = &v + return s +} + +// Represents an activity type. +type ActivityType struct { + _ struct{} `type:"structure"` + + // The name of this activity. + // + // The combination of activity type name and version must be unique within a + // domain. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The version of this activity. + // + // The combination of activity type name and version must be unique with in + // a domain. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ActivityType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivityType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivityType"} + 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.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ActivityType) SetName(v string) *ActivityType { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ActivityType) SetVersion(v string) *ActivityType { + s.Version = &v + return s +} + +// Configuration settings registered with the activity type. +type ActivityTypeConfiguration struct { + _ struct{} `type:"structure"` + + // The default maximum time, in seconds, before which a worker processing a + // task must report progress by calling RecordActivityTaskHeartbeat. + // + // You can specify this value only when registering an activity type. The registered + // default value can be overridden when you schedule a task through the ScheduleActivityTaskDecision. + // If the activity worker subsequently attempts to record a heartbeat or returns + // a result, the activity worker receives an UnknownResource fault. In this + // case, Amazon SWF no longer considers the activity task to be valid; the activity + // worker should clean up the activity task. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskHeartbeatTimeout *string `locationName:"defaultTaskHeartbeatTimeout" type:"string"` + + // The default task list specified for this activity type at registration. This + // default is used if a task list isn't provided when a task is scheduled through + // the ScheduleActivityTaskDecision. You can override the default registered + // task list when scheduling a task through the ScheduleActivityTaskDecision. + DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` + + // The default task priority for tasks of this activity type, specified at registration. + // If not set, then 0 is used as the default priority. This default can be overridden + // when scheduling an activity task. + // + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` + + // The default maximum duration, specified when registering the activity type, + // for tasks of this activity type. You can override this default when scheduling + // a task through the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskScheduleToCloseTimeout *string `locationName:"defaultTaskScheduleToCloseTimeout" type:"string"` + + // The default maximum duration, specified when registering the activity type, + // that a task of an activity type can wait before being assigned to a worker. + // You can override this default when scheduling a task through the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskScheduleToStartTimeout *string `locationName:"defaultTaskScheduleToStartTimeout" type:"string"` + + // The default maximum duration for tasks of an activity type specified when + // registering the activity type. You can override this default when scheduling + // a task through the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` +} + +// String returns the string representation +func (s ActivityTypeConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTypeConfiguration) GoString() string { + return s.String() +} + +// SetDefaultTaskHeartbeatTimeout sets the DefaultTaskHeartbeatTimeout field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskHeartbeatTimeout(v string) *ActivityTypeConfiguration { + s.DefaultTaskHeartbeatTimeout = &v + return s +} + +// SetDefaultTaskList sets the DefaultTaskList field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskList(v *TaskList) *ActivityTypeConfiguration { + s.DefaultTaskList = v + return s +} + +// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskPriority(v string) *ActivityTypeConfiguration { + s.DefaultTaskPriority = &v + return s +} + +// SetDefaultTaskScheduleToCloseTimeout sets the DefaultTaskScheduleToCloseTimeout field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskScheduleToCloseTimeout(v string) *ActivityTypeConfiguration { + s.DefaultTaskScheduleToCloseTimeout = &v + return s +} + +// SetDefaultTaskScheduleToStartTimeout sets the DefaultTaskScheduleToStartTimeout field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskScheduleToStartTimeout(v string) *ActivityTypeConfiguration { + s.DefaultTaskScheduleToStartTimeout = &v + return s +} + +// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. +func (s *ActivityTypeConfiguration) SetDefaultTaskStartToCloseTimeout(v string) *ActivityTypeConfiguration { + s.DefaultTaskStartToCloseTimeout = &v + return s +} + +// Detailed information about an activity type. +type ActivityTypeInfo struct { + _ struct{} `type:"structure"` + + // The ActivityType type structure representing the activity type. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // The date and time this activity type was created through RegisterActivityType. + // + // CreationDate is a required field + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` + + // If DEPRECATED, the date and time DeprecateActivityType was called. + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` + + // The description of the activity type provided in RegisterActivityType. + Description *string `locationName:"description" type:"string"` + + // The current status of the activity type. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` +} + +// String returns the string representation +func (s ActivityTypeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityTypeInfo) GoString() string { + return s.String() +} + +// SetActivityType sets the ActivityType field's value. +func (s *ActivityTypeInfo) SetActivityType(v *ActivityType) *ActivityTypeInfo { + s.ActivityType = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ActivityTypeInfo) SetCreationDate(v time.Time) *ActivityTypeInfo { + s.CreationDate = &v + return s +} + +// SetDeprecationDate sets the DeprecationDate field's value. +func (s *ActivityTypeInfo) SetDeprecationDate(v time.Time) *ActivityTypeInfo { + s.DeprecationDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ActivityTypeInfo) SetDescription(v string) *ActivityTypeInfo { + s.Description = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ActivityTypeInfo) SetStatus(v string) *ActivityTypeInfo { + s.Status = &v + return s +} + +// Provides the details of the CancelTimer decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type CancelTimerDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The unique ID of the timer to cancel. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelTimerDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelTimerDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelTimerDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelTimerDecisionAttributes"} + if s.TimerId == nil { + invalidParams.Add(request.NewErrParamRequired("TimerId")) + } + if s.TimerId != nil && len(*s.TimerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TimerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTimerId sets the TimerId field's value. +func (s *CancelTimerDecisionAttributes) SetTimerId(v string) *CancelTimerDecisionAttributes { + s.TimerId = &v + return s +} + +// Provides the details of the CancelTimerFailed event. +type CancelTimerFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"CancelTimerFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CancelTimer decision to cancel this timer. This information + // can be useful for diagnosing problems by tracing back the chain of events + // leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The timerId provided in the CancelTimer decision that failed. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelTimerFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelTimerFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *CancelTimerFailedEventAttributes) SetCause(v string) *CancelTimerFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *CancelTimerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CancelTimerFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *CancelTimerFailedEventAttributes) SetTimerId(v string) *CancelTimerFailedEventAttributes { + s.TimerId = &v + return s +} + +// Provides the details of the CancelWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type CancelWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // Details of the cancellation. + Details *string `locationName:"details" type:"string"` +} + +// String returns the string representation +func (s CancelWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *CancelWorkflowExecutionDecisionAttributes) SetDetails(v string) *CancelWorkflowExecutionDecisionAttributes { + s.Details = &v + return s +} + +// Provides the details of the CancelWorkflowExecutionFailed event. +type CancelWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"CancelWorkflowExecutionFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CancelWorkflowExecution decision for this cancellation + // request. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s CancelWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *CancelWorkflowExecutionFailedEventAttributes) SetCause(v string) *CancelWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *CancelWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CancelWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// Provide details of the ChildWorkflowExecutionCanceled event. +type ChildWorkflowExecutionCanceledEventAttributes struct { + _ struct{} `type:"structure"` + + // Details of the cancellation (if provided). + Details *string `locationName:"details" type:"string"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The ID of the ChildWorkflowExecutionStarted event recorded when this child + // workflow execution was started. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The child workflow execution that was canceled. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionCanceledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionCanceledEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ChildWorkflowExecutionCanceledEventAttributes) SetDetails(v string) *ChildWorkflowExecutionCanceledEventAttributes { + s.Details = &v + return s +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionCanceledEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionCanceledEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ChildWorkflowExecutionCanceledEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionCanceledEventAttributes { + s.StartedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionCanceledEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionCanceledEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionCanceledEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionCanceledEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the ChildWorkflowExecutionCompleted event. +type ChildWorkflowExecutionCompletedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The result of the child workflow execution. + Result *string `locationName:"result" type:"string"` + + // The ID of the ChildWorkflowExecutionStarted event recorded when this child + // workflow execution was started. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The child workflow execution that was completed. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionCompletedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionCompletedEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionCompletedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionCompletedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *ChildWorkflowExecutionCompletedEventAttributes) SetResult(v string) *ChildWorkflowExecutionCompletedEventAttributes { + s.Result = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ChildWorkflowExecutionCompletedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionCompletedEventAttributes { + s.StartedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionCompletedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionCompletedEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionCompletedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionCompletedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the ChildWorkflowExecutionFailed event. +type ChildWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The details of the failure (if provided). + Details *string `locationName:"details" type:"string"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The reason for the failure (if provided). + Reason *string `locationName:"reason" type:"string"` + + // The ID of the ChildWorkflowExecutionStarted event recorded when this child + // workflow execution was started. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The child workflow execution that failed. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetDetails(v string) *ChildWorkflowExecutionFailedEventAttributes { + s.Details = &v + return s +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionFailedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetReason(v string) *ChildWorkflowExecutionFailedEventAttributes { + s.Reason = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionFailedEventAttributes { + s.StartedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionFailedEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionFailedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionFailedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the ChildWorkflowExecutionStarted event. +type ChildWorkflowExecutionStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The child workflow execution that was started. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionStartedEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionStartedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionStartedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionStartedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionStartedEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionStartedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionStartedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the ChildWorkflowExecutionTerminated event. +type ChildWorkflowExecutionTerminatedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The ID of the ChildWorkflowExecutionStarted event recorded when this child + // workflow execution was started. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The child workflow execution that was terminated. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionTerminatedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionTerminatedEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionTerminatedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionTerminatedEventAttributes { + s.StartedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionTerminatedEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionTerminatedEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionTerminatedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the ChildWorkflowExecutionTimedOut event. +type ChildWorkflowExecutionTimedOutEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this child workflow execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The ID of the ChildWorkflowExecutionStarted event recorded when this child + // workflow execution was started. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The type of the timeout that caused the child workflow execution to time + // out. + // + // TimeoutType is a required field + TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"WorkflowExecutionTimeoutType"` + + // The child workflow execution that timed out. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ChildWorkflowExecutionTimedOutEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChildWorkflowExecutionTimedOutEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetInitiatedEventId(v int64) *ChildWorkflowExecutionTimedOutEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetStartedEventId(v int64) *ChildWorkflowExecutionTimedOutEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimeoutType sets the TimeoutType field's value. +func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetTimeoutType(v string) *ChildWorkflowExecutionTimedOutEventAttributes { + s.TimeoutType = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ChildWorkflowExecutionTimedOutEventAttributes { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *ChildWorkflowExecutionTimedOutEventAttributes) SetWorkflowType(v *WorkflowType) *ChildWorkflowExecutionTimedOutEventAttributes { + s.WorkflowType = v + return s +} + +// Used to filter the closed workflow executions in visibility APIs by their +// close status. +type CloseStatusFilter struct { + _ struct{} `type:"structure"` + + // The close status that must match the close status of an execution for it + // to meet the criteria of this filter. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"CloseStatus"` +} + +// String returns the string representation +func (s CloseStatusFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloseStatusFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloseStatusFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloseStatusFilter"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStatus sets the Status field's value. +func (s *CloseStatusFilter) SetStatus(v string) *CloseStatusFilter { + s.Status = &v + return s +} + +// Provides the details of the CompleteWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type CompleteWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The result of the workflow execution. The form of the result is implementation + // defined. + Result *string `locationName:"result" type:"string"` +} + +// String returns the string representation +func (s CompleteWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// SetResult sets the Result field's value. +func (s *CompleteWorkflowExecutionDecisionAttributes) SetResult(v string) *CompleteWorkflowExecutionDecisionAttributes { + s.Result = &v + return s +} + +// Provides the details of the CompleteWorkflowExecutionFailed event. +type CompleteWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"CompleteWorkflowExecutionFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CompleteWorkflowExecution decision to complete this + // execution. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s CompleteWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *CompleteWorkflowExecutionFailedEventAttributes) SetCause(v string) *CompleteWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *CompleteWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *CompleteWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// Provides the details of the ContinueAsNewWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tag – A tag used to identify the workflow execution +// +// taskList – String constraint. The key is swf:taskList.name. +// +// workflowType.version – String constraint. The key is swf:workflowType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type ContinueAsNewWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // If set, specifies the policy to use for the child workflow executions of + // the new execution if it is terminated by calling the TerminateWorkflowExecution + // action explicitly or due to an expired timeout. This policy overrides the + // default child policy specified when registering the workflow type using RegisterWorkflowType. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // A child policy for this workflow execution must be specified either as a + // default for the workflow type or through this parameter. If neither this + // parameter is set nor a default child policy was specified at registration + // time then a fault is returned. + ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` + + // If set, specifies the total duration for this workflow execution. This overrides + // the defaultExecutionStartToCloseTimeout specified when registering the workflow + // type. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // An execution start-to-close timeout for this workflow execution must be specified + // either as a default for the workflow type or through this field. If neither + // this field is set nor a default execution start-to-close timeout was specified + // at registration time then a fault is returned. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The input provided to the new workflow execution. + Input *string `locationName:"input" type:"string"` + + // The IAM role to attach to the new (continued) execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The list of tags to associate with the new workflow execution. A maximum + // of 5 tags can be specified. You can list workflow executions with a specific + // tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions + // and specifying a TagFilter. + TagList []*string `locationName:"tagList" type:"list"` + + // The task list to use for the decisions of the new (continued) workflow execution. + TaskList *TaskList `locationName:"taskList" type:"structure"` + + // The task priority that, if set, specifies the priority for the decision tasks + // for this workflow execution. This overrides the defaultTaskPriority specified + // when registering the workflow type. Valid values are integers that range + // from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). + // Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // Specifies the maximum duration of decision tasks for the new workflow execution. + // This parameter overrides the defaultTaskStartToCloseTimout specified when + // registering the workflow type using RegisterWorkflowType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A task start-to-close timeout for the new workflow execution must be specified + // either as a default for the workflow type or through this parameter. If neither + // this parameter is set nor a default task start-to-close timeout was specified + // at registration time then a fault is returned. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The version of the workflow to start. + WorkflowTypeVersion *string `locationName:"workflowTypeVersion" min:"1" type:"string"` +} + +// String returns the string representation +func (s ContinueAsNewWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContinueAsNewWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContinueAsNewWorkflowExecutionDecisionAttributes"} + if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) + } + if s.WorkflowTypeVersion != nil && len(*s.WorkflowTypeVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowTypeVersion", 1)) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetChildPolicy(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.ChildPolicy = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetExecutionStartToCloseTimeout(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetInput(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetLambdaRole(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.LambdaRole = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTagList(v []*string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskList(v *TaskList) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskPriority(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetTaskStartToCloseTimeout(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowTypeVersion sets the WorkflowTypeVersion field's value. +func (s *ContinueAsNewWorkflowExecutionDecisionAttributes) SetWorkflowTypeVersion(v string) *ContinueAsNewWorkflowExecutionDecisionAttributes { + s.WorkflowTypeVersion = &v + return s +} + +// Provides the details of the ContinueAsNewWorkflowExecutionFailed event. +type ContinueAsNewWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"ContinueAsNewWorkflowExecutionFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the ContinueAsNewWorkflowExecution decision that started + // this execution. This information can be useful for diagnosing problems by + // tracing back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ContinueAsNewWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContinueAsNewWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *ContinueAsNewWorkflowExecutionFailedEventAttributes) SetCause(v string) *ContinueAsNewWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *ContinueAsNewWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ContinueAsNewWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +type CountClosedWorkflowExecutionsInput struct { + _ struct{} `type:"structure"` + + // If specified, only workflow executions that match this close status are counted. + // This filter has an affect only if executionStatus is specified as CLOSED. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + CloseStatusFilter *CloseStatusFilter `locationName:"closeStatusFilter" type:"structure"` + + // If specified, only workflow executions that meet the close time criteria + // of the filter are counted. + // + // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify + // one of these in a request but not both. + CloseTimeFilter *ExecutionTimeFilter `locationName:"closeTimeFilter" type:"structure"` + + // The name of the domain containing the workflow executions to count. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // If specified, only workflow executions matching the WorkflowId in the filter + // are counted. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` + + // If specified, only workflow executions that meet the start time criteria + // of the filter are counted. + // + // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify + // one of these in a request but not both. + StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure"` + + // If specified, only executions that have a tag that matches the filter are + // counted. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` + + // If specified, indicates the type of the workflow executions to be counted. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` +} + +// String returns the string representation +func (s CountClosedWorkflowExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CountClosedWorkflowExecutionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CountClosedWorkflowExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CountClosedWorkflowExecutionsInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.CloseStatusFilter != nil { + if err := s.CloseStatusFilter.Validate(); err != nil { + invalidParams.AddNested("CloseStatusFilter", err.(request.ErrInvalidParams)) + } + } + if s.CloseTimeFilter != nil { + if err := s.CloseTimeFilter.Validate(); err != nil { + invalidParams.AddNested("CloseTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.ExecutionFilter != nil { + if err := s.ExecutionFilter.Validate(); err != nil { + invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) + } + } + if s.StartTimeFilter != nil { + if err := s.StartTimeFilter.Validate(); err != nil { + invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.TagFilter != nil { + if err := s.TagFilter.Validate(); err != nil { + invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) + } + } + if s.TypeFilter != nil { + if err := s.TypeFilter.Validate(); err != nil { + invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloseStatusFilter sets the CloseStatusFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetCloseStatusFilter(v *CloseStatusFilter) *CountClosedWorkflowExecutionsInput { + s.CloseStatusFilter = v + return s +} + +// SetCloseTimeFilter sets the CloseTimeFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetCloseTimeFilter(v *ExecutionTimeFilter) *CountClosedWorkflowExecutionsInput { + s.CloseTimeFilter = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *CountClosedWorkflowExecutionsInput) SetDomain(v string) *CountClosedWorkflowExecutionsInput { + s.Domain = &v + return s +} + +// SetExecutionFilter sets the ExecutionFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *CountClosedWorkflowExecutionsInput { + s.ExecutionFilter = v + return s +} + +// SetStartTimeFilter sets the StartTimeFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *CountClosedWorkflowExecutionsInput { + s.StartTimeFilter = v + return s +} + +// SetTagFilter sets the TagFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *CountClosedWorkflowExecutionsInput { + s.TagFilter = v + return s +} + +// SetTypeFilter sets the TypeFilter field's value. +func (s *CountClosedWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *CountClosedWorkflowExecutionsInput { + s.TypeFilter = v + return s +} + +type CountOpenWorkflowExecutionsInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the workflow executions to count. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // If specified, only workflow executions matching the WorkflowId in the filter + // are counted. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` + + // Specifies the start time criteria that workflow executions must meet in order + // to be counted. + // + // StartTimeFilter is a required field + StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure" required:"true"` + + // If specified, only executions that have a tag that matches the filter are + // counted. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` + + // Specifies the type of the workflow executions to be counted. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` +} + +// String returns the string representation +func (s CountOpenWorkflowExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CountOpenWorkflowExecutionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CountOpenWorkflowExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CountOpenWorkflowExecutionsInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.StartTimeFilter == nil { + invalidParams.Add(request.NewErrParamRequired("StartTimeFilter")) + } + if s.ExecutionFilter != nil { + if err := s.ExecutionFilter.Validate(); err != nil { + invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) + } + } + if s.StartTimeFilter != nil { + if err := s.StartTimeFilter.Validate(); err != nil { + invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.TagFilter != nil { + if err := s.TagFilter.Validate(); err != nil { + invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) + } + } + if s.TypeFilter != nil { + if err := s.TypeFilter.Validate(); err != nil { + invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *CountOpenWorkflowExecutionsInput) SetDomain(v string) *CountOpenWorkflowExecutionsInput { + s.Domain = &v + return s +} + +// SetExecutionFilter sets the ExecutionFilter field's value. +func (s *CountOpenWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *CountOpenWorkflowExecutionsInput { + s.ExecutionFilter = v + return s +} + +// SetStartTimeFilter sets the StartTimeFilter field's value. +func (s *CountOpenWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *CountOpenWorkflowExecutionsInput { + s.StartTimeFilter = v + return s +} + +// SetTagFilter sets the TagFilter field's value. +func (s *CountOpenWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *CountOpenWorkflowExecutionsInput { + s.TagFilter = v + return s +} + +// SetTypeFilter sets the TypeFilter field's value. +func (s *CountOpenWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *CountOpenWorkflowExecutionsInput { + s.TypeFilter = v + return s +} + +type CountPendingActivityTasksInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that contains the task list. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The name of the task list. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CountPendingActivityTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CountPendingActivityTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CountPendingActivityTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CountPendingActivityTasksInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.TaskList == nil { + invalidParams.Add(request.NewErrParamRequired("TaskList")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *CountPendingActivityTasksInput) SetDomain(v string) *CountPendingActivityTasksInput { + s.Domain = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *CountPendingActivityTasksInput) SetTaskList(v *TaskList) *CountPendingActivityTasksInput { + s.TaskList = v + return s +} + +type CountPendingDecisionTasksInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that contains the task list. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The name of the task list. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CountPendingDecisionTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CountPendingDecisionTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CountPendingDecisionTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CountPendingDecisionTasksInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.TaskList == nil { + invalidParams.Add(request.NewErrParamRequired("TaskList")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *CountPendingDecisionTasksInput) SetDomain(v string) *CountPendingDecisionTasksInput { + s.Domain = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *CountPendingDecisionTasksInput) SetTaskList(v *TaskList) *CountPendingDecisionTasksInput { + s.TaskList = v + return s +} + +// Specifies a decision made by the decider. A decision can be one of these +// types: +// +// * CancelTimer – Cancels a previously started timer and records a TimerCanceled +// event in the history. +// +// * CancelWorkflowExecution – Closes the workflow execution and records +// a WorkflowExecutionCanceled event in the history. +// +// * CompleteWorkflowExecution – Closes the workflow execution and records +// a WorkflowExecutionCompleted event in the history . +// +// * ContinueAsNewWorkflowExecution – Closes the workflow execution and starts +// a new workflow execution of the same type using the same workflow ID and +// a unique run Id. A WorkflowExecutionContinuedAsNew event is recorded in +// the history. +// +// * FailWorkflowExecution – Closes the workflow execution and records a +// WorkflowExecutionFailed event in the history. +// +// * RecordMarker – Records a MarkerRecorded event in the history. Markers +// can be used for adding custom information in the history for instance +// to let deciders know that they don't need to look at the history beyond +// the marker event. +// +// * RequestCancelActivityTask – Attempts to cancel a previously scheduled +// activity task. If the activity task was scheduled but has not been assigned +// to a worker, then it is canceled. If the activity task was already assigned +// to a worker, then the worker is informed that cancellation has been requested +// in the response to RecordActivityTaskHeartbeat. +// +// * RequestCancelExternalWorkflowExecution – Requests that a request be +// made to cancel the specified external workflow execution and records a +// RequestCancelExternalWorkflowExecutionInitiated event in the history. +// +// * ScheduleActivityTask – Schedules an activity task. +// +// * SignalExternalWorkflowExecution – Requests a signal to be delivered +// to the specified external workflow execution and records a SignalExternalWorkflowExecutionInitiated +// event in the history. +// +// * StartChildWorkflowExecution – Requests that a child workflow execution +// be started and records a StartChildWorkflowExecutionInitiated event in +// the history. The child workflow execution is a separate workflow execution +// with its own history. +// +// * StartTimer – Starts a timer for this workflow execution and records +// a TimerStarted event in the history. This timer fires after the specified +// delay and record a TimerFired event. +// +// Access Control +// +// If you grant permission to use RespondDecisionTaskCompleted, you can use +// IAM policies to express permissions for the list of decisions returned by +// this action as if they were members of the API. Treating decisions as a pseudo +// API maintains a uniform conceptual model and helps keep policies readable. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +// +// Decision Failure +// +// Decisions can fail for several reasons +// +// * The ordering of decisions should follow a logical flow. Some decisions +// might not make sense in the current context of the workflow execution +// and therefore fails. +// +// * A limit on your account was reached. +// +// * The decision lacks sufficient permissions. +// +// One of the following events might be added to the history to indicate an +// error. The event attribute's cause parameter indicates the cause. If cause +// is set to OPERATION_NOT_PERMITTED, the decision failed because it lacked +// sufficient permissions. For details and example IAM policies, see Using IAM +// to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +// +// * ScheduleActivityTaskFailed – A ScheduleActivityTask decision failed. +// This could happen if the activity type specified in the decision isn't +// registered, is in a deprecated state, or the decision isn't properly configured. +// +// * RequestCancelActivityTaskFailed – A RequestCancelActivityTask decision +// failed. This could happen if there is no open activity task with the specified +// activityId. +// +// * StartTimerFailed – A StartTimer decision failed. This could happen if +// there is another open timer with the same timerId. +// +// * CancelTimerFailed – A CancelTimer decision failed. This could happen +// if there is no open timer with the specified timerId. +// +// * StartChildWorkflowExecutionFailed – A StartChildWorkflowExecution decision +// failed. This could happen if the workflow type specified isn't registered, +// is deprecated, or the decision isn't properly configured. +// +// * SignalExternalWorkflowExecutionFailed – A SignalExternalWorkflowExecution +// decision failed. This could happen if the workflowID specified in the +// decision was incorrect. +// +// * RequestCancelExternalWorkflowExecutionFailed – A RequestCancelExternalWorkflowExecution +// decision failed. This could happen if the workflowID specified in the +// decision was incorrect. +// +// * CancelWorkflowExecutionFailed – A CancelWorkflowExecution decision failed. +// This could happen if there is an unhandled decision task pending in the +// workflow execution. +// +// * CompleteWorkflowExecutionFailed – A CompleteWorkflowExecution decision +// failed. This could happen if there is an unhandled decision task pending +// in the workflow execution. +// +// * ContinueAsNewWorkflowExecutionFailed – A ContinueAsNewWorkflowExecution +// decision failed. This could happen if there is an unhandled decision task +// pending in the workflow execution or the ContinueAsNewWorkflowExecution +// decision was not configured correctly. +// +// * FailWorkflowExecutionFailed – A FailWorkflowExecution decision failed. +// This could happen if there is an unhandled decision task pending in the +// workflow execution. +// +// The preceding error events might occur due to an error in the decider logic, +// which might put the workflow execution in an unstable state The cause field +// in the event structure for the error event indicates the cause of the error. +// +// A workflow execution may be closed by the decider by returning one of the +// following decisions when completing a decision task: CompleteWorkflowExecution, +// FailWorkflowExecution, CancelWorkflowExecution and ContinueAsNewWorkflowExecution. +// An UnhandledDecision fault is returned if a workflow closing decision is +// specified and a signal or activity event had been added to the history while +// the decision task was being performed by the decider. Unlike the above situations +// which are logic issues, this fault is always possible because of race conditions +// in a distributed system. The right action here is to call RespondDecisionTaskCompleted +// without any decisions. This would result in another decision task with these +// new events included in the history. The decider should handle the new events +// and may decide to close the workflow execution. +// +// How to Code a Decision +// +// You code a decision by first setting the decision type field to one of the +// above decision values, and then set the corresponding attributes field shown +// below: +// +// * ScheduleActivityTaskDecisionAttributes +// +// * RequestCancelActivityTaskDecisionAttributes +// +// * CompleteWorkflowExecutionDecisionAttributes +// +// * FailWorkflowExecutionDecisionAttributes +// +// * CancelWorkflowExecutionDecisionAttributes +// +// * ContinueAsNewWorkflowExecutionDecisionAttributes +// +// * RecordMarkerDecisionAttributes +// +// * StartTimerDecisionAttributes +// +// * CancelTimerDecisionAttributes +// +// * SignalExternalWorkflowExecutionDecisionAttributes +// +// * RequestCancelExternalWorkflowExecutionDecisionAttributes +// +// * StartChildWorkflowExecutionDecisionAttributes +type Decision struct { + _ struct{} `type:"structure"` + + // Provides the details of the CancelTimer decision. It isn't set for other + // decision types. + CancelTimerDecisionAttributes *CancelTimerDecisionAttributes `locationName:"cancelTimerDecisionAttributes" type:"structure"` + + // Provides the details of the CancelWorkflowExecution decision. It isn't set + // for other decision types. + CancelWorkflowExecutionDecisionAttributes *CancelWorkflowExecutionDecisionAttributes `locationName:"cancelWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the CompleteWorkflowExecution decision. It isn't + // set for other decision types. + CompleteWorkflowExecutionDecisionAttributes *CompleteWorkflowExecutionDecisionAttributes `locationName:"completeWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the ContinueAsNewWorkflowExecution decision. It isn't + // set for other decision types. + ContinueAsNewWorkflowExecutionDecisionAttributes *ContinueAsNewWorkflowExecutionDecisionAttributes `locationName:"continueAsNewWorkflowExecutionDecisionAttributes" type:"structure"` + + // Specifies the type of the decision. + // + // DecisionType is a required field + DecisionType *string `locationName:"decisionType" type:"string" required:"true" enum:"DecisionType"` + + // Provides the details of the FailWorkflowExecution decision. It isn't set + // for other decision types. + FailWorkflowExecutionDecisionAttributes *FailWorkflowExecutionDecisionAttributes `locationName:"failWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the RecordMarker decision. It isn't set for other + // decision types. + RecordMarkerDecisionAttributes *RecordMarkerDecisionAttributes `locationName:"recordMarkerDecisionAttributes" type:"structure"` + + // Provides the details of the RequestCancelActivityTask decision. It isn't + // set for other decision types. + RequestCancelActivityTaskDecisionAttributes *RequestCancelActivityTaskDecisionAttributes `locationName:"requestCancelActivityTaskDecisionAttributes" type:"structure"` + + // Provides the details of the RequestCancelExternalWorkflowExecution decision. + // It isn't set for other decision types. + RequestCancelExternalWorkflowExecutionDecisionAttributes *RequestCancelExternalWorkflowExecutionDecisionAttributes `locationName:"requestCancelExternalWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the ScheduleActivityTask decision. It isn't set for + // other decision types. + ScheduleActivityTaskDecisionAttributes *ScheduleActivityTaskDecisionAttributes `locationName:"scheduleActivityTaskDecisionAttributes" type:"structure"` + + // Provides the details of the ScheduleLambdaFunction decision. It isn't set + // for other decision types. + ScheduleLambdaFunctionDecisionAttributes *ScheduleLambdaFunctionDecisionAttributes `locationName:"scheduleLambdaFunctionDecisionAttributes" type:"structure"` + + // Provides the details of the SignalExternalWorkflowExecution decision. It + // isn't set for other decision types. + SignalExternalWorkflowExecutionDecisionAttributes *SignalExternalWorkflowExecutionDecisionAttributes `locationName:"signalExternalWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the StartChildWorkflowExecution decision. It isn't + // set for other decision types. + StartChildWorkflowExecutionDecisionAttributes *StartChildWorkflowExecutionDecisionAttributes `locationName:"startChildWorkflowExecutionDecisionAttributes" type:"structure"` + + // Provides the details of the StartTimer decision. It isn't set for other decision + // types. + StartTimerDecisionAttributes *StartTimerDecisionAttributes `locationName:"startTimerDecisionAttributes" type:"structure"` +} + +// String returns the string representation +func (s Decision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Decision) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Decision) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Decision"} + if s.DecisionType == nil { + invalidParams.Add(request.NewErrParamRequired("DecisionType")) + } + if s.CancelTimerDecisionAttributes != nil { + if err := s.CancelTimerDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("CancelTimerDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.ContinueAsNewWorkflowExecutionDecisionAttributes != nil { + if err := s.ContinueAsNewWorkflowExecutionDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("ContinueAsNewWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.RecordMarkerDecisionAttributes != nil { + if err := s.RecordMarkerDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("RecordMarkerDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.RequestCancelActivityTaskDecisionAttributes != nil { + if err := s.RequestCancelActivityTaskDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("RequestCancelActivityTaskDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.RequestCancelExternalWorkflowExecutionDecisionAttributes != nil { + if err := s.RequestCancelExternalWorkflowExecutionDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("RequestCancelExternalWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.ScheduleActivityTaskDecisionAttributes != nil { + if err := s.ScheduleActivityTaskDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("ScheduleActivityTaskDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.ScheduleLambdaFunctionDecisionAttributes != nil { + if err := s.ScheduleLambdaFunctionDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("ScheduleLambdaFunctionDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.SignalExternalWorkflowExecutionDecisionAttributes != nil { + if err := s.SignalExternalWorkflowExecutionDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("SignalExternalWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.StartChildWorkflowExecutionDecisionAttributes != nil { + if err := s.StartChildWorkflowExecutionDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("StartChildWorkflowExecutionDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + if s.StartTimerDecisionAttributes != nil { + if err := s.StartTimerDecisionAttributes.Validate(); err != nil { + invalidParams.AddNested("StartTimerDecisionAttributes", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCancelTimerDecisionAttributes sets the CancelTimerDecisionAttributes field's value. +func (s *Decision) SetCancelTimerDecisionAttributes(v *CancelTimerDecisionAttributes) *Decision { + s.CancelTimerDecisionAttributes = v + return s +} + +// SetCancelWorkflowExecutionDecisionAttributes sets the CancelWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetCancelWorkflowExecutionDecisionAttributes(v *CancelWorkflowExecutionDecisionAttributes) *Decision { + s.CancelWorkflowExecutionDecisionAttributes = v + return s +} + +// SetCompleteWorkflowExecutionDecisionAttributes sets the CompleteWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetCompleteWorkflowExecutionDecisionAttributes(v *CompleteWorkflowExecutionDecisionAttributes) *Decision { + s.CompleteWorkflowExecutionDecisionAttributes = v + return s +} + +// SetContinueAsNewWorkflowExecutionDecisionAttributes sets the ContinueAsNewWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetContinueAsNewWorkflowExecutionDecisionAttributes(v *ContinueAsNewWorkflowExecutionDecisionAttributes) *Decision { + s.ContinueAsNewWorkflowExecutionDecisionAttributes = v + return s +} + +// SetDecisionType sets the DecisionType field's value. +func (s *Decision) SetDecisionType(v string) *Decision { + s.DecisionType = &v + return s +} + +// SetFailWorkflowExecutionDecisionAttributes sets the FailWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetFailWorkflowExecutionDecisionAttributes(v *FailWorkflowExecutionDecisionAttributes) *Decision { + s.FailWorkflowExecutionDecisionAttributes = v + return s +} + +// SetRecordMarkerDecisionAttributes sets the RecordMarkerDecisionAttributes field's value. +func (s *Decision) SetRecordMarkerDecisionAttributes(v *RecordMarkerDecisionAttributes) *Decision { + s.RecordMarkerDecisionAttributes = v + return s +} + +// SetRequestCancelActivityTaskDecisionAttributes sets the RequestCancelActivityTaskDecisionAttributes field's value. +func (s *Decision) SetRequestCancelActivityTaskDecisionAttributes(v *RequestCancelActivityTaskDecisionAttributes) *Decision { + s.RequestCancelActivityTaskDecisionAttributes = v + return s +} + +// SetRequestCancelExternalWorkflowExecutionDecisionAttributes sets the RequestCancelExternalWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetRequestCancelExternalWorkflowExecutionDecisionAttributes(v *RequestCancelExternalWorkflowExecutionDecisionAttributes) *Decision { + s.RequestCancelExternalWorkflowExecutionDecisionAttributes = v + return s +} + +// SetScheduleActivityTaskDecisionAttributes sets the ScheduleActivityTaskDecisionAttributes field's value. +func (s *Decision) SetScheduleActivityTaskDecisionAttributes(v *ScheduleActivityTaskDecisionAttributes) *Decision { + s.ScheduleActivityTaskDecisionAttributes = v + return s +} + +// SetScheduleLambdaFunctionDecisionAttributes sets the ScheduleLambdaFunctionDecisionAttributes field's value. +func (s *Decision) SetScheduleLambdaFunctionDecisionAttributes(v *ScheduleLambdaFunctionDecisionAttributes) *Decision { + s.ScheduleLambdaFunctionDecisionAttributes = v + return s +} + +// SetSignalExternalWorkflowExecutionDecisionAttributes sets the SignalExternalWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetSignalExternalWorkflowExecutionDecisionAttributes(v *SignalExternalWorkflowExecutionDecisionAttributes) *Decision { + s.SignalExternalWorkflowExecutionDecisionAttributes = v + return s +} + +// SetStartChildWorkflowExecutionDecisionAttributes sets the StartChildWorkflowExecutionDecisionAttributes field's value. +func (s *Decision) SetStartChildWorkflowExecutionDecisionAttributes(v *StartChildWorkflowExecutionDecisionAttributes) *Decision { + s.StartChildWorkflowExecutionDecisionAttributes = v + return s +} + +// SetStartTimerDecisionAttributes sets the StartTimerDecisionAttributes field's value. +func (s *Decision) SetStartTimerDecisionAttributes(v *StartTimerDecisionAttributes) *Decision { + s.StartTimerDecisionAttributes = v + return s +} + +// Provides the details of the DecisionTaskCompleted event. +type DecisionTaskCompletedEventAttributes struct { + _ struct{} `type:"structure"` + + // User defined context for the workflow execution. + ExecutionContext *string `locationName:"executionContext" type:"string"` + + // The ID of the DecisionTaskScheduled event that was recorded when this decision + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the DecisionTaskStarted event recorded when this decision task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s DecisionTaskCompletedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecisionTaskCompletedEventAttributes) GoString() string { + return s.String() +} + +// SetExecutionContext sets the ExecutionContext field's value. +func (s *DecisionTaskCompletedEventAttributes) SetExecutionContext(v string) *DecisionTaskCompletedEventAttributes { + s.ExecutionContext = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *DecisionTaskCompletedEventAttributes) SetScheduledEventId(v int64) *DecisionTaskCompletedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *DecisionTaskCompletedEventAttributes) SetStartedEventId(v int64) *DecisionTaskCompletedEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides details about the DecisionTaskScheduled event. +type DecisionTaskScheduledEventAttributes struct { + _ struct{} `type:"structure"` + + // The maximum duration for this decision task. The task is considered timed + // out if it doesn't completed within this duration. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` + + // The name of the task list in which the decision task was scheduled. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // A task priority that, if set, specifies the priority for this decision task. + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` +} + +// String returns the string representation +func (s DecisionTaskScheduledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecisionTaskScheduledEventAttributes) GoString() string { + return s.String() +} + +// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. +func (s *DecisionTaskScheduledEventAttributes) SetStartToCloseTimeout(v string) *DecisionTaskScheduledEventAttributes { + s.StartToCloseTimeout = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *DecisionTaskScheduledEventAttributes) SetTaskList(v *TaskList) *DecisionTaskScheduledEventAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *DecisionTaskScheduledEventAttributes) SetTaskPriority(v string) *DecisionTaskScheduledEventAttributes { + s.TaskPriority = &v + return s +} + +// Provides the details of the DecisionTaskStarted event. +type DecisionTaskStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // Identity of the decider making the request. This enables diagnostic tracing + // when problems arise. The form of this identity is user defined. + Identity *string `locationName:"identity" type:"string"` + + // The ID of the DecisionTaskScheduled event that was recorded when this decision + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s DecisionTaskStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecisionTaskStartedEventAttributes) GoString() string { + return s.String() +} + +// SetIdentity sets the Identity field's value. +func (s *DecisionTaskStartedEventAttributes) SetIdentity(v string) *DecisionTaskStartedEventAttributes { + s.Identity = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *DecisionTaskStartedEventAttributes) SetScheduledEventId(v int64) *DecisionTaskStartedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// Provides the details of the DecisionTaskTimedOut event. +type DecisionTaskTimedOutEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskScheduled event that was recorded when this decision + // task was scheduled. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the DecisionTaskStarted event recorded when this decision task + // was started. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The type of timeout that expired before the decision task could be completed. + // + // TimeoutType is a required field + TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"DecisionTaskTimeoutType"` +} + +// String returns the string representation +func (s DecisionTaskTimedOutEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecisionTaskTimedOutEventAttributes) GoString() string { + return s.String() +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *DecisionTaskTimedOutEventAttributes) SetScheduledEventId(v int64) *DecisionTaskTimedOutEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *DecisionTaskTimedOutEventAttributes) SetStartedEventId(v int64) *DecisionTaskTimedOutEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimeoutType sets the TimeoutType field's value. +func (s *DecisionTaskTimedOutEventAttributes) SetTimeoutType(v string) *DecisionTaskTimedOutEventAttributes { + s.TimeoutType = &v + return s +} + +type DeprecateActivityTypeInput struct { + _ struct{} `type:"structure"` + + // The activity type to deprecate. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // The name of the domain in which the activity type is registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeprecateActivityTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateActivityTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeprecateActivityTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprecateActivityTypeInput"} + if s.ActivityType == nil { + invalidParams.Add(request.NewErrParamRequired("ActivityType")) + } + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.ActivityType != nil { + if err := s.ActivityType.Validate(); err != nil { + invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivityType sets the ActivityType field's value. +func (s *DeprecateActivityTypeInput) SetActivityType(v *ActivityType) *DeprecateActivityTypeInput { + s.ActivityType = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *DeprecateActivityTypeInput) SetDomain(v string) *DeprecateActivityTypeInput { + s.Domain = &v + return s +} + +type DeprecateActivityTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeprecateActivityTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateActivityTypeOutput) GoString() string { + return s.String() +} + +type DeprecateDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain to deprecate. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeprecateDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeprecateDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprecateDomainInput"} + 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 +} + +// SetName sets the Name field's value. +func (s *DeprecateDomainInput) SetName(v string) *DeprecateDomainInput { + s.Name = &v + return s +} + +type DeprecateDomainOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeprecateDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateDomainOutput) GoString() string { + return s.String() +} + +type DeprecateWorkflowTypeInput struct { + _ struct{} `type:"structure"` + + // The name of the domain in which the workflow type is registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The workflow type to deprecate. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeprecateWorkflowTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateWorkflowTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeprecateWorkflowTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprecateWorkflowTypeInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.WorkflowType == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowType")) + } + if s.WorkflowType != nil { + if err := s.WorkflowType.Validate(); err != nil { + invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *DeprecateWorkflowTypeInput) SetDomain(v string) *DeprecateWorkflowTypeInput { + s.Domain = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *DeprecateWorkflowTypeInput) SetWorkflowType(v *WorkflowType) *DeprecateWorkflowTypeInput { + s.WorkflowType = v + return s +} + +type DeprecateWorkflowTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeprecateWorkflowTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprecateWorkflowTypeOutput) GoString() string { + return s.String() +} + +type DescribeActivityTypeInput struct { + _ struct{} `type:"structure"` + + // The activity type to get information about. Activity types are identified + // by the name and version that were supplied when the activity was registered. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // The name of the domain in which the activity type is registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeActivityTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeActivityTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeActivityTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeActivityTypeInput"} + if s.ActivityType == nil { + invalidParams.Add(request.NewErrParamRequired("ActivityType")) + } + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.ActivityType != nil { + if err := s.ActivityType.Validate(); err != nil { + invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivityType sets the ActivityType field's value. +func (s *DescribeActivityTypeInput) SetActivityType(v *ActivityType) *DescribeActivityTypeInput { + s.ActivityType = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *DescribeActivityTypeInput) SetDomain(v string) *DescribeActivityTypeInput { + s.Domain = &v + return s +} + +// Detailed information about an activity type. +type DescribeActivityTypeOutput struct { + _ struct{} `type:"structure"` + + // The configuration settings registered with the activity type. + // + // Configuration is a required field + Configuration *ActivityTypeConfiguration `locationName:"configuration" type:"structure" required:"true"` + + // General information about the activity type. + // + // The status of activity type (returned in the ActivityTypeInfo structure) + // can be one of the following. + // + // * REGISTERED – The type is registered and available. Workers supporting + // this type should be running. + // + // * DEPRECATED – The type was deprecated using DeprecateActivityType, but + // is still in use. You should keep workers supporting this type running. + // You cannot create new tasks of this type. + // + // TypeInfo is a required field + TypeInfo *ActivityTypeInfo `locationName:"typeInfo" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeActivityTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeActivityTypeOutput) GoString() string { + return s.String() +} + +// SetConfiguration sets the Configuration field's value. +func (s *DescribeActivityTypeOutput) SetConfiguration(v *ActivityTypeConfiguration) *DescribeActivityTypeOutput { + s.Configuration = v + return s +} + +// SetTypeInfo sets the TypeInfo field's value. +func (s *DescribeActivityTypeOutput) SetTypeInfo(v *ActivityTypeInfo) *DescribeActivityTypeOutput { + s.TypeInfo = v + return s +} + +type DescribeDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain to describe. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDomainInput"} + 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 +} + +// SetName sets the Name field's value. +func (s *DescribeDomainInput) SetName(v string) *DescribeDomainInput { + s.Name = &v + return s +} + +// Contains details of a domain. +type DescribeDomainOutput struct { + _ struct{} `type:"structure"` + + // The domain configuration. Currently, this includes only the domain's retention + // period. + // + // Configuration is a required field + Configuration *DomainConfiguration `locationName:"configuration" type:"structure" required:"true"` + + // The basic information about a domain, such as its name, status, and description. + // + // DomainInfo is a required field + DomainInfo *DomainInfo `locationName:"domainInfo" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDomainOutput) GoString() string { + return s.String() +} + +// SetConfiguration sets the Configuration field's value. +func (s *DescribeDomainOutput) SetConfiguration(v *DomainConfiguration) *DescribeDomainOutput { + s.Configuration = v + return s +} + +// SetDomainInfo sets the DomainInfo field's value. +func (s *DescribeDomainOutput) SetDomainInfo(v *DomainInfo) *DescribeDomainOutput { + s.DomainInfo = v + return s +} + +type DescribeWorkflowExecutionInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the workflow execution. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The workflow execution to describe. + // + // Execution is a required field + Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkflowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkflowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkflowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkflowExecutionInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.Execution == nil { + invalidParams.Add(request.NewErrParamRequired("Execution")) + } + if s.Execution != nil { + if err := s.Execution.Validate(); err != nil { + invalidParams.AddNested("Execution", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *DescribeWorkflowExecutionInput) SetDomain(v string) *DescribeWorkflowExecutionInput { + s.Domain = &v + return s +} + +// SetExecution sets the Execution field's value. +func (s *DescribeWorkflowExecutionInput) SetExecution(v *WorkflowExecution) *DescribeWorkflowExecutionInput { + s.Execution = v + return s +} + +// Contains details about a workflow execution. +type DescribeWorkflowExecutionOutput struct { + _ struct{} `type:"structure"` + + // The configuration settings for this workflow execution including timeout + // values, tasklist etc. + // + // ExecutionConfiguration is a required field + ExecutionConfiguration *WorkflowExecutionConfiguration `locationName:"executionConfiguration" type:"structure" required:"true"` + + // Information about the workflow execution. + // + // ExecutionInfo is a required field + ExecutionInfo *WorkflowExecutionInfo `locationName:"executionInfo" type:"structure" required:"true"` + + // The time when the last activity task was scheduled for this workflow execution. + // You can use this information to determine if the workflow has not made progress + // for an unusually long period of time and might require a corrective action. + LatestActivityTaskTimestamp *time.Time `locationName:"latestActivityTaskTimestamp" type:"timestamp"` + + // The latest executionContext provided by the decider for this workflow execution. + // A decider can provide an executionContext (a free-form string) when closing + // a decision task using RespondDecisionTaskCompleted. + LatestExecutionContext *string `locationName:"latestExecutionContext" type:"string"` + + // The number of tasks for this workflow execution. This includes open and closed + // tasks of all types. + // + // OpenCounts is a required field + OpenCounts *WorkflowExecutionOpenCounts `locationName:"openCounts" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkflowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkflowExecutionOutput) GoString() string { + return s.String() +} + +// SetExecutionConfiguration sets the ExecutionConfiguration field's value. +func (s *DescribeWorkflowExecutionOutput) SetExecutionConfiguration(v *WorkflowExecutionConfiguration) *DescribeWorkflowExecutionOutput { + s.ExecutionConfiguration = v + return s +} + +// SetExecutionInfo sets the ExecutionInfo field's value. +func (s *DescribeWorkflowExecutionOutput) SetExecutionInfo(v *WorkflowExecutionInfo) *DescribeWorkflowExecutionOutput { + s.ExecutionInfo = v + return s +} + +// SetLatestActivityTaskTimestamp sets the LatestActivityTaskTimestamp field's value. +func (s *DescribeWorkflowExecutionOutput) SetLatestActivityTaskTimestamp(v time.Time) *DescribeWorkflowExecutionOutput { + s.LatestActivityTaskTimestamp = &v + return s +} + +// SetLatestExecutionContext sets the LatestExecutionContext field's value. +func (s *DescribeWorkflowExecutionOutput) SetLatestExecutionContext(v string) *DescribeWorkflowExecutionOutput { + s.LatestExecutionContext = &v + return s +} + +// SetOpenCounts sets the OpenCounts field's value. +func (s *DescribeWorkflowExecutionOutput) SetOpenCounts(v *WorkflowExecutionOpenCounts) *DescribeWorkflowExecutionOutput { + s.OpenCounts = v + return s +} + +type DescribeWorkflowTypeInput struct { + _ struct{} `type:"structure"` + + // The name of the domain in which this workflow type is registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The workflow type to describe. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkflowTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkflowTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkflowTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkflowTypeInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.WorkflowType == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowType")) + } + if s.WorkflowType != nil { + if err := s.WorkflowType.Validate(); err != nil { + invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *DescribeWorkflowTypeInput) SetDomain(v string) *DescribeWorkflowTypeInput { + s.Domain = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *DescribeWorkflowTypeInput) SetWorkflowType(v *WorkflowType) *DescribeWorkflowTypeInput { + s.WorkflowType = v + return s +} + +// Contains details about a workflow type. +type DescribeWorkflowTypeOutput struct { + _ struct{} `type:"structure"` + + // Configuration settings of the workflow type registered through RegisterWorkflowType + // + // Configuration is a required field + Configuration *WorkflowTypeConfiguration `locationName:"configuration" type:"structure" required:"true"` + + // General information about the workflow type. + // + // The status of the workflow type (returned in the WorkflowTypeInfo structure) + // can be one of the following. + // + // * REGISTERED – The type is registered and available. Workers supporting + // this type should be running. + // + // * DEPRECATED – The type was deprecated using DeprecateWorkflowType, but + // is still in use. You should keep workers supporting this type running. + // You cannot create new workflow executions of this type. + // + // TypeInfo is a required field + TypeInfo *WorkflowTypeInfo `locationName:"typeInfo" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkflowTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkflowTypeOutput) GoString() string { + return s.String() +} + +// SetConfiguration sets the Configuration field's value. +func (s *DescribeWorkflowTypeOutput) SetConfiguration(v *WorkflowTypeConfiguration) *DescribeWorkflowTypeOutput { + s.Configuration = v + return s +} + +// SetTypeInfo sets the TypeInfo field's value. +func (s *DescribeWorkflowTypeOutput) SetTypeInfo(v *WorkflowTypeInfo) *DescribeWorkflowTypeOutput { + s.TypeInfo = v + return s +} + +// Contains the configuration settings of a domain. +type DomainConfiguration struct { + _ struct{} `type:"structure"` + + // The retention period for workflow executions in this domain. + // + // WorkflowExecutionRetentionPeriodInDays is a required field + WorkflowExecutionRetentionPeriodInDays *string `locationName:"workflowExecutionRetentionPeriodInDays" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DomainConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainConfiguration) GoString() string { + return s.String() +} + +// SetWorkflowExecutionRetentionPeriodInDays sets the WorkflowExecutionRetentionPeriodInDays field's value. +func (s *DomainConfiguration) SetWorkflowExecutionRetentionPeriodInDays(v string) *DomainConfiguration { + s.WorkflowExecutionRetentionPeriodInDays = &v + return s +} + +// Contains general information about a domain. +type DomainInfo struct { + _ struct{} `type:"structure"` + + // The description of the domain provided through RegisterDomain. + Description *string `locationName:"description" type:"string"` + + // The name of the domain. This name is unique within the account. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The status of the domain: + // + // * REGISTERED – The domain is properly registered and available. You can + // use this domain for registering types and creating new workflow executions. + // + // + // * DEPRECATED – The domain was deprecated using DeprecateDomain, but is + // still in use. You should not create new workflow executions in this domain. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` +} + +// String returns the string representation +func (s DomainInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainInfo) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *DomainInfo) SetDescription(v string) *DomainInfo { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *DomainInfo) SetName(v string) *DomainInfo { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DomainInfo) SetStatus(v string) *DomainInfo { + s.Status = &v + return s +} + +// Used to filter the workflow executions in visibility APIs by various time-based +// rules. Each parameter, if specified, defines a rule that must be satisfied +// by each returned query result. The parameter values are in the Unix Time +// format (https://en.wikipedia.org/wiki/Unix_time). For example: "oldestDate": +// 1325376070. +type ExecutionTimeFilter struct { + _ struct{} `type:"structure"` + + // Specifies the latest start or close date and time to return. + LatestDate *time.Time `locationName:"latestDate" type:"timestamp"` + + // Specifies the oldest start or close date and time to return. + // + // OldestDate is a required field + OldestDate *time.Time `locationName:"oldestDate" type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s ExecutionTimeFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecutionTimeFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecutionTimeFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecutionTimeFilter"} + if s.OldestDate == nil { + invalidParams.Add(request.NewErrParamRequired("OldestDate")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLatestDate sets the LatestDate field's value. +func (s *ExecutionTimeFilter) SetLatestDate(v time.Time) *ExecutionTimeFilter { + s.LatestDate = &v + return s +} + +// SetOldestDate sets the OldestDate field's value. +func (s *ExecutionTimeFilter) SetOldestDate(v time.Time) *ExecutionTimeFilter { + s.OldestDate = &v + return s +} + +// Provides the details of the ExternalWorkflowExecutionCancelRequested event. +type ExternalWorkflowExecutionCancelRequestedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding + // to the RequestCancelExternalWorkflowExecution decision to cancel this external + // workflow execution. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The external workflow execution to which the cancellation request was delivered. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ExternalWorkflowExecutionCancelRequestedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExternalWorkflowExecutionCancelRequestedEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ExternalWorkflowExecutionCancelRequestedEventAttributes) SetInitiatedEventId(v int64) *ExternalWorkflowExecutionCancelRequestedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ExternalWorkflowExecutionCancelRequestedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ExternalWorkflowExecutionCancelRequestedEventAttributes { + s.WorkflowExecution = v + return s +} + +// Provides the details of the ExternalWorkflowExecutionSignaled event. +type ExternalWorkflowExecutionSignaledEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding + // to the SignalExternalWorkflowExecution decision to request this signal. This + // information can be useful for diagnosing problems by tracing back the chain + // of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The external workflow execution that the signal was delivered to. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ExternalWorkflowExecutionSignaledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExternalWorkflowExecutionSignaledEventAttributes) GoString() string { + return s.String() +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *ExternalWorkflowExecutionSignaledEventAttributes) SetInitiatedEventId(v int64) *ExternalWorkflowExecutionSignaledEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *ExternalWorkflowExecutionSignaledEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ExternalWorkflowExecutionSignaledEventAttributes { + s.WorkflowExecution = v + return s +} + +// Provides the details of the FailWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type FailWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // Details of the failure. + Details *string `locationName:"details" type:"string"` + + // A descriptive reason for the failure that may help in diagnostics. + Reason *string `locationName:"reason" type:"string"` +} + +// String returns the string representation +func (s FailWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *FailWorkflowExecutionDecisionAttributes) SetDetails(v string) *FailWorkflowExecutionDecisionAttributes { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *FailWorkflowExecutionDecisionAttributes) SetReason(v string) *FailWorkflowExecutionDecisionAttributes { + s.Reason = &v + return s +} + +// Provides the details of the FailWorkflowExecutionFailed event. +type FailWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"FailWorkflowExecutionFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the FailWorkflowExecution decision to fail this execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s FailWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *FailWorkflowExecutionFailedEventAttributes) SetCause(v string) *FailWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *FailWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *FailWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +type GetWorkflowExecutionHistoryInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the workflow execution. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // Specifies the workflow execution for which to return the history. + // + // Execution is a required field + Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // When set to true, returns the events in reverse order. By default the results + // are returned in ascending order of the eventTimeStamp of the events. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` +} + +// String returns the string representation +func (s GetWorkflowExecutionHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetWorkflowExecutionHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetWorkflowExecutionHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetWorkflowExecutionHistoryInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.Execution == nil { + invalidParams.Add(request.NewErrParamRequired("Execution")) + } + if s.Execution != nil { + if err := s.Execution.Validate(); err != nil { + invalidParams.AddNested("Execution", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *GetWorkflowExecutionHistoryInput) SetDomain(v string) *GetWorkflowExecutionHistoryInput { + s.Domain = &v + return s +} + +// SetExecution sets the Execution field's value. +func (s *GetWorkflowExecutionHistoryInput) SetExecution(v *WorkflowExecution) *GetWorkflowExecutionHistoryInput { + s.Execution = v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *GetWorkflowExecutionHistoryInput) SetMaximumPageSize(v int64) *GetWorkflowExecutionHistoryInput { + s.MaximumPageSize = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetWorkflowExecutionHistoryInput) SetNextPageToken(v string) *GetWorkflowExecutionHistoryInput { + s.NextPageToken = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *GetWorkflowExecutionHistoryInput) SetReverseOrder(v bool) *GetWorkflowExecutionHistoryInput { + s.ReverseOrder = &v + return s +} + +// Paginated representation of a workflow history for a workflow execution. +// This is the up to date, complete and authoritative record of the events related +// to all tasks and events in the life of the workflow execution. +type GetWorkflowExecutionHistoryOutput struct { + _ struct{} `type:"structure"` + + // The list of history events. + // + // Events is a required field + Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetWorkflowExecutionHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetWorkflowExecutionHistoryOutput) GoString() string { + return s.String() +} + +// SetEvents sets the Events field's value. +func (s *GetWorkflowExecutionHistoryOutput) SetEvents(v []*HistoryEvent) *GetWorkflowExecutionHistoryOutput { + s.Events = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetWorkflowExecutionHistoryOutput) SetNextPageToken(v string) *GetWorkflowExecutionHistoryOutput { + s.NextPageToken = &v + return s +} + +// Event within a workflow execution. A history event can be one of these types: +// +// * ActivityTaskCancelRequested – A RequestCancelActivityTask decision was +// received by the system. +// +// * ActivityTaskCanceled – The activity task was successfully canceled. +// +// * ActivityTaskCompleted – An activity worker successfully completed an +// activity task by calling RespondActivityTaskCompleted. +// +// * ActivityTaskFailed – An activity worker failed an activity task by calling +// RespondActivityTaskFailed. +// +// * ActivityTaskScheduled – An activity task was scheduled for execution. +// +// * ActivityTaskStarted – The scheduled activity task was dispatched to +// a worker. +// +// * ActivityTaskTimedOut – The activity task timed out. +// +// * CancelTimerFailed – Failed to process CancelTimer decision. This happens +// when the decision isn't configured properly, for example no timer exists +// with the specified timer Id. +// +// * CancelWorkflowExecutionFailed – A request to cancel a workflow execution +// failed. +// +// * ChildWorkflowExecutionCanceled – A child workflow execution, started +// by this workflow execution, was canceled and closed. +// +// * ChildWorkflowExecutionCompleted – A child workflow execution, started +// by this workflow execution, completed successfully and was closed. +// +// * ChildWorkflowExecutionFailed – A child workflow execution, started by +// this workflow execution, failed to complete successfully and was closed. +// +// * ChildWorkflowExecutionStarted – A child workflow execution was successfully +// started. +// +// * ChildWorkflowExecutionTerminated – A child workflow execution, started +// by this workflow execution, was terminated. +// +// * ChildWorkflowExecutionTimedOut – A child workflow execution, started +// by this workflow execution, timed out and was closed. +// +// * CompleteWorkflowExecutionFailed – The workflow execution failed to complete. +// +// * ContinueAsNewWorkflowExecutionFailed – The workflow execution failed +// to complete after being continued as a new workflow execution. +// +// * DecisionTaskCompleted – The decider successfully completed a decision +// task by calling RespondDecisionTaskCompleted. +// +// * DecisionTaskScheduled – A decision task was scheduled for the workflow +// execution. +// +// * DecisionTaskStarted – The decision task was dispatched to a decider. +// +// * DecisionTaskTimedOut – The decision task timed out. +// +// * ExternalWorkflowExecutionCancelRequested – Request to cancel an external +// workflow execution was successfully delivered to the target execution. +// +// * ExternalWorkflowExecutionSignaled – A signal, requested by this workflow +// execution, was successfully delivered to the target external workflow +// execution. +// +// * FailWorkflowExecutionFailed – A request to mark a workflow execution +// as failed, itself failed. +// +// * MarkerRecorded – A marker was recorded in the workflow history as the +// result of a RecordMarker decision. +// +// * RecordMarkerFailed – A RecordMarker decision was returned as failed. +// +// * RequestCancelActivityTaskFailed – Failed to process RequestCancelActivityTask +// decision. This happens when the decision isn't configured properly. +// +// * RequestCancelExternalWorkflowExecutionFailed – Request to cancel an +// external workflow execution failed. +// +// * RequestCancelExternalWorkflowExecutionInitiated – A request was made +// to request the cancellation of an external workflow execution. +// +// * ScheduleActivityTaskFailed – Failed to process ScheduleActivityTask +// decision. This happens when the decision isn't configured properly, for +// example the activity type specified isn't registered. +// +// * SignalExternalWorkflowExecutionFailed – The request to signal an external +// workflow execution failed. +// +// * SignalExternalWorkflowExecutionInitiated – A request to signal an external +// workflow was made. +// +// * StartActivityTaskFailed – A scheduled activity task failed to start. +// +// * StartChildWorkflowExecutionFailed – Failed to process StartChildWorkflowExecution +// decision. This happens when the decision isn't configured properly, for +// example the workflow type specified isn't registered. +// +// * StartChildWorkflowExecutionInitiated – A request was made to start a +// child workflow execution. +// +// * StartTimerFailed – Failed to process StartTimer decision. This happens +// when the decision isn't configured properly, for example a timer already +// exists with the specified timer Id. +// +// * TimerCanceled – A timer, previously started for this workflow execution, +// was successfully canceled. +// +// * TimerFired – A timer, previously started for this workflow execution, +// fired. +// +// * TimerStarted – A timer was started for the workflow execution due to +// a StartTimer decision. +// +// * WorkflowExecutionCancelRequested – A request to cancel this workflow +// execution was made. +// +// * WorkflowExecutionCanceled – The workflow execution was successfully +// canceled and closed. +// +// * WorkflowExecutionCompleted – The workflow execution was closed due to +// successful completion. +// +// * WorkflowExecutionContinuedAsNew – The workflow execution was closed +// and a new execution of the same type was created with the same workflowId. +// +// * WorkflowExecutionFailed – The workflow execution closed due to a failure. +// +// * WorkflowExecutionSignaled – An external signal was received for the +// workflow execution. +// +// * WorkflowExecutionStarted – The workflow execution was started. +// +// * WorkflowExecutionTerminated – The workflow execution was terminated. +// +// * WorkflowExecutionTimedOut – The workflow execution was closed because +// a time out was exceeded. +type HistoryEvent struct { + _ struct{} `type:"structure"` + + // If the event is of type ActivityTaskcancelRequested then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + ActivityTaskCancelRequestedEventAttributes *ActivityTaskCancelRequestedEventAttributes `locationName:"activityTaskCancelRequestedEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskCanceled then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + ActivityTaskCanceledEventAttributes *ActivityTaskCanceledEventAttributes `locationName:"activityTaskCanceledEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskCompleted then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + ActivityTaskCompletedEventAttributes *ActivityTaskCompletedEventAttributes `locationName:"activityTaskCompletedEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskFailed then this member is set and provides + // detailed information about the event. It isn't set for other event types. + ActivityTaskFailedEventAttributes *ActivityTaskFailedEventAttributes `locationName:"activityTaskFailedEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskScheduled then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + ActivityTaskScheduledEventAttributes *ActivityTaskScheduledEventAttributes `locationName:"activityTaskScheduledEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskStarted then this member is set and provides + // detailed information about the event. It isn't set for other event types. + ActivityTaskStartedEventAttributes *ActivityTaskStartedEventAttributes `locationName:"activityTaskStartedEventAttributes" type:"structure"` + + // If the event is of type ActivityTaskTimedOut then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + ActivityTaskTimedOutEventAttributes *ActivityTaskTimedOutEventAttributes `locationName:"activityTaskTimedOutEventAttributes" type:"structure"` + + // If the event is of type CancelTimerFailed then this member is set and provides + // detailed information about the event. It isn't set for other event types. + CancelTimerFailedEventAttributes *CancelTimerFailedEventAttributes `locationName:"cancelTimerFailedEventAttributes" type:"structure"` + + // If the event is of type CancelWorkflowExecutionFailed then this member is + // set and provides detailed information about the event. It isn't set for other + // event types. + CancelWorkflowExecutionFailedEventAttributes *CancelWorkflowExecutionFailedEventAttributes `locationName:"cancelWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionCanceled then this member is + // set and provides detailed information about the event. It isn't set for other + // event types. + ChildWorkflowExecutionCanceledEventAttributes *ChildWorkflowExecutionCanceledEventAttributes `locationName:"childWorkflowExecutionCanceledEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionCompleted then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + ChildWorkflowExecutionCompletedEventAttributes *ChildWorkflowExecutionCompletedEventAttributes `locationName:"childWorkflowExecutionCompletedEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionFailed then this member is + // set and provides detailed information about the event. It isn't set for other + // event types. + ChildWorkflowExecutionFailedEventAttributes *ChildWorkflowExecutionFailedEventAttributes `locationName:"childWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionStarted then this member is + // set and provides detailed information about the event. It isn't set for other + // event types. + ChildWorkflowExecutionStartedEventAttributes *ChildWorkflowExecutionStartedEventAttributes `locationName:"childWorkflowExecutionStartedEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionTerminated then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + ChildWorkflowExecutionTerminatedEventAttributes *ChildWorkflowExecutionTerminatedEventAttributes `locationName:"childWorkflowExecutionTerminatedEventAttributes" type:"structure"` + + // If the event is of type ChildWorkflowExecutionTimedOut then this member is + // set and provides detailed information about the event. It isn't set for other + // event types. + ChildWorkflowExecutionTimedOutEventAttributes *ChildWorkflowExecutionTimedOutEventAttributes `locationName:"childWorkflowExecutionTimedOutEventAttributes" type:"structure"` + + // If the event is of type CompleteWorkflowExecutionFailed then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + CompleteWorkflowExecutionFailedEventAttributes *CompleteWorkflowExecutionFailedEventAttributes `locationName:"completeWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type ContinueAsNewWorkflowExecutionFailed then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + ContinueAsNewWorkflowExecutionFailedEventAttributes *ContinueAsNewWorkflowExecutionFailedEventAttributes `locationName:"continueAsNewWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type DecisionTaskCompleted then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + DecisionTaskCompletedEventAttributes *DecisionTaskCompletedEventAttributes `locationName:"decisionTaskCompletedEventAttributes" type:"structure"` + + // If the event is of type DecisionTaskScheduled then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + DecisionTaskScheduledEventAttributes *DecisionTaskScheduledEventAttributes `locationName:"decisionTaskScheduledEventAttributes" type:"structure"` + + // If the event is of type DecisionTaskStarted then this member is set and provides + // detailed information about the event. It isn't set for other event types. + DecisionTaskStartedEventAttributes *DecisionTaskStartedEventAttributes `locationName:"decisionTaskStartedEventAttributes" type:"structure"` + + // If the event is of type DecisionTaskTimedOut then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + DecisionTaskTimedOutEventAttributes *DecisionTaskTimedOutEventAttributes `locationName:"decisionTaskTimedOutEventAttributes" type:"structure"` + + // The system generated ID of the event. This ID uniquely identifies the event + // with in the workflow execution history. + // + // EventId is a required field + EventId *int64 `locationName:"eventId" type:"long" required:"true"` + + // The date and time when the event occurred. + // + // EventTimestamp is a required field + EventTimestamp *time.Time `locationName:"eventTimestamp" type:"timestamp" required:"true"` + + // The type of the history event. + // + // EventType is a required field + EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` + + // If the event is of type ExternalWorkflowExecutionCancelRequested then this + // member is set and provides detailed information about the event. It isn't + // set for other event types. + ExternalWorkflowExecutionCancelRequestedEventAttributes *ExternalWorkflowExecutionCancelRequestedEventAttributes `locationName:"externalWorkflowExecutionCancelRequestedEventAttributes" type:"structure"` + + // If the event is of type ExternalWorkflowExecutionSignaled then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + ExternalWorkflowExecutionSignaledEventAttributes *ExternalWorkflowExecutionSignaledEventAttributes `locationName:"externalWorkflowExecutionSignaledEventAttributes" type:"structure"` + + // If the event is of type FailWorkflowExecutionFailed then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + FailWorkflowExecutionFailedEventAttributes *FailWorkflowExecutionFailedEventAttributes `locationName:"failWorkflowExecutionFailedEventAttributes" type:"structure"` + + // Provides the details of the LambdaFunctionCompleted event. It isn't set for + // other event types. + LambdaFunctionCompletedEventAttributes *LambdaFunctionCompletedEventAttributes `locationName:"lambdaFunctionCompletedEventAttributes" type:"structure"` + + // Provides the details of the LambdaFunctionFailed event. It isn't set for + // other event types. + LambdaFunctionFailedEventAttributes *LambdaFunctionFailedEventAttributes `locationName:"lambdaFunctionFailedEventAttributes" type:"structure"` + + // Provides the details of the LambdaFunctionScheduled event. It isn't set for + // other event types. + LambdaFunctionScheduledEventAttributes *LambdaFunctionScheduledEventAttributes `locationName:"lambdaFunctionScheduledEventAttributes" type:"structure"` + + // Provides the details of the LambdaFunctionStarted event. It isn't set for + // other event types. + LambdaFunctionStartedEventAttributes *LambdaFunctionStartedEventAttributes `locationName:"lambdaFunctionStartedEventAttributes" type:"structure"` + + // Provides the details of the LambdaFunctionTimedOut event. It isn't set for + // other event types. + LambdaFunctionTimedOutEventAttributes *LambdaFunctionTimedOutEventAttributes `locationName:"lambdaFunctionTimedOutEventAttributes" type:"structure"` + + // If the event is of type MarkerRecorded then this member is set and provides + // detailed information about the event. It isn't set for other event types. + MarkerRecordedEventAttributes *MarkerRecordedEventAttributes `locationName:"markerRecordedEventAttributes" type:"structure"` + + // If the event is of type DecisionTaskFailed then this member is set and provides + // detailed information about the event. It isn't set for other event types. + RecordMarkerFailedEventAttributes *RecordMarkerFailedEventAttributes `locationName:"recordMarkerFailedEventAttributes" type:"structure"` + + // If the event is of type RequestCancelActivityTaskFailed then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + RequestCancelActivityTaskFailedEventAttributes *RequestCancelActivityTaskFailedEventAttributes `locationName:"requestCancelActivityTaskFailedEventAttributes" type:"structure"` + + // If the event is of type RequestCancelExternalWorkflowExecutionFailed then + // this member is set and provides detailed information about the event. It + // isn't set for other event types. + RequestCancelExternalWorkflowExecutionFailedEventAttributes *RequestCancelExternalWorkflowExecutionFailedEventAttributes `locationName:"requestCancelExternalWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type RequestCancelExternalWorkflowExecutionInitiated then + // this member is set and provides detailed information about the event. It + // isn't set for other event types. + RequestCancelExternalWorkflowExecutionInitiatedEventAttributes *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes `locationName:"requestCancelExternalWorkflowExecutionInitiatedEventAttributes" type:"structure"` + + // If the event is of type ScheduleActivityTaskFailed then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + ScheduleActivityTaskFailedEventAttributes *ScheduleActivityTaskFailedEventAttributes `locationName:"scheduleActivityTaskFailedEventAttributes" type:"structure"` + + // Provides the details of the ScheduleLambdaFunctionFailed event. It isn't + // set for other event types. + ScheduleLambdaFunctionFailedEventAttributes *ScheduleLambdaFunctionFailedEventAttributes `locationName:"scheduleLambdaFunctionFailedEventAttributes" type:"structure"` + + // If the event is of type SignalExternalWorkflowExecutionFailed then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + SignalExternalWorkflowExecutionFailedEventAttributes *SignalExternalWorkflowExecutionFailedEventAttributes `locationName:"signalExternalWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type SignalExternalWorkflowExecutionInitiated then this + // member is set and provides detailed information about the event. It isn't + // set for other event types. + SignalExternalWorkflowExecutionInitiatedEventAttributes *SignalExternalWorkflowExecutionInitiatedEventAttributes `locationName:"signalExternalWorkflowExecutionInitiatedEventAttributes" type:"structure"` + + // If the event is of type StartChildWorkflowExecutionFailed then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + StartChildWorkflowExecutionFailedEventAttributes *StartChildWorkflowExecutionFailedEventAttributes `locationName:"startChildWorkflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type StartChildWorkflowExecutionInitiated then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + StartChildWorkflowExecutionInitiatedEventAttributes *StartChildWorkflowExecutionInitiatedEventAttributes `locationName:"startChildWorkflowExecutionInitiatedEventAttributes" type:"structure"` + + // Provides the details of the StartLambdaFunctionFailed event. It isn't set + // for other event types. + StartLambdaFunctionFailedEventAttributes *StartLambdaFunctionFailedEventAttributes `locationName:"startLambdaFunctionFailedEventAttributes" type:"structure"` + + // If the event is of type StartTimerFailed then this member is set and provides + // detailed information about the event. It isn't set for other event types. + StartTimerFailedEventAttributes *StartTimerFailedEventAttributes `locationName:"startTimerFailedEventAttributes" type:"structure"` + + // If the event is of type TimerCanceled then this member is set and provides + // detailed information about the event. It isn't set for other event types. + TimerCanceledEventAttributes *TimerCanceledEventAttributes `locationName:"timerCanceledEventAttributes" type:"structure"` + + // If the event is of type TimerFired then this member is set and provides detailed + // information about the event. It isn't set for other event types. + TimerFiredEventAttributes *TimerFiredEventAttributes `locationName:"timerFiredEventAttributes" type:"structure"` + + // If the event is of type TimerStarted then this member is set and provides + // detailed information about the event. It isn't set for other event types. + TimerStartedEventAttributes *TimerStartedEventAttributes `locationName:"timerStartedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionCancelRequested then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + WorkflowExecutionCancelRequestedEventAttributes *WorkflowExecutionCancelRequestedEventAttributes `locationName:"workflowExecutionCancelRequestedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionCanceled then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionCanceledEventAttributes *WorkflowExecutionCanceledEventAttributes `locationName:"workflowExecutionCanceledEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionCompleted then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionCompletedEventAttributes *WorkflowExecutionCompletedEventAttributes `locationName:"workflowExecutionCompletedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionContinuedAsNew then this member + // is set and provides detailed information about the event. It isn't set for + // other event types. + WorkflowExecutionContinuedAsNewEventAttributes *WorkflowExecutionContinuedAsNewEventAttributes `locationName:"workflowExecutionContinuedAsNewEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionFailed then this member is set and + // provides detailed information about the event. It isn't set for other event + // types. + WorkflowExecutionFailedEventAttributes *WorkflowExecutionFailedEventAttributes `locationName:"workflowExecutionFailedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionSignaled then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionSignaledEventAttributes *WorkflowExecutionSignaledEventAttributes `locationName:"workflowExecutionSignaledEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionStarted then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionStartedEventAttributes *WorkflowExecutionStartedEventAttributes `locationName:"workflowExecutionStartedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionTerminated then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionTerminatedEventAttributes *WorkflowExecutionTerminatedEventAttributes `locationName:"workflowExecutionTerminatedEventAttributes" type:"structure"` + + // If the event is of type WorkflowExecutionTimedOut then this member is set + // and provides detailed information about the event. It isn't set for other + // event types. + WorkflowExecutionTimedOutEventAttributes *WorkflowExecutionTimedOutEventAttributes `locationName:"workflowExecutionTimedOutEventAttributes" type:"structure"` +} + +// String returns the string representation +func (s HistoryEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HistoryEvent) GoString() string { + return s.String() +} + +// SetActivityTaskCancelRequestedEventAttributes sets the ActivityTaskCancelRequestedEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskCancelRequestedEventAttributes(v *ActivityTaskCancelRequestedEventAttributes) *HistoryEvent { + s.ActivityTaskCancelRequestedEventAttributes = v + return s +} + +// SetActivityTaskCanceledEventAttributes sets the ActivityTaskCanceledEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskCanceledEventAttributes(v *ActivityTaskCanceledEventAttributes) *HistoryEvent { + s.ActivityTaskCanceledEventAttributes = v + return s +} + +// SetActivityTaskCompletedEventAttributes sets the ActivityTaskCompletedEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskCompletedEventAttributes(v *ActivityTaskCompletedEventAttributes) *HistoryEvent { + s.ActivityTaskCompletedEventAttributes = v + return s +} + +// SetActivityTaskFailedEventAttributes sets the ActivityTaskFailedEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskFailedEventAttributes(v *ActivityTaskFailedEventAttributes) *HistoryEvent { + s.ActivityTaskFailedEventAttributes = v + return s +} + +// SetActivityTaskScheduledEventAttributes sets the ActivityTaskScheduledEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskScheduledEventAttributes(v *ActivityTaskScheduledEventAttributes) *HistoryEvent { + s.ActivityTaskScheduledEventAttributes = v + return s +} + +// SetActivityTaskStartedEventAttributes sets the ActivityTaskStartedEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskStartedEventAttributes(v *ActivityTaskStartedEventAttributes) *HistoryEvent { + s.ActivityTaskStartedEventAttributes = v + return s +} + +// SetActivityTaskTimedOutEventAttributes sets the ActivityTaskTimedOutEventAttributes field's value. +func (s *HistoryEvent) SetActivityTaskTimedOutEventAttributes(v *ActivityTaskTimedOutEventAttributes) *HistoryEvent { + s.ActivityTaskTimedOutEventAttributes = v + return s +} + +// SetCancelTimerFailedEventAttributes sets the CancelTimerFailedEventAttributes field's value. +func (s *HistoryEvent) SetCancelTimerFailedEventAttributes(v *CancelTimerFailedEventAttributes) *HistoryEvent { + s.CancelTimerFailedEventAttributes = v + return s +} + +// SetCancelWorkflowExecutionFailedEventAttributes sets the CancelWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetCancelWorkflowExecutionFailedEventAttributes(v *CancelWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.CancelWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetChildWorkflowExecutionCanceledEventAttributes sets the ChildWorkflowExecutionCanceledEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionCanceledEventAttributes(v *ChildWorkflowExecutionCanceledEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionCanceledEventAttributes = v + return s +} + +// SetChildWorkflowExecutionCompletedEventAttributes sets the ChildWorkflowExecutionCompletedEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionCompletedEventAttributes(v *ChildWorkflowExecutionCompletedEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionCompletedEventAttributes = v + return s +} + +// SetChildWorkflowExecutionFailedEventAttributes sets the ChildWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionFailedEventAttributes(v *ChildWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetChildWorkflowExecutionStartedEventAttributes sets the ChildWorkflowExecutionStartedEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionStartedEventAttributes(v *ChildWorkflowExecutionStartedEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionStartedEventAttributes = v + return s +} + +// SetChildWorkflowExecutionTerminatedEventAttributes sets the ChildWorkflowExecutionTerminatedEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionTerminatedEventAttributes(v *ChildWorkflowExecutionTerminatedEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionTerminatedEventAttributes = v + return s +} + +// SetChildWorkflowExecutionTimedOutEventAttributes sets the ChildWorkflowExecutionTimedOutEventAttributes field's value. +func (s *HistoryEvent) SetChildWorkflowExecutionTimedOutEventAttributes(v *ChildWorkflowExecutionTimedOutEventAttributes) *HistoryEvent { + s.ChildWorkflowExecutionTimedOutEventAttributes = v + return s +} + +// SetCompleteWorkflowExecutionFailedEventAttributes sets the CompleteWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetCompleteWorkflowExecutionFailedEventAttributes(v *CompleteWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.CompleteWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetContinueAsNewWorkflowExecutionFailedEventAttributes sets the ContinueAsNewWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetContinueAsNewWorkflowExecutionFailedEventAttributes(v *ContinueAsNewWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.ContinueAsNewWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetDecisionTaskCompletedEventAttributes sets the DecisionTaskCompletedEventAttributes field's value. +func (s *HistoryEvent) SetDecisionTaskCompletedEventAttributes(v *DecisionTaskCompletedEventAttributes) *HistoryEvent { + s.DecisionTaskCompletedEventAttributes = v + return s +} + +// SetDecisionTaskScheduledEventAttributes sets the DecisionTaskScheduledEventAttributes field's value. +func (s *HistoryEvent) SetDecisionTaskScheduledEventAttributes(v *DecisionTaskScheduledEventAttributes) *HistoryEvent { + s.DecisionTaskScheduledEventAttributes = v + return s +} + +// SetDecisionTaskStartedEventAttributes sets the DecisionTaskStartedEventAttributes field's value. +func (s *HistoryEvent) SetDecisionTaskStartedEventAttributes(v *DecisionTaskStartedEventAttributes) *HistoryEvent { + s.DecisionTaskStartedEventAttributes = v + return s +} + +// SetDecisionTaskTimedOutEventAttributes sets the DecisionTaskTimedOutEventAttributes field's value. +func (s *HistoryEvent) SetDecisionTaskTimedOutEventAttributes(v *DecisionTaskTimedOutEventAttributes) *HistoryEvent { + s.DecisionTaskTimedOutEventAttributes = v + return s +} + +// SetEventId sets the EventId field's value. +func (s *HistoryEvent) SetEventId(v int64) *HistoryEvent { + s.EventId = &v + return s +} + +// SetEventTimestamp sets the EventTimestamp field's value. +func (s *HistoryEvent) SetEventTimestamp(v time.Time) *HistoryEvent { + s.EventTimestamp = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *HistoryEvent) SetEventType(v string) *HistoryEvent { + s.EventType = &v + return s +} + +// SetExternalWorkflowExecutionCancelRequestedEventAttributes sets the ExternalWorkflowExecutionCancelRequestedEventAttributes field's value. +func (s *HistoryEvent) SetExternalWorkflowExecutionCancelRequestedEventAttributes(v *ExternalWorkflowExecutionCancelRequestedEventAttributes) *HistoryEvent { + s.ExternalWorkflowExecutionCancelRequestedEventAttributes = v + return s +} + +// SetExternalWorkflowExecutionSignaledEventAttributes sets the ExternalWorkflowExecutionSignaledEventAttributes field's value. +func (s *HistoryEvent) SetExternalWorkflowExecutionSignaledEventAttributes(v *ExternalWorkflowExecutionSignaledEventAttributes) *HistoryEvent { + s.ExternalWorkflowExecutionSignaledEventAttributes = v + return s +} + +// SetFailWorkflowExecutionFailedEventAttributes sets the FailWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetFailWorkflowExecutionFailedEventAttributes(v *FailWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.FailWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetLambdaFunctionCompletedEventAttributes sets the LambdaFunctionCompletedEventAttributes field's value. +func (s *HistoryEvent) SetLambdaFunctionCompletedEventAttributes(v *LambdaFunctionCompletedEventAttributes) *HistoryEvent { + s.LambdaFunctionCompletedEventAttributes = v + return s +} + +// SetLambdaFunctionFailedEventAttributes sets the LambdaFunctionFailedEventAttributes field's value. +func (s *HistoryEvent) SetLambdaFunctionFailedEventAttributes(v *LambdaFunctionFailedEventAttributes) *HistoryEvent { + s.LambdaFunctionFailedEventAttributes = v + return s +} + +// SetLambdaFunctionScheduledEventAttributes sets the LambdaFunctionScheduledEventAttributes field's value. +func (s *HistoryEvent) SetLambdaFunctionScheduledEventAttributes(v *LambdaFunctionScheduledEventAttributes) *HistoryEvent { + s.LambdaFunctionScheduledEventAttributes = v + return s +} + +// SetLambdaFunctionStartedEventAttributes sets the LambdaFunctionStartedEventAttributes field's value. +func (s *HistoryEvent) SetLambdaFunctionStartedEventAttributes(v *LambdaFunctionStartedEventAttributes) *HistoryEvent { + s.LambdaFunctionStartedEventAttributes = v + return s +} + +// SetLambdaFunctionTimedOutEventAttributes sets the LambdaFunctionTimedOutEventAttributes field's value. +func (s *HistoryEvent) SetLambdaFunctionTimedOutEventAttributes(v *LambdaFunctionTimedOutEventAttributes) *HistoryEvent { + s.LambdaFunctionTimedOutEventAttributes = v + return s +} + +// SetMarkerRecordedEventAttributes sets the MarkerRecordedEventAttributes field's value. +func (s *HistoryEvent) SetMarkerRecordedEventAttributes(v *MarkerRecordedEventAttributes) *HistoryEvent { + s.MarkerRecordedEventAttributes = v + return s +} + +// SetRecordMarkerFailedEventAttributes sets the RecordMarkerFailedEventAttributes field's value. +func (s *HistoryEvent) SetRecordMarkerFailedEventAttributes(v *RecordMarkerFailedEventAttributes) *HistoryEvent { + s.RecordMarkerFailedEventAttributes = v + return s +} + +// SetRequestCancelActivityTaskFailedEventAttributes sets the RequestCancelActivityTaskFailedEventAttributes field's value. +func (s *HistoryEvent) SetRequestCancelActivityTaskFailedEventAttributes(v *RequestCancelActivityTaskFailedEventAttributes) *HistoryEvent { + s.RequestCancelActivityTaskFailedEventAttributes = v + return s +} + +// SetRequestCancelExternalWorkflowExecutionFailedEventAttributes sets the RequestCancelExternalWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetRequestCancelExternalWorkflowExecutionFailedEventAttributes(v *RequestCancelExternalWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.RequestCancelExternalWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes sets the RequestCancelExternalWorkflowExecutionInitiatedEventAttributes field's value. +func (s *HistoryEvent) SetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes(v *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { + s.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = v + return s +} + +// SetScheduleActivityTaskFailedEventAttributes sets the ScheduleActivityTaskFailedEventAttributes field's value. +func (s *HistoryEvent) SetScheduleActivityTaskFailedEventAttributes(v *ScheduleActivityTaskFailedEventAttributes) *HistoryEvent { + s.ScheduleActivityTaskFailedEventAttributes = v + return s +} + +// SetScheduleLambdaFunctionFailedEventAttributes sets the ScheduleLambdaFunctionFailedEventAttributes field's value. +func (s *HistoryEvent) SetScheduleLambdaFunctionFailedEventAttributes(v *ScheduleLambdaFunctionFailedEventAttributes) *HistoryEvent { + s.ScheduleLambdaFunctionFailedEventAttributes = v + return s +} + +// SetSignalExternalWorkflowExecutionFailedEventAttributes sets the SignalExternalWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetSignalExternalWorkflowExecutionFailedEventAttributes(v *SignalExternalWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.SignalExternalWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetSignalExternalWorkflowExecutionInitiatedEventAttributes sets the SignalExternalWorkflowExecutionInitiatedEventAttributes field's value. +func (s *HistoryEvent) SetSignalExternalWorkflowExecutionInitiatedEventAttributes(v *SignalExternalWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { + s.SignalExternalWorkflowExecutionInitiatedEventAttributes = v + return s +} + +// SetStartChildWorkflowExecutionFailedEventAttributes sets the StartChildWorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetStartChildWorkflowExecutionFailedEventAttributes(v *StartChildWorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.StartChildWorkflowExecutionFailedEventAttributes = v + return s +} + +// SetStartChildWorkflowExecutionInitiatedEventAttributes sets the StartChildWorkflowExecutionInitiatedEventAttributes field's value. +func (s *HistoryEvent) SetStartChildWorkflowExecutionInitiatedEventAttributes(v *StartChildWorkflowExecutionInitiatedEventAttributes) *HistoryEvent { + s.StartChildWorkflowExecutionInitiatedEventAttributes = v + return s +} + +// SetStartLambdaFunctionFailedEventAttributes sets the StartLambdaFunctionFailedEventAttributes field's value. +func (s *HistoryEvent) SetStartLambdaFunctionFailedEventAttributes(v *StartLambdaFunctionFailedEventAttributes) *HistoryEvent { + s.StartLambdaFunctionFailedEventAttributes = v + return s +} + +// SetStartTimerFailedEventAttributes sets the StartTimerFailedEventAttributes field's value. +func (s *HistoryEvent) SetStartTimerFailedEventAttributes(v *StartTimerFailedEventAttributes) *HistoryEvent { + s.StartTimerFailedEventAttributes = v + return s +} + +// SetTimerCanceledEventAttributes sets the TimerCanceledEventAttributes field's value. +func (s *HistoryEvent) SetTimerCanceledEventAttributes(v *TimerCanceledEventAttributes) *HistoryEvent { + s.TimerCanceledEventAttributes = v + return s +} + +// SetTimerFiredEventAttributes sets the TimerFiredEventAttributes field's value. +func (s *HistoryEvent) SetTimerFiredEventAttributes(v *TimerFiredEventAttributes) *HistoryEvent { + s.TimerFiredEventAttributes = v + return s +} + +// SetTimerStartedEventAttributes sets the TimerStartedEventAttributes field's value. +func (s *HistoryEvent) SetTimerStartedEventAttributes(v *TimerStartedEventAttributes) *HistoryEvent { + s.TimerStartedEventAttributes = v + return s +} + +// SetWorkflowExecutionCancelRequestedEventAttributes sets the WorkflowExecutionCancelRequestedEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionCancelRequestedEventAttributes(v *WorkflowExecutionCancelRequestedEventAttributes) *HistoryEvent { + s.WorkflowExecutionCancelRequestedEventAttributes = v + return s +} + +// SetWorkflowExecutionCanceledEventAttributes sets the WorkflowExecutionCanceledEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionCanceledEventAttributes(v *WorkflowExecutionCanceledEventAttributes) *HistoryEvent { + s.WorkflowExecutionCanceledEventAttributes = v + return s +} + +// SetWorkflowExecutionCompletedEventAttributes sets the WorkflowExecutionCompletedEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionCompletedEventAttributes(v *WorkflowExecutionCompletedEventAttributes) *HistoryEvent { + s.WorkflowExecutionCompletedEventAttributes = v + return s +} + +// SetWorkflowExecutionContinuedAsNewEventAttributes sets the WorkflowExecutionContinuedAsNewEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionContinuedAsNewEventAttributes(v *WorkflowExecutionContinuedAsNewEventAttributes) *HistoryEvent { + s.WorkflowExecutionContinuedAsNewEventAttributes = v + return s +} + +// SetWorkflowExecutionFailedEventAttributes sets the WorkflowExecutionFailedEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionFailedEventAttributes(v *WorkflowExecutionFailedEventAttributes) *HistoryEvent { + s.WorkflowExecutionFailedEventAttributes = v + return s +} + +// SetWorkflowExecutionSignaledEventAttributes sets the WorkflowExecutionSignaledEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionSignaledEventAttributes(v *WorkflowExecutionSignaledEventAttributes) *HistoryEvent { + s.WorkflowExecutionSignaledEventAttributes = v + return s +} + +// SetWorkflowExecutionStartedEventAttributes sets the WorkflowExecutionStartedEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionStartedEventAttributes(v *WorkflowExecutionStartedEventAttributes) *HistoryEvent { + s.WorkflowExecutionStartedEventAttributes = v + return s +} + +// SetWorkflowExecutionTerminatedEventAttributes sets the WorkflowExecutionTerminatedEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionTerminatedEventAttributes(v *WorkflowExecutionTerminatedEventAttributes) *HistoryEvent { + s.WorkflowExecutionTerminatedEventAttributes = v + return s +} + +// SetWorkflowExecutionTimedOutEventAttributes sets the WorkflowExecutionTimedOutEventAttributes field's value. +func (s *HistoryEvent) SetWorkflowExecutionTimedOutEventAttributes(v *WorkflowExecutionTimedOutEventAttributes) *HistoryEvent { + s.WorkflowExecutionTimedOutEventAttributes = v + return s +} + +// Provides the details of the LambdaFunctionCompleted event. It isn't set for +// other event types. +type LambdaFunctionCompletedEventAttributes struct { + _ struct{} `type:"structure"` + + // The results of the Lambda task. + Result *string `locationName:"result" type:"string"` + + // The ID of the LambdaFunctionScheduled event that was recorded when this Lambda + // task was scheduled. To help diagnose issues, use this information to trace + // back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the LambdaFunctionStarted event recorded when this activity task + // started. To help diagnose issues, use this information to trace back the + // chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s LambdaFunctionCompletedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaFunctionCompletedEventAttributes) GoString() string { + return s.String() +} + +// SetResult sets the Result field's value. +func (s *LambdaFunctionCompletedEventAttributes) SetResult(v string) *LambdaFunctionCompletedEventAttributes { + s.Result = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *LambdaFunctionCompletedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionCompletedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *LambdaFunctionCompletedEventAttributes) SetStartedEventId(v int64) *LambdaFunctionCompletedEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides the details of the LambdaFunctionFailed event. It isn't set for +// other event types. +type LambdaFunctionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The details of the failure. + Details *string `locationName:"details" type:"string"` + + // The reason provided for the failure. + Reason *string `locationName:"reason" type:"string"` + + // The ID of the LambdaFunctionScheduled event that was recorded when this activity + // task was scheduled. To help diagnose issues, use this information to trace + // back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the LambdaFunctionStarted event recorded when this activity task + // started. To help diagnose issues, use this information to trace back the + // chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s LambdaFunctionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaFunctionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetDetails sets the Details field's value. +func (s *LambdaFunctionFailedEventAttributes) SetDetails(v string) *LambdaFunctionFailedEventAttributes { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *LambdaFunctionFailedEventAttributes) SetReason(v string) *LambdaFunctionFailedEventAttributes { + s.Reason = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *LambdaFunctionFailedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionFailedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *LambdaFunctionFailedEventAttributes) SetStartedEventId(v int64) *LambdaFunctionFailedEventAttributes { + s.StartedEventId = &v + return s +} + +// Provides the details of the LambdaFunctionScheduled event. It isn't set for +// other event types. +type LambdaFunctionScheduledEventAttributes struct { + _ struct{} `type:"structure"` + + // Data attached to the event that the decider can use in subsequent workflow + // tasks. This data isn't sent to the Lambda task. + Control *string `locationName:"control" type:"string"` + + // The ID of the LambdaFunctionCompleted event corresponding to the decision + // that resulted in scheduling this activity task. To help diagnose issues, + // use this information to trace back the chain of events leading up to this + // event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The unique ID of the Lambda task. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The input provided to the Lambda task. + Input *string `locationName:"input" type:"string"` + + // The name of the Lambda function. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The maximum amount of time a worker can take to process the Lambda task. + StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` +} + +// String returns the string representation +func (s LambdaFunctionScheduledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaFunctionScheduledEventAttributes) GoString() string { + return s.String() +} + +// SetControl sets the Control field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetControl(v string) *LambdaFunctionScheduledEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *LambdaFunctionScheduledEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetId sets the Id field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetId(v string) *LambdaFunctionScheduledEventAttributes { + s.Id = &v + return s +} + +// SetInput sets the Input field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetInput(v string) *LambdaFunctionScheduledEventAttributes { + s.Input = &v + return s +} + +// SetName sets the Name field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetName(v string) *LambdaFunctionScheduledEventAttributes { + s.Name = &v + return s +} + +// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. +func (s *LambdaFunctionScheduledEventAttributes) SetStartToCloseTimeout(v string) *LambdaFunctionScheduledEventAttributes { + s.StartToCloseTimeout = &v + return s +} + +// Provides the details of the LambdaFunctionStarted event. It isn't set for +// other event types. +type LambdaFunctionStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the LambdaFunctionScheduled event that was recorded when this activity + // task was scheduled. To help diagnose issues, use this information to trace + // back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s LambdaFunctionStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaFunctionStartedEventAttributes) GoString() string { + return s.String() +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *LambdaFunctionStartedEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionStartedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// Provides details of the LambdaFunctionTimedOut event. +type LambdaFunctionTimedOutEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the LambdaFunctionScheduled event that was recorded when this activity + // task was scheduled. To help diagnose issues, use this information to trace + // back the chain of events leading up to this event. + // + // ScheduledEventId is a required field + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long" required:"true"` + + // The ID of the ActivityTaskStarted event that was recorded when this activity + // task started. To help diagnose issues, use this information to trace back + // the chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The type of the timeout that caused this event. + TimeoutType *string `locationName:"timeoutType" type:"string" enum:"LambdaFunctionTimeoutType"` +} + +// String returns the string representation +func (s LambdaFunctionTimedOutEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaFunctionTimedOutEventAttributes) GoString() string { + return s.String() +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *LambdaFunctionTimedOutEventAttributes) SetScheduledEventId(v int64) *LambdaFunctionTimedOutEventAttributes { + s.ScheduledEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *LambdaFunctionTimedOutEventAttributes) SetStartedEventId(v int64) *LambdaFunctionTimedOutEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimeoutType sets the TimeoutType field's value. +func (s *LambdaFunctionTimedOutEventAttributes) SetTimeoutType(v string) *LambdaFunctionTimedOutEventAttributes { + s.TimeoutType = &v + return s +} + +type ListActivityTypesInput struct { + _ struct{} `type:"structure"` + + // The name of the domain in which the activity types have been registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If specified, only lists the activity types that have this name. + Name *string `locationName:"name" min:"1" type:"string"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // Specifies the registration status of the activity types to list. + // + // RegistrationStatus is a required field + RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` + + // When set to true, returns the results in reverse order. By default, the results + // are returned in ascending alphabetical order by name of the activity types. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` +} + +// String returns the string representation +func (s ListActivityTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActivityTypesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListActivityTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListActivityTypesInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RegistrationStatus == nil { + invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *ListActivityTypesInput) SetDomain(v string) *ListActivityTypesInput { + s.Domain = &v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *ListActivityTypesInput) SetMaximumPageSize(v int64) *ListActivityTypesInput { + s.MaximumPageSize = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListActivityTypesInput) SetName(v string) *ListActivityTypesInput { + s.Name = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListActivityTypesInput) SetNextPageToken(v string) *ListActivityTypesInput { + s.NextPageToken = &v + return s +} + +// SetRegistrationStatus sets the RegistrationStatus field's value. +func (s *ListActivityTypesInput) SetRegistrationStatus(v string) *ListActivityTypesInput { + s.RegistrationStatus = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *ListActivityTypesInput) SetReverseOrder(v bool) *ListActivityTypesInput { + s.ReverseOrder = &v + return s +} + +// Contains a paginated list of activity type information structures. +type ListActivityTypesOutput struct { + _ struct{} `type:"structure"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // List of activity type information. + // + // TypeInfos is a required field + TypeInfos []*ActivityTypeInfo `locationName:"typeInfos" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListActivityTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListActivityTypesOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListActivityTypesOutput) SetNextPageToken(v string) *ListActivityTypesOutput { + s.NextPageToken = &v + return s +} + +// SetTypeInfos sets the TypeInfos field's value. +func (s *ListActivityTypesOutput) SetTypeInfos(v []*ActivityTypeInfo) *ListActivityTypesOutput { + s.TypeInfos = v + return s +} + +type ListClosedWorkflowExecutionsInput struct { + _ struct{} `type:"structure"` + + // If specified, only workflow executions that match this close status are listed. + // For example, if TERMINATED is specified, then only TERMINATED workflow executions + // are listed. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + CloseStatusFilter *CloseStatusFilter `locationName:"closeStatusFilter" type:"structure"` + + // If specified, the workflow executions are included in the returned results + // based on whether their close times are within the range specified by this + // filter. Also, if this parameter is specified, the returned results are ordered + // by their close times. + // + // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify + // one of these in a request but not both. + CloseTimeFilter *ExecutionTimeFilter `locationName:"closeTimeFilter" type:"structure"` + + // The name of the domain that contains the workflow executions to list. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // If specified, only workflow executions matching the workflow ID specified + // in the filter are returned. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // When set to true, returns the results in reverse order. By default the results + // are returned in descending order of the start or the close time of the executions. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` + + // If specified, the workflow executions are included in the returned results + // based on whether their start times are within the range specified by this + // filter. Also, if this parameter is specified, the returned results are ordered + // by their start times. + // + // startTimeFilter and closeTimeFilter are mutually exclusive. You must specify + // one of these in a request but not both. + StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure"` + + // If specified, only executions that have the matching tag are listed. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` + + // If specified, only executions of the type specified in the filter are returned. + // + // closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually + // exclusive. You can specify at most one of these in a request. + TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` +} + +// String returns the string representation +func (s ListClosedWorkflowExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClosedWorkflowExecutionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListClosedWorkflowExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListClosedWorkflowExecutionsInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.CloseStatusFilter != nil { + if err := s.CloseStatusFilter.Validate(); err != nil { + invalidParams.AddNested("CloseStatusFilter", err.(request.ErrInvalidParams)) + } + } + if s.CloseTimeFilter != nil { + if err := s.CloseTimeFilter.Validate(); err != nil { + invalidParams.AddNested("CloseTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.ExecutionFilter != nil { + if err := s.ExecutionFilter.Validate(); err != nil { + invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) + } + } + if s.StartTimeFilter != nil { + if err := s.StartTimeFilter.Validate(); err != nil { + invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.TagFilter != nil { + if err := s.TagFilter.Validate(); err != nil { + invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) + } + } + if s.TypeFilter != nil { + if err := s.TypeFilter.Validate(); err != nil { + invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloseStatusFilter sets the CloseStatusFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetCloseStatusFilter(v *CloseStatusFilter) *ListClosedWorkflowExecutionsInput { + s.CloseStatusFilter = v + return s +} + +// SetCloseTimeFilter sets the CloseTimeFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetCloseTimeFilter(v *ExecutionTimeFilter) *ListClosedWorkflowExecutionsInput { + s.CloseTimeFilter = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *ListClosedWorkflowExecutionsInput) SetDomain(v string) *ListClosedWorkflowExecutionsInput { + s.Domain = &v + return s +} + +// SetExecutionFilter sets the ExecutionFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *ListClosedWorkflowExecutionsInput { + s.ExecutionFilter = v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *ListClosedWorkflowExecutionsInput) SetMaximumPageSize(v int64) *ListClosedWorkflowExecutionsInput { + s.MaximumPageSize = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListClosedWorkflowExecutionsInput) SetNextPageToken(v string) *ListClosedWorkflowExecutionsInput { + s.NextPageToken = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *ListClosedWorkflowExecutionsInput) SetReverseOrder(v bool) *ListClosedWorkflowExecutionsInput { + s.ReverseOrder = &v + return s +} + +// SetStartTimeFilter sets the StartTimeFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *ListClosedWorkflowExecutionsInput { + s.StartTimeFilter = v + return s +} + +// SetTagFilter sets the TagFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *ListClosedWorkflowExecutionsInput { + s.TagFilter = v + return s +} + +// SetTypeFilter sets the TypeFilter field's value. +func (s *ListClosedWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *ListClosedWorkflowExecutionsInput { + s.TypeFilter = v + return s +} + +type ListDomainsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // Specifies the registration status of the domains to list. + // + // RegistrationStatus is a required field + RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` + + // When set to true, returns the results in reverse order. By default, the results + // are returned in ascending alphabetical order by name of the domains. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` +} + +// String returns the string representation +func (s ListDomainsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDomainsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDomainsInput"} + if s.RegistrationStatus == nil { + invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *ListDomainsInput) SetMaximumPageSize(v int64) *ListDomainsInput { + s.MaximumPageSize = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListDomainsInput) SetNextPageToken(v string) *ListDomainsInput { + s.NextPageToken = &v + return s +} + +// SetRegistrationStatus sets the RegistrationStatus field's value. +func (s *ListDomainsInput) SetRegistrationStatus(v string) *ListDomainsInput { + s.RegistrationStatus = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *ListDomainsInput) SetReverseOrder(v bool) *ListDomainsInput { + s.ReverseOrder = &v + return s +} + +// Contains a paginated collection of DomainInfo structures. +type ListDomainsOutput struct { + _ struct{} `type:"structure"` + + // A list of DomainInfo structures. + // + // DomainInfos is a required field + DomainInfos []*DomainInfo `locationName:"domainInfos" type:"list" required:"true"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s ListDomainsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsOutput) GoString() string { + return s.String() +} + +// SetDomainInfos sets the DomainInfos field's value. +func (s *ListDomainsOutput) SetDomainInfos(v []*DomainInfo) *ListDomainsOutput { + s.DomainInfos = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListDomainsOutput) SetNextPageToken(v string) *ListDomainsOutput { + s.NextPageToken = &v + return s +} + +type ListOpenWorkflowExecutionsInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that contains the workflow executions to list. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // If specified, only workflow executions matching the workflow ID specified + // in the filter are returned. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + ExecutionFilter *WorkflowExecutionFilter `locationName:"executionFilter" type:"structure"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // When set to true, returns the results in reverse order. By default the results + // are returned in descending order of the start time of the executions. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` + + // Workflow executions are included in the returned results based on whether + // their start times are within the range specified by this filter. + // + // StartTimeFilter is a required field + StartTimeFilter *ExecutionTimeFilter `locationName:"startTimeFilter" type:"structure" required:"true"` + + // If specified, only executions that have the matching tag are listed. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + TagFilter *TagFilter `locationName:"tagFilter" type:"structure"` + + // If specified, only executions of the type specified in the filter are returned. + // + // executionFilter, typeFilter and tagFilter are mutually exclusive. You can + // specify at most one of these in a request. + TypeFilter *WorkflowTypeFilter `locationName:"typeFilter" type:"structure"` +} + +// String returns the string representation +func (s ListOpenWorkflowExecutionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOpenWorkflowExecutionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOpenWorkflowExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOpenWorkflowExecutionsInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.StartTimeFilter == nil { + invalidParams.Add(request.NewErrParamRequired("StartTimeFilter")) + } + if s.ExecutionFilter != nil { + if err := s.ExecutionFilter.Validate(); err != nil { + invalidParams.AddNested("ExecutionFilter", err.(request.ErrInvalidParams)) + } + } + if s.StartTimeFilter != nil { + if err := s.StartTimeFilter.Validate(); err != nil { + invalidParams.AddNested("StartTimeFilter", err.(request.ErrInvalidParams)) + } + } + if s.TagFilter != nil { + if err := s.TagFilter.Validate(); err != nil { + invalidParams.AddNested("TagFilter", err.(request.ErrInvalidParams)) + } + } + if s.TypeFilter != nil { + if err := s.TypeFilter.Validate(); err != nil { + invalidParams.AddNested("TypeFilter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *ListOpenWorkflowExecutionsInput) SetDomain(v string) *ListOpenWorkflowExecutionsInput { + s.Domain = &v + return s +} + +// SetExecutionFilter sets the ExecutionFilter field's value. +func (s *ListOpenWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *ListOpenWorkflowExecutionsInput { + s.ExecutionFilter = v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *ListOpenWorkflowExecutionsInput) SetMaximumPageSize(v int64) *ListOpenWorkflowExecutionsInput { + s.MaximumPageSize = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListOpenWorkflowExecutionsInput) SetNextPageToken(v string) *ListOpenWorkflowExecutionsInput { + s.NextPageToken = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *ListOpenWorkflowExecutionsInput) SetReverseOrder(v bool) *ListOpenWorkflowExecutionsInput { + s.ReverseOrder = &v + return s +} + +// SetStartTimeFilter sets the StartTimeFilter field's value. +func (s *ListOpenWorkflowExecutionsInput) SetStartTimeFilter(v *ExecutionTimeFilter) *ListOpenWorkflowExecutionsInput { + s.StartTimeFilter = v + return s +} + +// SetTagFilter sets the TagFilter field's value. +func (s *ListOpenWorkflowExecutionsInput) SetTagFilter(v *TagFilter) *ListOpenWorkflowExecutionsInput { + s.TagFilter = v + return s +} + +// SetTypeFilter sets the TypeFilter field's value. +func (s *ListOpenWorkflowExecutionsInput) SetTypeFilter(v *WorkflowTypeFilter) *ListOpenWorkflowExecutionsInput { + s.TypeFilter = v + return s +} + +type ListWorkflowTypesInput struct { + _ struct{} `type:"structure"` + + // The name of the domain in which the workflow types have been registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If specified, lists the workflow type with this name. + Name *string `locationName:"name" min:"1" type:"string"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // Specifies the registration status of the workflow types to list. + // + // RegistrationStatus is a required field + RegistrationStatus *string `locationName:"registrationStatus" type:"string" required:"true" enum:"RegistrationStatus"` + + // When set to true, returns the results in reverse order. By default the results + // are returned in ascending alphabetical order of the name of the workflow + // types. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` +} + +// String returns the string representation +func (s ListWorkflowTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWorkflowTypesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListWorkflowTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListWorkflowTypesInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RegistrationStatus == nil { + invalidParams.Add(request.NewErrParamRequired("RegistrationStatus")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *ListWorkflowTypesInput) SetDomain(v string) *ListWorkflowTypesInput { + s.Domain = &v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *ListWorkflowTypesInput) SetMaximumPageSize(v int64) *ListWorkflowTypesInput { + s.MaximumPageSize = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListWorkflowTypesInput) SetName(v string) *ListWorkflowTypesInput { + s.Name = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListWorkflowTypesInput) SetNextPageToken(v string) *ListWorkflowTypesInput { + s.NextPageToken = &v + return s +} + +// SetRegistrationStatus sets the RegistrationStatus field's value. +func (s *ListWorkflowTypesInput) SetRegistrationStatus(v string) *ListWorkflowTypesInput { + s.RegistrationStatus = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *ListWorkflowTypesInput) SetReverseOrder(v bool) *ListWorkflowTypesInput { + s.ReverseOrder = &v + return s +} + +// Contains a paginated list of information structures about workflow types. +type ListWorkflowTypesOutput struct { + _ struct{} `type:"structure"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // The list of workflow type information. + // + // TypeInfos is a required field + TypeInfos []*WorkflowTypeInfo `locationName:"typeInfos" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListWorkflowTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWorkflowTypesOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListWorkflowTypesOutput) SetNextPageToken(v string) *ListWorkflowTypesOutput { + s.NextPageToken = &v + return s +} + +// SetTypeInfos sets the TypeInfos field's value. +func (s *ListWorkflowTypesOutput) SetTypeInfos(v []*WorkflowTypeInfo) *ListWorkflowTypesOutput { + s.TypeInfos = v + return s +} + +// Provides the details of the MarkerRecorded event. +type MarkerRecordedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RecordMarker decision that requested this marker. This + // information can be useful for diagnosing problems by tracing back the chain + // of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The details of the marker. + Details *string `locationName:"details" type:"string"` + + // The name of the marker. + // + // MarkerName is a required field + MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s MarkerRecordedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MarkerRecordedEventAttributes) GoString() string { + return s.String() +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *MarkerRecordedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *MarkerRecordedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetDetails sets the Details field's value. +func (s *MarkerRecordedEventAttributes) SetDetails(v string) *MarkerRecordedEventAttributes { + s.Details = &v + return s +} + +// SetMarkerName sets the MarkerName field's value. +func (s *MarkerRecordedEventAttributes) SetMarkerName(v string) *MarkerRecordedEventAttributes { + s.MarkerName = &v + return s +} + +// Contains the count of tasks in a task list. +type PendingTaskCount struct { + _ struct{} `type:"structure"` + + // The number of tasks in the task list. + // + // Count is a required field + Count *int64 `locationName:"count" type:"integer" required:"true"` + + // If set to true, indicates that the actual count was more than the maximum + // supported by this API and the count returned is the truncated value. + Truncated *bool `locationName:"truncated" type:"boolean"` +} + +// String returns the string representation +func (s PendingTaskCount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingTaskCount) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *PendingTaskCount) SetCount(v int64) *PendingTaskCount { + s.Count = &v + return s +} + +// SetTruncated sets the Truncated field's value. +func (s *PendingTaskCount) SetTruncated(v bool) *PendingTaskCount { + s.Truncated = &v + return s +} + +type PollForActivityTaskInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that contains the task lists being polled. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // Identity of the worker making the request, recorded in the ActivityTaskStarted + // event in the workflow history. This enables diagnostic tracing when problems + // arise. The form of this identity is user defined. + Identity *string `locationName:"identity" type:"string"` + + // Specifies the task list to poll for activity tasks. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PollForActivityTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForActivityTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PollForActivityTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PollForActivityTaskInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.TaskList == nil { + invalidParams.Add(request.NewErrParamRequired("TaskList")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *PollForActivityTaskInput) SetDomain(v string) *PollForActivityTaskInput { + s.Domain = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *PollForActivityTaskInput) SetIdentity(v string) *PollForActivityTaskInput { + s.Identity = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *PollForActivityTaskInput) SetTaskList(v *TaskList) *PollForActivityTaskInput { + s.TaskList = v + return s +} + +// Unit of work sent to an activity worker. +type PollForActivityTaskOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the task. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The type of this activity task. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // The inputs provided when the activity task was scheduled. The form of the + // input is user defined and should be meaningful to the activity implementation. + Input *string `locationName:"input" type:"string"` + + // The ID of the ActivityTaskStarted event recorded in the history. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The opaque string used as a handle on the task. This token is used by workers + // to communicate progress and response information back to the system about + // the task. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` + + // The workflow execution that started this activity task. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PollForActivityTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForActivityTaskOutput) GoString() string { + return s.String() +} + +// SetActivityId sets the ActivityId field's value. +func (s *PollForActivityTaskOutput) SetActivityId(v string) *PollForActivityTaskOutput { + s.ActivityId = &v + return s +} + +// SetActivityType sets the ActivityType field's value. +func (s *PollForActivityTaskOutput) SetActivityType(v *ActivityType) *PollForActivityTaskOutput { + s.ActivityType = v + return s +} + +// SetInput sets the Input field's value. +func (s *PollForActivityTaskOutput) SetInput(v string) *PollForActivityTaskOutput { + s.Input = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *PollForActivityTaskOutput) SetStartedEventId(v int64) *PollForActivityTaskOutput { + s.StartedEventId = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *PollForActivityTaskOutput) SetTaskToken(v string) *PollForActivityTaskOutput { + s.TaskToken = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *PollForActivityTaskOutput) SetWorkflowExecution(v *WorkflowExecution) *PollForActivityTaskOutput { + s.WorkflowExecution = v + return s +} + +type PollForDecisionTaskInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the task lists to poll. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // Identity of the decider making the request, which is recorded in the DecisionTaskStarted + // event in the workflow history. This enables diagnostic tracing when problems + // arise. The form of this identity is user defined. + Identity *string `locationName:"identity" type:"string"` + + // The maximum number of results that are returned per call. nextPageToken can + // be used to obtain futher pages of results. The default is 1000, which is + // the maximum allowed page size. You can, however, specify a page size smaller + // than the maximum. + // + // This is an upper limit only; the actual number of results returned per call + // may be fewer than the specified maximum. + MaximumPageSize *int64 `locationName:"maximumPageSize" type:"integer"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + // + // The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory + // to get the next page. You must call PollForDecisionTask again (with the nextPageToken) + // to retrieve the next page of history records. Calling PollForDecisionTask + // with a nextPageToken doesn't return a new decision task. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // When set to true, returns the events in reverse order. By default the results + // are returned in ascending order of the eventTimestamp of the events. + ReverseOrder *bool `locationName:"reverseOrder" type:"boolean"` + + // Specifies the task list to poll for decision tasks. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PollForDecisionTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForDecisionTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PollForDecisionTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PollForDecisionTaskInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.TaskList == nil { + invalidParams.Add(request.NewErrParamRequired("TaskList")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *PollForDecisionTaskInput) SetDomain(v string) *PollForDecisionTaskInput { + s.Domain = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *PollForDecisionTaskInput) SetIdentity(v string) *PollForDecisionTaskInput { + s.Identity = &v + return s +} + +// SetMaximumPageSize sets the MaximumPageSize field's value. +func (s *PollForDecisionTaskInput) SetMaximumPageSize(v int64) *PollForDecisionTaskInput { + s.MaximumPageSize = &v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *PollForDecisionTaskInput) SetNextPageToken(v string) *PollForDecisionTaskInput { + s.NextPageToken = &v + return s +} + +// SetReverseOrder sets the ReverseOrder field's value. +func (s *PollForDecisionTaskInput) SetReverseOrder(v bool) *PollForDecisionTaskInput { + s.ReverseOrder = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *PollForDecisionTaskInput) SetTaskList(v *TaskList) *PollForDecisionTaskInput { + s.TaskList = v + return s +} + +// A structure that represents a decision task. Decision tasks are sent to deciders +// in order for them to make decisions. +type PollForDecisionTaskOutput struct { + _ struct{} `type:"structure"` + + // A paginated list of history events of the workflow execution. The decider + // uses this during the processing of the decision task. + // + // Events is a required field + Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // The ID of the DecisionTaskStarted event of the previous decision task of + // this workflow execution that was processed by the decider. This can be used + // to determine the events in the history new since the last decision task received + // by the decider. + PreviousStartedEventId *int64 `locationName:"previousStartedEventId" type:"long"` + + // The ID of the DecisionTaskStarted event recorded in the history. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The opaque string used as a handle on the task. This token is used by workers + // to communicate progress and response information back to the system about + // the task. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` + + // The workflow execution for which this decision task was created. + // + // WorkflowExecution is a required field + WorkflowExecution *WorkflowExecution `locationName:"workflowExecution" type:"structure" required:"true"` + + // The type of the workflow execution for which this decision task was created. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PollForDecisionTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForDecisionTaskOutput) GoString() string { + return s.String() +} + +// SetEvents sets the Events field's value. +func (s *PollForDecisionTaskOutput) SetEvents(v []*HistoryEvent) *PollForDecisionTaskOutput { + s.Events = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *PollForDecisionTaskOutput) SetNextPageToken(v string) *PollForDecisionTaskOutput { + s.NextPageToken = &v + return s +} + +// SetPreviousStartedEventId sets the PreviousStartedEventId field's value. +func (s *PollForDecisionTaskOutput) SetPreviousStartedEventId(v int64) *PollForDecisionTaskOutput { + s.PreviousStartedEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *PollForDecisionTaskOutput) SetStartedEventId(v int64) *PollForDecisionTaskOutput { + s.StartedEventId = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *PollForDecisionTaskOutput) SetTaskToken(v string) *PollForDecisionTaskOutput { + s.TaskToken = &v + return s +} + +// SetWorkflowExecution sets the WorkflowExecution field's value. +func (s *PollForDecisionTaskOutput) SetWorkflowExecution(v *WorkflowExecution) *PollForDecisionTaskOutput { + s.WorkflowExecution = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *PollForDecisionTaskOutput) SetWorkflowType(v *WorkflowType) *PollForDecisionTaskOutput { + s.WorkflowType = v + return s +} + +type RecordActivityTaskHeartbeatInput struct { + _ struct{} `type:"structure"` + + // If specified, contains details about the progress of the task. + Details *string `locationName:"details" type:"string"` + + // The taskToken of the ActivityTask. + // + // taskToken is generated by the service and should be treated as an opaque + // value. If the task is passed to another process, its taskToken must also + // be passed. This enables it to provide its progress and respond with results. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RecordActivityTaskHeartbeatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordActivityTaskHeartbeatInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RecordActivityTaskHeartbeatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RecordActivityTaskHeartbeatInput"} + if s.TaskToken == nil { + invalidParams.Add(request.NewErrParamRequired("TaskToken")) + } + if s.TaskToken != nil && len(*s.TaskToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetails sets the Details field's value. +func (s *RecordActivityTaskHeartbeatInput) SetDetails(v string) *RecordActivityTaskHeartbeatInput { + s.Details = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *RecordActivityTaskHeartbeatInput) SetTaskToken(v string) *RecordActivityTaskHeartbeatInput { + s.TaskToken = &v + return s +} + +// Status information about an activity task. +type RecordActivityTaskHeartbeatOutput struct { + _ struct{} `type:"structure"` + + // Set to true if cancellation of the task is requested. + // + // CancelRequested is a required field + CancelRequested *bool `locationName:"cancelRequested" type:"boolean" required:"true"` +} + +// String returns the string representation +func (s RecordActivityTaskHeartbeatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordActivityTaskHeartbeatOutput) GoString() string { + return s.String() +} + +// SetCancelRequested sets the CancelRequested field's value. +func (s *RecordActivityTaskHeartbeatOutput) SetCancelRequested(v bool) *RecordActivityTaskHeartbeatOutput { + s.CancelRequested = &v + return s +} + +// Provides the details of the RecordMarker decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type RecordMarkerDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The details of the marker. + Details *string `locationName:"details" type:"string"` + + // The name of the marker. + // + // MarkerName is a required field + MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RecordMarkerDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordMarkerDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RecordMarkerDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RecordMarkerDecisionAttributes"} + if s.MarkerName == nil { + invalidParams.Add(request.NewErrParamRequired("MarkerName")) + } + if s.MarkerName != nil && len(*s.MarkerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MarkerName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetails sets the Details field's value. +func (s *RecordMarkerDecisionAttributes) SetDetails(v string) *RecordMarkerDecisionAttributes { + s.Details = &v + return s +} + +// SetMarkerName sets the MarkerName field's value. +func (s *RecordMarkerDecisionAttributes) SetMarkerName(v string) *RecordMarkerDecisionAttributes { + s.MarkerName = &v + return s +} + +// Provides the details of the RecordMarkerFailed event. +type RecordMarkerFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"RecordMarkerFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RecordMarkerFailed decision for this cancellation request. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The marker's name. + // + // MarkerName is a required field + MarkerName *string `locationName:"markerName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RecordMarkerFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordMarkerFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *RecordMarkerFailedEventAttributes) SetCause(v string) *RecordMarkerFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *RecordMarkerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RecordMarkerFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetMarkerName sets the MarkerName field's value. +func (s *RecordMarkerFailedEventAttributes) SetMarkerName(v string) *RecordMarkerFailedEventAttributes { + s.MarkerName = &v + return s +} + +type RegisterActivityTypeInput struct { + _ struct{} `type:"structure"` + + // If set, specifies the default maximum time before which a worker processing + // a task of this type must report progress by calling RecordActivityTaskHeartbeat. + // If the timeout is exceeded, the activity task is automatically timed out. + // This default can be overridden when scheduling an activity task using the + // ScheduleActivityTaskDecision. If the activity worker subsequently attempts + // to record a heartbeat or returns a result, the activity worker receives an + // UnknownResource fault. In this case, Amazon SWF no longer considers the activity + // task to be valid; the activity worker should clean up the activity task. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskHeartbeatTimeout *string `locationName:"defaultTaskHeartbeatTimeout" type:"string"` + + // If set, specifies the default task list to use for scheduling tasks of this + // activity type. This default task list is used if a task list isn't provided + // when a task is scheduled through the ScheduleActivityTaskDecision. + DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` + + // The default task priority to assign to the activity type. If not assigned, + // then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE + // (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate + // higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the in the Amazon SWF Developer Guide.. + DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` + + // If set, specifies the default maximum duration for a task of this activity + // type. This default can be overridden when scheduling an activity task using + // the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskScheduleToCloseTimeout *string `locationName:"defaultTaskScheduleToCloseTimeout" type:"string"` + + // If set, specifies the default maximum duration that a task of this activity + // type can wait before being assigned to a worker. This default can be overridden + // when scheduling an activity task using the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskScheduleToStartTimeout *string `locationName:"defaultTaskScheduleToStartTimeout" type:"string"` + + // If set, specifies the default maximum duration that a worker can take to + // process tasks of this activity type. This default can be overridden when + // scheduling an activity task using the ScheduleActivityTaskDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` + + // A textual description of the activity type. + Description *string `locationName:"description" type:"string"` + + // The name of the domain in which this activity is to be registered. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The name of the activity type within the domain. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The version of the activity type. + // + // The activity type consists of the name and version, the combination of which + // must be unique within the domain. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterActivityTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterActivityTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterActivityTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterActivityTypeInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + 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.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + if s.DefaultTaskList != nil { + if err := s.DefaultTaskList.Validate(); err != nil { + invalidParams.AddNested("DefaultTaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultTaskHeartbeatTimeout sets the DefaultTaskHeartbeatTimeout field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskHeartbeatTimeout(v string) *RegisterActivityTypeInput { + s.DefaultTaskHeartbeatTimeout = &v + return s +} + +// SetDefaultTaskList sets the DefaultTaskList field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskList(v *TaskList) *RegisterActivityTypeInput { + s.DefaultTaskList = v + return s +} + +// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskPriority(v string) *RegisterActivityTypeInput { + s.DefaultTaskPriority = &v + return s +} + +// SetDefaultTaskScheduleToCloseTimeout sets the DefaultTaskScheduleToCloseTimeout field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskScheduleToCloseTimeout(v string) *RegisterActivityTypeInput { + s.DefaultTaskScheduleToCloseTimeout = &v + return s +} + +// SetDefaultTaskScheduleToStartTimeout sets the DefaultTaskScheduleToStartTimeout field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskScheduleToStartTimeout(v string) *RegisterActivityTypeInput { + s.DefaultTaskScheduleToStartTimeout = &v + return s +} + +// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. +func (s *RegisterActivityTypeInput) SetDefaultTaskStartToCloseTimeout(v string) *RegisterActivityTypeInput { + s.DefaultTaskStartToCloseTimeout = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RegisterActivityTypeInput) SetDescription(v string) *RegisterActivityTypeInput { + s.Description = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *RegisterActivityTypeInput) SetDomain(v string) *RegisterActivityTypeInput { + s.Domain = &v + return s +} + +// SetName sets the Name field's value. +func (s *RegisterActivityTypeInput) SetName(v string) *RegisterActivityTypeInput { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *RegisterActivityTypeInput) SetVersion(v string) *RegisterActivityTypeInput { + s.Version = &v + return s +} + +type RegisterActivityTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterActivityTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterActivityTypeOutput) GoString() string { + return s.String() +} + +type RegisterDomainInput struct { + _ struct{} `type:"structure"` + + // A text description of the domain. + Description *string `locationName:"description" type:"string"` + + // Name of the domain to register. The name must be unique in the region that + // the domain is registered in. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The duration (in days) that records and histories of workflow executions + // on the domain should be kept by the service. After the retention period, + // the workflow execution isn't available in the results of visibility calls. + // + // If you pass the value NONE or 0 (zero), then the workflow execution history + // isn't retained. As soon as the workflow execution completes, the execution + // record and its history are deleted. + // + // The maximum workflow execution retention period is 90 days. For more information + // about Amazon SWF service limits, see: Amazon SWF Service Limits (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-limits.html) + // in the Amazon SWF Developer Guide. + // + // WorkflowExecutionRetentionPeriodInDays is a required field + WorkflowExecutionRetentionPeriodInDays *string `locationName:"workflowExecutionRetentionPeriodInDays" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterDomainInput"} + 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.WorkflowExecutionRetentionPeriodInDays == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowExecutionRetentionPeriodInDays")) + } + if s.WorkflowExecutionRetentionPeriodInDays != nil && len(*s.WorkflowExecutionRetentionPeriodInDays) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowExecutionRetentionPeriodInDays", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *RegisterDomainInput) SetDescription(v string) *RegisterDomainInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *RegisterDomainInput) SetName(v string) *RegisterDomainInput { + s.Name = &v + return s +} + +// SetWorkflowExecutionRetentionPeriodInDays sets the WorkflowExecutionRetentionPeriodInDays field's value. +func (s *RegisterDomainInput) SetWorkflowExecutionRetentionPeriodInDays(v string) *RegisterDomainInput { + s.WorkflowExecutionRetentionPeriodInDays = &v + return s +} + +type RegisterDomainOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDomainOutput) GoString() string { + return s.String() +} + +type RegisterWorkflowTypeInput struct { + _ struct{} `type:"structure"` + + // If set, specifies the default policy to use for the child workflow executions + // when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution + // action explicitly or due to an expired timeout. This default can be overridden + // when starting a workflow execution using the StartWorkflowExecution action + // or the StartChildWorkflowExecutionDecision. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + DefaultChildPolicy *string `locationName:"defaultChildPolicy" type:"string" enum:"ChildPolicy"` + + // If set, specifies the default maximum duration for executions of this workflow + // type. You can override this default when starting an execution through the + // StartWorkflowExecution Action or StartChildWorkflowExecutionDecision. + // + // The duration is specified in seconds; an integer greater than or equal to + // 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot + // specify a value of "NONE" for defaultExecutionStartToCloseTimeout; there + // is a one-year max limit on the time that a workflow execution can run. Exceeding + // this limit always causes the workflow execution to time out. + DefaultExecutionStartToCloseTimeout *string `locationName:"defaultExecutionStartToCloseTimeout" type:"string"` + + // The default IAM role attached to this workflow type. + // + // Executions of this workflow type need IAM roles to invoke Lambda functions. + // If you don't specify an IAM role when you start this workflow type, the default + // Lambda role is attached to the execution. For more information, see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) + // in the Amazon SWF Developer Guide. + DefaultLambdaRole *string `locationName:"defaultLambdaRole" min:"1" type:"string"` + + // If set, specifies the default task list to use for scheduling decision tasks + // for executions of this workflow type. This default is used only if a task + // list isn't provided when starting the execution through the StartWorkflowExecution + // Action or StartChildWorkflowExecutionDecision. + DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` + + // The default task priority to assign to the workflow type. If not assigned, + // then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE + // (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate + // higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` + + // If set, specifies the default maximum duration of decision tasks for this + // workflow type. This default can be overridden when starting a workflow execution + // using the StartWorkflowExecution action or the StartChildWorkflowExecutionDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` + + // Textual description of the workflow type. + Description *string `locationName:"description" type:"string"` + + // The name of the domain in which to register the workflow type. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The name of the workflow type. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The version of the workflow type. + // + // The workflow type consists of the name and version, the combination of which + // must be unique within the domain. To get a list of all currently registered + // workflow types, use the ListWorkflowTypes action. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterWorkflowTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWorkflowTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterWorkflowTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterWorkflowTypeInput"} + if s.DefaultLambdaRole != nil && len(*s.DefaultLambdaRole) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DefaultLambdaRole", 1)) + } + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + 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.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + if s.DefaultTaskList != nil { + if err := s.DefaultTaskList.Validate(); err != nil { + invalidParams.AddNested("DefaultTaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultChildPolicy sets the DefaultChildPolicy field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultChildPolicy(v string) *RegisterWorkflowTypeInput { + s.DefaultChildPolicy = &v + return s +} + +// SetDefaultExecutionStartToCloseTimeout sets the DefaultExecutionStartToCloseTimeout field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultExecutionStartToCloseTimeout(v string) *RegisterWorkflowTypeInput { + s.DefaultExecutionStartToCloseTimeout = &v + return s +} + +// SetDefaultLambdaRole sets the DefaultLambdaRole field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultLambdaRole(v string) *RegisterWorkflowTypeInput { + s.DefaultLambdaRole = &v + return s +} + +// SetDefaultTaskList sets the DefaultTaskList field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultTaskList(v *TaskList) *RegisterWorkflowTypeInput { + s.DefaultTaskList = v + return s +} + +// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultTaskPriority(v string) *RegisterWorkflowTypeInput { + s.DefaultTaskPriority = &v + return s +} + +// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. +func (s *RegisterWorkflowTypeInput) SetDefaultTaskStartToCloseTimeout(v string) *RegisterWorkflowTypeInput { + s.DefaultTaskStartToCloseTimeout = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RegisterWorkflowTypeInput) SetDescription(v string) *RegisterWorkflowTypeInput { + s.Description = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *RegisterWorkflowTypeInput) SetDomain(v string) *RegisterWorkflowTypeInput { + s.Domain = &v + return s +} + +// SetName sets the Name field's value. +func (s *RegisterWorkflowTypeInput) SetName(v string) *RegisterWorkflowTypeInput { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *RegisterWorkflowTypeInput) SetVersion(v string) *RegisterWorkflowTypeInput { + s.Version = &v + return s +} + +type RegisterWorkflowTypeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterWorkflowTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWorkflowTypeOutput) GoString() string { + return s.String() +} + +// Provides the details of the RequestCancelActivityTask decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type RequestCancelActivityTaskDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The activityId of the activity task to be canceled. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RequestCancelActivityTaskDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelActivityTaskDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestCancelActivityTaskDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestCancelActivityTaskDecisionAttributes"} + if s.ActivityId == nil { + invalidParams.Add(request.NewErrParamRequired("ActivityId")) + } + if s.ActivityId != nil && len(*s.ActivityId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActivityId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivityId sets the ActivityId field's value. +func (s *RequestCancelActivityTaskDecisionAttributes) SetActivityId(v string) *RequestCancelActivityTaskDecisionAttributes { + s.ActivityId = &v + return s +} + +// Provides the details of the RequestCancelActivityTaskFailed event. +type RequestCancelActivityTaskFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The activityId provided in the RequestCancelActivityTask decision that failed. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"RequestCancelActivityTaskFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RequestCancelActivityTask decision for this cancellation + // request. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s RequestCancelActivityTaskFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelActivityTaskFailedEventAttributes) GoString() string { + return s.String() +} + +// SetActivityId sets the ActivityId field's value. +func (s *RequestCancelActivityTaskFailedEventAttributes) SetActivityId(v string) *RequestCancelActivityTaskFailedEventAttributes { + s.ActivityId = &v + return s +} + +// SetCause sets the Cause field's value. +func (s *RequestCancelActivityTaskFailedEventAttributes) SetCause(v string) *RequestCancelActivityTaskFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *RequestCancelActivityTaskFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelActivityTaskFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// Provides the details of the RequestCancelExternalWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type RequestCancelExternalWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The data attached to the event that can be used by the decider in subsequent + // workflow tasks. + Control *string `locationName:"control" type:"string"` + + // The runId of the external workflow execution to cancel. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the external workflow execution to cancel. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RequestCancelExternalWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelExternalWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestCancelExternalWorkflowExecutionDecisionAttributes"} + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetControl sets the Control field's value. +func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { + s.Control = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *RequestCancelExternalWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionDecisionAttributes { + s.WorkflowId = &v + return s +} + +// Provides the details of the RequestCancelExternalWorkflowExecutionFailed +// event. +type RequestCancelExternalWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"RequestCancelExternalWorkflowExecutionFailedCause"` + + // The data attached to the event that the decider can use in subsequent workflow + // tasks. This data isn't sent to the workflow execution. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RequestCancelExternalWorkflowExecution decision for + // this cancellation request. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding + // to the RequestCancelExternalWorkflowExecution decision to cancel this external + // workflow execution. This information can be useful for diagnosing problems + // by tracing back the chain of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The runId of the external workflow execution. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the external workflow to which the cancel request was to + // be delivered. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RequestCancelExternalWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelExternalWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetCause(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetControl sets the Control field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *RequestCancelExternalWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionFailedEventAttributes { + s.WorkflowId = &v + return s +} + +// Provides the details of the RequestCancelExternalWorkflowExecutionInitiated +// event. +type RequestCancelExternalWorkflowExecutionInitiatedEventAttributes struct { + _ struct{} `type:"structure"` + + // Data attached to the event that can be used by the decider in subsequent + // workflow tasks. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the RequestCancelExternalWorkflowExecution decision for + // this cancellation request. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The runId of the external workflow execution to be canceled. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the external workflow execution to be canceled. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) GoString() string { + return s.String() +} + +// SetControl sets the Control field's value. +func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetRunId(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + s.WorkflowId = &v + return s +} + +type RequestCancelWorkflowExecutionInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the workflow execution to cancel. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The runId of the workflow execution to cancel. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the workflow execution to cancel. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RequestCancelWorkflowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelWorkflowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RequestCancelWorkflowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestCancelWorkflowExecutionInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *RequestCancelWorkflowExecutionInput) SetDomain(v string) *RequestCancelWorkflowExecutionInput { + s.Domain = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *RequestCancelWorkflowExecutionInput) SetRunId(v string) *RequestCancelWorkflowExecutionInput { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *RequestCancelWorkflowExecutionInput) SetWorkflowId(v string) *RequestCancelWorkflowExecutionInput { + s.WorkflowId = &v + return s +} + +type RequestCancelWorkflowExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RequestCancelWorkflowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestCancelWorkflowExecutionOutput) GoString() string { + return s.String() +} + +type RespondActivityTaskCanceledInput struct { + _ struct{} `type:"structure"` + + // Information about the cancellation. + Details *string `locationName:"details" type:"string"` + + // The taskToken of the ActivityTask. + // + // taskToken is generated by the service and should be treated as an opaque + // value. If the task is passed to another process, its taskToken must also + // be passed. This enables it to provide its progress and respond with results. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RespondActivityTaskCanceledInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskCanceledInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RespondActivityTaskCanceledInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskCanceledInput"} + if s.TaskToken == nil { + invalidParams.Add(request.NewErrParamRequired("TaskToken")) + } + if s.TaskToken != nil && len(*s.TaskToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetails sets the Details field's value. +func (s *RespondActivityTaskCanceledInput) SetDetails(v string) *RespondActivityTaskCanceledInput { + s.Details = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *RespondActivityTaskCanceledInput) SetTaskToken(v string) *RespondActivityTaskCanceledInput { + s.TaskToken = &v + return s +} + +type RespondActivityTaskCanceledOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RespondActivityTaskCanceledOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskCanceledOutput) GoString() string { + return s.String() +} + +type RespondActivityTaskCompletedInput struct { + _ struct{} `type:"structure"` + + // The result of the activity task. It is a free form string that is implementation + // specific. + Result *string `locationName:"result" type:"string"` + + // The taskToken of the ActivityTask. + // + // taskToken is generated by the service and should be treated as an opaque + // value. If the task is passed to another process, its taskToken must also + // be passed. This enables it to provide its progress and respond with results. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RespondActivityTaskCompletedInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskCompletedInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RespondActivityTaskCompletedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskCompletedInput"} + if s.TaskToken == nil { + invalidParams.Add(request.NewErrParamRequired("TaskToken")) + } + if s.TaskToken != nil && len(*s.TaskToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResult sets the Result field's value. +func (s *RespondActivityTaskCompletedInput) SetResult(v string) *RespondActivityTaskCompletedInput { + s.Result = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *RespondActivityTaskCompletedInput) SetTaskToken(v string) *RespondActivityTaskCompletedInput { + s.TaskToken = &v + return s +} + +type RespondActivityTaskCompletedOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RespondActivityTaskCompletedOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskCompletedOutput) GoString() string { + return s.String() +} + +type RespondActivityTaskFailedInput struct { + _ struct{} `type:"structure"` + + // Detailed information about the failure. + Details *string `locationName:"details" type:"string"` + + // Description of the error that may assist in diagnostics. + Reason *string `locationName:"reason" type:"string"` + + // The taskToken of the ActivityTask. + // + // taskToken is generated by the service and should be treated as an opaque + // value. If the task is passed to another process, its taskToken must also + // be passed. This enables it to provide its progress and respond with results. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RespondActivityTaskFailedInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskFailedInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RespondActivityTaskFailedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RespondActivityTaskFailedInput"} + if s.TaskToken == nil { + invalidParams.Add(request.NewErrParamRequired("TaskToken")) + } + if s.TaskToken != nil && len(*s.TaskToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetails sets the Details field's value. +func (s *RespondActivityTaskFailedInput) SetDetails(v string) *RespondActivityTaskFailedInput { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *RespondActivityTaskFailedInput) SetReason(v string) *RespondActivityTaskFailedInput { + s.Reason = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *RespondActivityTaskFailedInput) SetTaskToken(v string) *RespondActivityTaskFailedInput { + s.TaskToken = &v + return s +} + +type RespondActivityTaskFailedOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RespondActivityTaskFailedOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondActivityTaskFailedOutput) GoString() string { + return s.String() +} + +// Input data for a TaskCompleted response to a decision task. +type RespondDecisionTaskCompletedInput struct { + _ struct{} `type:"structure"` + + // The list of decisions (possibly empty) made by the decider while processing + // this decision task. See the docs for the Decision structure for details. + Decisions []*Decision `locationName:"decisions" type:"list"` + + // User defined context to add to workflow execution. + ExecutionContext *string `locationName:"executionContext" type:"string"` + + // The taskToken from the DecisionTask. + // + // taskToken is generated by the service and should be treated as an opaque + // value. If the task is passed to another process, its taskToken must also + // be passed. This enables it to provide its progress and respond with results. + // + // TaskToken is a required field + TaskToken *string `locationName:"taskToken" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RespondDecisionTaskCompletedInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondDecisionTaskCompletedInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RespondDecisionTaskCompletedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RespondDecisionTaskCompletedInput"} + if s.TaskToken == nil { + invalidParams.Add(request.NewErrParamRequired("TaskToken")) + } + if s.TaskToken != nil && len(*s.TaskToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskToken", 1)) + } + if s.Decisions != nil { + for i, v := range s.Decisions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Decisions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDecisions sets the Decisions field's value. +func (s *RespondDecisionTaskCompletedInput) SetDecisions(v []*Decision) *RespondDecisionTaskCompletedInput { + s.Decisions = v + return s +} + +// SetExecutionContext sets the ExecutionContext field's value. +func (s *RespondDecisionTaskCompletedInput) SetExecutionContext(v string) *RespondDecisionTaskCompletedInput { + s.ExecutionContext = &v + return s +} + +// SetTaskToken sets the TaskToken field's value. +func (s *RespondDecisionTaskCompletedInput) SetTaskToken(v string) *RespondDecisionTaskCompletedInput { + s.TaskToken = &v + return s +} + +type RespondDecisionTaskCompletedOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RespondDecisionTaskCompletedOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RespondDecisionTaskCompletedOutput) GoString() string { + return s.String() +} + +// Provides the details of the ScheduleActivityTask decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// activityType.name – String constraint. The key is swf:activityType.name. +// +// activityType.version – String constraint. The key is swf:activityType.version. +// +// taskList – String constraint. The key is swf:taskList.name. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type ScheduleActivityTaskDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The activityId of the activity task. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The type of the activity task to schedule. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // Data attached to the event that can be used by the decider in subsequent + // workflow tasks. This data isn't sent to the activity. + Control *string `locationName:"control" type:"string"` + + // If set, specifies the maximum time before which a worker processing a task + // of this type must report progress by calling RecordActivityTaskHeartbeat. + // If the timeout is exceeded, the activity task is automatically timed out. + // If the worker subsequently attempts to record a heartbeat or returns a result, + // it is ignored. This overrides the default heartbeat timeout specified when + // registering the activity type using RegisterActivityType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + HeartbeatTimeout *string `locationName:"heartbeatTimeout" type:"string"` + + // The input provided to the activity task. + Input *string `locationName:"input" type:"string"` + + // The maximum duration for this activity task. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A schedule-to-close timeout for this activity task must be specified either + // as a default for the activity type or through this field. If neither this + // field is set nor a default schedule-to-close timeout was specified at registration + // time then a fault is returned. + ScheduleToCloseTimeout *string `locationName:"scheduleToCloseTimeout" type:"string"` + + // If set, specifies the maximum duration the activity task can wait to be assigned + // to a worker. This overrides the default schedule-to-start timeout specified + // when registering the activity type using RegisterActivityType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A schedule-to-start timeout for this activity task must be specified either + // as a default for the activity type or through this field. If neither this + // field is set nor a default schedule-to-start timeout was specified at registration + // time then a fault is returned. + ScheduleToStartTimeout *string `locationName:"scheduleToStartTimeout" type:"string"` + + // If set, specifies the maximum duration a worker may take to process this + // activity task. This overrides the default start-to-close timeout specified + // when registering the activity type using RegisterActivityType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A start-to-close timeout for this activity task must be specified either + // as a default for the activity type or through this field. If neither this + // field is set nor a default start-to-close timeout was specified at registration + // time then a fault is returned. + StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` + + // If set, specifies the name of the task list in which to schedule the activity + // task. If not specified, the defaultTaskList registered with the activity + // type is used. + // + // A task list for this activity task must be specified either as a default + // for the activity type or through this field. If neither this field is set + // nor a default task list was specified at registration time then a fault is + // returned. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + TaskList *TaskList `locationName:"taskList" type:"structure"` + + // If set, specifies the priority with which the activity task is to be assigned + // to a worker. This overrides the defaultTaskPriority specified when registering + // the activity type using RegisterActivityType. Valid values are integers that + // range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). + // Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` +} + +// String returns the string representation +func (s ScheduleActivityTaskDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleActivityTaskDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleActivityTaskDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleActivityTaskDecisionAttributes"} + if s.ActivityId == nil { + invalidParams.Add(request.NewErrParamRequired("ActivityId")) + } + if s.ActivityId != nil && len(*s.ActivityId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActivityId", 1)) + } + if s.ActivityType == nil { + invalidParams.Add(request.NewErrParamRequired("ActivityType")) + } + if s.ActivityType != nil { + if err := s.ActivityType.Validate(); err != nil { + invalidParams.AddNested("ActivityType", err.(request.ErrInvalidParams)) + } + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivityId sets the ActivityId field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetActivityId(v string) *ScheduleActivityTaskDecisionAttributes { + s.ActivityId = &v + return s +} + +// SetActivityType sets the ActivityType field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetActivityType(v *ActivityType) *ScheduleActivityTaskDecisionAttributes { + s.ActivityType = v + return s +} + +// SetControl sets the Control field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetControl(v string) *ScheduleActivityTaskDecisionAttributes { + s.Control = &v + return s +} + +// SetHeartbeatTimeout sets the HeartbeatTimeout field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetHeartbeatTimeout(v string) *ScheduleActivityTaskDecisionAttributes { + s.HeartbeatTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetInput(v string) *ScheduleActivityTaskDecisionAttributes { + s.Input = &v + return s +} + +// SetScheduleToCloseTimeout sets the ScheduleToCloseTimeout field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetScheduleToCloseTimeout(v string) *ScheduleActivityTaskDecisionAttributes { + s.ScheduleToCloseTimeout = &v + return s +} + +// SetScheduleToStartTimeout sets the ScheduleToStartTimeout field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetScheduleToStartTimeout(v string) *ScheduleActivityTaskDecisionAttributes { + s.ScheduleToStartTimeout = &v + return s +} + +// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetStartToCloseTimeout(v string) *ScheduleActivityTaskDecisionAttributes { + s.StartToCloseTimeout = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetTaskList(v *TaskList) *ScheduleActivityTaskDecisionAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *ScheduleActivityTaskDecisionAttributes) SetTaskPriority(v string) *ScheduleActivityTaskDecisionAttributes { + s.TaskPriority = &v + return s +} + +// Provides the details of the ScheduleActivityTaskFailed event. +type ScheduleActivityTaskFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The activityId provided in the ScheduleActivityTask decision that failed. + // + // ActivityId is a required field + ActivityId *string `locationName:"activityId" min:"1" type:"string" required:"true"` + + // The activity type provided in the ScheduleActivityTask decision that failed. + // + // ActivityType is a required field + ActivityType *ActivityType `locationName:"activityType" type:"structure" required:"true"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"ScheduleActivityTaskFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision that + // resulted in the scheduling of this activity task. This information can be + // useful for diagnosing problems by tracing back the chain of events leading + // up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s ScheduleActivityTaskFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleActivityTaskFailedEventAttributes) GoString() string { + return s.String() +} + +// SetActivityId sets the ActivityId field's value. +func (s *ScheduleActivityTaskFailedEventAttributes) SetActivityId(v string) *ScheduleActivityTaskFailedEventAttributes { + s.ActivityId = &v + return s +} + +// SetActivityType sets the ActivityType field's value. +func (s *ScheduleActivityTaskFailedEventAttributes) SetActivityType(v *ActivityType) *ScheduleActivityTaskFailedEventAttributes { + s.ActivityType = v + return s +} + +// SetCause sets the Cause field's value. +func (s *ScheduleActivityTaskFailedEventAttributes) SetCause(v string) *ScheduleActivityTaskFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *ScheduleActivityTaskFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ScheduleActivityTaskFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// Decision attributes specified in scheduleLambdaFunctionDecisionAttributes +// within the list of decisions decisions passed to RespondDecisionTaskCompleted. +type ScheduleLambdaFunctionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The data attached to the event that the decider can use in subsequent workflow + // tasks. This data isn't sent to the Lambda task. + Control *string `locationName:"control" type:"string"` + + // A string that identifies the Lambda function execution in the event history. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The optional input data to be supplied to the Lambda function. + Input *string `locationName:"input" type:"string"` + + // The name, or ARN, of the Lambda function to schedule. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The timeout value, in seconds, after which the Lambda function is considered + // to be failed once it has started. This can be any integer from 1-300 (1s-5m). + // If no value is supplied, than a default value of 300s is assumed. + StartToCloseTimeout *string `locationName:"startToCloseTimeout" type:"string"` +} + +// String returns the string representation +func (s ScheduleLambdaFunctionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleLambdaFunctionDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleLambdaFunctionDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleLambdaFunctionDecisionAttributes"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + 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 +} + +// SetControl sets the Control field's value. +func (s *ScheduleLambdaFunctionDecisionAttributes) SetControl(v string) *ScheduleLambdaFunctionDecisionAttributes { + s.Control = &v + return s +} + +// SetId sets the Id field's value. +func (s *ScheduleLambdaFunctionDecisionAttributes) SetId(v string) *ScheduleLambdaFunctionDecisionAttributes { + s.Id = &v + return s +} + +// SetInput sets the Input field's value. +func (s *ScheduleLambdaFunctionDecisionAttributes) SetInput(v string) *ScheduleLambdaFunctionDecisionAttributes { + s.Input = &v + return s +} + +// SetName sets the Name field's value. +func (s *ScheduleLambdaFunctionDecisionAttributes) SetName(v string) *ScheduleLambdaFunctionDecisionAttributes { + s.Name = &v + return s +} + +// SetStartToCloseTimeout sets the StartToCloseTimeout field's value. +func (s *ScheduleLambdaFunctionDecisionAttributes) SetStartToCloseTimeout(v string) *ScheduleLambdaFunctionDecisionAttributes { + s.StartToCloseTimeout = &v + return s +} + +// Provides the details of the ScheduleLambdaFunctionFailed event. It isn't +// set for other event types. +type ScheduleLambdaFunctionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. To help diagnose issues, use this information to + // trace back the chain of events leading up to this event. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"ScheduleLambdaFunctionFailedCause"` + + // The ID of the LambdaFunctionCompleted event corresponding to the decision + // that resulted in scheduling this Lambda task. To help diagnose issues, use + // this information to trace back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The ID provided in the ScheduleLambdaFunction decision that failed. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The name of the Lambda function. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ScheduleLambdaFunctionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleLambdaFunctionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *ScheduleLambdaFunctionFailedEventAttributes) SetCause(v string) *ScheduleLambdaFunctionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *ScheduleLambdaFunctionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *ScheduleLambdaFunctionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetId sets the Id field's value. +func (s *ScheduleLambdaFunctionFailedEventAttributes) SetId(v string) *ScheduleLambdaFunctionFailedEventAttributes { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ScheduleLambdaFunctionFailedEventAttributes) SetName(v string) *ScheduleLambdaFunctionFailedEventAttributes { + s.Name = &v + return s +} + +// Provides the details of the SignalExternalWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type SignalExternalWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The data attached to the event that can be used by the decider in subsequent + // decision tasks. + Control *string `locationName:"control" type:"string"` + + // The input data to be provided with the signal. The target workflow execution + // uses the signal name and input data to process the signal. + Input *string `locationName:"input" type:"string"` + + // The runId of the workflow execution to be signaled. + RunId *string `locationName:"runId" type:"string"` + + // The name of the signal.The target workflow execution uses the signal name + // and input to process the signal. + // + // SignalName is a required field + SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` + + // The workflowId of the workflow execution to be signaled. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SignalExternalWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignalExternalWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SignalExternalWorkflowExecutionDecisionAttributes"} + if s.SignalName == nil { + invalidParams.Add(request.NewErrParamRequired("SignalName")) + } + if s.SignalName != nil && len(*s.SignalName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SignalName", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetControl sets the Control field's value. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetControl(v string) *SignalExternalWorkflowExecutionDecisionAttributes { + s.Control = &v + return s +} + +// SetInput sets the Input field's value. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetInput(v string) *SignalExternalWorkflowExecutionDecisionAttributes { + s.Input = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionDecisionAttributes { + s.RunId = &v + return s +} + +// SetSignalName sets the SignalName field's value. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetSignalName(v string) *SignalExternalWorkflowExecutionDecisionAttributes { + s.SignalName = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *SignalExternalWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionDecisionAttributes { + s.WorkflowId = &v + return s +} + +// Provides the details of the SignalExternalWorkflowExecutionFailed event. +type SignalExternalWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"SignalExternalWorkflowExecutionFailedCause"` + + // The data attached to the event that the decider can use in subsequent workflow + // tasks. This data isn't sent to the workflow execution. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the SignalExternalWorkflowExecution decision for this signal. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding + // to the SignalExternalWorkflowExecution decision to request this signal. This + // information can be useful for diagnosing problems by tracing back the chain + // of events leading up to this event. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The runId of the external workflow execution that the signal was being delivered + // to. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the external workflow execution that the signal was being + // delivered to. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SignalExternalWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignalExternalWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetCause(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetControl sets the Control field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetControl(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *SignalExternalWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionFailedEventAttributes { + s.WorkflowId = &v + return s +} + +// Provides the details of the SignalExternalWorkflowExecutionInitiated event. +type SignalExternalWorkflowExecutionInitiatedEventAttributes struct { + _ struct{} `type:"structure"` + + // Data attached to the event that can be used by the decider in subsequent + // decision tasks. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the SignalExternalWorkflowExecution decision for this signal. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The input provided to the signal. + Input *string `locationName:"input" type:"string"` + + // The runId of the external workflow execution to send the signal to. + RunId *string `locationName:"runId" type:"string"` + + // The name of the signal. + // + // SignalName is a required field + SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` + + // The workflowId of the external workflow execution. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SignalExternalWorkflowExecutionInitiatedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignalExternalWorkflowExecutionInitiatedEventAttributes) GoString() string { + return s.String() +} + +// SetControl sets the Control field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetInput sets the Input field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetInput(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.Input = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetRunId(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.RunId = &v + return s +} + +// SetSignalName sets the SignalName field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetSignalName(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.SignalName = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *SignalExternalWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *SignalExternalWorkflowExecutionInitiatedEventAttributes { + s.WorkflowId = &v + return s +} + +type SignalWorkflowExecutionInput struct { + _ struct{} `type:"structure"` + + // The name of the domain containing the workflow execution to signal. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // Data to attach to the WorkflowExecutionSignaled event in the target workflow + // execution's history. + Input *string `locationName:"input" type:"string"` + + // The runId of the workflow execution to signal. + RunId *string `locationName:"runId" type:"string"` + + // The name of the signal. This name must be meaningful to the target workflow. + // + // SignalName is a required field + SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` + + // The workflowId of the workflow execution to signal. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SignalWorkflowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignalWorkflowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SignalWorkflowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SignalWorkflowExecutionInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.SignalName == nil { + invalidParams.Add(request.NewErrParamRequired("SignalName")) + } + if s.SignalName != nil && len(*s.SignalName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SignalName", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *SignalWorkflowExecutionInput) SetDomain(v string) *SignalWorkflowExecutionInput { + s.Domain = &v + return s +} + +// SetInput sets the Input field's value. +func (s *SignalWorkflowExecutionInput) SetInput(v string) *SignalWorkflowExecutionInput { + s.Input = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *SignalWorkflowExecutionInput) SetRunId(v string) *SignalWorkflowExecutionInput { + s.RunId = &v + return s +} + +// SetSignalName sets the SignalName field's value. +func (s *SignalWorkflowExecutionInput) SetSignalName(v string) *SignalWorkflowExecutionInput { + s.SignalName = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *SignalWorkflowExecutionInput) SetWorkflowId(v string) *SignalWorkflowExecutionInput { + s.WorkflowId = &v + return s +} + +type SignalWorkflowExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SignalWorkflowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignalWorkflowExecutionOutput) GoString() string { + return s.String() +} + +// Provides the details of the StartChildWorkflowExecution decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * Constrain the following parameters by using a Condition element with +// the appropriate keys. +// +// tagList.member.N – The key is "swf:tagList.N" where N is the tag number from +// 0 to 4, inclusive. +// +// taskList – String constraint. The key is swf:taskList.name. +// +// workflowType.name – String constraint. The key is swf:workflowType.name. +// +// workflowType.version – String constraint. The key is swf:workflowType.version. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type StartChildWorkflowExecutionDecisionAttributes struct { + _ struct{} `type:"structure"` + + // If set, specifies the policy to use for the child workflow executions if + // the workflow execution being started is terminated by calling the TerminateWorkflowExecution + // action explicitly or due to an expired timeout. This policy overrides the + // default child policy specified when registering the workflow type using RegisterWorkflowType. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // A child policy for this workflow execution must be specified either as a + // default for the workflow type or through this parameter. If neither this + // parameter is set nor a default child policy was specified at registration + // time then a fault is returned. + ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` + + // The data attached to the event that can be used by the decider in subsequent + // workflow tasks. This data isn't sent to the child workflow execution. + Control *string `locationName:"control" type:"string"` + + // The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout + // specified when registering the workflow type. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // An execution start-to-close timeout for this workflow execution must be specified + // either as a default for the workflow type or through this parameter. If neither + // this parameter is set nor a default execution start-to-close timeout was + // specified at registration time then a fault is returned. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The input to be provided to the workflow execution. + Input *string `locationName:"input" type:"string"` + + // The IAM role attached to the child workflow execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The list of tags to associate with the child workflow execution. A maximum + // of 5 tags can be specified. You can list workflow executions with a specific + // tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions + // and specifying a TagFilter. + TagList []*string `locationName:"tagList" type:"list"` + + // The name of the task list to be used for decision tasks of the child workflow + // execution. + // + // A task list for this workflow execution must be specified either as a default + // for the workflow type or through this parameter. If neither this parameter + // is set nor a default task list was specified at registration time then a + // fault is returned. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + TaskList *TaskList `locationName:"taskList" type:"structure"` + + // A task priority that, if set, specifies the priority for a decision task + // of this workflow execution. This overrides the defaultTaskPriority specified + // when registering the workflow type. Valid values are integers that range + // from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). + // Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // Specifies the maximum duration of decision tasks for this workflow execution. + // This parameter overrides the defaultTaskStartToCloseTimout specified when + // registering the workflow type using RegisterWorkflowType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A task start-to-close timeout for this workflow execution must be specified + // either as a default for the workflow type or through this parameter. If neither + // this parameter is set nor a default task start-to-close timeout was specified + // at registration time then a fault is returned. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The workflowId of the workflow execution. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` + + // The type of the workflow execution to be started. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s StartChildWorkflowExecutionDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartChildWorkflowExecutionDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartChildWorkflowExecutionDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartChildWorkflowExecutionDecisionAttributes"} + if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + if s.WorkflowType == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowType")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + if s.WorkflowType != nil { + if err := s.WorkflowType.Validate(); err != nil { + invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetChildPolicy(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.ChildPolicy = &v + return s +} + +// SetControl sets the Control field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetControl(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.Control = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetExecutionStartToCloseTimeout(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetInput(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetLambdaRole(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.LambdaRole = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetTagList(v []*string) *StartChildWorkflowExecutionDecisionAttributes { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskList(v *TaskList) *StartChildWorkflowExecutionDecisionAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskPriority(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetTaskStartToCloseTimeout(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionDecisionAttributes { + s.WorkflowId = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *StartChildWorkflowExecutionDecisionAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionDecisionAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the StartChildWorkflowExecutionFailed event. +type StartChildWorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // When cause is set to OPERATION_NOT_PERMITTED, the decision fails because + // it lacks sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"StartChildWorkflowExecutionFailedCause"` + + // The data attached to the event that the decider can use in subsequent workflow + // tasks. This data isn't sent to the child workflow execution. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the StartChildWorkflowExecutionDecision to request this + // child workflow execution. This information can be useful for diagnosing problems + // by tracing back the chain of events. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // When the cause is WORKFLOW_ALREADY_RUNNING, initiatedEventId is the ID of + // the StartChildWorkflowExecutionInitiated event that corresponds to the StartChildWorkflowExecutionDecision + // to start the workflow execution. You can use this information to diagnose + // problems by tracing back the chain of events leading up to this event. + // + // When the cause isn't WORKFLOW_ALREADY_RUNNING, initiatedEventId is set to + // 0 because the StartChildWorkflowExecutionInitiated event doesn't exist. + // + // InitiatedEventId is a required field + InitiatedEventId *int64 `locationName:"initiatedEventId" type:"long" required:"true"` + + // The workflowId of the child workflow execution. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` + + // The workflow type provided in the StartChildWorkflowExecutionDecision that + // failed. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s StartChildWorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartChildWorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetCause(v string) *StartChildWorkflowExecutionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetControl sets the Control field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetControl(v string) *StartChildWorkflowExecutionFailedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartChildWorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetInitiatedEventId sets the InitiatedEventId field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetInitiatedEventId(v int64) *StartChildWorkflowExecutionFailedEventAttributes { + s.InitiatedEventId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionFailedEventAttributes { + s.WorkflowId = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *StartChildWorkflowExecutionFailedEventAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionFailedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the StartChildWorkflowExecutionInitiated event. +type StartChildWorkflowExecutionInitiatedEventAttributes struct { + _ struct{} `type:"structure"` + + // The policy to use for the child workflow executions if this execution gets + // terminated by explicitly calling the TerminateWorkflowExecution action or + // due to an expired timeout. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // Data attached to the event that can be used by the decider in subsequent + // decision tasks. This data isn't sent to the activity. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the StartChildWorkflowExecutionDecision to request this + // child workflow execution. This information can be useful for diagnosing problems + // by tracing back the cause of events. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The maximum duration for the child workflow execution. If the workflow execution + // isn't closed within this duration, it is timed out and force-terminated. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The inputs provided to the child workflow execution. + Input *string `locationName:"input" type:"string"` + + // The IAM role to attach to the child workflow execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The list of tags to associated with the child workflow execution. + TagList []*string `locationName:"tagList" type:"list"` + + // The name of the task list used for the decision tasks of the child workflow + // execution. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // The priority assigned for the decision tasks for this workflow execution. + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // The maximum duration allowed for the decision tasks for this workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The workflowId of the child workflow execution. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` + + // The type of the child workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s StartChildWorkflowExecutionInitiatedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartChildWorkflowExecutionInitiatedEventAttributes) GoString() string { + return s.String() +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetChildPolicy(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.ChildPolicy = &v + return s +} + +// SetControl sets the Control field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetControl(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetExecutionStartToCloseTimeout(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetInput(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetLambdaRole(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.LambdaRole = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTagList(v []*string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskList(v *TaskList) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskPriority(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetTaskStartToCloseTimeout(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetWorkflowId(v string) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.WorkflowId = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *StartChildWorkflowExecutionInitiatedEventAttributes) SetWorkflowType(v *WorkflowType) *StartChildWorkflowExecutionInitiatedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the StartLambdaFunctionFailed event. It isn't set +// for other event types. +type StartLambdaFunctionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. To help diagnose issues, use this information to + // trace back the chain of events leading up to this event. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because the + // IAM role attached to the execution lacked sufficient permissions. For details + // and example IAM policies, see Lambda Tasks (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) + // in the Amazon SWF Developer Guide. + Cause *string `locationName:"cause" type:"string" enum:"StartLambdaFunctionFailedCause"` + + // A description that can help diagnose the cause of the fault. + Message *string `locationName:"message" type:"string"` + + // The ID of the ActivityTaskScheduled event that was recorded when this activity + // task was scheduled. To help diagnose issues, use this information to trace + // back the chain of events leading up to this event. + ScheduledEventId *int64 `locationName:"scheduledEventId" type:"long"` +} + +// String returns the string representation +func (s StartLambdaFunctionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartLambdaFunctionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *StartLambdaFunctionFailedEventAttributes) SetCause(v string) *StartLambdaFunctionFailedEventAttributes { + s.Cause = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *StartLambdaFunctionFailedEventAttributes) SetMessage(v string) *StartLambdaFunctionFailedEventAttributes { + s.Message = &v + return s +} + +// SetScheduledEventId sets the ScheduledEventId field's value. +func (s *StartLambdaFunctionFailedEventAttributes) SetScheduledEventId(v int64) *StartLambdaFunctionFailedEventAttributes { + s.ScheduledEventId = &v + return s +} + +// Provides the details of the StartTimer decision. +// +// Access Control +// +// You can use IAM policies to control this decision's access to Amazon SWF +// resources as follows: +// +// * Use a Resource element with the domain name to limit the action to only +// specified domains. +// +// * Use an Action element to allow or deny permission to call this action. +// +// * You cannot use an IAM policy to constrain this action's parameters. +// +// If the caller doesn't have sufficient permissions to invoke the action, or +// the parameter values fall outside the specified constraints, the action fails. +// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. +// For details and example IAM policies, see Using IAM to Manage Access to Amazon +// SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) +// in the Amazon SWF Developer Guide. +type StartTimerDecisionAttributes struct { + _ struct{} `type:"structure"` + + // The data attached to the event that can be used by the decider in subsequent + // workflow tasks. + Control *string `locationName:"control" type:"string"` + + // The duration to wait before firing the timer. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. + // + // StartToFireTimeout is a required field + StartToFireTimeout *string `locationName:"startToFireTimeout" min:"1" type:"string" required:"true"` + + // The unique ID of the timer. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartTimerDecisionAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartTimerDecisionAttributes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartTimerDecisionAttributes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartTimerDecisionAttributes"} + if s.StartToFireTimeout == nil { + invalidParams.Add(request.NewErrParamRequired("StartToFireTimeout")) + } + if s.StartToFireTimeout != nil && len(*s.StartToFireTimeout) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartToFireTimeout", 1)) + } + if s.TimerId == nil { + invalidParams.Add(request.NewErrParamRequired("TimerId")) + } + if s.TimerId != nil && len(*s.TimerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TimerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetControl sets the Control field's value. +func (s *StartTimerDecisionAttributes) SetControl(v string) *StartTimerDecisionAttributes { + s.Control = &v + return s +} + +// SetStartToFireTimeout sets the StartToFireTimeout field's value. +func (s *StartTimerDecisionAttributes) SetStartToFireTimeout(v string) *StartTimerDecisionAttributes { + s.StartToFireTimeout = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *StartTimerDecisionAttributes) SetTimerId(v string) *StartTimerDecisionAttributes { + s.TimerId = &v + return s +} + +// Provides the details of the StartTimerFailed event. +type StartTimerFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The cause of the failure. This information is generated by the system and + // can be useful for diagnostic purposes. + // + // If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it + // lacked sufficient permissions. For details and example IAM policies, see + // Using IAM to Manage Access to Amazon SWF Workflows (http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) + // in the Amazon SWF Developer Guide. + // + // Cause is a required field + Cause *string `locationName:"cause" type:"string" required:"true" enum:"StartTimerFailedCause"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the StartTimer decision for this activity task. This information + // can be useful for diagnosing problems by tracing back the chain of events + // leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The timerId provided in the StartTimer decision that failed. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartTimerFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartTimerFailedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *StartTimerFailedEventAttributes) SetCause(v string) *StartTimerFailedEventAttributes { + s.Cause = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *StartTimerFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *StartTimerFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *StartTimerFailedEventAttributes) SetTimerId(v string) *StartTimerFailedEventAttributes { + s.TimerId = &v + return s +} + +type StartWorkflowExecutionInput struct { + _ struct{} `type:"structure"` + + // If set, specifies the policy to use for the child workflow executions of + // this workflow execution if it is terminated, by calling the TerminateWorkflowExecution + // action explicitly or due to an expired timeout. This policy overrides the + // default child policy specified when registering the workflow type using RegisterWorkflowType. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // A child policy for this workflow execution must be specified either as a + // default for the workflow type or through this parameter. If neither this + // parameter is set nor a default child policy was specified at registration + // time then a fault is returned. + ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` + + // The name of the domain in which the workflow execution is created. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout + // specified when registering the workflow type. + // + // The duration is specified in seconds; an integer greater than or equal to + // 0. Exceeding this limit causes the workflow execution to time out. Unlike + // some of the other timeout parameters in Amazon SWF, you cannot specify a + // value of "NONE" for this timeout; there is a one-year max limit on the time + // that a workflow execution can run. + // + // An execution start-to-close timeout must be specified either through this + // parameter or as a default when the workflow type is registered. If neither + // this parameter nor a default execution start-to-close timeout is specified, + // a fault is returned. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The input for the workflow execution. This is a free form string which should + // be meaningful to the workflow you are starting. This input is made available + // to the new workflow execution in the WorkflowExecutionStarted history event. + Input *string `locationName:"input" type:"string"` + + // The IAM role to attach to this workflow execution. + // + // Executions of this workflow type need IAM roles to invoke Lambda functions. + // If you don't attach an IAM role, any attempt to schedule a Lambda task fails. + // This results in a ScheduleLambdaFunctionFailed history event. For more information, + // see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) + // in the Amazon SWF Developer Guide. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The list of tags to associate with the workflow execution. You can specify + // a maximum of 5 tags. You can list workflow executions with a specific tag + // by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and + // specifying a TagFilter. + TagList []*string `locationName:"tagList" type:"list"` + + // The task list to use for the decision tasks generated for this workflow execution. + // This overrides the defaultTaskList specified when registering the workflow + // type. + // + // A task list for this workflow execution must be specified either as a default + // for the workflow type or through this parameter. If neither this parameter + // is set nor a default task list was specified at registration time then a + // fault is returned. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + TaskList *TaskList `locationName:"taskList" type:"structure"` + + // The task priority to use for this workflow execution. This overrides any + // default priority that was assigned when the workflow type was registered. + // If not set, then the default task priority for the workflow type is used. + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // Specifies the maximum duration of decision tasks for this workflow execution. + // This parameter overrides the defaultTaskStartToCloseTimout specified when + // registering the workflow type using RegisterWorkflowType. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // A task start-to-close timeout for this workflow execution must be specified + // either as a default for the workflow type or through this parameter. If neither + // this parameter is set nor a default task start-to-close timeout was specified + // at registration time then a fault is returned. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The user defined identifier associated with the workflow execution. You can + // use this to associate a custom identifier with the workflow execution. You + // may specify the same identifier if a workflow execution is logically a restart + // of a previous execution. You cannot have two open workflow executions with + // the same workflowId at the same time. + // + // The specified string must not start or end with whitespace. It must not contain + // a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f + // | \u007f-\u009f). Also, it must not contain the literal string arn. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` + + // The type of the workflow to start. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s StartWorkflowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartWorkflowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartWorkflowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartWorkflowExecutionInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.LambdaRole != nil && len(*s.LambdaRole) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LambdaRole", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + if s.WorkflowType == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowType")) + } + if s.TaskList != nil { + if err := s.TaskList.Validate(); err != nil { + invalidParams.AddNested("TaskList", err.(request.ErrInvalidParams)) + } + } + if s.WorkflowType != nil { + if err := s.WorkflowType.Validate(); err != nil { + invalidParams.AddNested("WorkflowType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *StartWorkflowExecutionInput) SetChildPolicy(v string) *StartWorkflowExecutionInput { + s.ChildPolicy = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *StartWorkflowExecutionInput) SetDomain(v string) *StartWorkflowExecutionInput { + s.Domain = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *StartWorkflowExecutionInput) SetExecutionStartToCloseTimeout(v string) *StartWorkflowExecutionInput { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *StartWorkflowExecutionInput) SetInput(v string) *StartWorkflowExecutionInput { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *StartWorkflowExecutionInput) SetLambdaRole(v string) *StartWorkflowExecutionInput { + s.LambdaRole = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *StartWorkflowExecutionInput) SetTagList(v []*string) *StartWorkflowExecutionInput { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *StartWorkflowExecutionInput) SetTaskList(v *TaskList) *StartWorkflowExecutionInput { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *StartWorkflowExecutionInput) SetTaskPriority(v string) *StartWorkflowExecutionInput { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *StartWorkflowExecutionInput) SetTaskStartToCloseTimeout(v string) *StartWorkflowExecutionInput { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *StartWorkflowExecutionInput) SetWorkflowId(v string) *StartWorkflowExecutionInput { + s.WorkflowId = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *StartWorkflowExecutionInput) SetWorkflowType(v *WorkflowType) *StartWorkflowExecutionInput { + s.WorkflowType = v + return s +} + +// Specifies the runId of a workflow execution. +type StartWorkflowExecutionOutput struct { + _ struct{} `type:"structure"` + + // The runId of a workflow execution. This ID is generated by the service and + // can be used to uniquely identify the workflow execution within a domain. + RunId *string `locationName:"runId" min:"1" type:"string"` +} + +// String returns the string representation +func (s StartWorkflowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartWorkflowExecutionOutput) GoString() string { + return s.String() +} + +// SetRunId sets the RunId field's value. +func (s *StartWorkflowExecutionOutput) SetRunId(v string) *StartWorkflowExecutionOutput { + s.RunId = &v + return s +} + +// Used to filter the workflow executions in visibility APIs based on a tag. +type TagFilter struct { + _ struct{} `type:"structure"` + + // Specifies the tag that must be associated with the execution for it to meet + // the filter criteria. + // + // Tag is a required field + Tag *string `locationName:"tag" type:"string" required:"true"` +} + +// String returns the string representation +func (s TagFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagFilter"} + if s.Tag == nil { + invalidParams.Add(request.NewErrParamRequired("Tag")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTag sets the Tag field's value. +func (s *TagFilter) SetTag(v string) *TagFilter { + s.Tag = &v + return s +} + +// Represents a task list. +type TaskList struct { + _ struct{} `type:"structure"` + + // The name of the task list. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskList) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskList) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TaskList) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TaskList"} + 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 +} + +// SetName sets the Name field's value. +func (s *TaskList) SetName(v string) *TaskList { + s.Name = &v + return s +} + +type TerminateWorkflowExecutionInput struct { + _ struct{} `type:"structure"` + + // If set, specifies the policy to use for the child workflow executions of + // the workflow execution being terminated. This policy overrides the child + // policy specified for the workflow execution at registration time or when + // starting the execution. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // A child policy for this workflow execution must be specified either as a + // default for the workflow type or through this parameter. If neither this + // parameter is set nor a default child policy was specified at registration + // time then a fault is returned. + ChildPolicy *string `locationName:"childPolicy" type:"string" enum:"ChildPolicy"` + + // Details for terminating the workflow execution. + Details *string `locationName:"details" type:"string"` + + // The domain of the workflow execution to terminate. + // + // Domain is a required field + Domain *string `locationName:"domain" min:"1" type:"string" required:"true"` + + // A descriptive reason for terminating the workflow execution. + Reason *string `locationName:"reason" type:"string"` + + // The runId of the workflow execution to terminate. + RunId *string `locationName:"runId" type:"string"` + + // The workflowId of the workflow execution to terminate. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TerminateWorkflowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateWorkflowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateWorkflowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateWorkflowExecutionInput"} + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *TerminateWorkflowExecutionInput) SetChildPolicy(v string) *TerminateWorkflowExecutionInput { + s.ChildPolicy = &v + return s +} + +// SetDetails sets the Details field's value. +func (s *TerminateWorkflowExecutionInput) SetDetails(v string) *TerminateWorkflowExecutionInput { + s.Details = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *TerminateWorkflowExecutionInput) SetDomain(v string) *TerminateWorkflowExecutionInput { + s.Domain = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *TerminateWorkflowExecutionInput) SetReason(v string) *TerminateWorkflowExecutionInput { + s.Reason = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *TerminateWorkflowExecutionInput) SetRunId(v string) *TerminateWorkflowExecutionInput { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *TerminateWorkflowExecutionInput) SetWorkflowId(v string) *TerminateWorkflowExecutionInput { + s.WorkflowId = &v + return s +} + +type TerminateWorkflowExecutionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TerminateWorkflowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateWorkflowExecutionOutput) GoString() string { + return s.String() +} + +// Provides the details of the TimerCanceled event. +type TimerCanceledEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CancelTimer decision to cancel this timer. This information + // can be useful for diagnosing problems by tracing back the chain of events + // leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The ID of the TimerStarted event that was recorded when this timer was started. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The unique ID of the timer that was canceled. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TimerCanceledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimerCanceledEventAttributes) GoString() string { + return s.String() +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *TimerCanceledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *TimerCanceledEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *TimerCanceledEventAttributes) SetStartedEventId(v int64) *TimerCanceledEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *TimerCanceledEventAttributes) SetTimerId(v string) *TimerCanceledEventAttributes { + s.TimerId = &v + return s +} + +// Provides the details of the TimerFired event. +type TimerFiredEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the TimerStarted event that was recorded when this timer was started. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // StartedEventId is a required field + StartedEventId *int64 `locationName:"startedEventId" type:"long" required:"true"` + + // The unique ID of the timer that fired. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TimerFiredEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimerFiredEventAttributes) GoString() string { + return s.String() +} + +// SetStartedEventId sets the StartedEventId field's value. +func (s *TimerFiredEventAttributes) SetStartedEventId(v int64) *TimerFiredEventAttributes { + s.StartedEventId = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *TimerFiredEventAttributes) SetTimerId(v string) *TimerFiredEventAttributes { + s.TimerId = &v + return s +} + +// Provides the details of the TimerStarted event. +type TimerStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // Data attached to the event that can be used by the decider in subsequent + // workflow tasks. + Control *string `locationName:"control" type:"string"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the StartTimer decision for this activity task. This information + // can be useful for diagnosing problems by tracing back the chain of events + // leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The duration of time after which the timer fires. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. + // + // StartToFireTimeout is a required field + StartToFireTimeout *string `locationName:"startToFireTimeout" min:"1" type:"string" required:"true"` + + // The unique ID of the timer that was started. + // + // TimerId is a required field + TimerId *string `locationName:"timerId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TimerStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimerStartedEventAttributes) GoString() string { + return s.String() +} + +// SetControl sets the Control field's value. +func (s *TimerStartedEventAttributes) SetControl(v string) *TimerStartedEventAttributes { + s.Control = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *TimerStartedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *TimerStartedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetStartToFireTimeout sets the StartToFireTimeout field's value. +func (s *TimerStartedEventAttributes) SetStartToFireTimeout(v string) *TimerStartedEventAttributes { + s.StartToFireTimeout = &v + return s +} + +// SetTimerId sets the TimerId field's value. +func (s *TimerStartedEventAttributes) SetTimerId(v string) *TimerStartedEventAttributes { + s.TimerId = &v + return s +} + +// Represents a workflow execution. +type WorkflowExecution struct { + _ struct{} `type:"structure"` + + // A system-generated unique identifier for the workflow execution. + // + // RunId is a required field + RunId *string `locationName:"runId" min:"1" type:"string" required:"true"` + + // The user defined identifier associated with the workflow execution. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecution) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WorkflowExecution) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WorkflowExecution"} + if s.RunId == nil { + invalidParams.Add(request.NewErrParamRequired("RunId")) + } + if s.RunId != nil && len(*s.RunId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RunId", 1)) + } + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRunId sets the RunId field's value. +func (s *WorkflowExecution) SetRunId(v string) *WorkflowExecution { + s.RunId = &v + return s +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *WorkflowExecution) SetWorkflowId(v string) *WorkflowExecution { + s.WorkflowId = &v + return s +} + +// Provides the details of the WorkflowExecutionCancelRequested event. +type WorkflowExecutionCancelRequestedEventAttributes struct { + _ struct{} `type:"structure"` + + // If set, indicates that the request to cancel the workflow execution was automatically + // generated, and specifies the cause. This happens if the parent workflow execution + // times out or is terminated, and the child policy is set to cancel child executions. + Cause *string `locationName:"cause" type:"string" enum:"WorkflowExecutionCancelRequestedCause"` + + // The ID of the RequestCancelExternalWorkflowExecutionInitiated event corresponding + // to the RequestCancelExternalWorkflowExecution decision to cancel this workflow + // execution.The source event with this ID can be found in the history of the + // source workflow execution. This information can be useful for diagnosing + // problems by tracing back the chain of events leading up to this event. + ExternalInitiatedEventId *int64 `locationName:"externalInitiatedEventId" type:"long"` + + // The external workflow execution for which the cancellation was requested. + ExternalWorkflowExecution *WorkflowExecution `locationName:"externalWorkflowExecution" type:"structure"` +} + +// String returns the string representation +func (s WorkflowExecutionCancelRequestedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionCancelRequestedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *WorkflowExecutionCancelRequestedEventAttributes) SetCause(v string) *WorkflowExecutionCancelRequestedEventAttributes { + s.Cause = &v + return s +} + +// SetExternalInitiatedEventId sets the ExternalInitiatedEventId field's value. +func (s *WorkflowExecutionCancelRequestedEventAttributes) SetExternalInitiatedEventId(v int64) *WorkflowExecutionCancelRequestedEventAttributes { + s.ExternalInitiatedEventId = &v + return s +} + +// SetExternalWorkflowExecution sets the ExternalWorkflowExecution field's value. +func (s *WorkflowExecutionCancelRequestedEventAttributes) SetExternalWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionCancelRequestedEventAttributes { + s.ExternalWorkflowExecution = v + return s +} + +// Provides the details of the WorkflowExecutionCanceled event. +type WorkflowExecutionCanceledEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CancelWorkflowExecution decision for this cancellation + // request. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The details of the cancellation. + Details *string `locationName:"details" type:"string"` +} + +// String returns the string representation +func (s WorkflowExecutionCanceledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionCanceledEventAttributes) GoString() string { + return s.String() +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *WorkflowExecutionCanceledEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionCanceledEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetDetails sets the Details field's value. +func (s *WorkflowExecutionCanceledEventAttributes) SetDetails(v string) *WorkflowExecutionCanceledEventAttributes { + s.Details = &v + return s +} + +// Provides the details of the WorkflowExecutionCompleted event. +type WorkflowExecutionCompletedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the CompleteWorkflowExecution decision to complete this + // execution. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The result produced by the workflow execution upon successful completion. + Result *string `locationName:"result" type:"string"` +} + +// String returns the string representation +func (s WorkflowExecutionCompletedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionCompletedEventAttributes) GoString() string { + return s.String() +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *WorkflowExecutionCompletedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionCompletedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *WorkflowExecutionCompletedEventAttributes) SetResult(v string) *WorkflowExecutionCompletedEventAttributes { + s.Result = &v + return s +} + +// The configuration settings for a workflow execution including timeout values, +// tasklist etc. These configuration settings are determined from the defaults +// specified when registering the workflow type and those specified when starting +// the workflow execution. +type WorkflowExecutionConfiguration struct { + _ struct{} `type:"structure"` + + // The policy to use for the child workflow executions if this workflow execution + // is terminated, by calling the TerminateWorkflowExecution action explicitly + // or due to an expired timeout. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // The total duration for this workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // ExecutionStartToCloseTimeout is a required field + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" min:"1" type:"string" required:"true"` + + // The IAM role attached to the child workflow execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The task list used for the decision tasks generated for this workflow execution. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // The priority assigned to decision tasks for this workflow execution. Valid + // values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // The maximum duration allowed for decision tasks for this workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + // + // TaskStartToCloseTimeout is a required field + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionConfiguration) GoString() string { + return s.String() +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *WorkflowExecutionConfiguration) SetChildPolicy(v string) *WorkflowExecutionConfiguration { + s.ChildPolicy = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *WorkflowExecutionConfiguration) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionConfiguration { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *WorkflowExecutionConfiguration) SetLambdaRole(v string) *WorkflowExecutionConfiguration { + s.LambdaRole = &v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *WorkflowExecutionConfiguration) SetTaskList(v *TaskList) *WorkflowExecutionConfiguration { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *WorkflowExecutionConfiguration) SetTaskPriority(v string) *WorkflowExecutionConfiguration { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *WorkflowExecutionConfiguration) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionConfiguration { + s.TaskStartToCloseTimeout = &v + return s +} + +// Provides the details of the WorkflowExecutionContinuedAsNew event. +type WorkflowExecutionContinuedAsNewEventAttributes struct { + _ struct{} `type:"structure"` + + // The policy to use for the child workflow executions of the new execution + // if it is terminated by calling the TerminateWorkflowExecution action explicitly + // or due to an expired timeout. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the ContinueAsNewWorkflowExecution decision that started + // this execution. This information can be useful for diagnosing problems by + // tracing back the chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The total duration allowed for the new workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The input provided to the new workflow execution. + Input *string `locationName:"input" type:"string"` + + // The IAM role to attach to the new (continued) workflow execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The runId of the new workflow execution. + // + // NewExecutionRunId is a required field + NewExecutionRunId *string `locationName:"newExecutionRunId" min:"1" type:"string" required:"true"` + + // The list of tags associated with the new workflow execution. + TagList []*string `locationName:"tagList" type:"list"` + + // The task list to use for the decisions of the new (continued) workflow execution. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // The priority of the task to use for the decisions of the new (continued) + // workflow execution. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // The maximum duration of decision tasks for the new workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The workflow type of this execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionContinuedAsNewEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionContinuedAsNewEventAttributes) GoString() string { + return s.String() +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetChildPolicy(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.ChildPolicy = &v + return s +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionContinuedAsNewEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetInput(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetLambdaRole(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.LambdaRole = &v + return s +} + +// SetNewExecutionRunId sets the NewExecutionRunId field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetNewExecutionRunId(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.NewExecutionRunId = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTagList(v []*string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskList(v *TaskList) *WorkflowExecutionContinuedAsNewEventAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskPriority(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionContinuedAsNewEventAttributes { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *WorkflowExecutionContinuedAsNewEventAttributes) SetWorkflowType(v *WorkflowType) *WorkflowExecutionContinuedAsNewEventAttributes { + s.WorkflowType = v + return s +} + +// Contains the count of workflow executions returned from CountOpenWorkflowExecutions +// or CountClosedWorkflowExecutions +type WorkflowExecutionCount struct { + _ struct{} `type:"structure"` + + // The number of workflow executions. + // + // Count is a required field + Count *int64 `locationName:"count" type:"integer" required:"true"` + + // If set to true, indicates that the actual count was more than the maximum + // supported by this API and the count returned is the truncated value. + Truncated *bool `locationName:"truncated" type:"boolean"` +} + +// String returns the string representation +func (s WorkflowExecutionCount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionCount) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *WorkflowExecutionCount) SetCount(v int64) *WorkflowExecutionCount { + s.Count = &v + return s +} + +// SetTruncated sets the Truncated field's value. +func (s *WorkflowExecutionCount) SetTruncated(v bool) *WorkflowExecutionCount { + s.Truncated = &v + return s +} + +// Provides the details of the WorkflowExecutionFailed event. +type WorkflowExecutionFailedEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the DecisionTaskCompleted event corresponding to the decision task + // that resulted in the FailWorkflowExecution decision to fail this execution. + // This information can be useful for diagnosing problems by tracing back the + // chain of events leading up to this event. + // + // DecisionTaskCompletedEventId is a required field + DecisionTaskCompletedEventId *int64 `locationName:"decisionTaskCompletedEventId" type:"long" required:"true"` + + // The details of the failure. + Details *string `locationName:"details" type:"string"` + + // The descriptive reason provided for the failure. + Reason *string `locationName:"reason" type:"string"` +} + +// String returns the string representation +func (s WorkflowExecutionFailedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionFailedEventAttributes) GoString() string { + return s.String() +} + +// SetDecisionTaskCompletedEventId sets the DecisionTaskCompletedEventId field's value. +func (s *WorkflowExecutionFailedEventAttributes) SetDecisionTaskCompletedEventId(v int64) *WorkflowExecutionFailedEventAttributes { + s.DecisionTaskCompletedEventId = &v + return s +} + +// SetDetails sets the Details field's value. +func (s *WorkflowExecutionFailedEventAttributes) SetDetails(v string) *WorkflowExecutionFailedEventAttributes { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *WorkflowExecutionFailedEventAttributes) SetReason(v string) *WorkflowExecutionFailedEventAttributes { + s.Reason = &v + return s +} + +// Used to filter the workflow executions in visibility APIs by their workflowId. +type WorkflowExecutionFilter struct { + _ struct{} `type:"structure"` + + // The workflowId to pass of match the criteria of this filter. + // + // WorkflowId is a required field + WorkflowId *string `locationName:"workflowId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WorkflowExecutionFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WorkflowExecutionFilter"} + if s.WorkflowId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkflowId")) + } + if s.WorkflowId != nil && len(*s.WorkflowId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkflowId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkflowId sets the WorkflowId field's value. +func (s *WorkflowExecutionFilter) SetWorkflowId(v string) *WorkflowExecutionFilter { + s.WorkflowId = &v + return s +} + +// Contains information about a workflow execution. +type WorkflowExecutionInfo struct { + _ struct{} `type:"structure"` + + // Set to true if a cancellation is requested for this workflow execution. + CancelRequested *bool `locationName:"cancelRequested" type:"boolean"` + + // If the execution status is closed then this specifies how the execution was + // closed: + // + // * COMPLETED – the execution was successfully completed. + // + // * CANCELED – the execution was canceled.Cancellation allows the implementation + // to gracefully clean up before the execution is closed. + // + // * TERMINATED – the execution was force terminated. + // + // * FAILED – the execution failed to complete. + // + // * TIMED_OUT – the execution did not complete in the alloted time and was + // automatically timed out. + // + // * CONTINUED_AS_NEW – the execution is logically continued. This means + // the current execution was completed and a new execution was started to + // carry on the workflow. + CloseStatus *string `locationName:"closeStatus" type:"string" enum:"CloseStatus"` + + // The time when the workflow execution was closed. Set only if the execution + // status is CLOSED. + CloseTimestamp *time.Time `locationName:"closeTimestamp" type:"timestamp"` + + // The workflow execution this information is about. + // + // Execution is a required field + Execution *WorkflowExecution `locationName:"execution" type:"structure" required:"true"` + + // The current status of the execution. + // + // ExecutionStatus is a required field + ExecutionStatus *string `locationName:"executionStatus" type:"string" required:"true" enum:"ExecutionStatus"` + + // If this workflow execution is a child of another execution then contains + // the workflow execution that started this execution. + Parent *WorkflowExecution `locationName:"parent" type:"structure"` + + // The time when the execution was started. + // + // StartTimestamp is a required field + StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp" required:"true"` + + // The list of tags associated with the workflow execution. Tags can be used + // to identify and list workflow executions of interest through the visibility + // APIs. A workflow execution can have a maximum of 5 tags. + TagList []*string `locationName:"tagList" type:"list"` + + // The type of the workflow execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionInfo) GoString() string { + return s.String() +} + +// SetCancelRequested sets the CancelRequested field's value. +func (s *WorkflowExecutionInfo) SetCancelRequested(v bool) *WorkflowExecutionInfo { + s.CancelRequested = &v + return s +} + +// SetCloseStatus sets the CloseStatus field's value. +func (s *WorkflowExecutionInfo) SetCloseStatus(v string) *WorkflowExecutionInfo { + s.CloseStatus = &v + return s +} + +// SetCloseTimestamp sets the CloseTimestamp field's value. +func (s *WorkflowExecutionInfo) SetCloseTimestamp(v time.Time) *WorkflowExecutionInfo { + s.CloseTimestamp = &v + return s +} + +// SetExecution sets the Execution field's value. +func (s *WorkflowExecutionInfo) SetExecution(v *WorkflowExecution) *WorkflowExecutionInfo { + s.Execution = v + return s +} + +// SetExecutionStatus sets the ExecutionStatus field's value. +func (s *WorkflowExecutionInfo) SetExecutionStatus(v string) *WorkflowExecutionInfo { + s.ExecutionStatus = &v + return s +} + +// SetParent sets the Parent field's value. +func (s *WorkflowExecutionInfo) SetParent(v *WorkflowExecution) *WorkflowExecutionInfo { + s.Parent = v + return s +} + +// SetStartTimestamp sets the StartTimestamp field's value. +func (s *WorkflowExecutionInfo) SetStartTimestamp(v time.Time) *WorkflowExecutionInfo { + s.StartTimestamp = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *WorkflowExecutionInfo) SetTagList(v []*string) *WorkflowExecutionInfo { + s.TagList = v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *WorkflowExecutionInfo) SetWorkflowType(v *WorkflowType) *WorkflowExecutionInfo { + s.WorkflowType = v + return s +} + +// Contains a paginated list of information about workflow executions. +type WorkflowExecutionInfos struct { + _ struct{} `type:"structure"` + + // The list of workflow information structures. + // + // ExecutionInfos is a required field + ExecutionInfos []*WorkflowExecutionInfo `locationName:"executionInfos" type:"list" required:"true"` + + // If a NextPageToken was returned by a previous call, there are more results + // available. To retrieve the next page of results, make the call again using + // the returned token in nextPageToken. Keep all other arguments unchanged. + // + // The configured maximumPageSize determines how many results can be returned + // in a single call. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s WorkflowExecutionInfos) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionInfos) GoString() string { + return s.String() +} + +// SetExecutionInfos sets the ExecutionInfos field's value. +func (s *WorkflowExecutionInfos) SetExecutionInfos(v []*WorkflowExecutionInfo) *WorkflowExecutionInfos { + s.ExecutionInfos = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *WorkflowExecutionInfos) SetNextPageToken(v string) *WorkflowExecutionInfos { + s.NextPageToken = &v + return s +} + +// Contains the counts of open tasks, child workflow executions and timers for +// a workflow execution. +type WorkflowExecutionOpenCounts struct { + _ struct{} `type:"structure"` + + // The count of activity tasks whose status is OPEN. + // + // OpenActivityTasks is a required field + OpenActivityTasks *int64 `locationName:"openActivityTasks" type:"integer" required:"true"` + + // The count of child workflow executions whose status is OPEN. + // + // OpenChildWorkflowExecutions is a required field + OpenChildWorkflowExecutions *int64 `locationName:"openChildWorkflowExecutions" type:"integer" required:"true"` + + // The count of decision tasks whose status is OPEN. A workflow execution can + // have at most one open decision task. + // + // OpenDecisionTasks is a required field + OpenDecisionTasks *int64 `locationName:"openDecisionTasks" type:"integer" required:"true"` + + // The count of Lambda tasks whose status is OPEN. + OpenLambdaFunctions *int64 `locationName:"openLambdaFunctions" type:"integer"` + + // The count of timers started by this workflow execution that have not fired + // yet. + // + // OpenTimers is a required field + OpenTimers *int64 `locationName:"openTimers" type:"integer" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionOpenCounts) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionOpenCounts) GoString() string { + return s.String() +} + +// SetOpenActivityTasks sets the OpenActivityTasks field's value. +func (s *WorkflowExecutionOpenCounts) SetOpenActivityTasks(v int64) *WorkflowExecutionOpenCounts { + s.OpenActivityTasks = &v + return s +} + +// SetOpenChildWorkflowExecutions sets the OpenChildWorkflowExecutions field's value. +func (s *WorkflowExecutionOpenCounts) SetOpenChildWorkflowExecutions(v int64) *WorkflowExecutionOpenCounts { + s.OpenChildWorkflowExecutions = &v + return s +} + +// SetOpenDecisionTasks sets the OpenDecisionTasks field's value. +func (s *WorkflowExecutionOpenCounts) SetOpenDecisionTasks(v int64) *WorkflowExecutionOpenCounts { + s.OpenDecisionTasks = &v + return s +} + +// SetOpenLambdaFunctions sets the OpenLambdaFunctions field's value. +func (s *WorkflowExecutionOpenCounts) SetOpenLambdaFunctions(v int64) *WorkflowExecutionOpenCounts { + s.OpenLambdaFunctions = &v + return s +} + +// SetOpenTimers sets the OpenTimers field's value. +func (s *WorkflowExecutionOpenCounts) SetOpenTimers(v int64) *WorkflowExecutionOpenCounts { + s.OpenTimers = &v + return s +} + +// Provides the details of the WorkflowExecutionSignaled event. +type WorkflowExecutionSignaledEventAttributes struct { + _ struct{} `type:"structure"` + + // The ID of the SignalExternalWorkflowExecutionInitiated event corresponding + // to the SignalExternalWorkflow decision to signal this workflow execution.The + // source event with this ID can be found in the history of the source workflow + // execution. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. This field is set only + // if the signal was initiated by another workflow execution. + ExternalInitiatedEventId *int64 `locationName:"externalInitiatedEventId" type:"long"` + + // The workflow execution that sent the signal. This is set only of the signal + // was sent by another workflow execution. + ExternalWorkflowExecution *WorkflowExecution `locationName:"externalWorkflowExecution" type:"structure"` + + // The inputs provided with the signal. The decider can use the signal name + // and inputs to determine how to process the signal. + Input *string `locationName:"input" type:"string"` + + // The name of the signal received. The decider can use the signal name and + // inputs to determine how to the process the signal. + // + // SignalName is a required field + SignalName *string `locationName:"signalName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionSignaledEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionSignaledEventAttributes) GoString() string { + return s.String() +} + +// SetExternalInitiatedEventId sets the ExternalInitiatedEventId field's value. +func (s *WorkflowExecutionSignaledEventAttributes) SetExternalInitiatedEventId(v int64) *WorkflowExecutionSignaledEventAttributes { + s.ExternalInitiatedEventId = &v + return s +} + +// SetExternalWorkflowExecution sets the ExternalWorkflowExecution field's value. +func (s *WorkflowExecutionSignaledEventAttributes) SetExternalWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionSignaledEventAttributes { + s.ExternalWorkflowExecution = v + return s +} + +// SetInput sets the Input field's value. +func (s *WorkflowExecutionSignaledEventAttributes) SetInput(v string) *WorkflowExecutionSignaledEventAttributes { + s.Input = &v + return s +} + +// SetSignalName sets the SignalName field's value. +func (s *WorkflowExecutionSignaledEventAttributes) SetSignalName(v string) *WorkflowExecutionSignaledEventAttributes { + s.SignalName = &v + return s +} + +// Provides details of WorkflowExecutionStarted event. +type WorkflowExecutionStartedEventAttributes struct { + _ struct{} `type:"structure"` + + // The policy to use for the child workflow executions if this workflow execution + // is terminated, by calling the TerminateWorkflowExecution action explicitly + // or due to an expired timeout. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // If this workflow execution was started due to a ContinueAsNewWorkflowExecution + // decision, then it contains the runId of the previous workflow execution that + // was closed and continued as this execution. + ContinuedExecutionRunId *string `locationName:"continuedExecutionRunId" type:"string"` + + // The maximum duration for this workflow execution. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + ExecutionStartToCloseTimeout *string `locationName:"executionStartToCloseTimeout" type:"string"` + + // The input provided to the workflow execution. + Input *string `locationName:"input" type:"string"` + + // The IAM role attached to the workflow execution. + LambdaRole *string `locationName:"lambdaRole" min:"1" type:"string"` + + // The ID of the StartChildWorkflowExecutionInitiated event corresponding to + // the StartChildWorkflowExecutionDecision to start this workflow execution. + // The source event with this ID can be found in the history of the source workflow + // execution. This information can be useful for diagnosing problems by tracing + // back the chain of events leading up to this event. + ParentInitiatedEventId *int64 `locationName:"parentInitiatedEventId" type:"long"` + + // The source workflow execution that started this workflow execution. The member + // isn't set if the workflow execution was not started by a workflow. + ParentWorkflowExecution *WorkflowExecution `locationName:"parentWorkflowExecution" type:"structure"` + + // The list of tags associated with this workflow execution. An execution can + // have up to 5 tags. + TagList []*string `locationName:"tagList" type:"list"` + + // The name of the task list for scheduling the decision tasks for this workflow + // execution. + // + // TaskList is a required field + TaskList *TaskList `locationName:"taskList" type:"structure" required:"true"` + + // The priority of the decision tasks in the workflow execution. + TaskPriority *string `locationName:"taskPriority" type:"string"` + + // The maximum duration of decision tasks for this workflow type. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + TaskStartToCloseTimeout *string `locationName:"taskStartToCloseTimeout" type:"string"` + + // The workflow type of this execution. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s WorkflowExecutionStartedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionStartedEventAttributes) GoString() string { + return s.String() +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetChildPolicy(v string) *WorkflowExecutionStartedEventAttributes { + s.ChildPolicy = &v + return s +} + +// SetContinuedExecutionRunId sets the ContinuedExecutionRunId field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetContinuedExecutionRunId(v string) *WorkflowExecutionStartedEventAttributes { + s.ContinuedExecutionRunId = &v + return s +} + +// SetExecutionStartToCloseTimeout sets the ExecutionStartToCloseTimeout field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetExecutionStartToCloseTimeout(v string) *WorkflowExecutionStartedEventAttributes { + s.ExecutionStartToCloseTimeout = &v + return s +} + +// SetInput sets the Input field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetInput(v string) *WorkflowExecutionStartedEventAttributes { + s.Input = &v + return s +} + +// SetLambdaRole sets the LambdaRole field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetLambdaRole(v string) *WorkflowExecutionStartedEventAttributes { + s.LambdaRole = &v + return s +} + +// SetParentInitiatedEventId sets the ParentInitiatedEventId field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetParentInitiatedEventId(v int64) *WorkflowExecutionStartedEventAttributes { + s.ParentInitiatedEventId = &v + return s +} + +// SetParentWorkflowExecution sets the ParentWorkflowExecution field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetParentWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionStartedEventAttributes { + s.ParentWorkflowExecution = v + return s +} + +// SetTagList sets the TagList field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetTagList(v []*string) *WorkflowExecutionStartedEventAttributes { + s.TagList = v + return s +} + +// SetTaskList sets the TaskList field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetTaskList(v *TaskList) *WorkflowExecutionStartedEventAttributes { + s.TaskList = v + return s +} + +// SetTaskPriority sets the TaskPriority field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetTaskPriority(v string) *WorkflowExecutionStartedEventAttributes { + s.TaskPriority = &v + return s +} + +// SetTaskStartToCloseTimeout sets the TaskStartToCloseTimeout field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetTaskStartToCloseTimeout(v string) *WorkflowExecutionStartedEventAttributes { + s.TaskStartToCloseTimeout = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *WorkflowExecutionStartedEventAttributes) SetWorkflowType(v *WorkflowType) *WorkflowExecutionStartedEventAttributes { + s.WorkflowType = v + return s +} + +// Provides the details of the WorkflowExecutionTerminated event. +type WorkflowExecutionTerminatedEventAttributes struct { + _ struct{} `type:"structure"` + + // If set, indicates that the workflow execution was automatically terminated, + // and specifies the cause. This happens if the parent workflow execution times + // out or is terminated and the child policy is set to terminate child executions. + Cause *string `locationName:"cause" type:"string" enum:"WorkflowExecutionTerminatedCause"` + + // The policy used for the child workflow executions of this workflow execution. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // The details provided for the termination. + Details *string `locationName:"details" type:"string"` + + // The reason provided for the termination. + Reason *string `locationName:"reason" type:"string"` +} + +// String returns the string representation +func (s WorkflowExecutionTerminatedEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionTerminatedEventAttributes) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *WorkflowExecutionTerminatedEventAttributes) SetCause(v string) *WorkflowExecutionTerminatedEventAttributes { + s.Cause = &v + return s +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *WorkflowExecutionTerminatedEventAttributes) SetChildPolicy(v string) *WorkflowExecutionTerminatedEventAttributes { + s.ChildPolicy = &v + return s +} + +// SetDetails sets the Details field's value. +func (s *WorkflowExecutionTerminatedEventAttributes) SetDetails(v string) *WorkflowExecutionTerminatedEventAttributes { + s.Details = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *WorkflowExecutionTerminatedEventAttributes) SetReason(v string) *WorkflowExecutionTerminatedEventAttributes { + s.Reason = &v + return s +} + +// Provides the details of the WorkflowExecutionTimedOut event. +type WorkflowExecutionTimedOutEventAttributes struct { + _ struct{} `type:"structure"` + + // The policy used for the child workflow executions of this workflow execution. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + // + // ChildPolicy is a required field + ChildPolicy *string `locationName:"childPolicy" type:"string" required:"true" enum:"ChildPolicy"` + + // The type of timeout that caused this event. + // + // TimeoutType is a required field + TimeoutType *string `locationName:"timeoutType" type:"string" required:"true" enum:"WorkflowExecutionTimeoutType"` +} + +// String returns the string representation +func (s WorkflowExecutionTimedOutEventAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowExecutionTimedOutEventAttributes) GoString() string { + return s.String() +} + +// SetChildPolicy sets the ChildPolicy field's value. +func (s *WorkflowExecutionTimedOutEventAttributes) SetChildPolicy(v string) *WorkflowExecutionTimedOutEventAttributes { + s.ChildPolicy = &v + return s +} + +// SetTimeoutType sets the TimeoutType field's value. +func (s *WorkflowExecutionTimedOutEventAttributes) SetTimeoutType(v string) *WorkflowExecutionTimedOutEventAttributes { + s.TimeoutType = &v + return s +} + +// Represents a workflow type. +type WorkflowType struct { + _ struct{} `type:"structure"` + + // The name of the workflow type. + // + // The combination of workflow type name and version must be unique with in + // a domain. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The version of the workflow type. + // + // The combination of workflow type name and version must be unique with in + // a domain. + // + // Version is a required field + Version *string `locationName:"version" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WorkflowType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WorkflowType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WorkflowType"} + 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.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *WorkflowType) SetName(v string) *WorkflowType { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *WorkflowType) SetVersion(v string) *WorkflowType { + s.Version = &v + return s +} + +// The configuration settings of a workflow type. +type WorkflowTypeConfiguration struct { + _ struct{} `type:"structure"` + + // The default policy to use for the child workflow executions when a workflow + // execution of this type is terminated, by calling the TerminateWorkflowExecution + // action explicitly or due to an expired timeout. This default can be overridden + // when starting a workflow execution using the StartWorkflowExecution action + // or the StartChildWorkflowExecutionDecision. + // + // The supported child policies are: + // + // * TERMINATE – The child executions are terminated. + // + // * REQUEST_CANCEL – A request to cancel is attempted for each child execution + // by recording a WorkflowExecutionCancelRequested event in its history. + // It is up to the decider to take appropriate actions when it receives an + // execution history with this event. + // + // * ABANDON – No action is taken. The child executions continue to run. + DefaultChildPolicy *string `locationName:"defaultChildPolicy" type:"string" enum:"ChildPolicy"` + + // The default maximum duration, specified when registering the workflow type, + // for executions of this workflow type. This default can be overridden when + // starting a workflow execution using the StartWorkflowExecution action or + // the StartChildWorkflowExecutionDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultExecutionStartToCloseTimeout *string `locationName:"defaultExecutionStartToCloseTimeout" type:"string"` + + // The default IAM role attached to this workflow type. + // + // Executions of this workflow type need IAM roles to invoke Lambda functions. + // If you don't specify an IAM role when starting this workflow type, the default + // Lambda role is attached to the execution. For more information, see http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html) + // in the Amazon SWF Developer Guide. + DefaultLambdaRole *string `locationName:"defaultLambdaRole" min:"1" type:"string"` + + // The default task list, specified when registering the workflow type, for + // decisions tasks scheduled for workflow executions of this type. This default + // can be overridden when starting a workflow execution using the StartWorkflowExecution + // action or the StartChildWorkflowExecutionDecision. + DefaultTaskList *TaskList `locationName:"defaultTaskList" type:"structure"` + + // The default task priority, specified when registering the workflow type, + // for all decision tasks of this workflow type. This default can be overridden + // when starting a workflow execution using the StartWorkflowExecution action + // or the StartChildWorkflowExecution decision. + // + // Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) + // to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. + // + // For more information about setting task priority, see Setting Task Priority + // (http://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html) + // in the Amazon SWF Developer Guide. + DefaultTaskPriority *string `locationName:"defaultTaskPriority" type:"string"` + + // The default maximum duration, specified when registering the workflow type, + // that a decision task for executions of this workflow type might take before + // returning completion or failure. If the task doesn'tdo close in the specified + // time then the task is automatically timed out and rescheduled. If the decider + // eventually reports a completion or failure, it is ignored. This default can + // be overridden when starting a workflow execution using the StartWorkflowExecution + // action or the StartChildWorkflowExecutionDecision. + // + // The duration is specified in seconds, an integer greater than or equal to + // 0. You can use NONE to specify unlimited duration. + DefaultTaskStartToCloseTimeout *string `locationName:"defaultTaskStartToCloseTimeout" type:"string"` +} + +// String returns the string representation +func (s WorkflowTypeConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowTypeConfiguration) GoString() string { + return s.String() +} + +// SetDefaultChildPolicy sets the DefaultChildPolicy field's value. +func (s *WorkflowTypeConfiguration) SetDefaultChildPolicy(v string) *WorkflowTypeConfiguration { + s.DefaultChildPolicy = &v + return s +} + +// SetDefaultExecutionStartToCloseTimeout sets the DefaultExecutionStartToCloseTimeout field's value. +func (s *WorkflowTypeConfiguration) SetDefaultExecutionStartToCloseTimeout(v string) *WorkflowTypeConfiguration { + s.DefaultExecutionStartToCloseTimeout = &v + return s +} + +// SetDefaultLambdaRole sets the DefaultLambdaRole field's value. +func (s *WorkflowTypeConfiguration) SetDefaultLambdaRole(v string) *WorkflowTypeConfiguration { + s.DefaultLambdaRole = &v + return s +} + +// SetDefaultTaskList sets the DefaultTaskList field's value. +func (s *WorkflowTypeConfiguration) SetDefaultTaskList(v *TaskList) *WorkflowTypeConfiguration { + s.DefaultTaskList = v + return s +} + +// SetDefaultTaskPriority sets the DefaultTaskPriority field's value. +func (s *WorkflowTypeConfiguration) SetDefaultTaskPriority(v string) *WorkflowTypeConfiguration { + s.DefaultTaskPriority = &v + return s +} + +// SetDefaultTaskStartToCloseTimeout sets the DefaultTaskStartToCloseTimeout field's value. +func (s *WorkflowTypeConfiguration) SetDefaultTaskStartToCloseTimeout(v string) *WorkflowTypeConfiguration { + s.DefaultTaskStartToCloseTimeout = &v + return s +} + +// Used to filter workflow execution query results by type. Each parameter, +// if specified, defines a rule that must be satisfied by each returned result. +type WorkflowTypeFilter struct { + _ struct{} `type:"structure"` + + // Name of the workflow type. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // Version of the workflow type. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s WorkflowTypeFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowTypeFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WorkflowTypeFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WorkflowTypeFilter"} + 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 +} + +// SetName sets the Name field's value. +func (s *WorkflowTypeFilter) SetName(v string) *WorkflowTypeFilter { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *WorkflowTypeFilter) SetVersion(v string) *WorkflowTypeFilter { + s.Version = &v + return s +} + +// Contains information about a workflow type. +type WorkflowTypeInfo struct { + _ struct{} `type:"structure"` + + // The date when this type was registered. + // + // CreationDate is a required field + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` + + // If the type is in deprecated state, then it is set to the date when the type + // was deprecated. + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` + + // The description of the type registered through RegisterWorkflowType. + Description *string `locationName:"description" type:"string"` + + // The current status of the workflow type. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"RegistrationStatus"` + + // The workflow type this information is about. + // + // WorkflowType is a required field + WorkflowType *WorkflowType `locationName:"workflowType" type:"structure" required:"true"` +} + +// String returns the string representation +func (s WorkflowTypeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowTypeInfo) GoString() string { + return s.String() +} + +// SetCreationDate sets the CreationDate field's value. +func (s *WorkflowTypeInfo) SetCreationDate(v time.Time) *WorkflowTypeInfo { + s.CreationDate = &v + return s +} + +// SetDeprecationDate sets the DeprecationDate field's value. +func (s *WorkflowTypeInfo) SetDeprecationDate(v time.Time) *WorkflowTypeInfo { + s.DeprecationDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *WorkflowTypeInfo) SetDescription(v string) *WorkflowTypeInfo { + s.Description = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *WorkflowTypeInfo) SetStatus(v string) *WorkflowTypeInfo { + s.Status = &v + return s +} + +// SetWorkflowType sets the WorkflowType field's value. +func (s *WorkflowTypeInfo) SetWorkflowType(v *WorkflowType) *WorkflowTypeInfo { + s.WorkflowType = v + return s +} + +const ( + // ActivityTaskTimeoutTypeStartToClose is a ActivityTaskTimeoutType enum value + ActivityTaskTimeoutTypeStartToClose = "START_TO_CLOSE" + + // ActivityTaskTimeoutTypeScheduleToStart is a ActivityTaskTimeoutType enum value + ActivityTaskTimeoutTypeScheduleToStart = "SCHEDULE_TO_START" + + // ActivityTaskTimeoutTypeScheduleToClose is a ActivityTaskTimeoutType enum value + ActivityTaskTimeoutTypeScheduleToClose = "SCHEDULE_TO_CLOSE" + + // ActivityTaskTimeoutTypeHeartbeat is a ActivityTaskTimeoutType enum value + ActivityTaskTimeoutTypeHeartbeat = "HEARTBEAT" +) + +const ( + // CancelTimerFailedCauseTimerIdUnknown is a CancelTimerFailedCause enum value + CancelTimerFailedCauseTimerIdUnknown = "TIMER_ID_UNKNOWN" + + // CancelTimerFailedCauseOperationNotPermitted is a CancelTimerFailedCause enum value + CancelTimerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // CancelWorkflowExecutionFailedCauseUnhandledDecision is a CancelWorkflowExecutionFailedCause enum value + CancelWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" + + // CancelWorkflowExecutionFailedCauseOperationNotPermitted is a CancelWorkflowExecutionFailedCause enum value + CancelWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // ChildPolicyTerminate is a ChildPolicy enum value + ChildPolicyTerminate = "TERMINATE" + + // ChildPolicyRequestCancel is a ChildPolicy enum value + ChildPolicyRequestCancel = "REQUEST_CANCEL" + + // ChildPolicyAbandon is a ChildPolicy enum value + ChildPolicyAbandon = "ABANDON" +) + +const ( + // CloseStatusCompleted is a CloseStatus enum value + CloseStatusCompleted = "COMPLETED" + + // CloseStatusFailed is a CloseStatus enum value + CloseStatusFailed = "FAILED" + + // CloseStatusCanceled is a CloseStatus enum value + CloseStatusCanceled = "CANCELED" + + // CloseStatusTerminated is a CloseStatus enum value + CloseStatusTerminated = "TERMINATED" + + // CloseStatusContinuedAsNew is a CloseStatus enum value + CloseStatusContinuedAsNew = "CONTINUED_AS_NEW" + + // CloseStatusTimedOut is a CloseStatus enum value + CloseStatusTimedOut = "TIMED_OUT" +) + +const ( + // CompleteWorkflowExecutionFailedCauseUnhandledDecision is a CompleteWorkflowExecutionFailedCause enum value + CompleteWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" + + // CompleteWorkflowExecutionFailedCauseOperationNotPermitted is a CompleteWorkflowExecutionFailedCause enum value + CompleteWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // ContinueAsNewWorkflowExecutionFailedCauseUnhandledDecision is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" + + // ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDeprecated is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDeprecated = "WORKFLOW_TYPE_DEPRECATED" + + // ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist = "WORKFLOW_TYPE_DOES_NOT_EXIST" + + // ContinueAsNewWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined = "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" + + // ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined = "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" + + // ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskListUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" + + // ContinueAsNewWorkflowExecutionFailedCauseDefaultChildPolicyUndefined is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseDefaultChildPolicyUndefined = "DEFAULT_CHILD_POLICY_UNDEFINED" + + // ContinueAsNewWorkflowExecutionFailedCauseContinueAsNewWorkflowExecutionRateExceeded is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseContinueAsNewWorkflowExecutionRateExceeded = "CONTINUE_AS_NEW_WORKFLOW_EXECUTION_RATE_EXCEEDED" + + // ContinueAsNewWorkflowExecutionFailedCauseOperationNotPermitted is a ContinueAsNewWorkflowExecutionFailedCause enum value + ContinueAsNewWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // DecisionTaskTimeoutTypeStartToClose is a DecisionTaskTimeoutType enum value + DecisionTaskTimeoutTypeStartToClose = "START_TO_CLOSE" +) + +const ( + // DecisionTypeScheduleActivityTask is a DecisionType enum value + DecisionTypeScheduleActivityTask = "ScheduleActivityTask" + + // DecisionTypeRequestCancelActivityTask is a DecisionType enum value + DecisionTypeRequestCancelActivityTask = "RequestCancelActivityTask" + + // DecisionTypeCompleteWorkflowExecution is a DecisionType enum value + DecisionTypeCompleteWorkflowExecution = "CompleteWorkflowExecution" + + // DecisionTypeFailWorkflowExecution is a DecisionType enum value + DecisionTypeFailWorkflowExecution = "FailWorkflowExecution" + + // DecisionTypeCancelWorkflowExecution is a DecisionType enum value + DecisionTypeCancelWorkflowExecution = "CancelWorkflowExecution" + + // DecisionTypeContinueAsNewWorkflowExecution is a DecisionType enum value + DecisionTypeContinueAsNewWorkflowExecution = "ContinueAsNewWorkflowExecution" + + // DecisionTypeRecordMarker is a DecisionType enum value + DecisionTypeRecordMarker = "RecordMarker" + + // DecisionTypeStartTimer is a DecisionType enum value + DecisionTypeStartTimer = "StartTimer" + + // DecisionTypeCancelTimer is a DecisionType enum value + DecisionTypeCancelTimer = "CancelTimer" + + // DecisionTypeSignalExternalWorkflowExecution is a DecisionType enum value + DecisionTypeSignalExternalWorkflowExecution = "SignalExternalWorkflowExecution" + + // DecisionTypeRequestCancelExternalWorkflowExecution is a DecisionType enum value + DecisionTypeRequestCancelExternalWorkflowExecution = "RequestCancelExternalWorkflowExecution" + + // DecisionTypeStartChildWorkflowExecution is a DecisionType enum value + DecisionTypeStartChildWorkflowExecution = "StartChildWorkflowExecution" + + // DecisionTypeScheduleLambdaFunction is a DecisionType enum value + DecisionTypeScheduleLambdaFunction = "ScheduleLambdaFunction" +) + +const ( + // EventTypeWorkflowExecutionStarted is a EventType enum value + EventTypeWorkflowExecutionStarted = "WorkflowExecutionStarted" + + // EventTypeWorkflowExecutionCancelRequested is a EventType enum value + EventTypeWorkflowExecutionCancelRequested = "WorkflowExecutionCancelRequested" + + // EventTypeWorkflowExecutionCompleted is a EventType enum value + EventTypeWorkflowExecutionCompleted = "WorkflowExecutionCompleted" + + // EventTypeCompleteWorkflowExecutionFailed is a EventType enum value + EventTypeCompleteWorkflowExecutionFailed = "CompleteWorkflowExecutionFailed" + + // EventTypeWorkflowExecutionFailed is a EventType enum value + EventTypeWorkflowExecutionFailed = "WorkflowExecutionFailed" + + // EventTypeFailWorkflowExecutionFailed is a EventType enum value + EventTypeFailWorkflowExecutionFailed = "FailWorkflowExecutionFailed" + + // EventTypeWorkflowExecutionTimedOut is a EventType enum value + EventTypeWorkflowExecutionTimedOut = "WorkflowExecutionTimedOut" + + // EventTypeWorkflowExecutionCanceled is a EventType enum value + EventTypeWorkflowExecutionCanceled = "WorkflowExecutionCanceled" + + // EventTypeCancelWorkflowExecutionFailed is a EventType enum value + EventTypeCancelWorkflowExecutionFailed = "CancelWorkflowExecutionFailed" + + // EventTypeWorkflowExecutionContinuedAsNew is a EventType enum value + EventTypeWorkflowExecutionContinuedAsNew = "WorkflowExecutionContinuedAsNew" + + // EventTypeContinueAsNewWorkflowExecutionFailed is a EventType enum value + EventTypeContinueAsNewWorkflowExecutionFailed = "ContinueAsNewWorkflowExecutionFailed" + + // EventTypeWorkflowExecutionTerminated is a EventType enum value + EventTypeWorkflowExecutionTerminated = "WorkflowExecutionTerminated" + + // EventTypeDecisionTaskScheduled is a EventType enum value + EventTypeDecisionTaskScheduled = "DecisionTaskScheduled" + + // EventTypeDecisionTaskStarted is a EventType enum value + EventTypeDecisionTaskStarted = "DecisionTaskStarted" + + // EventTypeDecisionTaskCompleted is a EventType enum value + EventTypeDecisionTaskCompleted = "DecisionTaskCompleted" + + // EventTypeDecisionTaskTimedOut is a EventType enum value + EventTypeDecisionTaskTimedOut = "DecisionTaskTimedOut" + + // EventTypeActivityTaskScheduled is a EventType enum value + EventTypeActivityTaskScheduled = "ActivityTaskScheduled" + + // EventTypeScheduleActivityTaskFailed is a EventType enum value + EventTypeScheduleActivityTaskFailed = "ScheduleActivityTaskFailed" + + // EventTypeActivityTaskStarted is a EventType enum value + EventTypeActivityTaskStarted = "ActivityTaskStarted" + + // EventTypeActivityTaskCompleted is a EventType enum value + EventTypeActivityTaskCompleted = "ActivityTaskCompleted" + + // EventTypeActivityTaskFailed is a EventType enum value + EventTypeActivityTaskFailed = "ActivityTaskFailed" + + // EventTypeActivityTaskTimedOut is a EventType enum value + EventTypeActivityTaskTimedOut = "ActivityTaskTimedOut" + + // EventTypeActivityTaskCanceled is a EventType enum value + EventTypeActivityTaskCanceled = "ActivityTaskCanceled" + + // EventTypeActivityTaskCancelRequested is a EventType enum value + EventTypeActivityTaskCancelRequested = "ActivityTaskCancelRequested" + + // EventTypeRequestCancelActivityTaskFailed is a EventType enum value + EventTypeRequestCancelActivityTaskFailed = "RequestCancelActivityTaskFailed" + + // EventTypeWorkflowExecutionSignaled is a EventType enum value + EventTypeWorkflowExecutionSignaled = "WorkflowExecutionSignaled" + + // EventTypeMarkerRecorded is a EventType enum value + EventTypeMarkerRecorded = "MarkerRecorded" + + // EventTypeRecordMarkerFailed is a EventType enum value + EventTypeRecordMarkerFailed = "RecordMarkerFailed" + + // EventTypeTimerStarted is a EventType enum value + EventTypeTimerStarted = "TimerStarted" + + // EventTypeStartTimerFailed is a EventType enum value + EventTypeStartTimerFailed = "StartTimerFailed" + + // EventTypeTimerFired is a EventType enum value + EventTypeTimerFired = "TimerFired" + + // EventTypeTimerCanceled is a EventType enum value + EventTypeTimerCanceled = "TimerCanceled" + + // EventTypeCancelTimerFailed is a EventType enum value + EventTypeCancelTimerFailed = "CancelTimerFailed" + + // EventTypeStartChildWorkflowExecutionInitiated is a EventType enum value + EventTypeStartChildWorkflowExecutionInitiated = "StartChildWorkflowExecutionInitiated" + + // EventTypeStartChildWorkflowExecutionFailed is a EventType enum value + EventTypeStartChildWorkflowExecutionFailed = "StartChildWorkflowExecutionFailed" + + // EventTypeChildWorkflowExecutionStarted is a EventType enum value + EventTypeChildWorkflowExecutionStarted = "ChildWorkflowExecutionStarted" + + // EventTypeChildWorkflowExecutionCompleted is a EventType enum value + EventTypeChildWorkflowExecutionCompleted = "ChildWorkflowExecutionCompleted" + + // EventTypeChildWorkflowExecutionFailed is a EventType enum value + EventTypeChildWorkflowExecutionFailed = "ChildWorkflowExecutionFailed" + + // EventTypeChildWorkflowExecutionTimedOut is a EventType enum value + EventTypeChildWorkflowExecutionTimedOut = "ChildWorkflowExecutionTimedOut" + + // EventTypeChildWorkflowExecutionCanceled is a EventType enum value + EventTypeChildWorkflowExecutionCanceled = "ChildWorkflowExecutionCanceled" + + // EventTypeChildWorkflowExecutionTerminated is a EventType enum value + EventTypeChildWorkflowExecutionTerminated = "ChildWorkflowExecutionTerminated" + + // EventTypeSignalExternalWorkflowExecutionInitiated is a EventType enum value + EventTypeSignalExternalWorkflowExecutionInitiated = "SignalExternalWorkflowExecutionInitiated" + + // EventTypeSignalExternalWorkflowExecutionFailed is a EventType enum value + EventTypeSignalExternalWorkflowExecutionFailed = "SignalExternalWorkflowExecutionFailed" + + // EventTypeExternalWorkflowExecutionSignaled is a EventType enum value + EventTypeExternalWorkflowExecutionSignaled = "ExternalWorkflowExecutionSignaled" + + // EventTypeRequestCancelExternalWorkflowExecutionInitiated is a EventType enum value + EventTypeRequestCancelExternalWorkflowExecutionInitiated = "RequestCancelExternalWorkflowExecutionInitiated" + + // EventTypeRequestCancelExternalWorkflowExecutionFailed is a EventType enum value + EventTypeRequestCancelExternalWorkflowExecutionFailed = "RequestCancelExternalWorkflowExecutionFailed" + + // EventTypeExternalWorkflowExecutionCancelRequested is a EventType enum value + EventTypeExternalWorkflowExecutionCancelRequested = "ExternalWorkflowExecutionCancelRequested" + + // EventTypeLambdaFunctionScheduled is a EventType enum value + EventTypeLambdaFunctionScheduled = "LambdaFunctionScheduled" + + // EventTypeLambdaFunctionStarted is a EventType enum value + EventTypeLambdaFunctionStarted = "LambdaFunctionStarted" + + // EventTypeLambdaFunctionCompleted is a EventType enum value + EventTypeLambdaFunctionCompleted = "LambdaFunctionCompleted" + + // EventTypeLambdaFunctionFailed is a EventType enum value + EventTypeLambdaFunctionFailed = "LambdaFunctionFailed" + + // EventTypeLambdaFunctionTimedOut is a EventType enum value + EventTypeLambdaFunctionTimedOut = "LambdaFunctionTimedOut" + + // EventTypeScheduleLambdaFunctionFailed is a EventType enum value + EventTypeScheduleLambdaFunctionFailed = "ScheduleLambdaFunctionFailed" + + // EventTypeStartLambdaFunctionFailed is a EventType enum value + EventTypeStartLambdaFunctionFailed = "StartLambdaFunctionFailed" +) + +const ( + // ExecutionStatusOpen is a ExecutionStatus enum value + ExecutionStatusOpen = "OPEN" + + // ExecutionStatusClosed is a ExecutionStatus enum value + ExecutionStatusClosed = "CLOSED" +) + +const ( + // FailWorkflowExecutionFailedCauseUnhandledDecision is a FailWorkflowExecutionFailedCause enum value + FailWorkflowExecutionFailedCauseUnhandledDecision = "UNHANDLED_DECISION" + + // FailWorkflowExecutionFailedCauseOperationNotPermitted is a FailWorkflowExecutionFailedCause enum value + FailWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // LambdaFunctionTimeoutTypeStartToClose is a LambdaFunctionTimeoutType enum value + LambdaFunctionTimeoutTypeStartToClose = "START_TO_CLOSE" +) + +const ( + // RecordMarkerFailedCauseOperationNotPermitted is a RecordMarkerFailedCause enum value + RecordMarkerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // RegistrationStatusRegistered is a RegistrationStatus enum value + RegistrationStatusRegistered = "REGISTERED" + + // RegistrationStatusDeprecated is a RegistrationStatus enum value + RegistrationStatusDeprecated = "DEPRECATED" +) + +const ( + // RequestCancelActivityTaskFailedCauseActivityIdUnknown is a RequestCancelActivityTaskFailedCause enum value + RequestCancelActivityTaskFailedCauseActivityIdUnknown = "ACTIVITY_ID_UNKNOWN" + + // RequestCancelActivityTaskFailedCauseOperationNotPermitted is a RequestCancelActivityTaskFailedCause enum value + RequestCancelActivityTaskFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // RequestCancelExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution is a RequestCancelExternalWorkflowExecutionFailedCause enum value + RequestCancelExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution = "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" + + // RequestCancelExternalWorkflowExecutionFailedCauseRequestCancelExternalWorkflowExecutionRateExceeded is a RequestCancelExternalWorkflowExecutionFailedCause enum value + RequestCancelExternalWorkflowExecutionFailedCauseRequestCancelExternalWorkflowExecutionRateExceeded = "REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" + + // RequestCancelExternalWorkflowExecutionFailedCauseOperationNotPermitted is a RequestCancelExternalWorkflowExecutionFailedCause enum value + RequestCancelExternalWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // ScheduleActivityTaskFailedCauseActivityTypeDeprecated is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseActivityTypeDeprecated = "ACTIVITY_TYPE_DEPRECATED" + + // ScheduleActivityTaskFailedCauseActivityTypeDoesNotExist is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseActivityTypeDoesNotExist = "ACTIVITY_TYPE_DOES_NOT_EXIST" + + // ScheduleActivityTaskFailedCauseActivityIdAlreadyInUse is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseActivityIdAlreadyInUse = "ACTIVITY_ID_ALREADY_IN_USE" + + // ScheduleActivityTaskFailedCauseOpenActivitiesLimitExceeded is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseOpenActivitiesLimitExceeded = "OPEN_ACTIVITIES_LIMIT_EXCEEDED" + + // ScheduleActivityTaskFailedCauseActivityCreationRateExceeded is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseActivityCreationRateExceeded = "ACTIVITY_CREATION_RATE_EXCEEDED" + + // ScheduleActivityTaskFailedCauseDefaultScheduleToCloseTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseDefaultScheduleToCloseTimeoutUndefined = "DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED" + + // ScheduleActivityTaskFailedCauseDefaultTaskListUndefined is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" + + // ScheduleActivityTaskFailedCauseDefaultScheduleToStartTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseDefaultScheduleToStartTimeoutUndefined = "DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED" + + // ScheduleActivityTaskFailedCauseDefaultStartToCloseTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseDefaultStartToCloseTimeoutUndefined = "DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED" + + // ScheduleActivityTaskFailedCauseDefaultHeartbeatTimeoutUndefined is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseDefaultHeartbeatTimeoutUndefined = "DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED" + + // ScheduleActivityTaskFailedCauseOperationNotPermitted is a ScheduleActivityTaskFailedCause enum value + ScheduleActivityTaskFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // ScheduleLambdaFunctionFailedCauseIdAlreadyInUse is a ScheduleLambdaFunctionFailedCause enum value + ScheduleLambdaFunctionFailedCauseIdAlreadyInUse = "ID_ALREADY_IN_USE" + + // ScheduleLambdaFunctionFailedCauseOpenLambdaFunctionsLimitExceeded is a ScheduleLambdaFunctionFailedCause enum value + ScheduleLambdaFunctionFailedCauseOpenLambdaFunctionsLimitExceeded = "OPEN_LAMBDA_FUNCTIONS_LIMIT_EXCEEDED" + + // ScheduleLambdaFunctionFailedCauseLambdaFunctionCreationRateExceeded is a ScheduleLambdaFunctionFailedCause enum value + ScheduleLambdaFunctionFailedCauseLambdaFunctionCreationRateExceeded = "LAMBDA_FUNCTION_CREATION_RATE_EXCEEDED" + + // ScheduleLambdaFunctionFailedCauseLambdaServiceNotAvailableInRegion is a ScheduleLambdaFunctionFailedCause enum value + ScheduleLambdaFunctionFailedCauseLambdaServiceNotAvailableInRegion = "LAMBDA_SERVICE_NOT_AVAILABLE_IN_REGION" +) + +const ( + // SignalExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution is a SignalExternalWorkflowExecutionFailedCause enum value + SignalExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution = "UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION" + + // SignalExternalWorkflowExecutionFailedCauseSignalExternalWorkflowExecutionRateExceeded is a SignalExternalWorkflowExecutionFailedCause enum value + SignalExternalWorkflowExecutionFailedCauseSignalExternalWorkflowExecutionRateExceeded = "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED" + + // SignalExternalWorkflowExecutionFailedCauseOperationNotPermitted is a SignalExternalWorkflowExecutionFailedCause enum value + SignalExternalWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // StartChildWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseWorkflowTypeDoesNotExist = "WORKFLOW_TYPE_DOES_NOT_EXIST" + + // StartChildWorkflowExecutionFailedCauseWorkflowTypeDeprecated is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseWorkflowTypeDeprecated = "WORKFLOW_TYPE_DEPRECATED" + + // StartChildWorkflowExecutionFailedCauseOpenChildrenLimitExceeded is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseOpenChildrenLimitExceeded = "OPEN_CHILDREN_LIMIT_EXCEEDED" + + // StartChildWorkflowExecutionFailedCauseOpenWorkflowsLimitExceeded is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseOpenWorkflowsLimitExceeded = "OPEN_WORKFLOWS_LIMIT_EXCEEDED" + + // StartChildWorkflowExecutionFailedCauseChildCreationRateExceeded is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseChildCreationRateExceeded = "CHILD_CREATION_RATE_EXCEEDED" + + // StartChildWorkflowExecutionFailedCauseWorkflowAlreadyRunning is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseWorkflowAlreadyRunning = "WORKFLOW_ALREADY_RUNNING" + + // StartChildWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseDefaultExecutionStartToCloseTimeoutUndefined = "DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED" + + // StartChildWorkflowExecutionFailedCauseDefaultTaskListUndefined is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseDefaultTaskListUndefined = "DEFAULT_TASK_LIST_UNDEFINED" + + // StartChildWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseDefaultTaskStartToCloseTimeoutUndefined = "DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED" + + // StartChildWorkflowExecutionFailedCauseDefaultChildPolicyUndefined is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseDefaultChildPolicyUndefined = "DEFAULT_CHILD_POLICY_UNDEFINED" + + // StartChildWorkflowExecutionFailedCauseOperationNotPermitted is a StartChildWorkflowExecutionFailedCause enum value + StartChildWorkflowExecutionFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // StartLambdaFunctionFailedCauseAssumeRoleFailed is a StartLambdaFunctionFailedCause enum value + StartLambdaFunctionFailedCauseAssumeRoleFailed = "ASSUME_ROLE_FAILED" +) + +const ( + // StartTimerFailedCauseTimerIdAlreadyInUse is a StartTimerFailedCause enum value + StartTimerFailedCauseTimerIdAlreadyInUse = "TIMER_ID_ALREADY_IN_USE" + + // StartTimerFailedCauseOpenTimersLimitExceeded is a StartTimerFailedCause enum value + StartTimerFailedCauseOpenTimersLimitExceeded = "OPEN_TIMERS_LIMIT_EXCEEDED" + + // StartTimerFailedCauseTimerCreationRateExceeded is a StartTimerFailedCause enum value + StartTimerFailedCauseTimerCreationRateExceeded = "TIMER_CREATION_RATE_EXCEEDED" + + // StartTimerFailedCauseOperationNotPermitted is a StartTimerFailedCause enum value + StartTimerFailedCauseOperationNotPermitted = "OPERATION_NOT_PERMITTED" +) + +const ( + // WorkflowExecutionCancelRequestedCauseChildPolicyApplied is a WorkflowExecutionCancelRequestedCause enum value + WorkflowExecutionCancelRequestedCauseChildPolicyApplied = "CHILD_POLICY_APPLIED" +) + +const ( + // WorkflowExecutionTerminatedCauseChildPolicyApplied is a WorkflowExecutionTerminatedCause enum value + WorkflowExecutionTerminatedCauseChildPolicyApplied = "CHILD_POLICY_APPLIED" + + // WorkflowExecutionTerminatedCauseEventLimitExceeded is a WorkflowExecutionTerminatedCause enum value + WorkflowExecutionTerminatedCauseEventLimitExceeded = "EVENT_LIMIT_EXCEEDED" + + // WorkflowExecutionTerminatedCauseOperatorInitiated is a WorkflowExecutionTerminatedCause enum value + WorkflowExecutionTerminatedCauseOperatorInitiated = "OPERATOR_INITIATED" +) + +const ( + // WorkflowExecutionTimeoutTypeStartToClose is a WorkflowExecutionTimeoutType enum value + WorkflowExecutionTimeoutTypeStartToClose = "START_TO_CLOSE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go b/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go new file mode 100644 index 000000000..bbb8f45ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/doc.go @@ -0,0 +1,38 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package swf provides the client and types for making API +// requests to Amazon Simple Workflow Service. +// +// The Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications +// that use Amazon's cloud to coordinate work across distributed components. +// In Amazon SWF, a task represents a logical unit of work that is performed +// by a component of your workflow. Coordinating tasks in a workflow involves +// managing intertask dependencies, scheduling, and concurrency in accordance +// with the logical flow of the application. +// +// Amazon SWF gives you full control over implementing tasks and coordinating +// them without worrying about underlying complexities such as tracking their +// progress and maintaining their state. +// +// This documentation serves as reference only. For a broader overview of the +// Amazon SWF programming model, see the Amazon SWF Developer Guide (http://docs.aws.amazon.com/amazonswf/latest/developerguide/). +// +// See swf package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/ +// +// Using the Client +// +// To contact Amazon Simple Workflow Service 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 Simple Workflow Service client SWF for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/swf/#New +package swf diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go new file mode 100644 index 000000000..7baff0daf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/errors.go @@ -0,0 +1,80 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package swf + +const ( + + // ErrCodeDefaultUndefinedFault for service response error code + // "DefaultUndefinedFault". + // + // The StartWorkflowExecution API action was called without the required parameters + // set. + // + // Some workflow execution parameters, such as the decision taskList, must be + // set to start the execution. However, these parameters might have been set + // as defaults when the workflow type was registered. In this case, you can + // omit these parameters from the StartWorkflowExecution call and Amazon SWF + // uses the values defined in the workflow type. + // + // If these parameters aren't set and no default parameters were defined in + // the workflow type, this error is displayed. + ErrCodeDefaultUndefinedFault = "DefaultUndefinedFault" + + // ErrCodeDomainAlreadyExistsFault for service response error code + // "DomainAlreadyExistsFault". + // + // Returned if the specified domain already exists. You get this fault even + // if the existing domain is in deprecated status. + ErrCodeDomainAlreadyExistsFault = "DomainAlreadyExistsFault" + + // ErrCodeDomainDeprecatedFault for service response error code + // "DomainDeprecatedFault". + // + // Returned when the specified domain has been deprecated. + ErrCodeDomainDeprecatedFault = "DomainDeprecatedFault" + + // ErrCodeLimitExceededFault for service response error code + // "LimitExceededFault". + // + // Returned by any operation if a system imposed limitation has been reached. + // To address this fault you should either clean up unused resources or increase + // the limit by contacting AWS. + ErrCodeLimitExceededFault = "LimitExceededFault" + + // ErrCodeOperationNotPermittedFault for service response error code + // "OperationNotPermittedFault". + // + // Returned when the caller doesn't have sufficient permissions to invoke the + // action. + ErrCodeOperationNotPermittedFault = "OperationNotPermittedFault" + + // ErrCodeTypeAlreadyExistsFault for service response error code + // "TypeAlreadyExistsFault". + // + // Returned if the type already exists in the specified domain. You get this + // fault even if the existing type is in deprecated status. You can specify + // another version if the intent is to create a new distinct version of the + // type. + ErrCodeTypeAlreadyExistsFault = "TypeAlreadyExistsFault" + + // ErrCodeTypeDeprecatedFault for service response error code + // "TypeDeprecatedFault". + // + // Returned when the specified activity or workflow type was already deprecated. + ErrCodeTypeDeprecatedFault = "TypeDeprecatedFault" + + // ErrCodeUnknownResourceFault for service response error code + // "UnknownResourceFault". + // + // Returned when the named resource cannot be found with in the scope of this + // operation (region or domain). This could happen if the named resource was + // never created or is no longer available for this operation. + ErrCodeUnknownResourceFault = "UnknownResourceFault" + + // ErrCodeWorkflowExecutionAlreadyStartedFault for service response error code + // "WorkflowExecutionAlreadyStartedFault". + // + // Returned by StartWorkflowExecution when an open execution with the same workflowId + // is already running in the specified domain. + ErrCodeWorkflowExecutionAlreadyStartedFault = "WorkflowExecutionAlreadyStartedFault" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/service.go b/vendor/github.com/aws/aws-sdk-go/service/swf/service.go new file mode 100644 index 000000000..014d89a52 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package swf + +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/jsonrpc" +) + +// SWF provides the API operation methods for making requests to +// Amazon Simple Workflow Service. See this package's package overview docs +// for details on the service. +// +// SWF methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SWF 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 = "swf" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SWF" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the SWF client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a SWF client from just a session. +// svc := swf.New(mySession) +// +// // Create a SWF client with additional configuration +// svc := swf.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SWF { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SWF { + svc := &SWF{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2012-01-25", + JSONVersion: "1.0", + TargetPrefix: "SimpleWorkflowService", + }, + 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(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a SWF operation and runs any +// custom request initialization. +func (c *SWF) 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 +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 3fd63c681..e08ff3ee9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -86,18 +86,18 @@ func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *re // API operation CreateByteMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -126,11 +126,11 @@ func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *re // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -232,22 +232,22 @@ func (c *WAF) CreateGeoMatchSetRequest(input *CreateGeoMatchSetInput) (req *requ // API operation CreateGeoMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -276,7 +276,7 @@ func (c *WAF) CreateGeoMatchSetRequest(input *CreateGeoMatchSetInput) (req *requ // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -379,22 +379,22 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // API operation CreateIPSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -423,7 +423,7 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -565,18 +565,18 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // API operation CreateRateBasedRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -605,7 +605,7 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -709,18 +709,18 @@ func (c *WAF) CreateRegexMatchSetRequest(input *CreateRegexMatchSetInput) (req * // API operation CreateRegexMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -820,18 +820,18 @@ func (c *WAF) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (r // API operation CreateRegexPatternSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -948,18 +948,18 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // API operation CreateRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -988,7 +988,7 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1083,18 +1083,18 @@ func (c *WAF) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request. // API operation CreateRuleGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1198,22 +1198,22 @@ func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput // API operation CreateSizeConstraintSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -1242,7 +1242,7 @@ func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1342,18 +1342,18 @@ func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSe // API operation CreateSqlInjectionMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -1382,11 +1382,11 @@ func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSe // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1498,22 +1498,22 @@ func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Reques // API operation CreateWebACL for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -1542,7 +1542,7 @@ func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Reques // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1643,18 +1643,18 @@ func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *requ // API operation CreateXssMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -1683,11 +1683,11 @@ func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *requ // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -1783,18 +1783,18 @@ func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *re // API operation DeleteByteMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -1802,11 +1802,11 @@ func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *re // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -1909,22 +1909,22 @@ func (c *WAF) DeleteGeoMatchSetRequest(input *DeleteGeoMatchSetInput) (req *requ // API operation DeleteGeoMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -1932,7 +1932,7 @@ func (c *WAF) DeleteGeoMatchSetRequest(input *DeleteGeoMatchSetInput) (req *requ // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2035,22 +2035,22 @@ func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, // API operation DeleteIPSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2058,7 +2058,7 @@ func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2150,15 +2150,15 @@ func (c *WAF) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) // API operation DeletePermissionPolicy for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeletePermissionPolicy @@ -2252,22 +2252,22 @@ func (c *WAF) DeleteRateBasedRuleRequest(input *DeleteRateBasedRuleInput) (req * // API operation DeleteRateBasedRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2275,7 +2275,7 @@ func (c *WAF) DeleteRateBasedRuleRequest(input *DeleteRateBasedRuleInput) (req * // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2379,18 +2379,18 @@ func (c *WAF) DeleteRegexMatchSetRequest(input *DeleteRegexMatchSetInput) (req * // API operation DeleteRegexMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2398,11 +2398,11 @@ func (c *WAF) DeleteRegexMatchSetRequest(input *DeleteRegexMatchSetInput) (req * // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2494,18 +2494,18 @@ func (c *WAF) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (r // API operation DeleteRegexPatternSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2513,11 +2513,11 @@ func (c *WAF) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (r // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2620,22 +2620,22 @@ func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, o // API operation DeleteRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2643,7 +2643,7 @@ func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, o // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2745,18 +2745,18 @@ func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request. // API operation DeleteRuleGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2764,7 +2764,7 @@ func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request. // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2868,22 +2868,22 @@ func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput // API operation DeleteSizeConstraintSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -2891,7 +2891,7 @@ func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -2996,18 +2996,18 @@ func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSe // API operation DeleteSqlInjectionMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -3015,11 +3015,11 @@ func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSe // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -3119,22 +3119,22 @@ func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Reques // API operation DeleteWebACL for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -3142,7 +3142,7 @@ func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Reques // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -3246,18 +3246,18 @@ func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *requ // API operation DeleteXssMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -3265,11 +3265,11 @@ func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *requ // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonEmptyEntityException "NonEmptyEntityException" +// * ErrCodeNonEmptyEntityException "WAFNonEmptyEntityException" // The operation failed because you tried to delete an object that isn't empty. // For example: // @@ -3359,15 +3359,15 @@ func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request. // API operation GetByteMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetByteMatchSet @@ -3460,7 +3460,7 @@ func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Re // API operation GetChangeToken for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // @@ -3550,10 +3550,10 @@ func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req // API operation GetChangeTokenStatus for usage and error information. // // Returned Error Codes: -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // @@ -3633,15 +3633,15 @@ func (c *WAF) GetGeoMatchSetRequest(input *GetGeoMatchSetInput) (req *request.Re // API operation GetGeoMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetGeoMatchSet @@ -3720,15 +3720,15 @@ func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, outpu // API operation GetIPSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetIPSet @@ -3807,11 +3807,11 @@ func (c *WAF) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req * // API operation GetPermissionPolicy for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetPermissionPolicy @@ -3891,15 +3891,15 @@ func (c *WAF) GetRateBasedRuleRequest(input *GetRateBasedRuleInput) (req *reques // API operation GetRateBasedRule for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRateBasedRule @@ -3981,18 +3981,18 @@ func (c *WAF) GetRateBasedRuleManagedKeysRequest(input *GetRateBasedRuleManagedK // API operation GetRateBasedRuleManagedKeys for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -4097,15 +4097,15 @@ func (c *WAF) GetRegexMatchSetRequest(input *GetRegexMatchSetInput) (req *reques // API operation GetRegexMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexMatchSet @@ -4184,15 +4184,15 @@ func (c *WAF) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *re // API operation GetRegexPatternSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRegexPatternSet @@ -4272,15 +4272,15 @@ func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output // API operation GetRule for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRule @@ -4362,11 +4362,11 @@ func (c *WAF) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Reques // API operation GetRuleGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetRuleGroup @@ -4455,10 +4455,10 @@ func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *re // API operation GetSampledRequests for usage and error information. // // Returned Error Codes: -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // @@ -4538,15 +4538,15 @@ func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req // API operation GetSizeConstraintSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSizeConstraintSet @@ -4625,15 +4625,15 @@ func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput // API operation GetSqlInjectionMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetSqlInjectionMatchSet @@ -4712,15 +4712,15 @@ func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, out // API operation GetWebACL for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetWebACL @@ -4799,15 +4799,15 @@ func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Re // API operation GetXssMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetXssMatchSet @@ -4886,14 +4886,14 @@ func (c *WAF) ListActivatedRulesInRuleGroupRequest(input *ListActivatedRulesInRu // API operation ListActivatedRulesInRuleGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -4998,11 +4998,11 @@ func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *requ // API operation ListByteMatchSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5082,11 +5082,11 @@ func (c *WAF) ListGeoMatchSetsRequest(input *ListGeoMatchSetsInput) (req *reques // API operation ListGeoMatchSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5166,11 +5166,11 @@ func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, o // API operation ListIPSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5250,11 +5250,11 @@ func (c *WAF) ListRateBasedRulesRequest(input *ListRateBasedRulesInput) (req *re // API operation ListRateBasedRules for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5334,11 +5334,11 @@ func (c *WAF) ListRegexMatchSetsRequest(input *ListRegexMatchSetsInput) (req *re // API operation ListRegexMatchSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5418,11 +5418,11 @@ func (c *WAF) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req // API operation ListRegexPatternSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5502,7 +5502,7 @@ func (c *WAF) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Re // API operation ListRuleGroups for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // @@ -5582,11 +5582,11 @@ func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, out // API operation ListRules for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5666,11 +5666,11 @@ func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) // API operation ListSizeConstraintSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5750,11 +5750,11 @@ func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsI // API operation ListSqlInjectionMatchSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -5834,10 +5834,10 @@ func (c *WAF) ListSubscribedRuleGroupsRequest(input *ListSubscribedRuleGroupsInp // API operation ListSubscribedRuleGroups for usage and error information. // // Returned Error Codes: -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // @@ -5917,11 +5917,11 @@ func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, // API operation ListWebACLs for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -6001,11 +6001,11 @@ func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *reques // API operation ListXssMatchSets for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -6110,18 +6110,18 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // API operation PutPermissionPolicy for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInvalidPermissionPolicyException "InvalidPermissionPolicyException" +// * ErrCodeInvalidPermissionPolicyException "WAFInvalidPermissionPolicyException" // The operation failed because the specified policy is not in the proper format. // // The policy is subject to the following restrictions: @@ -6256,15 +6256,15 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // API operation UpdateByteMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -6285,7 +6285,7 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -6314,7 +6314,7 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -6330,14 +6330,14 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -6446,19 +6446,19 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // API operation UpdateGeoMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -6479,7 +6479,7 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -6508,7 +6508,7 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -6524,10 +6524,10 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -6535,7 +6535,7 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -6665,19 +6665,19 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // API operation UpdateIPSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -6698,7 +6698,7 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -6727,7 +6727,7 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -6743,10 +6743,10 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -6754,7 +6754,7 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -6873,19 +6873,19 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // API operation UpdateRateBasedRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -6906,7 +6906,7 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -6935,7 +6935,7 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -6951,10 +6951,10 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -6962,7 +6962,7 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -7077,27 +7077,27 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // API operation UpdateRegexMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeDisallowedNameException "DisallowedNameException" +// * ErrCodeDisallowedNameException "WAFDisallowedNameException" // The name specified is invalid. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -7113,7 +7113,7 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -7134,7 +7134,7 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // @@ -7244,24 +7244,24 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // API operation UpdateRegexPatternSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -7277,7 +7277,7 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -7298,11 +7298,11 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidRegexPatternException "InvalidRegexPatternException" +// * ErrCodeInvalidRegexPatternException "WAFInvalidRegexPatternException" // The regular expression (regex) you specified in RegexPatternString is invalid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateRegexPatternSet @@ -7413,19 +7413,19 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // API operation UpdateRule for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -7446,7 +7446,7 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -7475,7 +7475,7 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -7491,10 +7491,10 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -7502,7 +7502,7 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -7606,15 +7606,15 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // API operation UpdateRuleGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -7630,10 +7630,10 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -7654,13 +7654,13 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -7803,19 +7803,19 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // API operation UpdateSizeConstraintSet for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -7836,7 +7836,7 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -7865,7 +7865,7 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -7881,10 +7881,10 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -7892,7 +7892,7 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -8005,15 +8005,15 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // API operation UpdateSqlInjectionMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -8034,7 +8034,7 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -8063,7 +8063,7 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -8079,14 +8079,14 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -8215,19 +8215,19 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // API operation UpdateWebACL for usage and error information. // // Returned Error Codes: -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -8248,7 +8248,7 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -8277,7 +8277,7 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -8293,10 +8293,10 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeReferencedItemException "ReferencedItemException" +// * ErrCodeReferencedItemException "WAFReferencedItemException" // The operation failed because you tried to delete an object that is still // in use. For example: // @@ -8304,13 +8304,13 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // // * You tried to delete a Rule that is still referenced by a WebACL. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // -// * ErrCodeSubscriptionNotFoundException "SubscriptionNotFoundException" +// * ErrCodeSubscriptionNotFoundException "WAFSubscriptionNotFoundException" // The specified subscription does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/UpdateWebACL @@ -8420,15 +8420,15 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // API operation UpdateXssMatchSet for usage and error information. // // Returned Error Codes: -// * ErrCodeInternalErrorException "InternalErrorException" +// * ErrCodeInternalErrorException "WAFInternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // -// * ErrCodeInvalidAccountException "InvalidAccountException" +// * ErrCodeInvalidAccountException "WAFInvalidAccountException" // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. // -// * ErrCodeInvalidOperationException "InvalidOperationException" +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" // The operation failed because there was nothing to do. For example: // // * You tried to remove a Rule from a WebACL, but the Rule isn't in the @@ -8449,7 +8449,7 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // -// * ErrCodeInvalidParameterException "InvalidParameterException" +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: // @@ -8478,7 +8478,7 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. // -// * ErrCodeNonexistentContainerException "NonexistentContainerException" +// * ErrCodeNonexistentContainerException "WAFNonexistentContainerException" // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: // @@ -8494,14 +8494,14 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. // -// * ErrCodeNonexistentItemException "NonexistentItemException" +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // -// * ErrCodeStaleDataException "StaleDataException" +// * ErrCodeStaleDataException "WAFStaleDataException" // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // -// * ErrCodeLimitsExceededException "LimitsExceededException" +// * ErrCodeLimitsExceededException "WAFLimitsExceededException" // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) @@ -15660,7 +15660,7 @@ type SampledHTTPRequest struct { // The time at which AWS WAF received the request from your AWS resource, in // Unix time format (in seconds). - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` // A value that indicates how one result in the response relates proportionally // to other results in the response. A result that has a weight of 2 represents @@ -16424,7 +16424,7 @@ type TimeWindow struct { // time range in the previous three hours. // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The beginning of the time range from which you want GetSampledRequests to // return a sample of the requests that your AWS resource received. Specify @@ -16432,7 +16432,7 @@ type TimeWindow struct { // any time range in the previous three hours. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 1e85bed52..97850b5df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -5,27 +5,27 @@ package waf const ( // ErrCodeDisallowedNameException for service response error code - // "DisallowedNameException". + // "WAFDisallowedNameException". // // The name specified is invalid. - ErrCodeDisallowedNameException = "DisallowedNameException" + ErrCodeDisallowedNameException = "WAFDisallowedNameException" // ErrCodeInternalErrorException for service response error code - // "InternalErrorException". + // "WAFInternalErrorException". // // The operation failed because of a system problem, even though the request // was valid. Retry your request. - ErrCodeInternalErrorException = "InternalErrorException" + ErrCodeInternalErrorException = "WAFInternalErrorException" // ErrCodeInvalidAccountException for service response error code - // "InvalidAccountException". + // "WAFInvalidAccountException". // // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. - ErrCodeInvalidAccountException = "InvalidAccountException" + ErrCodeInvalidAccountException = "WAFInvalidAccountException" // ErrCodeInvalidOperationException for service response error code - // "InvalidOperationException". + // "WAFInvalidOperationException". // // The operation failed because there was nothing to do. For example: // @@ -46,10 +46,10 @@ const ( // // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. - ErrCodeInvalidOperationException = "InvalidOperationException" + ErrCodeInvalidOperationException = "WAFInvalidOperationException" // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". + // "WAFInvalidParameterException". // // The operation failed because AWS WAF didn't recognize a parameter in the // request. For example: @@ -78,10 +78,10 @@ const ( // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. - ErrCodeInvalidParameterException = "InvalidParameterException" + ErrCodeInvalidParameterException = "WAFInvalidParameterException" // ErrCodeInvalidPermissionPolicyException for service response error code - // "InvalidPermissionPolicyException". + // "WAFInvalidPermissionPolicyException". // // The operation failed because the specified policy is not in the proper format. // @@ -104,25 +104,25 @@ const ( // * The user making the request must be the owner of the RuleGroup. // // * Your policy must be composed using IAM Policy version 2012-10-17. - ErrCodeInvalidPermissionPolicyException = "InvalidPermissionPolicyException" + ErrCodeInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException" // ErrCodeInvalidRegexPatternException for service response error code - // "InvalidRegexPatternException". + // "WAFInvalidRegexPatternException". // // The regular expression (regex) you specified in RegexPatternString is invalid. - ErrCodeInvalidRegexPatternException = "InvalidRegexPatternException" + ErrCodeInvalidRegexPatternException = "WAFInvalidRegexPatternException" // ErrCodeLimitsExceededException for service response error code - // "LimitsExceededException". + // "WAFLimitsExceededException". // // The operation exceeds a resource limit, for example, the maximum number of // WebACL objects that you can create for an AWS account. For more information, // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. - ErrCodeLimitsExceededException = "LimitsExceededException" + ErrCodeLimitsExceededException = "WAFLimitsExceededException" // ErrCodeNonEmptyEntityException for service response error code - // "NonEmptyEntityException". + // "WAFNonEmptyEntityException". // // The operation failed because you tried to delete an object that isn't empty. // For example: @@ -136,10 +136,10 @@ const ( // objects. // // * You tried to delete an IPSet that references one or more IP addresses. - ErrCodeNonEmptyEntityException = "NonEmptyEntityException" + ErrCodeNonEmptyEntityException = "WAFNonEmptyEntityException" // ErrCodeNonexistentContainerException for service response error code - // "NonexistentContainerException". + // "WAFNonexistentContainerException". // // The operation failed because you tried to add an object to or delete an object // from another object that doesn't exist. For example: @@ -155,16 +155,16 @@ const ( // // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. - ErrCodeNonexistentContainerException = "NonexistentContainerException" + ErrCodeNonexistentContainerException = "WAFNonexistentContainerException" // ErrCodeNonexistentItemException for service response error code - // "NonexistentItemException". + // "WAFNonexistentItemException". // // The operation failed because the referenced object doesn't exist. - ErrCodeNonexistentItemException = "NonexistentItemException" + ErrCodeNonexistentItemException = "WAFNonexistentItemException" // ErrCodeReferencedItemException for service response error code - // "ReferencedItemException". + // "WAFReferencedItemException". // // The operation failed because you tried to delete an object that is still // in use. For example: @@ -172,18 +172,18 @@ const ( // * You tried to delete a ByteMatchSet that is still referenced by a Rule. // // * You tried to delete a Rule that is still referenced by a WebACL. - ErrCodeReferencedItemException = "ReferencedItemException" + ErrCodeReferencedItemException = "WAFReferencedItemException" // ErrCodeStaleDataException for service response error code - // "StaleDataException". + // "WAFStaleDataException". // // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. - ErrCodeStaleDataException = "StaleDataException" + ErrCodeStaleDataException = "WAFStaleDataException" // ErrCodeSubscriptionNotFoundException for service response error code - // "SubscriptionNotFoundException". + // "WAFSubscriptionNotFoundException". // // The specified subscription does not exist. - ErrCodeSubscriptionNotFoundException = "SubscriptionNotFoundException" + ErrCodeSubscriptionNotFoundException = "WAFSubscriptionNotFoundException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go b/vendor/github.com/aws/aws-sdk-go/service/waf/service.go index 91648a19f..09bf43d9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "waf" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "waf" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WAF" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the WAF client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go index 8f0e70947..3a267ae63 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go @@ -29,8 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "waf-regional" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. + ServiceName = "waf-regional" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WAF Regional" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the WAFRegional client with a session. @@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md b/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md index 7139fb0f8..dc3f4ce96 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/CHANGELOG.md @@ -1,3 +1,529 @@ +## 1.29.0 (July 26, 2018) + +NOTES: + +* data-source/aws_kms_secret: This data source has been deprecated and will be removed in the next major version. This is required to support the upcoming Terraform 0.12. A new `aws_kms_secrets` data source is available that allows for the same multiple KMS secret decryption functionality, but requires different attribute references. Full migration information is available in the new AWS Provider Version 2 Upgrade guide under the `Data Source: aws_kms_secret` section. + +FEATURES: + +* **New Data Source:** `aws_kms_secrets` ([#5195](https://github.com/terraform-providers/terraform-provider-aws/issues/5195)) +* **New Data Source:** `aws_network_interfaces` ([#5324](https://github.com/terraform-providers/terraform-provider-aws/issues/5324)) +* **New Guide:** `AWS Provider Version 2 Upgrade` ([#5195](https://github.com/terraform-providers/terraform-provider-aws/issues/5195)) + +ENHANCEMENTS: + +* data-source/aws_iam_role: Add `permissions_boundary` attribute ([#5186](https://github.com/terraform-providers/terraform-provider-aws/issues/5186)) +* data-source/aws_vpc: Add `arn` attribute ([#5300](https://github.com/terraform-providers/terraform-provider-aws/issues/5300)) +* resource/aws_default_vpc: Add `arn` attribute ([#5300](https://github.com/terraform-providers/terraform-provider-aws/issues/5300)) +* resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments ([#5159](https://github.com/terraform-providers/terraform-provider-aws/issues/5159)) +* resource/aws_lambda_permission: Add `event_source_token` argument (support Alexa Skills) ([#5264](https://github.com/terraform-providers/terraform-provider-aws/issues/5264)) +* resource/aws_launch_template: Add `arn` attribute ([#5306](https://github.com/terraform-providers/terraform-provider-aws/issues/5306)) +* resource/aws_secretsmanager_secret: Add `policy` argument ([#5290](https://github.com/terraform-providers/terraform-provider-aws/issues/5290)) +* resource/aws_vpc: Add `arn` attribute ([#5300](https://github.com/terraform-providers/terraform-provider-aws/issues/5300)) +* resource/aws_waf_web_acl: Support resource import ([#5337](https://github.com/terraform-providers/terraform-provider-aws/issues/5337)) + +BUG FIXES: + +* data-source/aws_vpc_endpoint_service: Perform client side filtering to workaround server side filtering issues in AWS China and AWS GovCloud (US) ([#4592](https://github.com/terraform-providers/terraform-provider-aws/issues/4592)) +* resource/aws_kinesis_firehose_delivery_stream: Force new resource for `kinesis_source_configuration` argument changes ([#5332](https://github.com/terraform-providers/terraform-provider-aws/issues/5332)) +* resource/aws_route53_record: Prevent DomainLabelEmpty errors when expanding record names with trailing period ([#5312](https://github.com/terraform-providers/terraform-provider-aws/issues/5312)) +* resource/aws_ses_identity_notification_topic: Prevent panic when API returns no attributes ([#5327](https://github.com/terraform-providers/terraform-provider-aws/issues/5327)) +* resource/aws_ssm_parameter: Reduce DescribeParameters API calls by switching filtering logic ([#5325](https://github.com/terraform-providers/terraform-provider-aws/issues/5325)) + +## 1.28.0 (July 18, 2018) + +FEATURES: + +* **New Resource:** `aws_macie_s3_bucket_association` ([#5201](https://github.com/terraform-providers/terraform-provider-aws/issues/5201)) +* **New Resource:** `aws_neptune_cluster` ([#5050](https://github.com/terraform-providers/terraform-provider-aws/issues/5050)) +* **New Resource:** `aws_storagegateway_gateway` ([#5208](https://github.com/terraform-providers/terraform-provider-aws/issues/5208)) + +ENHANCEMENTS: + +* data-source/aws_iam_user: Add `permissions_boundary` attribute ([#5187](https://github.com/terraform-providers/terraform-provider-aws/issues/5187)) +* resource/aws_api_gateway_integration: Add `timeout_milliseconds` argument ([#5199](https://github.com/terraform-providers/terraform-provider-aws/issues/5199)) +* resource/aws_cloudwatch_log_group: Allow `tags` handling in AWS GovCloud (US) and AWS China ([#5175](https://github.com/terraform-providers/terraform-provider-aws/issues/5175)) +* resource/aws_codebuild_project: Add `report_build_status` argument under `source` (support report build status for GitHub source type) ([#5156](https://github.com/terraform-providers/terraform-provider-aws/issues/5156)) +* resource/aws_launch_template: Ignore `credit_specification` when not using T2 `instance_type` ([#5190](https://github.com/terraform-providers/terraform-provider-aws/issues/5190)) +* resource/aws_rds_cluster_instance: Add `arn` attribute ([#5220](https://github.com/terraform-providers/terraform-provider-aws/issues/5220)) +* resource/aws_route: Print more useful error message when missing valid target type ([#5198](https://github.com/terraform-providers/terraform-provider-aws/issues/5198)) +* resource/aws_vpc_endpoint: Add configurable timeouts ([#3418](https://github.com/terraform-providers/terraform-provider-aws/issues/3418)) +* resource/aws_vpc_endpoint_subnet_association: Add configurable timeouts ([#3418](https://github.com/terraform-providers/terraform-provider-aws/issues/3418)) + +BUG FIXES: + +* resource/aws_glue_crawler: Prevent error when deleted outside Terraform ([#5158](https://github.com/terraform-providers/terraform-provider-aws/issues/5158)) +* resource/aws_vpc_endpoint_subnet_association: Add mutex to prevent errors with concurrent `ModifyVpcEndpoint` calls ([#3418](https://github.com/terraform-providers/terraform-provider-aws/issues/3418)) + +## 1.27.0 (July 11, 2018) + +NOTES: + +* resource/aws_codebuild_project: The `service_role` argument is now required to match the API behavior and provide plan time validation. Additional details from AWS Support can be found in: https://github.com/terraform-providers/terraform-provider-aws/pull/4826 +* resource/aws_wafregional_byte_match_set: The `byte_match_tuple` argument name has been deprecated in preference of a new `byte_match_tuples` argument name, for consistency with the `aws_waf_byte_match_set` resource to reduce any confusion working between the two resources and to denote its multiple value support. Its behavior is exactly the same as the old argument. Simply changing the argument name (adding the `s`) to configurations should upgrade without other changes. + +FEATURES: + +* **New Resource:** `aws_appsync_api_key` ([#3827](https://github.com/terraform-providers/terraform-provider-aws/issues/3827)) +* **New Resource:** `aws_swf_domain` ([#2803](https://github.com/terraform-providers/terraform-provider-aws/issues/2803)) + +ENHANCEMENTS: + +* data-source/aws_region: Add `description` attribute ([#5077](https://github.com/terraform-providers/terraform-provider-aws/issues/5077)) +* data-source/aws_vpc: Add `cidr_block_associations` attribute ([#5098](https://github.com/terraform-providers/terraform-provider-aws/issues/5098)) +* resource/aws_cloudwatch_metric_alarm: Add `datapoints_to_alarm` and `evaluation_period` plan time validation ([#5095](https://github.com/terraform-providers/terraform-provider-aws/issues/5095)) +* resource/aws_db_parameter_group: Clarify naming validation error messages ([#5090](https://github.com/terraform-providers/terraform-provider-aws/issues/5090)) +* resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) ([#5039](https://github.com/terraform-providers/terraform-provider-aws/issues/5039)) +* resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` ([#5114](https://github.com/terraform-providers/terraform-provider-aws/issues/5114)) +* resource/aws_instance: Allow AWS GovCloud (US) to perform tagging on creation ([#5106](https://github.com/terraform-providers/terraform-provider-aws/issues/5106)) +* resource/aws_lambda_function: Support `dotnetcore2.1` in `runtime` validation ([#5150](https://github.com/terraform-providers/terraform-provider-aws/issues/5150)) +* resource/aws_route_table: Ignore propagated routes during resource import ([#5100](https://github.com/terraform-providers/terraform-provider-aws/issues/5100)) +* resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) ([#4726](https://github.com/terraform-providers/terraform-provider-aws/issues/4726)) +* resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` ([#5092](https://github.com/terraform-providers/terraform-provider-aws/issues/5092)) +* resource/aws_vpc_ipv4_cidr_block_association: Support resource import ([#5069](https://github.com/terraform-providers/terraform-provider-aws/issues/5069)) +* resource/aws_waf_web_acl: Add `rules` `override_action` argument and support `GROUP` type ([#5053](https://github.com/terraform-providers/terraform-provider-aws/issues/5053)) +* resource/aws_wafregional_web_acl: Add `rules` `override_action` argument and support `GROUP` type ([#5053](https://github.com/terraform-providers/terraform-provider-aws/issues/5053)) + +BUG FIXES: + +* resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured ([#5070](https://github.com/terraform-providers/terraform-provider-aws/issues/5070)) +* resource/aws_codebuild_project: Mark `service_role` as required ([#4826](https://github.com/terraform-providers/terraform-provider-aws/issues/4826)) +* resource/aws_glue_catalog_database: Properly return error when missing colon during import ([#5123](https://github.com/terraform-providers/terraform-provider-aws/issues/5123)) +* resource/aws_glue_catalog_database: Prevent error when deleted outside Terraform ([#5141](https://github.com/terraform-providers/terraform-provider-aws/issues/5141)) +* resource/aws_instance: Allow AWS China to perform volume tagging post-creation on first apply ([#5106](https://github.com/terraform-providers/terraform-provider-aws/issues/5106)) +* resource/aws_kms_grant: Properly return error when listing KMS grants ([#5063](https://github.com/terraform-providers/terraform-provider-aws/issues/5063)) +* resource/aws_rds_cluster_instance: Support `configuring-log-exports` status ([#5124](https://github.com/terraform-providers/terraform-provider-aws/issues/5124)) +* resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation ([#5107](https://github.com/terraform-providers/terraform-provider-aws/issues/5107)) +* resource/aws_wafregional_byte_match_set: Deprecate `byte_match_tuple` argument for `byte_match_tuples` ([#5043](https://github.com/terraform-providers/terraform-provider-aws/issues/5043)) + +## 1.26.0 (July 04, 2018) + +FEATURES: + +* **New Data Source:** `aws_launch_configuration` ([#3624](https://github.com/terraform-providers/terraform-provider-aws/issues/3624)) +* **New Data Source:** `aws_pricing_product` ([#5057](https://github.com/terraform-providers/terraform-provider-aws/issues/5057)) +* **New Resource:** `aws_s3_bucket_inventory` ([#5019](https://github.com/terraform-providers/terraform-provider-aws/issues/5019)) +* **New Resource:** `aws_vpc_ipv4_cidr_block_association` ([#3723](https://github.com/terraform-providers/terraform-provider-aws/issues/3723)) + +ENHANCEMENTS: + +* data-source/aws_elasticache_replication_group: Add `member_clusters` attribute ([#5056](https://github.com/terraform-providers/terraform-provider-aws/issues/5056)) +* data-source/aws_instances: Add `instance_state_names` argument (support non-`running` instances) ([#4950](https://github.com/terraform-providers/terraform-provider-aws/issues/4950)) +* data-source/aws_route_tables: Add `filter` argument ([#5035](https://github.com/terraform-providers/terraform-provider-aws/issues/5035)) +* data-source/aws_subnet_ids: Add `filter` argument ([#5038](https://github.com/terraform-providers/terraform-provider-aws/issues/5038)) +* resource/aws_eip_association: Support resource import ([#5006](https://github.com/terraform-providers/terraform-provider-aws/issues/5006)) +* resource/aws_elasticache_replication_group: Add `member_clusters` attribute ([#5056](https://github.com/terraform-providers/terraform-provider-aws/issues/5056)) +* resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) ([#3316](https://github.com/terraform-providers/terraform-provider-aws/issues/3316)) +* resource/aws_lambda_event_source_mapping: Make `starting_position` optional and allow `batch_size` to support default of 10 for SQS ([#5024](https://github.com/terraform-providers/terraform-provider-aws/issues/5024)) +* resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` ([#3951](https://github.com/terraform-providers/terraform-provider-aws/issues/3951)) +* resource/aws_spot_fleet_request: Add `fleet_type` argument ([#5032](https://github.com/terraform-providers/terraform-provider-aws/issues/5032)) +* resource/aws_ssm_document: Add `tags` argument (support tagging) ([#5020](https://github.com/terraform-providers/terraform-provider-aws/issues/5020)) + +BUG FIXES: + +* resource/aws_codebuild_project: Prevent panic with missing environment variable type ([#5052](https://github.com/terraform-providers/terraform-provider-aws/issues/5052)) +* resource/aws_kms_alias: Fix perpetual plan when `target_key_id` is ARN ([#4010](https://github.com/terraform-providers/terraform-provider-aws/issues/4010)) + +## 1.25.0 (June 27, 2018) + +NOTES: + +* resource/aws_instance: Starting around June 21, 2018, the EC2 API began responding with an empty string value for user data for some instances instead of a completely empty response. In Terraform, it would show as a difference of `user_data: "da39a3ee5e6b4b0d3255bfef95601890afd80709" => "" (forces new resource)` if the `user_data` argument was not defined in the Terraform configuration for the resource. This release ignores that difference as equivalent. + +FEATURES: + +* **New Data Source:** `aws_codecommit_repository` ([#4934](https://github.com/terraform-providers/terraform-provider-aws/issues/4934)) +* **New Data Source:** `aws_dx_gateway` ([#4988](https://github.com/terraform-providers/terraform-provider-aws/issues/4988)) +* **New Data Source:** `aws_network_acls` ([#4966](https://github.com/terraform-providers/terraform-provider-aws/issues/4966)) +* **New Data Source:** `aws_route_tables` ([#4841](https://github.com/terraform-providers/terraform-provider-aws/issues/4841)) +* **New Data Source:** `aws_security_groups` ([#2947](https://github.com/terraform-providers/terraform-provider-aws/issues/2947)) +* **New Resource:** `aws_dx_hosted_private_virtual_interface` ([#3255](https://github.com/terraform-providers/terraform-provider-aws/issues/3255)) +* **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` ([#3255](https://github.com/terraform-providers/terraform-provider-aws/issues/3255)) +* **New Resource:** `aws_dx_hosted_public_virtual_interface` ([#3254](https://github.com/terraform-providers/terraform-provider-aws/issues/3254)) +* **New Resource:** `aws_dx_hosted_public_virtual_interface_accepter` ([#3254](https://github.com/terraform-providers/terraform-provider-aws/issues/3254)) +* **New Resource:** `aws_dx_private_virtual_interface` ([#3253](https://github.com/terraform-providers/terraform-provider-aws/issues/3253)) +* **New Resource:** `aws_dx_public_virtual_interface` ([#3252](https://github.com/terraform-providers/terraform-provider-aws/issues/3252)) +* **New Resource:** `aws_media_store_container_policy` ([#3507](https://github.com/terraform-providers/terraform-provider-aws/issues/3507)) + +ENHANCEMENTS: + +* provider: Support custom endpoint for `autoscaling` ([#4970](https://github.com/terraform-providers/terraform-provider-aws/issues/4970)) +* resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type ([#4960](https://github.com/terraform-providers/terraform-provider-aws/issues/4960)) +* resource/aws_codebuild_project: Support resource import ([#4976](https://github.com/terraform-providers/terraform-provider-aws/issues/4976)) +* resource/aws_ecs_service: Add `scheduling_strategy` argument (support `DAEMON` scheduling strategy) ([#4825](https://github.com/terraform-providers/terraform-provider-aws/issues/4825)) +* resource/aws_iam_instance_profile: Add `create_date` attribute ([#4932](https://github.com/terraform-providers/terraform-provider-aws/issues/4932)) +* resource/aws_media_store_container: Support resource import ([#3501](https://github.com/terraform-providers/terraform-provider-aws/issues/3501)) +* resource/aws_network_acl: Add full mapping of protocol names to protocol numbers ([#4956](https://github.com/terraform-providers/terraform-provider-aws/issues/4956)) +* resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers ([#4956](https://github.com/terraform-providers/terraform-provider-aws/issues/4956)) +* resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` ([#4929](https://github.com/terraform-providers/terraform-provider-aws/issues/4929)) +* resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` ([#2514](https://github.com/terraform-providers/terraform-provider-aws/issues/2514)) +* resource/aws_waf_ipset: Support resource import ([#4979](https://github.com/terraform-providers/terraform-provider-aws/issues/4979)) +* resource/aws_wafregional_web_acl: Add rule `type` argument (support rate limited rules) ([#4307](https://github.com/terraform-providers/terraform-provider-aws/issues/4307)] / [[#4978](https://github.com/terraform-providers/terraform-provider-aws/issues/4978)) + +BUG FIXES: + +* data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 ([#4927](https://github.com/terraform-providers/terraform-provider-aws/issues/4927)) +* resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read ([#4917](https://github.com/terraform-providers/terraform-provider-aws/issues/4917)) +* resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` ([#4943](https://github.com/terraform-providers/terraform-provider-aws/issues/4943)) +* resource/aws_instance: Prevent extraneous ModifyInstanceAttribute call for `disable_api_termination` on resource creation ([#4941](https://github.com/terraform-providers/terraform-provider-aws/issues/4941)) +* resource/aws_instance: Ignore empty string SHA (`da39a3ee5e6b4b0d3255bfef95601890afd80709`) `user_data` difference due to EC2 API response changes ([#4991](https://github.com/terraform-providers/terraform-provider-aws/issues/4991)) +* resource/aws_launch_template: Prevent error when using `valid_until` ([#4952](https://github.com/terraform-providers/terraform-provider-aws/issues/4952)) +* resource/aws_route: Properly force resource recreation when updating `route_table_id` ([#4946](https://github.com/terraform-providers/terraform-provider-aws/issues/4946)) +* resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors ([#4903](https://github.com/terraform-providers/terraform-provider-aws/issues/4903)) +* resource/aws_ses_receipt_rule: Prevent error with `s3_action` when `kms_key_arn` is not specified ([#4965](https://github.com/terraform-providers/terraform-provider-aws/issues/4965)) + +## 1.24.0 (June 21, 2018) + +FEATURES: + +* **New Data Source:** `aws_cloudformation_export` ([#2180](https://github.com/terraform-providers/terraform-provider-aws/issues/2180)) +* **New Data Source:** `aws_vpc_dhcp_options` ([#4878](https://github.com/terraform-providers/terraform-provider-aws/issues/4878)) +* **New Resource:** `aws_dx_gateway` ([#4896](https://github.com/terraform-providers/terraform-provider-aws/issues/4896)) +* **New Resource:** `aws_dx_gateway_association` ([#4896](https://github.com/terraform-providers/terraform-provider-aws/issues/4896)) +* **New Resource:** `aws_glue_crawler` ([#4484](https://github.com/terraform-providers/terraform-provider-aws/issues/4484)) +* **New Resource:** `aws_neptune_cluster_parameter_group` ([#4860](https://github.com/terraform-providers/terraform-provider-aws/issues/4860)) +* **New Resource:** `aws_neptune_subnet_group` ([#4782](https://github.com/terraform-providers/terraform-provider-aws/issues/4782)) + +ENHANCEMENTS: + +* resource/aws_api_gateway_rest_api: Support `PRIVATE` endpoint type ([#4888](https://github.com/terraform-providers/terraform-provider-aws/issues/4888)) +* resource/aws_codedeploy_app: Add `compute_platform` argument ([#4811](https://github.com/terraform-providers/terraform-provider-aws/issues/4811)) +* resource/aws_kinesis_firehose_delivery_stream: Support extended S3 destination `data_format_conversion_configuration` ([#4842](https://github.com/terraform-providers/terraform-provider-aws/issues/4842)) +* resource/aws_kms_grant: Support ARN for `key_id` argument (external CMKs) ([#4886](https://github.com/terraform-providers/terraform-provider-aws/issues/4886)) +* resource/aws_neptune_parameter_group: Add `tags` argument and `arn` attribute ([#4873](https://github.com/terraform-providers/terraform-provider-aws/issues/4873)) +* resource/aws_rds_cluster: Add `enabled_cloudwatch_logs_exports` argument ([#4875](https://github.com/terraform-providers/terraform-provider-aws/issues/4875)) + +BUG FIXES: + +* resource/aws_batch_job_definition: Force resource recreation on retry_strategy attempts updates ([#4854](https://github.com/terraform-providers/terraform-provider-aws/issues/4854)) +* resource/aws_cognito_user_pool_client: Prevent panic with updating `refresh_token_validity` ([#4868](https://github.com/terraform-providers/terraform-provider-aws/issues/4868)) +* resource/aws_instance: Prevent extraneous ModifyInstanceCreditSpecification call on resource creation ([#4898](https://github.com/terraform-providers/terraform-provider-aws/issues/4898)) +* resource/aws_s3_bucket: Properly detect `cors_rule` drift when it is deleted outside Terraform ([#4887](https://github.com/terraform-providers/terraform-provider-aws/issues/4887)) +* resource/aws_vpn_gateway_attachment: Fix error handling for missing VPN gateway ([#4895](https://github.com/terraform-providers/terraform-provider-aws/issues/4895)) + +## 1.23.0 (June 14, 2018) + +NOTES: + +* resource/aws_elasticache_cluster: The `availability_zones` argument has been deprecated in favor of a new `preferred_availability_zones` argument to allow specifying the same Availability Zone more than once in larger Memcached clusters that also need to specifically set Availability Zones. The argument is still optional and the API will continue to automatically choose Availability Zones for nodes if not specified. The new argument will also continue to match the APIs required behavior that the length of the list must be the same as `num_cache_nodes`. Migration will require recreating the resource or using the resource [lifecycle configuration](https://www.terraform.io/docs/configuration/resources.html#lifecycle) of `ignore_changes = ["availability_zones"]` to prevent recreation. See the resource documentation for additional details. + +FEATURES: + +* **New Data Source:** `aws_vpcs` ([#4736](https://github.com/terraform-providers/terraform-provider-aws/issues/4736)) +* **New Resource:** `aws_neptune_parameter_group` ([#4724](https://github.com/terraform-providers/terraform-provider-aws/issues/4724)) + +ENHANCEMENTS: + +* resource/aws_db_instance: Display input arguments when receiving InvalidParameterValue error on resource creation ([#4803](https://github.com/terraform-providers/terraform-provider-aws/issues/4803)) +* resource/aws_elasticache_cluster: Migrate from `availability_zones` TypeSet attribute to `preferred_availability_zones` TypeList attribute (allow duplicate Availability Zone elements) ([#4741](https://github.com/terraform-providers/terraform-provider-aws/issues/4741)) +* resource/aws_launch_template: Add `tags` argument (support tagging the resource itself) ([#4763](https://github.com/terraform-providers/terraform-provider-aws/issues/4763)) +* resource/aws_launch_template: Add plan time validation for tag_specifications `resource_type` ([#4765](https://github.com/terraform-providers/terraform-provider-aws/issues/4765)) +* resource/aws_waf_ipset: Add `arn` attribute ([#4784](https://github.com/terraform-providers/terraform-provider-aws/issues/4784)) +* resource/aws_wafregional_ipset: Add `arn` attribute ([#4816](https://github.com/terraform-providers/terraform-provider-aws/issues/4816)) + +BUG FIXES: + +* resource/aws_codebuild_webhook: Properly export `secret` (the CodeBuild API only provides its value during resource creation) ([#4775](https://github.com/terraform-providers/terraform-provider-aws/issues/4775)) +* resource/aws_codecommit_repository: Prevent error and trigger recreation when not found during read ([#4761](https://github.com/terraform-providers/terraform-provider-aws/issues/4761)) +* resource/aws_eks_cluster: Properly export `arn` attribute ([#4766](https://github.com/terraform-providers/terraform-provider-aws/issues/4766)] / [[#4767](https://github.com/terraform-providers/terraform-provider-aws/issues/4767)) +* resource/aws_elasticsearch_domain: Skip EBS options update/refresh if EBS is not enabled ([#4802](https://github.com/terraform-providers/terraform-provider-aws/issues/4802)) + +## 1.22.0 (June 05, 2018) + +FEATURES: + +* **New Data Source:** `aws_ecs_service` ([#3617](https://github.com/terraform-providers/terraform-provider-aws/issues/3617)) +* **New Data Source:** `aws_eks_cluster` ([#4749](https://github.com/terraform-providers/terraform-provider-aws/issues/4749)) +* **New Guide:** EKS Getting Started +* **New Resource:** `aws_config_aggregate_authorization` ([#4263](https://github.com/terraform-providers/terraform-provider-aws/issues/4263)) +* **New Resource:** `aws_config_configuration_aggregator` ([#4262](https://github.com/terraform-providers/terraform-provider-aws/issues/4262)) +* **New Resource:** `aws_eks_cluster` ([#4749](https://github.com/terraform-providers/terraform-provider-aws/issues/4749)) + +ENHANCEMENTS: + +* provider: Support custom endpoint for EFS ([#4716](https://github.com/terraform-providers/terraform-provider-aws/issues/4716)) +* resource/aws_api_gateway_method: Add `authorization_scopes` argument ([#4533](https://github.com/terraform-providers/terraform-provider-aws/issues/4533)) +* resource/aws_api_gateway_rest_api: Add `api_key_source` argument ([#4717](https://github.com/terraform-providers/terraform-provider-aws/issues/4717)) +* resource/aws_cloudfront_distribution: Allow create and update retries on InvalidViewerCertificate for eventual consistency with ACM/IAM services ([#4698](https://github.com/terraform-providers/terraform-provider-aws/issues/4698)) +* resource/aws_cognito_identity_pool: Add `arn` attribute ([#4719](https://github.com/terraform-providers/terraform-provider-aws/issues/4719)) +* resource/aws_cognito_user_pool: Add `endpoint` attribute ([#4718](https://github.com/terraform-providers/terraform-provider-aws/issues/4718)) + +BUG FIXES: + +* resource/aws_service_discovery_private_dns_namespace: Prevent creation error with names longer than 34 characters ([#4702](https://github.com/terraform-providers/terraform-provider-aws/issues/4702)) +* resource/aws_vpn_connection: Allow period in `tunnel[1-2]_preshared_key` validation ([#4731](https://github.com/terraform-providers/terraform-provider-aws/issues/4731)) + +## 1.21.0 (May 31, 2018) + +FEATURES: + +* **New Data Source:** `aws_route` ([#4529](https://github.com/terraform-providers/terraform-provider-aws/issues/4529)) +* **New Resource:** `aws_codebuild_webhook` ([#4473](https://github.com/terraform-providers/terraform-provider-aws/issues/4473)) +* **New Resource:** `aws_cognito_identity_provider` ([#3601](https://github.com/terraform-providers/terraform-provider-aws/issues/3601)) +* **New Resource:** `aws_cognito_resource_server` ([#4530](https://github.com/terraform-providers/terraform-provider-aws/issues/4530)) +* **New Resource:** `aws_glue_classifier` ([#4472](https://github.com/terraform-providers/terraform-provider-aws/issues/4472)) + +ENHANCEMENTS: + +* provider: Support custom endpoint for SSM ([#4670](https://github.com/terraform-providers/terraform-provider-aws/issues/4670)) +* resource/aws_codebuild_project: Add `badge_enabled` argument and `badge_url` attribute ([#3504](https://github.com/terraform-providers/terraform-provider-aws/issues/3504)) +* resource/aws_codebuild_project: Add `environment_variable` argument `type` (support parameter store environment variables) ([#2811](https://github.com/terraform-providers/terraform-provider-aws/issues/2811)] / [[#4021](https://github.com/terraform-providers/terraform-provider-aws/issues/4021)) +* resource/aws_codebuild_project: Add `source` argument `git_clone_depth` and `insecure_ssl` ([#3929](https://github.com/terraform-providers/terraform-provider-aws/issues/3929)) +* resource/aws_elasticache_replication_group: Support `number_cache_nodes` updates ([#4504](https://github.com/terraform-providers/terraform-provider-aws/issues/4504)) +* resource/aws_lb_target_group: Add `slow_start` argument ([#4661](https://github.com/terraform-providers/terraform-provider-aws/issues/4661)) +* resource/aws_redshift_cluster: Add `dns_name` attribute ([#4582](https://github.com/terraform-providers/terraform-provider-aws/issues/4582)) +* resource/aws_s3_bucket: Add `bucket_regional_domain_name` attribute ([#4556](https://github.com/terraform-providers/terraform-provider-aws/issues/4556)) + +BUG FIXES: + +* data-source/aws_lambda_function: Qualifiers explicitly set are now honoured ([#4654](https://github.com/terraform-providers/terraform-provider-aws/issues/4654)) +* resource/aws_batch_job_definition: Properly force new resource when updating timeout `attempt_duration_seconds` argument ([#4697](https://github.com/terraform-providers/terraform-provider-aws/issues/4697)) +* resource/aws_budgets_budget: Force new resource when updating `name` ([#4656](https://github.com/terraform-providers/terraform-provider-aws/issues/4656)) +* resource/aws_dms_endpoint: Additionally specify MongoDB connection info in the top-level API namespace to prevent issues connecting ([#4636](https://github.com/terraform-providers/terraform-provider-aws/issues/4636)) +* resource/aws_rds_cluster: Prevent additional retry error during S3 import for IAM/S3 eventual consistency ([#4683](https://github.com/terraform-providers/terraform-provider-aws/issues/4683)) +* resource/aws_sns_sms_preferences: Properly add SNS preferences to website docs ([#4694](https://github.com/terraform-providers/terraform-provider-aws/issues/4694)) + +## 1.20.0 (May 23, 2018) + +NOTES: + +* resource/aws_guardduty_member: Terraform will now try to properly detect if a member account has been invited based on its relationship status (`Disabled`/`Enabled`/`Invited`) and appropriately flag the new `invite` argument for update. You will want to set `invite = true` in your Terraform configuration if you previously handled the invitation process for a member, otherwise the resource will attempt to disassociate the member upon updating the provider to this version. + +FEATURES: + +* **New Data Source:** `aws_glue_script` ([#4481](https://github.com/terraform-providers/terraform-provider-aws/issues/4481)) +* **New Resource:** `aws_glue_trigger` ([#4464](https://github.com/terraform-providers/terraform-provider-aws/issues/4464)) + +ENHANCEMENTS: + +* resource/aws_api_gateway_domain_name: Add `endpoint_configuration` argument, `regional_certificate_arn` argument, `regional_certificate_name` argument, `regional_domain_name` attribute, and `regional_zone_id` attribute (support regional domain names) ([#2866](https://github.com/terraform-providers/terraform-provider-aws/issues/2866)) +* resource/aws_api_gateway_rest_api: Add `endpoint_configuration` argument (support regional endpoint type) ([#2866](https://github.com/terraform-providers/terraform-provider-aws/issues/2866)) +* resource/aws_appautoscaling_policy: Add retry logic for rate exceeded errors during read, update and delete ([#4594](https://github.com/terraform-providers/terraform-provider-aws/issues/4594)) +* resource/aws_ecs_service: Add `container_name` and `container_port` arguments for `service_registry` (support bridge and host network mode for service registry) ([#4623](https://github.com/terraform-providers/terraform-provider-aws/issues/4623)) +* resource/aws_emr_cluster: Add `additional_info` argument ([#4590](https://github.com/terraform-providers/terraform-provider-aws/issues/4590)) +* resource/aws_guardduty_member: Support member account invitation on creation ([#4357](https://github.com/terraform-providers/terraform-provider-aws/issues/4357)) +* resource/aws_guardduty_member: Support `invite` argument updates (invite or disassociate on update) ([#4604](https://github.com/terraform-providers/terraform-provider-aws/issues/4604)) +* resource/aws_ssm_patch_baseline: Add `approval_rule` `enable_non_security` argument ([#4546](https://github.com/terraform-providers/terraform-provider-aws/issues/4546)) + +BUG FIXES: + +* resource/aws_api_gateway_rest_api: Prevent error with `policy` containing special characters (e.g. forward slashes in CIDRs) ([#4606](https://github.com/terraform-providers/terraform-provider-aws/issues/4606)) +* resource/aws_cloudwatch_event_rule: Prevent multiple names on creation ([#4579](https://github.com/terraform-providers/terraform-provider-aws/issues/4579)) +* resource/aws_dynamodb_table: Prevent error with APIs that do not support point in time recovery (e.g. AWS China) ([#4573](https://github.com/terraform-providers/terraform-provider-aws/issues/4573)) +* resource/aws_glue_catalog_table: Prevent multiple potential panic scenarios ([#4621](https://github.com/terraform-providers/terraform-provider-aws/issues/4621)) +* resource/aws_kinesis_stream: Handle tag additions/removals of more than 10 tags ([#4574](https://github.com/terraform-providers/terraform-provider-aws/issues/4574)) +* resource/aws_kinesis_stream: Prevent perpetual `encryption_type` difference with APIs that do not support encryption (e.g. AWS China) ([#4575](https://github.com/terraform-providers/terraform-provider-aws/issues/4575)) +* resource/aws_s3_bucket: Prevent panic from CORS reading errors ([#4603](https://github.com/terraform-providers/terraform-provider-aws/issues/4603)) +* resource/aws_spot_fleet_request: Prevent empty `iam_instance_profile_arn` from overwriting `iam_instance_profile` ([#4591](https://github.com/terraform-providers/terraform-provider-aws/issues/4591)) + +## 1.19.0 (May 16, 2018) + +NOTES: + +* data-source/aws_iam_policy_document: Please note there is a behavior change in the rendering of `principal`/`not_principal` in the case of `type = "AWS"` and `identifiers = ["*"]`. This will now render as `Principal": {"AWS": "*"}` instead of `"Principal": "*"`. This change is required for IAM role trust policy support as well as differentiating between anonymous access versus AWS access in policies. To keep the old behavior of anonymous access, use `type = "*"` and `identifiers = ["*"]`, which will continue to render as `"Principal": "*"`. For additional information, see the [`aws_iam_policy_document` documentation](https://www.terraform.io/docs/providers/aws/d/iam_policy_document.html). + +FEATURES: + +* **New Data Source:** `aws_arn` ([#3996](https://github.com/terraform-providers/terraform-provider-aws/issues/3996)) +* **New Data Source:** `aws_lambda_invocation` ([#4222](https://github.com/terraform-providers/terraform-provider-aws/issues/4222)) +* **New Resource:** `aws_sns_sms_preferences` ([#3858](https://github.com/terraform-providers/terraform-provider-aws/issues/3858)) + +ENHANCEMENTS: + +* data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) ([#4248](https://github.com/terraform-providers/terraform-provider-aws/issues/4248)) +* resource/aws_api_gateway_rest_api: Add `execution_arn` attribute ([#3968](https://github.com/terraform-providers/terraform-provider-aws/issues/3968)) +* resource/aws_db_event_subscription: Add `name_prefix` argument ([#2754](https://github.com/terraform-providers/terraform-provider-aws/issues/2754)) +* resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation ([#4506](https://github.com/terraform-providers/terraform-provider-aws/issues/4506)) +* resource/aws_rds_cluster: Add `backtrack_window` argument and wait for updates to complete ([#4524](https://github.com/terraform-providers/terraform-provider-aws/issues/4524)) +* resource/aws_spot_fleet_request: Add `launch_specification` `iam_instance_profile_arn` argument ([#4511](https://github.com/terraform-providers/terraform-provider-aws/issues/4511)) + +BUG FIXES: + +* data-source/aws_autoscaling_groups: Use pagination function for DescribeTags filtering ([#4535](https://github.com/terraform-providers/terraform-provider-aws/issues/4535)) +* resource/aws_elb: Ensure `bucket_prefix` for access logging can be updated to `""` ([#4383](https://github.com/terraform-providers/terraform-provider-aws/issues/4383)) +* resource/aws_kinesis_firehose_delivery_stream: Retry on Elasticsearch destination IAM role errors and update IAM errors ([#4518](https://github.com/terraform-providers/terraform-provider-aws/issues/4518)) +* resource/aws_launch_template: Allow `network_interfaces` `device_index` to be set to 0 ([#4367](https://github.com/terraform-providers/terraform-provider-aws/issues/4367)) +* resource/aws_lb: Ensure `bucket_prefix` for access logging can be updated to `""` ([#4383](https://github.com/terraform-providers/terraform-provider-aws/issues/4383)) +* resource/aws_lb: Ensure `access_logs` is properly set into Terraform state ([#4517](https://github.com/terraform-providers/terraform-provider-aws/issues/4517)) +* resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions ([#4416](https://github.com/terraform-providers/terraform-provider-aws/issues/4416)) + +## 1.18.0 (May 10, 2018) + +FEATURES: + +* **New Data Source:** `aws_acmpca_certificate_authority` ([#4458](https://github.com/terraform-providers/terraform-provider-aws/issues/4458)) +* **New Resource:** `aws_acmpca_certificate_authority` ([#4458](https://github.com/terraform-providers/terraform-provider-aws/issues/4458)) +* **New Resource:** `aws_glue_catalog_table` ([#4368](https://github.com/terraform-providers/terraform-provider-aws/issues/4368)) + +ENHANCEMENTS: + +* provider: Lower retry threshold for DNS resolution failures ([#4459](https://github.com/terraform-providers/terraform-provider-aws/issues/4459)) +* resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument ([#1685](https://github.com/terraform-providers/terraform-provider-aws/issues/1685)] and [[#4447](https://github.com/terraform-providers/terraform-provider-aws/issues/4447)) +* resource/aws_glue_job: Add `timeout` argument ([#4460](https://github.com/terraform-providers/terraform-provider-aws/issues/4460)) +* resource/aws_lb_target_group: Add `proxy_protocol_v2` argument ([#4365](https://github.com/terraform-providers/terraform-provider-aws/issues/4365)) +* resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) ([#4424](https://github.com/terraform-providers/terraform-provider-aws/issues/4424)) +* resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments ([#4463](https://github.com/terraform-providers/terraform-provider-aws/issues/4463)) +* resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) ([#4424](https://github.com/terraform-providers/terraform-provider-aws/issues/4424)) + +BUG FIXES: + +* data-source/aws_autoscaling_groups: Correctly paginate through over 50 results ([#4433](https://github.com/terraform-providers/terraform-provider-aws/issues/4433)) +* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition ([#4485](https://github.com/terraform-providers/terraform-provider-aws/issues/4485)) +* resource/aws_glue_job: Remove `allocated_capacity` and `max_concurrent_runs` upper plan time validation limits ([#4461](https://github.com/terraform-providers/terraform-provider-aws/issues/4461)) +* resource/aws_instance: Fix `root_device_mapping` matching of expected root device name with multiple block devices. ([#4489](https://github.com/terraform-providers/terraform-provider-aws/issues/4489)) +* resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Separate usage of `ipv4_address_count`/`ipv6_address_count` from `ipv4_addresses`/`ipv6_addresses` ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_redshift_cluster: Properly send all required parameters when resizing ([#3127](https://github.com/terraform-providers/terraform-provider-aws/issues/3127)) +* resource/aws_s3_bucket: Prevent crash from empty string CORS arguments ([#4465](https://github.com/terraform-providers/terraform-provider-aws/issues/4465)) +* resource/aws_ssm_document: Add missing account ID to `arn` attribute ([#4436](https://github.com/terraform-providers/terraform-provider-aws/issues/4436)) + +## 1.17.0 (May 02, 2018) + +NOTES: + +* resource/aws_ecs_service: Please note the `placement_strategy` argument (an unordered list) has been marked deprecated in favor of the `ordered_placement_strategy` argument (an ordered list based on the Terraform configuration ordering). + +FEATURES: + +* **New Data Source:** `aws_mq_broker` ([#3163](https://github.com/terraform-providers/terraform-provider-aws/issues/3163)) +* **New Resource:** `aws_budgets_budget` ([#1879](https://github.com/terraform-providers/terraform-provider-aws/issues/1879)) +* **New Resource:** `aws_iam_user_group_membership` ([#3365](https://github.com/terraform-providers/terraform-provider-aws/issues/3365)) +* **New Resource:** `aws_vpc_peering_connection_options` ([#3909](https://github.com/terraform-providers/terraform-provider-aws/issues/3909)) + +ENHANCEMENTS: + +* data-source/aws_route53_zone: Add `name_servers` attribute ([#4336](https://github.com/terraform-providers/terraform-provider-aws/issues/4336)) +* resource/aws_api_gateway_stage: Add `access_log_settings` argument (Support access logging) ([#4369](https://github.com/terraform-providers/terraform-provider-aws/issues/4369)) +* resource/aws_autoscaling_group: Add `launch_template` argument ([#4305](https://github.com/terraform-providers/terraform-provider-aws/issues/4305)) +* resource/aws_batch_job_definition: Add `timeout` argument ([#4386](https://github.com/terraform-providers/terraform-provider-aws/issues/4386)) +* resource/aws_cloudwatch_event_rule: Add `name_prefix` argument ([#2752](https://github.com/terraform-providers/terraform-provider-aws/issues/2752)) +* resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) ([#2752](https://github.com/terraform-providers/terraform-provider-aws/issues/2752)) +* resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) ([#4324](https://github.com/terraform-providers/terraform-provider-aws/issues/4324)) +* resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates ([#4396](https://github.com/terraform-providers/terraform-provider-aws/issues/4396)) +* resource/aws_dms_endpoint: Support `mongodb` engine_name and `mongodb_settings` argument ([#4406](https://github.com/terraform-providers/terraform-provider-aws/issues/4406)) +* resource/aws_dynamodb_table: Add `point_in_time_recovery` argument ([#4063](https://github.com/terraform-providers/terraform-provider-aws/issues/4063)) +* resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument ([#4390](https://github.com/terraform-providers/terraform-provider-aws/issues/4390)) +* resource/aws_ecs_service: Allow `health_check_grace_period_seconds` up to 7200 seconds ([#4420](https://github.com/terraform-providers/terraform-provider-aws/issues/4420)) +* resource/aws_lambda_permission: Add `statement_id_prefix` argument ([#2743](https://github.com/terraform-providers/terraform-provider-aws/issues/2743)) +* resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) ([#2743](https://github.com/terraform-providers/terraform-provider-aws/issues/2743)) +* resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) ([#4366](https://github.com/terraform-providers/terraform-provider-aws/issues/4366)) +* resource/aws_vpc_peering_connection: Support configurable timeouts ([#3909](https://github.com/terraform-providers/terraform-provider-aws/issues/3909)) + +BUG FIXES: + +* data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call ([#4362](https://github.com/terraform-providers/terraform-provider-aws/issues/4362)) +* resource/aws_iam_group_policy: Properly handle generated policy name updates ([#4379](https://github.com/terraform-providers/terraform-provider-aws/issues/4379)) +* resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call ([#4362](https://github.com/terraform-providers/terraform-provider-aws/issues/4362)) +* resource/aws_launch_template: Appropriately set `security_groups` in network interfaces ([#4364](https://github.com/terraform-providers/terraform-provider-aws/issues/4364)) +* resource/aws_rds_cluster: Add retries for IAM eventual consistency ([#4371](https://github.com/terraform-providers/terraform-provider-aws/issues/4371)) +* resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency ([#4370](https://github.com/terraform-providers/terraform-provider-aws/issues/4370)) +* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one ([#4341](https://github.com/terraform-providers/terraform-provider-aws/issues/4341)) + +## 1.16.0 (April 25, 2018) + +FEATURES: + +* **New Data Source:** `aws_batch_compute_environment` ([#4270](https://github.com/terraform-providers/terraform-provider-aws/issues/4270)) +* **New Data Source:** `aws_batch_job_queue` ([#4288](https://github.com/terraform-providers/terraform-provider-aws/issues/4288)) +* **New Data Source:** `aws_iot_endpoint` ([#4303](https://github.com/terraform-providers/terraform-provider-aws/issues/4303)) +* **New Data Source:** `aws_lambda_function` ([#2984](https://github.com/terraform-providers/terraform-provider-aws/issues/2984)) +* **New Data Source:** `aws_redshift_cluster` ([#2603](https://github.com/terraform-providers/terraform-provider-aws/issues/2603)) +* **New Data Source:** `aws_secretsmanager_secret` ([#4272](https://github.com/terraform-providers/terraform-provider-aws/issues/4272)) +* **New Data Source:** `aws_secretsmanager_secret_version` ([#4272](https://github.com/terraform-providers/terraform-provider-aws/issues/4272)) +* **New Resource:** `aws_dax_parameter_group` ([#4299](https://github.com/terraform-providers/terraform-provider-aws/issues/4299)) +* **New Resource:** `aws_dax_subnet_group` ([#4302](https://github.com/terraform-providers/terraform-provider-aws/issues/4302)) +* **New Resource:** `aws_organizations_policy` ([#4249](https://github.com/terraform-providers/terraform-provider-aws/issues/4249)) +* **New Resource:** `aws_organizations_policy_attachment` ([#4253](https://github.com/terraform-providers/terraform-provider-aws/issues/4253)) +* **New Resource:** `aws_secretsmanager_secret` ([#4272](https://github.com/terraform-providers/terraform-provider-aws/issues/4272)) +* **New Resource:** `aws_secretsmanager_secret_version` ([#4272](https://github.com/terraform-providers/terraform-provider-aws/issues/4272)) + +ENHANCEMENTS: + +* data-source/aws_cognito_user_pools: Add `arns` attribute ([#4256](https://github.com/terraform-providers/terraform-provider-aws/issues/4256)) +* data-source/aws_ecs_cluster Return error on multiple clusters ([#4286](https://github.com/terraform-providers/terraform-provider-aws/issues/4286)) +* data-source/aws_iam_instance_profile: Add `role_arn` and `role_name` attributes ([#4300](https://github.com/terraform-providers/terraform-provider-aws/issues/4300)) +* data-source/aws_instance: Add `disable_api_termination` attribute ([#4314](https://github.com/terraform-providers/terraform-provider-aws/issues/4314)) +* resource/aws_api_gateway_rest_api: Add `policy` argument ([#4211](https://github.com/terraform-providers/terraform-provider-aws/issues/4211)) +* resource/aws_api_gateway_stage: Add `tags` argument ([#2858](https://github.com/terraform-providers/terraform-provider-aws/issues/2858)) +* resource/aws_api_gateway_stage: Add `execution_arn` and `invoke_url` attributes ([#3469](https://github.com/terraform-providers/terraform-provider-aws/issues/3469)) +* resource/aws_api_gateway_vpc_link: Support import ([#4306](https://github.com/terraform-providers/terraform-provider-aws/issues/4306)) +* resource/aws_cloudwatch_event_target: Add `batch_target` argument ([#4312](https://github.com/terraform-providers/terraform-provider-aws/issues/4312)) +* resource/aws_cloudwatch_event_target: Add `kinesis_target` and `sqs_target` arguments ([#4323](https://github.com/terraform-providers/terraform-provider-aws/issues/4323)) +* resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` ([#4301](https://github.com/terraform-providers/terraform-provider-aws/issues/4301)) +* resource/aws_db_instance: Add `s3_import` argument ([#2728](https://github.com/terraform-providers/terraform-provider-aws/issues/2728)) +* resource/aws_elastic_beanstalk_application: Add `appversion_lifecycle` argument ([#1907](https://github.com/terraform-providers/terraform-provider-aws/issues/1907)) +* resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) ([#2619](https://github.com/terraform-providers/terraform-provider-aws/issues/2619)) +* resource/aws_kinesis_firehose_delivery_stream: Support Redshift `processing_configuration` ([#4251](https://github.com/terraform-providers/terraform-provider-aws/issues/4251)) +* resource/aws_launch_configuration: Add `user_data_base64` argument ([#4257](https://github.com/terraform-providers/terraform-provider-aws/issues/4257)) +* resource/aws_s3_bucket: Add support for `ONEZONE_IA` storage class ([#4287](https://github.com/terraform-providers/terraform-provider-aws/issues/4287)) +* resource/aws_s3_bucket_object: Add support for `ONEZONE_IA` storage class ([#4287](https://github.com/terraform-providers/terraform-provider-aws/issues/4287)) +* resource/aws_spot_instance_request: Add `valid_from` and `valid_until` arguments ([#4018](https://github.com/terraform-providers/terraform-provider-aws/issues/4018)) +* resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument ([#4268](https://github.com/terraform-providers/terraform-provider-aws/issues/4268)) + +BUG FIXES: + +* data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers ([#4277](https://github.com/terraform-providers/terraform-provider-aws/issues/4277)) +* data-source/aws_lb_listener: Ensure attributes are properly set when not used as arguments ([#4317](https://github.com/terraform-providers/terraform-provider-aws/issues/4317)) +* resource/aws_codebuild_project: Mark auth resource attribute as sensitive ([#4284](https://github.com/terraform-providers/terraform-provider-aws/issues/4284)) +* resource/aws_cognito_user_pool_client: Fix import to include user pool ID ([#3762](https://github.com/terraform-providers/terraform-provider-aws/issues/3762)) +* resource/aws_elasticache_cluster: Remove extraneous plan-time validation for `node_type` and `subnet_group_name` ([#4333](https://github.com/terraform-providers/terraform-provider-aws/issues/4333)) +* resource/aws_launch_template: Allow dashes in `name` and `name_prefix` arguments ([#4321](https://github.com/terraform-providers/terraform-provider-aws/issues/4321)) +* resource/aws_launch_template: Properly set `block_device_mappings` EBS information into Terraform state ([#4321](https://github.com/terraform-providers/terraform-provider-aws/issues/4321)) +* resource/aws_launch_template: Properly pass `block_device_mappings` information to EC2 API ([#4321](https://github.com/terraform-providers/terraform-provider-aws/issues/4321)) +* resource/aws_s3_bucket: Prevent panic on lifecycle rule reading errors ([#4282](https://github.com/terraform-providers/terraform-provider-aws/issues/4282)) + +## 1.15.0 (April 18, 2018) + +NOTES: + +* resource/aws_cloudfront_distribution: Please note the `cache_behavior` argument (an unordered list) has been marked deprecated in favor of the `ordered_cache_behavior` argument (an ordered list based on the Terraform configuration ordering). This is to support proper cache behavior precedence within a CloudFront distribution. + +FEATURES: + +* **New Data Source:** `aws_api_gateway_rest_api` ([#4172](https://github.com/terraform-providers/terraform-provider-aws/issues/4172)) +* **New Data Source:** `aws_cloudwatch_log_group` ([#4167](https://github.com/terraform-providers/terraform-provider-aws/issues/4167)) +* **New Data Source:** `aws_cognito_user_pools` ([#4212](https://github.com/terraform-providers/terraform-provider-aws/issues/4212)) +* **New Data Source:** `aws_sqs_queue` ([#2311](https://github.com/terraform-providers/terraform-provider-aws/issues/2311)) +* **New Resource:** `aws_directory_service_conditional_forwarder` ([#4071](https://github.com/terraform-providers/terraform-provider-aws/issues/4071)) +* **New Resource:** `aws_glue_connection` ([#4016](https://github.com/terraform-providers/terraform-provider-aws/issues/4016)) +* **New Resource:** `aws_glue_job` ([#4028](https://github.com/terraform-providers/terraform-provider-aws/issues/4028)) +* **New Resource:** `aws_iam_service_linked_role` ([#2985](https://github.com/terraform-providers/terraform-provider-aws/issues/2985)) +* **New Resource:** `aws_launch_template` ([#2927](https://github.com/terraform-providers/terraform-provider-aws/issues/2927)) +* **New Resource:** `aws_ses_domain_identity_verification` ([#4108](https://github.com/terraform-providers/terraform-provider-aws/issues/4108)) + +ENHANCEMENTS: + +* data-source/aws_iam_server_certificate: Filter by `path_prefix` ([#3801](https://github.com/terraform-providers/terraform-provider-aws/issues/3801)) +* resource/aws_api_gateway_integration: Support VPC connection ([#3428](https://github.com/terraform-providers/terraform-provider-aws/issues/3428)) +* resource/aws_cloudfront_distribution: Added `ordered_cache_behavior` argument, deprecate `cache_behavior` ([#4117](https://github.com/terraform-providers/terraform-provider-aws/issues/4117)) +* resource/aws_db_instance: Support `enabled_cloudwatch_logs_exports` argument ([#4111](https://github.com/terraform-providers/terraform-provider-aws/issues/4111)) +* resource/aws_db_option_group: Support option version argument ([#2590](https://github.com/terraform-providers/terraform-provider-aws/issues/2590)) +* resource/aws_ecs_service: Support ServiceRegistries ([#3906](https://github.com/terraform-providers/terraform-provider-aws/issues/3906)) +* resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments ([#4188](https://github.com/terraform-providers/terraform-provider-aws/issues/4188)) +* resource/aws_service_discovery_service: Support `health_check_custom_config` argument ([#4083](https://github.com/terraform-providers/terraform-provider-aws/issues/4083)) +* resource/aws_spot_fleet_request: Support configurable delete timeout ([#3940](https://github.com/terraform-providers/terraform-provider-aws/issues/3940)) +* resource/aws_spot_instance_request: Support optionally fetching password data ([#4189](https://github.com/terraform-providers/terraform-provider-aws/issues/4189)) +* resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) +* resource/aws_waf_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) +* resource/aws_wafregional_rate_based_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) + +BUG FIXES: + +* resource/aws_athena_database: Handle database names with uppercase and underscores ([#4133](https://github.com/terraform-providers/terraform-provider-aws/issues/4133)) +* resource/aws_codebuild_project: Retry UpdateProject for IAM eventual consistency ([#4238](https://github.com/terraform-providers/terraform-provider-aws/issues/4238)) +* resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates ([#4194](https://github.com/terraform-providers/terraform-provider-aws/issues/4194)) +* resource/aws_cognito_user_group: Fix `role_arn` updates ([#4237](https://github.com/terraform-providers/terraform-provider-aws/issues/4237)) +* resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes ([#4093](https://github.com/terraform-providers/terraform-provider-aws/issues/4093)) +* resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change ([#4218](https://github.com/terraform-providers/terraform-provider-aws/issues/4218)) +* resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion ([#4209](https://github.com/terraform-providers/terraform-provider-aws/issues/4209)) +* resource/aws_lb: Force new resource if any of the `subnet_mapping` attributes change ([#4086](https://github.com/terraform-providers/terraform-provider-aws/issues/4086)) +* resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` ([#4215](https://github.com/terraform-providers/terraform-provider-aws/issues/4215)) +* resource/aws_route53_record: Improved handling of non-alphanumeric record names ([#4183](https://github.com/terraform-providers/terraform-provider-aws/issues/4183)) +* resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement ([#1986](https://github.com/terraform-providers/terraform-provider-aws/issues/1986)) +* resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors ([#4136](https://github.com/terraform-providers/terraform-provider-aws/issues/4136)) + ## 1.14.1 (April 11, 2018) ENHANCEMENTS: diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/GNUmakefile b/vendor/github.com/terraform-providers/terraform-provider-aws/GNUmakefile index eca08ffa7..4f24da372 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/GNUmakefile +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/GNUmakefile @@ -1,6 +1,8 @@ SWEEP?=us-east-1,us-west-2 TEST?=./... GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) +PKG_NAME=aws +WEBSITE_REPO=github.com/hashicorp/terraform-website default: build @@ -41,10 +43,24 @@ vendor-status: test-compile: @if [ "$(TEST)" = "./..." ]; then \ echo "ERROR: Set TEST to a specific package. For example,"; \ - echo " make test-compile TEST=./aws"; \ + echo " make test-compile TEST=./$(PKG_NAME)"; \ exit 1; \ fi go test -c $(TEST) $(TESTARGS) -.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile +website: +ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) + echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." + git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) +endif + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) + +website-test: +ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) + echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." + git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) +endif + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) + +.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go index fb12edd6a..ae3cfa242 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go @@ -8,6 +8,10 @@ import ( "github.com/hashicorp/terraform/helper/resource" ) +// Returns true if the error matches all these conditions: +// * err is of type awserr.Error +// * Error.Code() matches code +// * Error.Message() contains message func isAWSErr(err error, code string, message string) bool { if err, ok := err.(awserr.Error); ok { return err.Code() == code && strings.Contains(err.Message(), message) @@ -15,6 +19,18 @@ func isAWSErr(err error, code string, message string) bool { return false } +// Returns true if the error matches all these conditions: +// * err is of type awserr.Error +// * Error.Code() matches code +// * Error.Message() contains message +// * Error.OrigErr() contains origErrMessage +func isAWSErrExtended(err error, code string, message string, origErrMessage string) bool { + if !isAWSErr(err, code, message) { + return false + } + return strings.Contains(err.(awserr.Error).OrigErr().Error(), origErrMessage) +} + func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, error) { var resp interface{} err := resource.Retry(1*time.Minute, func() *resource.RetryError { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go index a4f3f9863..be332c1f6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go @@ -42,7 +42,6 @@ func (p StringPtrSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } // Used by the aws_cloudfront_distribution Create and Update functions. func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionConfig { distributionConfig := &cloudfront.DistributionConfig{ - CacheBehaviors: expandCacheBehaviors(d.Get("cache_behavior").(*schema.Set)), CustomErrorResponses: expandCustomErrorResponses(d.Get("custom_error_response").(*schema.Set)), DefaultCacheBehavior: expandDefaultCacheBehavior(d.Get("default_cache_behavior").(*schema.Set).List()[0].(map[string]interface{})), Enabled: aws.Bool(d.Get("enabled").(bool)), @@ -51,6 +50,11 @@ func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionCo Origins: expandOrigins(d.Get("origin").(*schema.Set)), PriceClass: aws.String(d.Get("price_class").(string)), } + if v, ok := d.GetOk("ordered_cache_behavior"); ok { + distributionConfig.CacheBehaviors = expandCacheBehaviors(v.([]interface{})) + } else { + distributionConfig.CacheBehaviors = expandCacheBehaviorsDeprecated(d.Get("cache_behavior").(*schema.Set)) + } // This sets CallerReference if it's still pending computation (ie: new resource) if v, ok := d.GetOk("caller_reference"); ok == false { distributionConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) @@ -140,7 +144,12 @@ func flattenDistributionConfig(d *schema.ResourceData, distributionConfig *cloud } } if distributionConfig.CacheBehaviors != nil { - err = d.Set("cache_behavior", flattenCacheBehaviors(distributionConfig.CacheBehaviors)) + if _, ok := d.GetOk("ordered_cache_behavior"); ok { + err = d.Set("ordered_cache_behavior", flattenCacheBehaviors(distributionConfig.CacheBehaviors)) + } else { + err = d.Set("cache_behavior", flattenCacheBehaviorsDeprecated(distributionConfig.CacheBehaviors)) + } + if err != nil { return err } @@ -178,7 +187,7 @@ func flattenDistributionConfig(d *schema.ResourceData, distributionConfig *cloud } func expandDefaultCacheBehavior(m map[string]interface{}) *cloudfront.DefaultCacheBehavior { - cb := expandCacheBehavior(m) + cb := expandCacheBehaviorDeprecated(m) var dcb cloudfront.DefaultCacheBehavior simpleCopyStruct(cb, &dcb) @@ -190,7 +199,7 @@ func flattenDefaultCacheBehavior(dcb *cloudfront.DefaultCacheBehavior) *schema.S var cb cloudfront.CacheBehavior simpleCopyStruct(dcb, &cb) - m = flattenCacheBehavior(&cb) + m = flattenCacheBehaviorDeprecated(&cb) return schema.NewSet(defaultCacheBehaviorHash, []interface{}{m}) } @@ -246,10 +255,31 @@ func defaultCacheBehaviorHash(v interface{}) int { return hashcode.String(buf.String()) } -func expandCacheBehaviors(s *schema.Set) *cloudfront.CacheBehaviors { +func expandCacheBehaviorsDeprecated(s *schema.Set) *cloudfront.CacheBehaviors { var qty int64 var items []*cloudfront.CacheBehavior for _, v := range s.List() { + items = append(items, expandCacheBehaviorDeprecated(v.(map[string]interface{}))) + qty++ + } + return &cloudfront.CacheBehaviors{ + Quantity: aws.Int64(qty), + Items: items, + } +} + +func flattenCacheBehaviorsDeprecated(cbs *cloudfront.CacheBehaviors) *schema.Set { + s := []interface{}{} + for _, v := range cbs.Items { + s = append(s, flattenCacheBehaviorDeprecated(v)) + } + return schema.NewSet(cacheBehaviorHash, s) +} + +func expandCacheBehaviors(lst []interface{}) *cloudfront.CacheBehaviors { + var qty int64 + var items []*cloudfront.CacheBehavior + for _, v := range lst { items = append(items, expandCacheBehavior(v.(map[string]interface{}))) qty++ } @@ -259,12 +289,50 @@ func expandCacheBehaviors(s *schema.Set) *cloudfront.CacheBehaviors { } } -func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) *schema.Set { - s := []interface{}{} +func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) []interface{} { + lst := []interface{}{} for _, v := range cbs.Items { - s = append(s, flattenCacheBehavior(v)) + lst = append(lst, flattenCacheBehavior(v)) } - return schema.NewSet(cacheBehaviorHash, s) + return lst +} + +// Deprecated. +func expandCacheBehaviorDeprecated(m map[string]interface{}) *cloudfront.CacheBehavior { + cb := &cloudfront.CacheBehavior{ + Compress: aws.Bool(m["compress"].(bool)), + FieldLevelEncryptionId: aws.String(m["field_level_encryption_id"].(string)), + ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), + TargetOriginId: aws.String(m["target_origin_id"].(string)), + ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), + DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), + MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), + MinTTL: aws.Int64(int64(m["min_ttl"].(int))), + } + + if v, ok := m["trusted_signers"]; ok { + cb.TrustedSigners = expandTrustedSigners(v.([]interface{})) + } else { + cb.TrustedSigners = expandTrustedSigners([]interface{}{}) + } + + if v, ok := m["lambda_function_association"]; ok { + cb.LambdaFunctionAssociations = expandLambdaFunctionAssociations(v.(*schema.Set).List()) + } + + if v, ok := m["smooth_streaming"]; ok { + cb.SmoothStreaming = aws.Bool(v.(bool)) + } + if v, ok := m["allowed_methods"]; ok { + cb.AllowedMethods = expandAllowedMethodsDeprecated(v.([]interface{})) + } + if v, ok := m["cached_methods"]; ok { + cb.AllowedMethods.CachedMethods = expandCachedMethodsDeprecated(v.([]interface{})) + } + if v, ok := m["path_pattern"]; ok { + cb.PathPattern = aws.String(v.(string)) + } + return cb } func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { @@ -293,10 +361,10 @@ func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { cb.SmoothStreaming = aws.Bool(v.(bool)) } if v, ok := m["allowed_methods"]; ok { - cb.AllowedMethods = expandAllowedMethods(v.([]interface{})) + cb.AllowedMethods = expandAllowedMethods(v.(*schema.Set)) } if v, ok := m["cached_methods"]; ok { - cb.AllowedMethods.CachedMethods = expandCachedMethods(v.([]interface{})) + cb.AllowedMethods.CachedMethods = expandCachedMethods(v.(*schema.Set)) } if v, ok := m["path_pattern"]; ok { cb.PathPattern = aws.String(v.(string)) @@ -304,6 +372,43 @@ func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { return cb } +func flattenCacheBehaviorDeprecated(cb *cloudfront.CacheBehavior) map[string]interface{} { + m := make(map[string]interface{}) + + m["compress"] = *cb.Compress + m["field_level_encryption_id"] = aws.StringValue(cb.FieldLevelEncryptionId) + m["viewer_protocol_policy"] = *cb.ViewerProtocolPolicy + m["target_origin_id"] = *cb.TargetOriginId + m["forwarded_values"] = schema.NewSet(forwardedValuesHash, []interface{}{flattenForwardedValues(cb.ForwardedValues)}) + m["min_ttl"] = int(*cb.MinTTL) + + if len(cb.TrustedSigners.Items) > 0 { + m["trusted_signers"] = flattenTrustedSigners(cb.TrustedSigners) + } + if len(cb.LambdaFunctionAssociations.Items) > 0 { + m["lambda_function_association"] = flattenLambdaFunctionAssociations(cb.LambdaFunctionAssociations) + } + if cb.MaxTTL != nil { + m["max_ttl"] = int(*cb.MaxTTL) + } + if cb.SmoothStreaming != nil { + m["smooth_streaming"] = *cb.SmoothStreaming + } + if cb.DefaultTTL != nil { + m["default_ttl"] = int(*cb.DefaultTTL) + } + if cb.AllowedMethods != nil { + m["allowed_methods"] = flattenAllowedMethodsDeprecated(cb.AllowedMethods) + } + if cb.AllowedMethods.CachedMethods != nil { + m["cached_methods"] = flattenCachedMethodsDeprecated(cb.AllowedMethods.CachedMethods) + } + if cb.PathPattern != nil { + m["path_pattern"] = *cb.PathPattern + } + return m +} + func flattenCacheBehavior(cb *cloudfront.CacheBehavior) map[string]interface{} { m := make(map[string]interface{}) @@ -597,28 +702,56 @@ func flattenCookieNames(cn *cloudfront.CookieNames) []interface{} { return []interface{}{} } -func expandAllowedMethods(s []interface{}) *cloudfront.AllowedMethods { +func expandAllowedMethods(s *schema.Set) *cloudfront.AllowedMethods { + return &cloudfront.AllowedMethods{ + Quantity: aws.Int64(int64(s.Len())), + Items: expandStringList(s.List()), + } +} + +func flattenAllowedMethods(am *cloudfront.AllowedMethods) *schema.Set { + if am.Items != nil { + return schema.NewSet(schema.HashString, flattenStringList(am.Items)) + } + return nil +} + +func expandAllowedMethodsDeprecated(s []interface{}) *cloudfront.AllowedMethods { return &cloudfront.AllowedMethods{ Quantity: aws.Int64(int64(len(s))), Items: expandStringList(s), } } -func flattenAllowedMethods(am *cloudfront.AllowedMethods) []interface{} { +func flattenAllowedMethodsDeprecated(am *cloudfront.AllowedMethods) []interface{} { if am.Items != nil { return flattenStringList(am.Items) } return []interface{}{} } -func expandCachedMethods(s []interface{}) *cloudfront.CachedMethods { +func expandCachedMethods(s *schema.Set) *cloudfront.CachedMethods { + return &cloudfront.CachedMethods{ + Quantity: aws.Int64(int64(s.Len())), + Items: expandStringList(s.List()), + } +} + +func flattenCachedMethods(cm *cloudfront.CachedMethods) *schema.Set { + if cm.Items != nil { + return schema.NewSet(schema.HashString, flattenStringList(cm.Items)) + } + return nil +} + +func expandCachedMethodsDeprecated(s []interface{}) *cloudfront.CachedMethods { return &cloudfront.CachedMethods{ Quantity: aws.Int64(int64(len(s))), Items: expandStringList(s), } } -func flattenCachedMethods(cm *cloudfront.CachedMethods) []interface{} { +func flattenCachedMethodsDeprecated(cm *cloudfront.CachedMethods) []interface{} { if cm.Items != nil { return flattenStringList(cm.Items) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go index 71833acf7..b875074e9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go @@ -16,12 +16,14 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/acm" + "github.com/aws/aws-sdk-go/service/acmpca" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/applicationautoscaling" "github.com/aws/aws-sdk-go/service/appsync" "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/batch" + "github.com/aws/aws-sdk-go/service/budgets" "github.com/aws/aws-sdk-go/service/cloud9" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudfront" @@ -46,6 +48,7 @@ import ( "github.com/aws/aws-sdk-go/service/ecr" "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/service/efs" + "github.com/aws/aws-sdk-go/service/eks" "github.com/aws/aws-sdk-go/service/elasticache" "github.com/aws/aws-sdk-go/service/elasticbeanstalk" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" @@ -54,6 +57,7 @@ import ( "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/emr" "github.com/aws/aws-sdk-go/service/firehose" + "github.com/aws/aws-sdk-go/service/fms" "github.com/aws/aws-sdk-go/service/gamelift" "github.com/aws/aws-sdk-go/service/glacier" "github.com/aws/aws-sdk-go/service/glue" @@ -66,14 +70,18 @@ import ( "github.com/aws/aws-sdk-go/service/lambda" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/aws/aws-sdk-go/service/macie" "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" + "github.com/aws/aws-sdk-go/service/neptune" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" + "github.com/aws/aws-sdk-go/service/pricing" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/s3" + "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/aws/aws-sdk-go/service/ses" @@ -82,7 +90,9 @@ import ( "github.com/aws/aws-sdk-go/service/sns" "github.com/aws/aws-sdk-go/service/sqs" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/aws/aws-sdk-go/service/storagegateway" "github.com/aws/aws-sdk-go/service/sts" + "github.com/aws/aws-sdk-go/service/swf" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/davecgh/go-spew/spew" @@ -119,7 +129,9 @@ type Config struct { DeviceFarmEndpoint string Ec2Endpoint string EcsEndpoint string + AutoscalingEndpoint string EcrEndpoint string + EfsEndpoint string EsEndpoint string ElbEndpoint string IamEndpoint string @@ -132,6 +144,7 @@ type Config struct { SnsEndpoint string SqsEndpoint string StsEndpoint string + SsmEndpoint string Insecure bool SkipCredsValidation bool @@ -162,15 +175,18 @@ type AWSClient struct { ecrconn *ecr.ECR ecsconn *ecs.ECS efsconn *efs.EFS + eksconn *eks.EKS elbconn *elb.ELB elbv2conn *elbv2.ELBV2 emrconn *emr.EMR esconn *elasticsearch.ElasticsearchService acmconn *acm.ACM + acmpcaconn *acmpca.ACMPCA apigateway *apigateway.APIGateway appautoscalingconn *applicationautoscaling.ApplicationAutoScaling autoscalingconn *autoscaling.AutoScaling s3conn *s3.S3 + secretsmanagerconn *secretsmanager.SecretsManager scconn *servicecatalog.ServiceCatalog sesConn *ses.SES simpledbconn *simpledb.SimpleDB @@ -189,12 +205,14 @@ type AWSClient struct { kmsconn *kms.KMS gameliftconn *gamelift.GameLift firehoseconn *firehose.Firehose + fmsconn *fms.FMS inspectorconn *inspector.Inspector elasticacheconn *elasticache.ElastiCache elasticbeanstalkconn *elasticbeanstalk.ElasticBeanstalk elastictranscoderconn *elastictranscoder.ElasticTranscoder lambdaconn *lambda.Lambda lightsailconn *lightsail.Lightsail + macieconn *macie.Macie mqconn *mq.MQ opsworksconn *opsworks.OpsWorks organizationsconn *organizations.Organizations @@ -207,6 +225,8 @@ type AWSClient struct { sdconn *servicediscovery.ServiceDiscovery sfnconn *sfn.SFN ssmconn *ssm.SSM + storagegatewayconn *storagegateway.StorageGateway + swfconn *swf.SWF wafconn *waf.WAF wafregionalconn *wafregional.WAFRegional iotconn *iot.IoT @@ -217,6 +237,9 @@ type AWSClient struct { mediastoreconn *mediastore.MediaStore appsyncconn *appsync.AppSync lexmodelconn *lexmodelbuildingservice.LexModelBuildingService + budgetconn *budgets.Budgets + neptuneconn *neptune.Neptune + pricingconn *pricing.Pricing } func (c *AWSClient) S3() *s3.S3 { @@ -227,11 +250,6 @@ func (c *AWSClient) DynamoDB() *dynamodb.DynamoDB { return c.dynamodbconn } -func (c *AWSClient) IsGovCloud() bool { - _, isGovCloud := endpoints.PartitionForRegion([]endpoints.Partition{endpoints.AwsUsGovPartition()}, c.region) - return isGovCloud -} - func (c *AWSClient) IsChinaCloud() bool { _, isChinaCloud := endpoints.PartitionForRegion([]endpoints.Partition{endpoints.AwsCnPartition()}, c.region) return isChinaCloud @@ -343,6 +361,26 @@ func (c *Config) Client() (interface{}, error) { sess = sess.Copy(&aws.Config{MaxRetries: aws.Int(c.MaxRetries)}) } + // Generally, we want to configure a lower retry theshold for networking issues + // as the session retry threshold is very high by default and can mask permanent + // networking failures, such as a non-existent service endpoint. + // MaxRetries will override this logic if it has a lower retry threshold. + // NOTE: This logic can be fooled by other request errors raising the retry count + // before any networking error occurs + sess.Handlers.Retry.PushBack(func(r *request.Request) { + // We currently depend on the DefaultRetryer exponential backoff here. + // ~10 retries gives a fair backoff of a few seconds. + if r.RetryCount < 9 { + return + } + // RequestError: send request failed + // caused by: Post https://FQDN/: dial tcp: lookup FQDN: no such host + if isAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { + log.Printf("[WARN] Disabling retries after next request due to networking issue") + r.Retryable = aws.Bool(false) + } + }) + // This restriction should only be used for Route53 sessions. // Other resources that have restrictions should allow the API to fail, rather // than Terraform abstracting the region for the user. This can lead to breaking @@ -358,8 +396,10 @@ func (c *Config) Client() (interface{}, error) { awsCwlSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudWatchLogsEndpoint)}) awsDynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)}) awsEc2Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.Ec2Endpoint)}) + awsAutoscalingSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.AutoscalingEndpoint)}) awsEcrSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcrEndpoint)}) awsEcsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcsEndpoint)}) + awsEfsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EfsEndpoint)}) awsElbSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.ElbEndpoint)}) awsEsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EsEndpoint)}) awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) @@ -372,6 +412,7 @@ func (c *Config) Client() (interface{}, error) { awsSqsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SqsEndpoint)}) awsStsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.StsEndpoint)}) awsDeviceFarmSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DeviceFarmEndpoint)}) + awsSsmSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SsmEndpoint)}) log.Println("[INFO] Initializing DeviceFarm SDK connection") client.devicefarmconn = devicefarm.New(awsDeviceFarmSess) @@ -417,10 +458,12 @@ func (c *Config) Client() (interface{}, error) { } } + client.budgetconn = budgets.New(sess) client.acmconn = acm.New(awsAcmSess) + client.acmpcaconn = acmpca.New(sess) client.apigateway = apigateway.New(awsApigatewaySess) client.appautoscalingconn = applicationautoscaling.New(sess) - client.autoscalingconn = autoscaling.New(sess) + client.autoscalingconn = autoscaling.New(awsAutoscalingSess) client.cloud9conn = cloud9.New(sess) client.cfconn = cloudformation.New(awsCfSess) client.cloudfrontconn = cloudfront.New(sess) @@ -441,7 +484,8 @@ func (c *Config) Client() (interface{}, error) { client.dynamodbconn = dynamodb.New(awsDynamoSess) client.ecrconn = ecr.New(awsEcrSess) client.ecsconn = ecs.New(awsEcsSess) - client.efsconn = efs.New(sess) + client.efsconn = efs.New(awsEfsSess) + client.eksconn = eks.New(sess) client.elasticacheconn = elasticache.New(sess) client.elasticbeanstalkconn = elasticbeanstalk.New(sess) client.elastictranscoderconn = elastictranscoder.New(sess) @@ -450,6 +494,7 @@ func (c *Config) Client() (interface{}, error) { client.emrconn = emr.New(sess) client.esconn = elasticsearch.New(awsEsSess) client.firehoseconn = firehose.New(sess) + client.fmsconn = fms.New(sess) client.inspectorconn = inspector.New(sess) client.gameliftconn = gamelift.New(sess) client.glacierconn = glacier.New(sess) @@ -460,7 +505,9 @@ func (c *Config) Client() (interface{}, error) { client.lambdaconn = lambda.New(awsLambdaSess) client.lexmodelconn = lexmodelbuildingservice.New(sess) client.lightsailconn = lightsail.New(sess) + client.macieconn = macie.New(sess) client.mqconn = mq.New(sess) + client.neptuneconn = neptune.New(sess) client.opsworksconn = opsworks.New(sess) client.organizationsconn = organizations.New(sess) client.r53conn = route53.New(r53Sess) @@ -471,10 +518,13 @@ func (c *Config) Client() (interface{}, error) { client.scconn = servicecatalog.New(sess) client.sdconn = servicediscovery.New(sess) client.sesConn = ses.New(sess) + client.secretsmanagerconn = secretsmanager.New(sess) client.sfnconn = sfn.New(sess) client.snsconn = sns.New(awsSnsSess) client.sqsconn = sqs.New(awsSqsSess) - client.ssmconn = ssm.New(sess) + client.ssmconn = ssm.New(awsSsmSess) + client.storagegatewayconn = storagegateway.New(sess) + client.swfconn = swf.New(sess) client.wafconn = waf.New(sess) client.wafregionalconn = wafregional.New(sess) client.batchconn = batch.New(sess) @@ -483,6 +533,8 @@ func (c *Config) Client() (interface{}, error) { client.dxconn = directconnect.New(sess) client.mediastoreconn = mediastore.New(sess) client.appsyncconn = appsync.New(sess) + client.neptuneconn = neptune.New(sess) + client.pricingconn = pricing.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go new file mode 100644 index 000000000..b64902e2e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsAcmpcaCertificateAuthority() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsAcmpcaCertificateAuthorityRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + }, + "certificate": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_chain": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_signing_request": { + Type: schema.TypeString, + Computed: true, + }, + "not_after": { + Type: schema.TypeString, + Computed: true, + }, + "not_before": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html + "revocation_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html + "crl_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "custom_cname": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "expiration_in_days": { + Type: schema.TypeInt, + Computed: true, + }, + "s3_bucket_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "serial": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "type": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + certificateAuthorityArn := d.Get("arn").(string) + + describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) + + describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) + } + + if describeCertificateAuthorityOutput.CertificateAuthority == nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority: not found") + } + certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority + + d.Set("arn", certificateAuthority.Arn) + d.Set("not_after", certificateAuthority.NotAfter) + d.Set("not_before", certificateAuthority.NotBefore) + + if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("serial", certificateAuthority.Serial) + d.Set("status", certificateAuthority.Status) + d.Set("type", certificateAuthority.Type) + + getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) + + getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) + if err != nil { + // Returned when in PENDING_CERTIFICATE status + // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. + if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) + } + } + + d.Set("certificate", "") + d.Set("certificate_chain", "") + if getCertificateAuthorityCertificateOutput != nil { + d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) + d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) + } + + getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) + + getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) + } + + d.Set("certificate_signing_request", "") + if getCertificateAuthorityCsrOutput != nil { + d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) + } + + tags, err := listAcmpcaTags(conn, certificateAuthorityArn) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", certificateAuthorityArn, err) + } + + if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.SetId(certificateAuthorityArn) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go new file mode 100644 index 000000000..cc71d87d2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_rest_api.go @@ -0,0 +1,73 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsApiGatewayRestApi() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsApiGatewayRestApiRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "root_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + params := &apigateway.GetRestApisInput{} + + target := d.Get("name") + var matchedApis []*apigateway.RestApi + log.Printf("[DEBUG] Reading API Gateway REST APIs: %s", params) + err := conn.GetRestApisPages(params, func(page *apigateway.GetRestApisOutput, lastPage bool) bool { + for _, api := range page.Items { + if aws.StringValue(api.Name) == target { + matchedApis = append(matchedApis, api) + } + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("error describing API Gateway REST APIs: %s", err) + } + + if len(matchedApis) == 0 { + return fmt.Errorf("no REST APIs with name %q found in this region", target) + } + if len(matchedApis) > 1 { + return fmt.Errorf("multiple REST APIs with name %q found in this region", target) + } + + match := matchedApis[0] + + d.SetId(*match.Id) + + resp, err := conn.GetResources(&apigateway.GetResourcesInput{ + RestApiId: aws.String(d.Id()), + }) + if err != nil { + return err + } + + for _, item := range resp.Items { + if *item.Path == "/" { + d.Set("root_resource_id", item.Id) + break + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go new file mode 100644 index 000000000..93a369355 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_arn.go @@ -0,0 +1,59 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsArn() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsArnRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "partition": { + Type: schema.TypeString, + Computed: true, + }, + "service": { + Type: schema.TypeString, + Computed: true, + }, + "region": { + Type: schema.TypeString, + Computed: true, + }, + "account": { + Type: schema.TypeString, + Computed: true, + }, + "resource": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsArnRead(d *schema.ResourceData, meta interface{}) error { + v := d.Get("arn").(string) + arn, err := arn.Parse(v) + if err != nil { + return fmt.Errorf("Error parsing '%s': %s", v, err.Error()) + } + + d.SetId(arn.String()) + d.Set("partition", arn.Partition) + d.Set("service", arn.Service) + d.Set("region", arn.Region) + d.Set("account", arn.AccountID) + d.Set("resource", arn.Resource) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go index 012195e17..7bc4dc9c3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go @@ -50,31 +50,29 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} d.SetId(time.Now().UTC().String()) var raw []string + var err error tf := d.Get("filter").(*schema.Set) if tf.Len() > 0 { - out, err := conn.DescribeTags(&autoscaling.DescribeTagsInput{ + input := &autoscaling.DescribeTagsInput{ Filters: expandAsgTagFilters(tf.List()), + } + err = conn.DescribeTagsPages(input, func(resp *autoscaling.DescribeTagsOutput, lastPage bool) bool { + for _, v := range resp.Tags { + raw = append(raw, aws.StringValue(v.ResourceId)) + } + return !lastPage }) - if err != nil { - return err - } - - raw = make([]string, len(out.Tags)) - for i, v := range out.Tags { - raw[i] = *v.ResourceId - } } else { - - resp, err := conn.DescribeAutoScalingGroups(&autoscaling.DescribeAutoScalingGroupsInput{}) - if err != nil { - return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) - } - - raw = make([]string, len(resp.AutoScalingGroups)) - for i, v := range resp.AutoScalingGroups { - raw[i] = *v.AutoScalingGroupName - } + err = conn.DescribeAutoScalingGroupsPages(&autoscaling.DescribeAutoScalingGroupsInput{}, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { + for _, group := range resp.AutoScalingGroups { + raw = append(raw, aws.StringValue(group.AutoScalingGroupName)) + } + return !lastPage + }) + } + if err != nil { + return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) } sort.Strings(raw) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go new file mode 100644 index 000000000..11c363150 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_compute_environment.go @@ -0,0 +1,93 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsBatchComputeEnvironment() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBatchComputeEnvironmentRead, + + Schema: map[string]*schema.Schema{ + "compute_environment_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "ecs_cluster_arn": { + Type: schema.TypeString, + Computed: true, + }, + + "service_role": { + Type: schema.TypeString, + Computed: true, + }, + + "type": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "status_reason": { + Type: schema.TypeString, + Computed: true, + }, + + "state": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + params := &batch.DescribeComputeEnvironmentsInput{ + ComputeEnvironments: []*string{aws.String(d.Get("compute_environment_name").(string))}, + } + log.Printf("[DEBUG] Reading Batch Compute Environment: %s", params) + desc, err := conn.DescribeComputeEnvironments(params) + + if err != nil { + return err + } + + if len(desc.ComputeEnvironments) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("compute_environment_name").(string)) + } + + if len(desc.ComputeEnvironments) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("compute_environment_name").(string)) + } + + computeEnvironment := desc.ComputeEnvironments[0] + d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) + d.Set("arn", computeEnvironment.ComputeEnvironmentArn) + d.Set("compute_environment_name", computeEnvironment.ComputeEnvironmentName) + d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) + d.Set("service_role", computeEnvironment.ServiceRole) + d.Set("type", computeEnvironment.Type) + d.Set("status", computeEnvironment.Status) + d.Set("status_reason", computeEnvironment.StatusReason) + d.Set("state", computeEnvironment.State) + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go new file mode 100644 index 000000000..8afca929b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_batch_job_queue.go @@ -0,0 +1,110 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsBatchJobQueue() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBatchJobQueueRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "status_reason": { + Type: schema.TypeString, + Computed: true, + }, + + "state": { + Type: schema.TypeString, + Computed: true, + }, + + "priority": { + Type: schema.TypeInt, + Computed: true, + }, + + "compute_environment_order": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "compute_environment": { + Type: schema.TypeString, + Computed: true, + }, + "order": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + params := &batch.DescribeJobQueuesInput{ + JobQueues: []*string{aws.String(d.Get("name").(string))}, + } + log.Printf("[DEBUG] Reading Batch Job Queue: %s", params) + desc, err := conn.DescribeJobQueues(params) + + if err != nil { + return err + } + + if len(desc.JobQueues) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("name").(string)) + } + + if len(desc.JobQueues) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("name").(string)) + } + + jobQueue := desc.JobQueues[0] + d.SetId(aws.StringValue(jobQueue.JobQueueArn)) + d.Set("arn", jobQueue.JobQueueArn) + d.Set("name", jobQueue.JobQueueName) + d.Set("status", jobQueue.Status) + d.Set("status_reason", jobQueue.StatusReason) + d.Set("state", jobQueue.State) + d.Set("priority", jobQueue.Priority) + + ceos := make([]map[string]interface{}, 0) + for _, v := range jobQueue.ComputeEnvironmentOrder { + ceo := map[string]interface{}{} + ceo["compute_environment"] = aws.StringValue(v.ComputeEnvironment) + ceo["order"] = int(aws.Int64Value(v.Order)) + ceos = append(ceos, ceo) + } + if err := d.Set("compute_environment_order", ceos); err != nil { + return fmt.Errorf("error setting compute_environment_order: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go new file mode 100644 index 000000000..95c65d983 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go @@ -0,0 +1,58 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudformation" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCloudFormationExport() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCloudFormationExportRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Computed: true, + }, + "exporting_stack_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsCloudFormationExportRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cfconn + var value string + name := d.Get("name").(string) + region := meta.(*AWSClient).region + d.SetId(fmt.Sprintf("cloudformation-exports-%s-%s", region, name)) + input := &cloudformation.ListExportsInput{} + err := conn.ListExportsPages(input, + func(page *cloudformation.ListExportsOutput, lastPage bool) bool { + for _, e := range page.Exports { + if name == aws.StringValue(e.Name) { + value = aws.StringValue(e.Value) + d.Set("value", e.Value) + d.Set("exporting_stack_id", e.ExportingStackId) + return false + } + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Failed listing CloudFormation exports: %s", err) + } + if "" == value { + return fmt.Errorf("%s was not found in CloudFormation Exports for region %s", name, region) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go new file mode 100644 index 000000000..b7285b686 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go @@ -0,0 +1,66 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudwatchlogs" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCloudwatchLogGroup() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCloudwatchLogGroupRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "creation_time": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { + name := d.Get("name").(string) + conn := meta.(*AWSClient).cloudwatchlogsconn + + input := &cloudwatchlogs.DescribeLogGroupsInput{ + LogGroupNamePrefix: aws.String(name), + } + + var logGroup *cloudwatchlogs.LogGroup + // iterate over the pages of log groups until we find the one we are looking for + err := conn.DescribeLogGroupsPages(input, + func(resp *cloudwatchlogs.DescribeLogGroupsOutput, _ bool) bool { + for _, lg := range resp.LogGroups { + if aws.StringValue(lg.LogGroupName) == name { + logGroup = lg + return false + } + } + return true + }) + + if err != nil { + return err + } + + if logGroup == nil { + return fmt.Errorf("No log group named %s found\n", name) + } + + d.SetId(name) + d.Set("arn", logGroup.Arn) + d.Set("creation_time", logGroup.CreationTime) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go new file mode 100644 index 000000000..163a4b2e3 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go @@ -0,0 +1,78 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codecommit" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCodeCommitRepository() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCodeCommitRepositoryRead, + + Schema: map[string]*schema.Schema{ + "repository_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateMaxLength(100), + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "repository_id": { + Type: schema.TypeString, + Computed: true, + }, + + "clone_url_http": { + Type: schema.TypeString, + Computed: true, + }, + + "clone_url_ssh": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsCodeCommitRepositoryRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codecommitconn + + repositoryName := d.Get("repository_name").(string) + input := &codecommit.GetRepositoryInput{ + RepositoryName: aws.String(repositoryName), + } + + out, err := conn.GetRepository(input) + if err != nil { + if isAWSErr(err, codecommit.ErrCodeRepositoryDoesNotExistException, "") { + log.Printf("[WARN] CodeCommit Repository (%s) not found, removing from state", d.Id()) + d.SetId("") + return fmt.Errorf("Resource codecommit repository not found for %s", repositoryName) + } else { + return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error()) + } + } + + if out.RepositoryMetadata == nil { + return fmt.Errorf("no matches found for repository name: %s", repositoryName) + } + + d.SetId(aws.StringValue(out.RepositoryMetadata.RepositoryName)) + d.Set("arn", out.RepositoryMetadata.Arn) + d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp) + d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh) + d.Set("repository_name", out.RepositoryMetadata.RepositoryName) + d.Set("repository_id", out.RepositoryMetadata.RepositoryId) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go new file mode 100644 index 000000000..700f9f495 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cognito_user_pools.go @@ -0,0 +1,96 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCognitoUserPools() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCognitoUserPoolsRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "arns": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + name := d.Get("name").(string) + var ids []string + var arns []string + + pools, err := getAllCognitoUserPools(conn) + if err != nil { + return fmt.Errorf("Error listing cognito user pools: %s", err) + } + for _, pool := range pools { + if name == aws.StringValue(pool.Name) { + id := aws.StringValue(pool.Id) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "cognito-idp", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("userpool/%s", id), + }.String() + + ids = append(ids, id) + arns = append(arns, arn) + } + } + + if len(ids) == 0 { + return fmt.Errorf("No cognito user pool found with name: %s", name) + } + + d.SetId(name) + d.Set("ids", ids) + d.Set("arns", arns) + + return nil +} + +func getAllCognitoUserPools(conn *cognitoidentityprovider.CognitoIdentityProvider) ([]*cognitoidentityprovider.UserPoolDescriptionType, error) { + var pools []*cognitoidentityprovider.UserPoolDescriptionType + var nextToken string + + for { + input := &cognitoidentityprovider.ListUserPoolsInput{ + // MaxResults Valid Range: Minimum value of 1. Maximum value of 60 + MaxResults: aws.Int64(int64(60)), + } + if nextToken != "" { + input.NextToken = aws.String(nextToken) + } + out, err := conn.ListUserPools(input) + if err != nil { + return pools, err + } + pools = append(pools, out.UserPools...) + + if out.NextToken == nil { + break + } + nextToken = aws.StringValue(out.NextToken) + } + + return pools, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go new file mode 100644 index 000000000..f80025c9e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_dx_gateway.go @@ -0,0 +1,66 @@ +package aws + +import ( + "fmt" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDxGateway() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDxGatewayRead, + + Schema: map[string]*schema.Schema{ + "amazon_side_asn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func dataSourceAwsDxGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + name := d.Get("name").(string) + + gateways := make([]*directconnect.Gateway, 0) + // DescribeDirectConnectGatewaysInput does not have a name parameter for filtering + input := &directconnect.DescribeDirectConnectGatewaysInput{} + for { + output, err := conn.DescribeDirectConnectGateways(input) + if err != nil { + return fmt.Errorf("error reading Direct Connect Gateway: %s", err) + } + for _, gateway := range output.DirectConnectGateways { + if aws.StringValue(gateway.DirectConnectGatewayName) == name { + gateways = append(gateways, gateway) + } + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + if len(gateways) == 0 { + return fmt.Errorf("Direct Connect Gateway not found for name: %s", name) + } + + if len(gateways) > 1 { + return fmt.Errorf("Multiple Direct Connect Gateways found for name: %s", name) + } + + gateway := gateways[0] + + d.SetId(aws.StringValue(gateway.DirectConnectGatewayId)) + d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(gateway.AmazonSideAsn), 10)) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go index b6dbc63f4..308bdb9a9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_cluster.go @@ -61,21 +61,21 @@ func dataSourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error return err } - for _, cluster := range desc.Clusters { - if aws.StringValue(cluster.ClusterName) != d.Get("cluster_name").(string) { - continue - } - d.SetId(aws.StringValue(cluster.ClusterArn)) - d.Set("arn", cluster.ClusterArn) - d.Set("status", cluster.Status) - d.Set("pending_tasks_count", cluster.PendingTasksCount) - d.Set("running_tasks_count", cluster.RunningTasksCount) - d.Set("registered_container_instances_count", cluster.RegisteredContainerInstancesCount) + if len(desc.Clusters) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("cluster_name").(string)) } - if d.Id() == "" { - return fmt.Errorf("cluster with name %q not found", d.Get("cluster_name").(string)) + if len(desc.Clusters) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("cluster_name").(string)) } + cluster := desc.Clusters[0] + d.SetId(aws.StringValue(cluster.ClusterArn)) + d.Set("arn", cluster.ClusterArn) + d.Set("status", cluster.Status) + d.Set("pending_tasks_count", cluster.PendingTasksCount) + d.Set("running_tasks_count", cluster.RunningTasksCount) + d.Set("registered_container_instances_count", cluster.RegisteredContainerInstancesCount) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go index 9bb99cdae..914d58264 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_container_definition.go @@ -53,12 +53,12 @@ func dataSourceAwsEcsContainerDefinition() *schema.Resource { "docker_labels": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "environment": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go new file mode 100644 index 000000000..524b47f73 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecs_service.go @@ -0,0 +1,89 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ecs" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsEcsService() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEcsServiceRead, + + Schema: map[string]*schema.Schema{ + "service_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "desired_count": { + Type: schema.TypeInt, + Computed: true, + }, + "launch_type": { + Type: schema.TypeString, + Computed: true, + }, + "scheduling_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "task_definition": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecsconn + + clusterArn := d.Get("cluster_arn").(string) + serviceName := d.Get("service_name").(string) + + params := &ecs.DescribeServicesInput{ + Cluster: aws.String(clusterArn), + Services: []*string{aws.String(serviceName)}, + } + + log.Printf("[DEBUG] Reading ECS Service: %s", params) + desc, err := conn.DescribeServices(params) + + if err != nil { + return err + } + + if desc == nil || len(desc.Services) == 0 { + return fmt.Errorf("service with name %q in cluster %q not found", serviceName, clusterArn) + } + + if len(desc.Services) > 1 { + return fmt.Errorf("multiple services with name %q found in cluster %q", serviceName, clusterArn) + } + + service := desc.Services[0] + d.SetId(aws.StringValue(service.ServiceArn)) + + d.Set("service_name", service.ServiceName) + d.Set("arn", service.ServiceArn) + d.Set("cluster_arn", service.ClusterArn) + d.Set("desired_count", service.DesiredCount) + d.Set("launch_type", service.LaunchType) + d.Set("scheduling_strategy", service.SchedulingStrategy) + d.Set("task_definition", service.TaskDefinition) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go index ab518d6f8..3958cdbff 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go @@ -105,7 +105,7 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er return err } - var fs *efs.FileSystemDescription + var fs *efs.UpdateFileSystemOutput for _, f := range describeResp.FileSystems { if d.Id() == *f.FileSystemId { fs = f diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go new file mode 100644 index 000000000..c2dfbdfaf --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster.go @@ -0,0 +1,121 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/eks" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func dataSourceAwsEksCluster() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEksClusterRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_authority": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "created_at": { + Type: schema.TypeString, + Computed: true, + }, + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "role_arn": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_config": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "security_group_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "subnet_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "version": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).eksconn + name := d.Get("name").(string) + + input := &eks.DescribeClusterInput{ + Name: aws.String(name), + } + + log.Printf("[DEBUG] Reading EKS Cluster: %s", input) + output, err := conn.DescribeCluster(input) + if err != nil { + return fmt.Errorf("error reading EKS Cluster (%s): %s", name, err) + } + + cluster := output.Cluster + if cluster == nil { + return fmt.Errorf("EKS Cluster (%s) not found", name) + } + + d.SetId(name) + d.Set("arn", cluster.Arn) + + if err := d.Set("certificate_authority", flattenEksCertificate(cluster.CertificateAuthority)); err != nil { + return fmt.Errorf("error setting certificate_authority: %s", err) + } + + d.Set("created_at", aws.TimeValue(cluster.CreatedAt).String()) + d.Set("endpoint", cluster.Endpoint) + d.Set("name", cluster.Name) + d.Set("role_arn", cluster.RoleArn) + d.Set("version", cluster.Version) + + if err := d.Set("vpc_config", flattenEksVpcConfigResponse(cluster.ResourcesVpcConfig)); err != nil { + return fmt.Errorf("error setting vpc_config: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go index 938eea1a6..7c3ee5e2c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_replication_group.go @@ -45,6 +45,12 @@ func dataSourceAwsElasticacheReplicationGroup() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "member_clusters": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, "node_type": { Type: schema.TypeString, Computed: true, @@ -106,6 +112,9 @@ func dataSourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta i d.Set("primary_endpoint_address", rg.NodeGroups[0].PrimaryEndpoint.Address) } d.Set("number_cache_clusters", len(rg.MemberClusters)) + if err := d.Set("member_clusters", flattenStringList(rg.MemberClusters)); err != nil { + return fmt.Errorf("error setting member_clusters: %s", err) + } d.Set("node_type", rg.CacheNodeType) d.Set("snapshot_window", rg.SnapshotWindow) d.Set("snapshot_retention_limit", rg.SnapshotRetentionLimit) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go new file mode 100644 index 000000000..ec59b882c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_glue_script.go @@ -0,0 +1,184 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func dataSourceAwsGlueScript() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsGlueScriptRead, + Schema: map[string]*schema.Schema{ + "dag_edge": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "source": { + Type: schema.TypeString, + Required: true, + }, + "target": { + Type: schema.TypeString, + Required: true, + }, + "target_parameter": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "dag_node": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "args": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "param": { + Type: schema.TypeBool, + Optional: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "id": { + Type: schema.TypeString, + Required: true, + }, + "line_number": { + Type: schema.TypeInt, + Optional: true, + }, + "node_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "language": { + Type: schema.TypeString, + Optional: true, + Default: glue.LanguagePython, + ValidateFunc: validation.StringInSlice([]string{ + glue.LanguagePython, + glue.LanguageScala, + }, false), + }, + "python_script": { + Type: schema.TypeString, + Computed: true, + }, + "scala_code": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsGlueScriptRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + dagEdge := d.Get("dag_edge").([]interface{}) + dagNode := d.Get("dag_node").([]interface{}) + + input := &glue.CreateScriptInput{ + DagEdges: expandGlueCodeGenEdges(dagEdge), + DagNodes: expandGlueCodeGenNodes(dagNode), + } + + if v, ok := d.GetOk("language"); ok && v.(string) != "" { + input.Language = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Glue Script: %s", input) + output, err := conn.CreateScript(input) + if err != nil { + return fmt.Errorf("error creating Glue script: %s", err) + } + + if output == nil { + return errors.New("script not created") + } + + d.SetId(time.Now().UTC().String()) + d.Set("python_script", output.PythonScript) + d.Set("scala_code", output.ScalaCode) + + return nil +} + +func expandGlueCodeGenNodeArgs(l []interface{}) []*glue.CodeGenNodeArg { + args := []*glue.CodeGenNodeArg{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + arg := &glue.CodeGenNodeArg{ + Name: aws.String(m["name"].(string)), + Param: aws.Bool(m["param"].(bool)), + Value: aws.String(m["value"].(string)), + } + args = append(args, arg) + } + + return args +} + +func expandGlueCodeGenEdges(l []interface{}) []*glue.CodeGenEdge { + edges := []*glue.CodeGenEdge{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + edge := &glue.CodeGenEdge{ + Source: aws.String(m["source"].(string)), + Target: aws.String(m["target"].(string)), + } + if v, ok := m["target_parameter"]; ok && v.(string) != "" { + edge.TargetParameter = aws.String(v.(string)) + } + edges = append(edges, edge) + } + + return edges +} + +func expandGlueCodeGenNodes(l []interface{}) []*glue.CodeGenNode { + nodes := []*glue.CodeGenNode{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + node := &glue.CodeGenNode{ + Args: expandGlueCodeGenNodeArgs(m["args"].([]interface{})), + Id: aws.String(m["id"].(string)), + NodeType: aws.String(m["node_type"].(string)), + } + if v, ok := m["line_number"]; ok && v.(int) != 0 { + node.LineNumber = aws.Int64(int64(v.(int))) + } + nodes = append(nodes, node) + } + + return nodes +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go index 305e2e4e7..344f3b99d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go @@ -31,10 +31,18 @@ func dataSourceAwsIAMInstanceProfile() *schema.Resource { Type: schema.TypeString, Required: true, }, + "role_arn": { + Type: schema.TypeString, + Computed: true, + }, "role_id": { Type: schema.TypeString, Computed: true, }, + "role_name": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -64,8 +72,11 @@ func dataSourceAwsIAMInstanceProfileRead(d *schema.ResourceData, meta interface{ d.Set("create_date", fmt.Sprintf("%v", instanceProfile.CreateDate)) d.Set("path", instanceProfile.Path) - for _, r := range instanceProfile.Roles { - d.Set("role_id", r.RoleId) + if len(instanceProfile.Roles) > 0 { + role := instanceProfile.Roles[0] + d.Set("role_arn", role.Arn) + d.Set("role_id", role.RoleId) + d.Set("role_name", role.RoleName) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go index fe4f6f657..26af5a2fb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_role.go @@ -2,7 +2,11 @@ package aws import ( "fmt" + "net/url" + "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/schema" ) @@ -28,6 +32,10 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "permissions_boundary": { + Type: schema.TypeString, + Computed: true, + }, "role_id": { Type: schema.TypeString, Computed: true, @@ -63,6 +71,8 @@ func dataSourceAwsIAMRole() *schema.Resource { } func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { + iamconn := meta.(*AWSClient).iamconn + name, hasName := d.GetOk("name") roleName, hasRoleName := d.GetOk("role_name") @@ -78,10 +88,40 @@ func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { } d.SetId(id) - data := resourceAwsIamRoleRead(d, meta) - // Keep backward compatibility with previous attributes - d.Set("role_id", d.Get("unique_id").(string)) - d.Set("assume_role_policy_document", d.Get("assume_role_policy").(string)) + input := &iam.GetRoleInput{ + RoleName: aws.String(d.Id()), + } - return data + output, err := iamconn.GetRole(input) + if err != nil { + return fmt.Errorf("Error reading IAM Role %s: %s", d.Id(), err) + } + + d.Set("arn", output.Role.Arn) + if err := d.Set("create_date", output.Role.CreateDate.Format(time.RFC3339)); err != nil { + return err + } + d.Set("description", output.Role.Description) + d.Set("max_session_duration", output.Role.MaxSessionDuration) + d.Set("name", output.Role.RoleName) + d.Set("path", output.Role.Path) + d.Set("permissions_boundary", "") + if output.Role.PermissionsBoundary != nil { + d.Set("permissions_boundary", output.Role.PermissionsBoundary.PermissionsBoundaryArn) + } + d.Set("unique_id", output.Role.RoleId) + + assumRolePolicy, err := url.QueryUnescape(aws.StringValue(output.Role.AssumeRolePolicyDocument)) + if err != nil { + return err + } + if err := d.Set("assume_role_policy", assumRolePolicy); err != nil { + return err + } + + // Keep backward compatibility with previous attributes + d.Set("role_id", output.Role.RoleId) + d.Set("assume_role_policy_document", assumRolePolicy) + + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go index 29321ef43..a628806ed 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go @@ -36,6 +36,12 @@ func dataSourceAwsIAMServerCertificate() *schema.Resource { ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), }, + "path_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "latest": { Type: schema.TypeBool, Optional: true, @@ -103,8 +109,12 @@ func dataSourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interfac } var metadatas []*iam.ServerCertificateMetadata + input := &iam.ListServerCertificatesInput{} + if v, ok := d.GetOk("path_prefix"); ok { + input.PathPrefix = aws.String(v.(string)) + } log.Printf("[DEBUG] Reading IAM Server Certificate") - err := iamconn.ListServerCertificatesPages(&iam.ListServerCertificatesInput{}, func(p *iam.ListServerCertificatesOutput, lastPage bool) bool { + err := iamconn.ListServerCertificatesPages(input, func(p *iam.ListServerCertificatesOutput, lastPage bool) bool { for _, cert := range p.ServerCertificateMetadataList { if matcher(cert) { metadatas = append(metadatas, cert) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go index 72d3e47d9..2a627b918 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_user.go @@ -1,11 +1,11 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -22,6 +22,10 @@ func dataSourceAwsIAMUser() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "permissions_boundary": { + Type: schema.TypeString, + Computed: true, + }, "user_id": { Type: schema.TypeString, Computed: true, @@ -44,13 +48,17 @@ func dataSourceAwsIAMUserRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Reading IAM User: %s", req) resp, err := iamconn.GetUser(req) if err != nil { - return errwrap.Wrapf("error getting user: {{err}}", err) + return fmt.Errorf("error getting user: %s", err) } user := resp.User - d.SetId(*user.UserId) + d.SetId(aws.StringValue(user.UserId)) d.Set("arn", user.Arn) d.Set("path", user.Path) + d.Set("permissions_boundary", "") + if user.PermissionsBoundary != nil { + d.Set("permissions_boundary", user.PermissionsBoundary.PermissionsBoundaryArn) + } d.Set("user_id", user.UserId) return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go index 23a8fac24..d2ff51ab7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go @@ -222,6 +222,22 @@ func dataSourceAwsInstance() *schema.Resource { }, }, }, + "credit_specification": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "disable_api_termination": { + Type: schema.TypeBool, + Computed: true, + }, }, } } @@ -389,6 +405,15 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc d.Set("user_data", userDataHashSum(*attr.UserData.Value)) } } + { + creditSpecifications, err := getCreditSpecifications(conn, d.Id()) + if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { + return err + } + if err := d.Set("credit_specification", creditSpecifications); err != nil { + return fmt.Errorf("error setting credit_specification: %s", err) + } + } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go index 7196e3189..e0b094e20 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsInstances() *schema.Resource { @@ -17,6 +18,21 @@ func dataSourceAwsInstances() *schema.Resource { Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "instance_tags": tagsSchemaComputed(), + "instance_state_names": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceStateNamePending, + ec2.InstanceStateNameRunning, + ec2.InstanceStateNameShuttingDown, + ec2.InstanceStateNameStopped, + ec2.InstanceStateNameStopping, + ec2.InstanceStateNameTerminated, + }, false), + }, + }, "ids": { Type: schema.TypeList, @@ -47,14 +63,19 @@ func dataSourceAwsInstancesRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("One of filters or instance_tags must be assigned") } + instanceStateNames := []*string{aws.String(ec2.InstanceStateNameRunning)} + if v, ok := d.GetOk("instance_state_names"); ok && len(v.(*schema.Set).List()) > 0 { + instanceStateNames = expandStringSet(v.(*schema.Set)) + } params := &ec2.DescribeInstancesInput{ Filters: []*ec2.Filter{ &ec2.Filter{ Name: aws.String("instance-state-name"), - Values: []*string{aws.String("running")}, + Values: instanceStateNames, }, }, } + if filtersOk { params.Filters = append(params.Filters, buildAwsDataSourceFilters(filters.(*schema.Set))...) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go new file mode 100644 index 000000000..e9938bf8e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go @@ -0,0 +1,37 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsIotEndpoint() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsIotEndpointRead, + Schema: map[string]*schema.Schema{ + "endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsIotEndpointRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + input := &iot.DescribeEndpointInput{} + + output, err := conn.DescribeEndpoint(input) + if err != nil { + return fmt.Errorf("error while describing iot endpoint: %s", err) + } + endpointAddress := aws.StringValue(output.EndpointAddress) + d.SetId(endpointAddress) + if err := d.Set("endpoint_address", endpointAddress); err != nil { + return fmt.Errorf("error setting endpoint_address: %s", err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go index 3b022dfb5..caac90001 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go @@ -13,7 +13,8 @@ import ( func dataSourceAwsKmsSecret() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsKmsSecretRead, + DeprecationMessage: "This data source will be removed in Terraform AWS provider version 2.0. Please see migration information available in: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret", + Read: dataSourceAwsKmsSecretRead, Schema: map[string]*schema.Schema{ "secret": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go new file mode 100644 index 000000000..97b622722 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go @@ -0,0 +1,108 @@ +package aws + +import ( + "encoding/base64" + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kms" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsKmsSecrets() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsKmsSecretsRead, + + Schema: map[string]*schema.Schema{ + "secret": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "payload": { + Type: schema.TypeString, + Required: true, + }, + "context": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "grant_tokens": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "plaintext": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + Sensitive: true, + }, + }, + }, + } +} + +func dataSourceAwsKmsSecretsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kmsconn + + secrets := d.Get("secret").(*schema.Set) + plaintext := make(map[string]string, len(secrets.List())) + + for _, v := range secrets.List() { + secret := v.(map[string]interface{}) + + // base64 decode the payload + payload, err := base64.StdEncoding.DecodeString(secret["payload"].(string)) + if err != nil { + return fmt.Errorf("Invalid base64 value for secret '%s': %v", secret["name"].(string), err) + } + + // build the kms decrypt params + params := &kms.DecryptInput{ + CiphertextBlob: []byte(payload), + } + if context, exists := secret["context"]; exists { + params.EncryptionContext = make(map[string]*string) + for k, v := range context.(map[string]interface{}) { + params.EncryptionContext[k] = aws.String(v.(string)) + } + } + if grant_tokens, exists := secret["grant_tokens"]; exists { + params.GrantTokens = make([]*string, 0) + for _, v := range grant_tokens.([]interface{}) { + params.GrantTokens = append(params.GrantTokens, aws.String(v.(string))) + } + } + + // decrypt + resp, err := conn.Decrypt(params) + if err != nil { + return fmt.Errorf("Failed to decrypt '%s': %s", secret["name"].(string), err) + } + + // Set the secret via the name + log.Printf("[DEBUG] aws_kms_secret - successfully decrypted secret: %s", secret["name"].(string)) + plaintext[secret["name"].(string)] = string(resp.Plaintext) + } + + if err := d.Set("plaintext", plaintext); err != nil { + return fmt.Errorf("error setting plaintext: %s", err) + } + + d.SetId(time.Now().UTC().String()) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go new file mode 100644 index 000000000..cf41f4add --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go @@ -0,0 +1,154 @@ +package aws + +import ( + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLambdaFunction() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLambdaFunctionRead, + + Schema: map[string]*schema.Schema{ + "function_name": { + Type: schema.TypeString, + Required: true, + }, + "qualifier": { + Type: schema.TypeString, + Optional: true, + Default: "$LATEST", + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "dead_letter_config": { + Type: schema.TypeList, + Computed: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "target_arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "handler": { + Type: schema.TypeString, + Computed: true, + }, + "memory_size": { + Type: schema.TypeInt, + Computed: true, + }, + "reserved_concurrent_executions": { + Type: schema.TypeInt, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "runtime": { + Type: schema.TypeString, + Computed: true, + }, + "timeout": { + Type: schema.TypeInt, + Computed: true, + }, + "version": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_config": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnet_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "qualified_arn": { + Type: schema.TypeString, + Computed: true, + }, + "invoke_arn": { + Type: schema.TypeString, + Computed: true, + }, + "last_modified": { + Type: schema.TypeString, + Computed: true, + }, + "source_code_hash": { + Type: schema.TypeString, + Computed: true, + }, + "source_code_size": { + Type: schema.TypeInt, + Computed: true, + }, + "environment": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "variables": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + }, + }, + }, + "tracing_config": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mode": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "kms_key_arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) error { + d.SetId(d.Get("function_name").(string)) + return resourceAwsLambdaFunctionRead(d, meta) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go new file mode 100644 index 000000000..6e532686f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go @@ -0,0 +1,94 @@ +package aws + +import ( + "crypto/md5" + "encoding/json" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/lambda" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLambdaInvocation() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLambdaInvocationRead, + + Schema: map[string]*schema.Schema{ + "function_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "$LATEST", + }, + + "input": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateJsonString, + }, + + "result": { + Type: schema.TypeString, + Computed: true, + }, + + "result_map": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + } +} + +func dataSourceAwsLambdaInvocationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).lambdaconn + + functionName := d.Get("function_name").(string) + qualifier := d.Get("qualifier").(string) + input := []byte(d.Get("input").(string)) + + res, err := conn.Invoke(&lambda.InvokeInput{ + FunctionName: aws.String(functionName), + InvocationType: aws.String(lambda.InvocationTypeRequestResponse), + Payload: input, + Qualifier: aws.String(qualifier), + }) + + if err != nil { + return err + } + + if res.FunctionError != nil { + return fmt.Errorf("Lambda function (%s) returned error: (%s)", functionName, string(res.Payload)) + } + + if err = d.Set("result", string(res.Payload)); err != nil { + return err + } + + var result map[string]interface{} + + if err = json.Unmarshal(res.Payload, &result); err != nil { + return err + } + + if err = d.Set("result_map", result); err != nil { + log.Printf("[WARN] Cannot use the result invocation as a string map: %s", err) + } + + d.SetId(fmt.Sprintf("%s_%s_%x", functionName, qualifier, md5.Sum(input))) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go new file mode 100644 index 000000000..e02cbd2a0 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_configuration.go @@ -0,0 +1,246 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLaunchConfiguration() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLaunchConfigurationRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + + "image_id": { + Type: schema.TypeString, + Computed: true, + }, + + "instance_type": { + Type: schema.TypeString, + Computed: true, + }, + + "iam_instance_profile": { + Type: schema.TypeString, + Computed: true, + }, + + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + + "user_data": { + Type: schema.TypeString, + Computed: true, + }, + + "security_groups": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "vpc_classic_link_id": { + Type: schema.TypeString, + Computed: true, + }, + + "vpc_classic_link_security_groups": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "associate_public_ip_address": { + Type: schema.TypeBool, + Computed: true, + }, + + "spot_price": { + Type: schema.TypeString, + Computed: true, + }, + + "ebs_optimized": { + Type: schema.TypeBool, + Computed: true, + }, + + "placement_tenancy": { + Type: schema.TypeString, + Computed: true, + }, + + "enable_monitoring": { + Type: schema.TypeBool, + Computed: true, + }, + + "ebs_block_device": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Computed: true, + }, + + "device_name": { + Type: schema.TypeString, + Computed: true, + }, + + "iops": { + Type: schema.TypeInt, + Computed: true, + }, + + "snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, + + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_type": { + Type: schema.TypeString, + Computed: true, + }, + + "encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + + "ephemeral_block_device": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "device_name": { + Type: schema.TypeString, + Computed: true, + }, + + "virtual_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + + "root_block_device": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Computed: true, + }, + + "iops": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{}) error { + autoscalingconn := meta.(*AWSClient).autoscalingconn + ec2conn := meta.(*AWSClient).ec2conn + + if v, ok := d.GetOk("name"); ok { + d.SetId(v.(string)) + } + + describeOpts := autoscaling.DescribeLaunchConfigurationsInput{ + LaunchConfigurationNames: []*string{aws.String(d.Id())}, + } + + log.Printf("[DEBUG] launch configuration describe configuration: %s", describeOpts) + describConfs, err := autoscalingconn.DescribeLaunchConfigurations(&describeOpts) + if err != nil { + return fmt.Errorf("Error retrieving launch configuration: %s", err) + } + + if describConfs == nil || len(describConfs.LaunchConfigurations) == 0 { + return errors.New("No matching Launch Configuration found") + } + + if len(describConfs.LaunchConfigurations) > 1 { + return errors.New("Multiple matching Launch Configurations found") + } + + lc := describConfs.LaunchConfigurations[0] + + d.Set("key_name", lc.KeyName) + d.Set("image_id", lc.ImageId) + d.Set("instance_type", lc.InstanceType) + d.Set("name", lc.LaunchConfigurationName) + d.Set("user_data", lc.UserData) + d.Set("iam_instance_profile", lc.IamInstanceProfile) + d.Set("ebs_optimized", lc.EbsOptimized) + d.Set("spot_price", lc.SpotPrice) + d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) + d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) + d.Set("enable_monitoring", false) + + if lc.InstanceMonitoring != nil { + d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) + } + + vpcSGs := make([]string, 0, len(lc.SecurityGroups)) + for _, sg := range lc.SecurityGroups { + vpcSGs = append(vpcSGs, *sg) + } + if err := d.Set("security_groups", vpcSGs); err != nil { + return fmt.Errorf("error setting security_groups: %s", err) + } + + classicSGs := make([]string, 0, len(lc.ClassicLinkVPCSecurityGroups)) + for _, sg := range lc.ClassicLinkVPCSecurityGroups { + classicSGs = append(classicSGs, *sg) + } + if err := d.Set("vpc_classic_link_security_groups", classicSGs); err != nil { + return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) + } + + if err := readLCBlockDevices(d, lc, ec2conn); err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go index f0357a5b7..37ac1ef94 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go @@ -17,17 +17,20 @@ func dataSourceAwsLbListener() *schema.Resource { "arn": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"load_balancer_arn", "port"}, }, "load_balancer_arn": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"arn"}, }, "port": { Type: schema.TypeInt, Optional: true, + Computed: true, ConflictsWith: []string{"arn"}, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go index f10919448..ceefffb34 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_target_group.go @@ -50,6 +50,11 @@ func dataSourceAwsLbTargetGroup() *schema.Resource { Computed: true, }, + "slow_start": { + Type: schema.TypeInt, + Computed: true, + }, + "stickiness": { Type: schema.TypeList, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go new file mode 100644 index 000000000..fa150808c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go @@ -0,0 +1,180 @@ +package aws + +import ( + "errors" + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mq" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsMqBroker() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsmQBrokerRead, + + Schema: map[string]*schema.Schema{ + "broker_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{"broker_name"}, + }, + "broker_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{"broker_id"}, + }, + "auto_minor_version_upgrade": { + Type: schema.TypeBool, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "configuration": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "revision": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + "deployment_mode": { + Type: schema.TypeString, + Computed: true, + }, + "engine_type": { + Type: schema.TypeString, + Computed: true, + }, + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + "host_instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "instances": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "console_url": { + Type: schema.TypeString, + Computed: true, + }, + "endpoints": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "maintenance_window_start_time": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "day_of_week": { + Type: schema.TypeString, + Computed: true, + }, + "time_of_day": { + Type: schema.TypeString, + Computed: true, + }, + "time_zone": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "publicly_accessible": { + Type: schema.TypeBool, + Computed: true, + }, + "security_groups": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "subnet_ids": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "user": { + Type: schema.TypeSet, + Computed: true, + Set: resourceAwsMqUserHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "console_access": { + Type: schema.TypeBool, + Computed: true, + }, + "groups": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + Computed: true, + }, + "username": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsmQBrokerRead(d *schema.ResourceData, meta interface{}) error { + if brokerId, ok := d.GetOk("broker_id"); ok { + d.SetId(brokerId.(string)) + } else { + conn := meta.(*AWSClient).mqconn + brokerName := d.Get("broker_name").(string) + var nextToken string + for { + out, err := conn.ListBrokers(&mq.ListBrokersInput{NextToken: aws.String(nextToken)}) + if err != nil { + return errors.New("Failed to list mq brokers") + } + for _, broker := range out.BrokerSummaries { + if aws.StringValue(broker.BrokerName) == brokerName { + brokerId := aws.StringValue(broker.BrokerId) + d.Set("broker_id", brokerId) + d.SetId(brokerId) + } + } + if out.NextToken == nil { + break + } + nextToken = *out.NextToken + } + + if d.Id() == "" { + return fmt.Errorf("Failed to determine mq broker: %s", brokerName) + } + } + + return resourceAwsMqBrokerRead(d, meta) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go new file mode 100644 index 000000000..bd99ed18a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_acls.go @@ -0,0 +1,92 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsNetworkAcls() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsNetworkAclsRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "vpc_id": { + Type: schema.TypeString, + Optional: true, + }, + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeNetworkAclsInput{} + + if v, ok := d.GetOk("vpc_id"); ok { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": v.(string), + }, + ) + } + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + if tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + if filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeNetworkAcls %s\n", req) + resp, err := conn.DescribeNetworkAcls(req) + if err != nil { + return err + } + + if resp == nil || len(resp.NetworkAcls) == 0 { + return errors.New("no matching network ACLs found") + } + + networkAcls := make([]string, 0) + + for _, networkAcl := range resp.NetworkAcls { + networkAcls = append(networkAcls, aws.StringValue(networkAcl.NetworkAclId)) + } + + d.SetId(resource.UniqueId()) + if err := d.Set("ids", networkAcls); err != nil { + return fmt.Errorf("Error setting network ACL ids: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go new file mode 100644 index 000000000..316c59803 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interfaces.go @@ -0,0 +1,79 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsNetworkInterfaces() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsNetworkInterfacesRead, + Schema: map[string]*schema.Schema{ + + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsNetworkInterfacesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeNetworkInterfacesInput{} + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + if tagsOk { + req.Filters = buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + ) + } + + if filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(req.Filters) == 0 { + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeNetworkInterfaces %s\n", req) + resp, err := conn.DescribeNetworkInterfaces(req) + if err != nil { + return err + } + + if resp == nil || len(resp.NetworkInterfaces) == 0 { + return errors.New("no matching network interfaces found") + } + + networkInterfaces := make([]string, 0) + + for _, networkInterface := range resp.NetworkInterfaces { + networkInterfaces = append(networkInterfaces, aws.StringValue(networkInterface.NetworkInterfaceId)) + } + + d.SetId(resource.UniqueId()) + if err := d.Set("ids", networkInterfaces); err != nil { + return fmt.Errorf("Error setting network interfaces ids: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go new file mode 100644 index 000000000..393acef12 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_pricing_product.go @@ -0,0 +1,92 @@ +package aws + +import ( + "log" + + "encoding/json" + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pricing" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsPricingProduct() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsPricingProductRead, + Schema: map[string]*schema.Schema{ + "service_code": { + Type: schema.TypeString, + Required: true, + }, + "filters": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "result": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pricingconn + + params := &pricing.GetProductsInput{ + ServiceCode: aws.String(d.Get("service_code").(string)), + Filters: []*pricing.Filter{}, + } + + filters := d.Get("filters") + for _, v := range filters.([]interface{}) { + m := v.(map[string]interface{}) + params.Filters = append(params.Filters, &pricing.Filter{ + Field: aws.String(m["field"].(string)), + Value: aws.String(m["value"].(string)), + Type: aws.String(pricing.FilterTypeTermMatch), + }) + } + + log.Printf("[DEBUG] Reading pricing of products: %s", params) + resp, err := conn.GetProducts(params) + if err != nil { + return fmt.Errorf("Error reading pricing of products: %s", err) + } + + numberOfElements := len(resp.PriceList) + if numberOfElements == 0 { + return fmt.Errorf("Pricing product query did not return any elements") + } else if numberOfElements > 1 { + priceListBytes, err := json.Marshal(resp.PriceList) + priceListString := string(priceListBytes) + if err != nil { + priceListString = err.Error() + } + return fmt.Errorf("Pricing product query not precise enough. Returned more than one element: %s", priceListString) + } + + pricingResult, err := json.Marshal(resp.PriceList[0]) + if err != nil { + return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) + } + + d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) + d.Set("result", string(pricingResult)) + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go index 6fea11591..4ef0742fd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_rds_cluster.go @@ -58,6 +58,12 @@ func dataSourceAwsRdsCluster() *schema.Resource { Computed: true, }, + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "endpoint": { Type: schema.TypeString, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go new file mode 100644 index 000000000..41666e7fb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go @@ -0,0 +1,278 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsRedshiftCluster() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsRedshiftClusterRead, + + Schema: map[string]*schema.Schema{ + + "cluster_identifier": { + Type: schema.TypeString, + Required: true, + }, + + "allow_version_upgrade": { + Type: schema.TypeBool, + Computed: true, + }, + + "automated_snapshot_retention_period": { + Type: schema.TypeInt, + Computed: true, + }, + + "availability_zone": { + Type: schema.TypeString, + Computed: true, + }, + + "bucket_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_parameter_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_public_key": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_revision_number": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_security_groups": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "cluster_subnet_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_type": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_version": { + Type: schema.TypeString, + Computed: true, + }, + + "database_name": { + Type: schema.TypeString, + Computed: true, + }, + + "elastic_ip": { + Type: schema.TypeString, + Computed: true, + }, + + "enable_logging": { + Type: schema.TypeBool, + Computed: true, + }, + + "encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "enhanced_vpc_routing": { + Type: schema.TypeBool, + Computed: true, + }, + + "iam_roles": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + + "master_username": { + Type: schema.TypeString, + Computed: true, + }, + + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + + "number_of_nodes": { + Type: schema.TypeInt, + Computed: true, + }, + + "port": { + Type: schema.TypeInt, + Computed: true, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Computed: true, + }, + + "publicly_accessible": { + Type: schema.TypeBool, + Computed: true, + }, + + "s3_key_prefix": { + Type: schema.TypeString, + Computed: true, + }, + + "tags": tagsSchema(), + + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + + "vpc_security_group_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + cluster := d.Get("cluster_identifier").(string) + + log.Printf("[INFO] Reading Redshift Cluster Information: %s", cluster) + + resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ + ClusterIdentifier: aws.String(cluster), + }) + + if err != nil { + return fmt.Errorf("Error describing Redshift Cluster: %s, error: %s", cluster, err) + } + + if resp.Clusters == nil || len(resp.Clusters) == 0 { + return fmt.Errorf("Error describing Redshift Cluster: %s, cluster information not found", cluster) + } + + rsc := *resp.Clusters[0] + + d.SetId(cluster) + d.Set("allow_version_upgrade", rsc.AllowVersionUpgrade) + d.Set("automated_snapshot_retention_period", rsc.AutomatedSnapshotRetentionPeriod) + d.Set("availability_zone", rsc.AvailabilityZone) + d.Set("cluster_identifier", rsc.ClusterIdentifier) + + if len(rsc.ClusterParameterGroups) > 0 { + d.Set("cluster_parameter_group_name", rsc.ClusterParameterGroups[0].ParameterGroupName) + } + + d.Set("cluster_public_key", rsc.ClusterPublicKey) + d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) + + var csg []string + for _, g := range rsc.ClusterSecurityGroups { + csg = append(csg, *g.ClusterSecurityGroupName) + } + if err := d.Set("cluster_security_groups", csg); err != nil { + return fmt.Errorf("[DEBUG] Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", cluster, err) + } + + d.Set("cluster_subnet_group_name", rsc.ClusterSubnetGroupName) + + if len(rsc.ClusterNodes) > 1 { + d.Set("cluster_type", "multi-node") + } else { + d.Set("cluster_type", "single-node") + } + + d.Set("cluster_version", rsc.ClusterVersion) + d.Set("database_name", rsc.DBName) + + if rsc.ElasticIpStatus != nil { + d.Set("elastic_ip", rsc.ElasticIpStatus.ElasticIp) + } + + d.Set("encrypted", rsc.Encrypted) + + if rsc.Endpoint != nil { + d.Set("endpoint", rsc.Endpoint.Address) + } + + d.Set("enhanced_vpc_routing", rsc.EnhancedVpcRouting) + + var iamRoles []string + for _, i := range rsc.IamRoles { + iamRoles = append(iamRoles, *i.IamRoleArn) + } + if err := d.Set("iam_roles", iamRoles); err != nil { + return fmt.Errorf("[DEBUG] Error saving IAM Roles to state for Redshift Cluster (%s): %s", cluster, err) + } + + d.Set("kms_key_id", rsc.KmsKeyId) + d.Set("master_username", rsc.MasterUsername) + d.Set("node_type", rsc.NodeType) + d.Set("number_of_nodes", rsc.NumberOfNodes) + d.Set("port", rsc.Endpoint.Port) + d.Set("preferred_maintenance_window", rsc.PreferredMaintenanceWindow) + d.Set("publicly_accessible", rsc.PubliclyAccessible) + d.Set("tags", tagsToMapRedshift(rsc.Tags)) + d.Set("vpc_id", rsc.VpcId) + + var vpcg []string + for _, g := range rsc.VpcSecurityGroups { + vpcg = append(vpcg, *g.VpcSecurityGroupId) + } + if err := d.Set("vpc_security_group_ids", vpcg); err != nil { + return fmt.Errorf("[DEBUG] Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", cluster, err) + } + + log.Printf("[INFO] Reading Redshift Cluster Logging Status: %s", cluster) + loggingStatus, loggingErr := conn.DescribeLoggingStatus(&redshift.DescribeLoggingStatusInput{ + ClusterIdentifier: aws.String(cluster), + }) + + if loggingErr != nil { + return loggingErr + } + + if loggingStatus != nil && aws.BoolValue(loggingStatus.LoggingEnabled) { + d.Set("enable_logging", loggingStatus.LoggingEnabled) + d.Set("bucket_name", loggingStatus.BucketName) + d.Set("s3_key_prefix", loggingStatus.S3KeyPrefix) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go index b3424a8cb..b3112a34b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_region.go @@ -31,6 +31,11 @@ func dataSourceAwsRegion() *schema.Resource { Optional: true, Computed: true, }, + + "description": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -81,6 +86,8 @@ func dataSourceAwsRegionRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", region.ID()) + d.Set("description", region.Description()) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go new file mode 100644 index 000000000..ea7eb6d24 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route.go @@ -0,0 +1,180 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsRoute() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsRouteRead, + + Schema: map[string]*schema.Schema{ + "route_table_id": { + Type: schema.TypeString, + Required: true, + }, + "destination_cidr_block": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "destination_ipv6_cidr_block": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "egress_only_gateway_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "gateway_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "nat_gateway_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vpc_peering_connection_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "network_interface_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + } +} + +func dataSourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + req := &ec2.DescribeRouteTablesInput{} + rtbId := d.Get("route_table_id") + cidr := d.Get("destination_cidr_block") + ipv6Cidr := d.Get("destination_ipv6_cidr_block") + + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "route-table-id": rtbId.(string), + "route.destination-cidr-block": cidr.(string), + "route.destination-ipv6-cidr-block": ipv6Cidr.(string), + }, + ) + + log.Printf("[DEBUG] Reading Route Table: %s", req) + resp, err := conn.DescribeRouteTables(req) + if err != nil { + return err + } + if resp == nil || len(resp.RouteTables) == 0 { + return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + if len(resp.RouteTables) > 1 { + return fmt.Errorf("Your query returned more than one route table. Please change your search criteria and try again.") + } + + results := getRoutes(resp.RouteTables[0], d) + + if len(results) == 0 { + return fmt.Errorf("No routes matching supplied arguments found in table(s)") + } + if len(results) > 1 { + return fmt.Errorf("Multiple routes matched; use additional constraints to reduce matches to a single route") + } + route := results[0] + + d.SetId(routeIDHash(d, route)) // using function from "resource_aws_route.go" + d.Set("destination_cidr_block", route.DestinationCidrBlock) + d.Set("destination_ipv6_cidr_block", route.DestinationIpv6CidrBlock) + d.Set("egress_only_gateway_id", route.EgressOnlyInternetGatewayId) + d.Set("gateway_id", route.GatewayId) + d.Set("instance_id", route.InstanceId) + d.Set("nat_gateway_id", route.NatGatewayId) + d.Set("vpc_peering_connection_id", route.VpcPeeringConnectionId) + d.Set("network_interface_id", route.NetworkInterfaceId) + + return nil +} + +func getRoutes(table *ec2.RouteTable, d *schema.ResourceData) []*ec2.Route { + ec2Routes := table.Routes + routes := make([]*ec2.Route, 0, len(ec2Routes)) + // Loop through the routes and add them to the set + for _, r := range ec2Routes { + + if r.Origin != nil && *r.Origin == "EnableVgwRoutePropagation" { + continue + } + + if r.DestinationPrefixListId != nil { + // Skipping because VPC endpoint routes are handled separately + // See aws_vpc_endpoint + continue + } + + if v, ok := d.GetOk("destination_cidr_block"); ok { + if r.DestinationCidrBlock == nil || *r.DestinationCidrBlock != v.(string) { + continue + } + } + + if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { + if r.DestinationIpv6CidrBlock == nil || *r.DestinationIpv6CidrBlock != v.(string) { + continue + } + } + + if v, ok := d.GetOk("egress_only_gateway_id"); ok { + if r.EgressOnlyInternetGatewayId == nil || *r.EgressOnlyInternetGatewayId != v.(string) { + continue + } + } + + if v, ok := d.GetOk("gateway_id"); ok { + if r.GatewayId == nil || *r.GatewayId != v.(string) { + continue + } + } + + if v, ok := d.GetOk("instance_id"); ok { + if r.InstanceId == nil || *r.InstanceId != v.(string) { + continue + } + } + + if v, ok := d.GetOk("nat_gateway_id"); ok { + if r.NatGatewayId == nil || *r.NatGatewayId != v.(string) { + continue + } + } + + if v, ok := d.GetOk("vpc_peering_connection_id"); ok { + if r.VpcPeeringConnectionId == nil || *r.VpcPeeringConnectionId != v.(string) { + continue + } + } + + if v, ok := d.GetOk("network_interface_id"); ok { + if r.NetworkInterfaceId == nil || *r.NetworkInterfaceId != v.(string) { + continue + } + } + routes = append(routes, r) + } + return routes +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go index 55629f5de..3b96506e8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go @@ -51,6 +51,11 @@ func dataSourceAwsRoute53Zone() *schema.Resource { Optional: true, Computed: true, }, + "name_servers": &schema.Schema{ + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, }, } } @@ -135,7 +140,6 @@ func dataSourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) erro break } } - } if matchingTags && matchingVPC { @@ -146,7 +150,6 @@ func dataSourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) erro hostedZoneFound = hostedZone } } - } if *resp.IsTruncated { nextMarker = resp.NextMarker @@ -166,6 +169,13 @@ func dataSourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) erro d.Set("private_zone", hostedZoneFound.Config.PrivateZone) d.Set("caller_reference", hostedZoneFound.CallerReference) d.Set("resource_record_set_count", hostedZoneFound.ResourceRecordSetCount) + + nameServers, err := hostedZoneNameServers(idHostedZone, conn) + if err != nil { + return fmt.Errorf("Error finding Route 53 Hosted Zone: %v", err) + } + d.Set("name_servers", nameServers) + return nil } @@ -177,3 +187,26 @@ func hostedZoneName(name string) string { return name + "." } + +// used to retrieve name servers +func hostedZoneNameServers(id string, conn *route53.Route53) ([]string, error) { + req := &route53.GetHostedZoneInput{} + req.Id = aws.String(id) + + resp, err := conn.GetHostedZone(req) + if err != nil { + return []string{}, err + } + + if resp.DelegationSet == nil { + return []string{}, nil + } + + servers := []string{} + for _, server := range resp.DelegationSet.NameServers { + if server != nil { + servers = append(servers, *server) + } + } + return servers, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go new file mode 100644 index 000000000..ef34987c3 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route_tables.go @@ -0,0 +1,80 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsRouteTables() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsRouteTablesRead, + Schema: map[string]*schema.Schema{ + + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "vpc_id": { + Type: schema.TypeString, + Optional: true, + }, + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsRouteTablesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeRouteTablesInput{} + + if v, ok := d.GetOk("vpc_id"); ok { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": v.(string), + }, + ) + } + + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(d.Get("tags").(map[string]interface{})), + )...) + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + + log.Printf("[DEBUG] DescribeRouteTables %s\n", req) + resp, err := conn.DescribeRouteTables(req) + if err != nil { + return err + } + + if resp == nil || len(resp.RouteTables) == 0 { + return fmt.Errorf("no matching route tables found for vpc with id %s", d.Get("vpc_id").(string)) + } + + routeTables := make([]string, 0) + + for _, routeTable := range resp.RouteTables { + routeTables = append(routeTables, aws.StringValue(routeTable.RouteTableId)) + } + + d.SetId(resource.UniqueId()) + if err = d.Set("ids", routeTables); err != nil { + return fmt.Errorf("error setting ids: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go new file mode 100644 index 000000000..b076b8d1c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go @@ -0,0 +1,116 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSecretsManagerSecret() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecretsManagerSecretRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateArn, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "rotation_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "rotation_lambda_arn": { + Type: schema.TypeString, + Computed: true, + }, + "rotation_rules": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "automatically_after_days": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + "tags": { + Type: schema.TypeMap, + Computed: true, + }, + }, + } +} + +func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + var secretID string + if v, ok := d.GetOk("arn"); ok { + secretID = v.(string) + } + if v, ok := d.GetOk("name"); ok { + if secretID != "" { + return errors.New("specify only arn or name") + } + secretID = v.(string) + } + + if secretID == "" { + return errors.New("must specify either arn or name") + } + + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(secretID), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) + output, err := conn.DescribeSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return fmt.Errorf("Secrets Manager Secret %q not found", secretID) + } + return fmt.Errorf("error reading Secrets Manager Secret: %s", err) + } + + if output.ARN == nil { + return fmt.Errorf("Secrets Manager Secret %q not found", secretID) + } + + d.SetId(aws.StringValue(output.ARN)) + d.Set("arn", output.ARN) + d.Set("description", output.Description) + d.Set("kms_key_id", output.KmsKeyId) + d.Set("name", output.Name) + d.Set("rotation_enabled", output.RotationEnabled) + d.Set("rotation_lambda_arn", output.RotationLambdaARN) + + if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { + return fmt.Errorf("error setting rotation_rules: %s", err) + } + + if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go new file mode 100644 index 000000000..2f1ae2766 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go @@ -0,0 +1,87 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSecretsManagerSecretVersion() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecretsManagerSecretVersionRead, + + Schema: map[string]*schema.Schema{ + "secret_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "secret_string": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "version_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "version_stage": { + Type: schema.TypeString, + Optional: true, + Default: "AWSCURRENT", + }, + "version_stages": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + secretID := d.Get("secret_id").(string) + var version string + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + } + + if v, ok := d.GetOk("version_id"); ok { + versionID := v.(string) + input.VersionId = aws.String(versionID) + version = versionID + } else { + versionStage := d.Get("version_stage").(string) + input.VersionStage = aws.String(versionStage) + version = versionStage + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) + output, err := conn.GetSecretValue(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) + } + return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) + } + + d.SetId(fmt.Sprintf("%s|%s", secretID, version)) + d.Set("secret_id", secretID) + d.Set("secret_string", output.SecretString) + d.Set("version_id", output.VersionId) + + if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { + return fmt.Errorf("error setting version_stages: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go new file mode 100644 index 000000000..aa00db518 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go @@ -0,0 +1,94 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSecurityGroups() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecurityGroupsRead, + + Schema: map[string]*schema.Schema{ + "filter": dataSourceFiltersSchema(), + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpc_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsSecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + req := &ec2.DescribeSecurityGroupsInput{} + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + if !filtersOk && !tagsOk { + return fmt.Errorf("One of filters or tags must be assigned") + } + + if filtersOk { + req.Filters = append(req.Filters, + buildAwsDataSourceFilters(filters.(*schema.Set))...) + } + if tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + log.Printf("[DEBUG] Reading Security Groups with request: %s", req) + + var ids, vpc_ids []string + for { + resp, err := conn.DescribeSecurityGroups(req) + if err != nil { + return fmt.Errorf("error reading security groups: %s", err) + } + + for _, sg := range resp.SecurityGroups { + ids = append(ids, aws.StringValue(sg.GroupId)) + vpc_ids = append(vpc_ids, aws.StringValue(sg.VpcId)) + } + + if resp.NextToken == nil { + break + } + req.NextToken = resp.NextToken + } + + if len(ids) < 1 { + return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + + log.Printf("[DEBUG] Found %d securuity groups via given filter: %s", len(ids), req) + + d.SetId(resource.UniqueId()) + err := d.Set("ids", ids) + if err != nil { + return err + } + + err = d.Set("vpc_ids", vpc_ids) + if err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go new file mode 100644 index 000000000..40099d6a4 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sqs_queue.go @@ -0,0 +1,57 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sqs" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSqsQueue() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSqsQueueRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "url": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sqsconn + name := d.Get("name").(string) + + urlOutput, err := conn.GetQueueUrl(&sqs.GetQueueUrlInput{ + QueueName: aws.String(name), + }) + if err != nil || urlOutput.QueueUrl == nil { + return fmt.Errorf("Error getting queue URL: %s", err) + } + + queueURL := aws.StringValue(urlOutput.QueueUrl) + + attributesOutput, err := conn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ + QueueUrl: aws.String(queueURL), + AttributeNames: []*string{aws.String(sqs.QueueAttributeNameQueueArn)}, + }) + if err != nil { + return fmt.Errorf("Error getting queue attributes: %s", err) + } + + d.Set("arn", aws.StringValue(attributesOutput.Attributes[sqs.QueueAttributeNameQueueArn])) + d.Set("url", queueURL) + d.SetId(queueURL) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go index 8c92b9a93..024eedd8f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go @@ -47,25 +47,19 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { name := d.Get("name").(string) - paramInput := &ssm.GetParametersInput{ - Names: []*string{ - aws.String(name), - }, + paramInput := &ssm.GetParameterInput{ + Name: aws.String(name), WithDecryption: aws.Bool(d.Get("with_decryption").(bool)), } log.Printf("[DEBUG] Reading SSM Parameter: %s", paramInput) - resp, err := ssmconn.GetParameters(paramInput) + resp, err := ssmconn.GetParameter(paramInput) if err != nil { return errwrap.Wrapf("[ERROR] Error describing SSM parameter: {{err}}", err) } - if len(resp.InvalidParameters) > 0 { - return fmt.Errorf("[ERROR] SSM Parameter %s is invalid", name) - } - - param := resp.Parameters[0] + param := resp.Parameter d.SetId(*param.Name) arn := arn.ARN{ @@ -76,7 +70,6 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { Resource: fmt.Sprintf("parameter/%s", strings.TrimPrefix(d.Id(), "/")), } d.Set("arn", arn.String()) - d.Set("name", param.Name) d.Set("type", param.Type) d.Set("value", param.Value) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go index a2f5f0c46..21339f1ab 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_subnet_ids.go @@ -12,6 +12,7 @@ func dataSourceAwsSubnetIDs() *schema.Resource { return &schema.Resource{ Read: dataSourceAwsSubnetIDsRead, Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), "tags": tagsSchemaComputed(), @@ -35,15 +36,29 @@ func dataSourceAwsSubnetIDsRead(d *schema.ResourceData, meta interface{}) error req := &ec2.DescribeSubnetsInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": d.Get("vpc_id").(string), - }, - ) + if vpc, vpcOk := d.GetOk("vpc_id"); vpcOk { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": vpc.(string), + }, + ) + } - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + if filters, filtersOk := d.GetOk("filter"); filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(req.Filters) == 0 { + req.Filters = nil + } log.Printf("[DEBUG] DescribeSubnets %s\n", req) resp, err := conn.DescribeSubnets(req) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go index 583d69333..b2ad03d19 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -20,6 +21,27 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, + "cidr_block_associations": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "association_id": { + Type: schema.TypeString, + Computed: true, + }, + "cidr_block": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "dhcp_options_id": { Type: schema.TypeString, Optional: true, @@ -71,6 +93,11 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), }, } @@ -141,6 +168,28 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("state", vpc.State) d.Set("tags", tagsToMap(vpc.Tags)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("vpc/%s", d.Id()), + }.String() + d.Set("arn", arn) + + cidrAssociations := []interface{}{} + for _, associationSet := range vpc.CidrBlockAssociationSet { + association := map[string]interface{}{ + "association_id": aws.StringValue(associationSet.AssociationId), + "cidr_block": aws.StringValue(associationSet.CidrBlock), + "state": aws.StringValue(associationSet.CidrBlockState.State), + } + cidrAssociations = append(cidrAssociations, association) + } + if err := d.Set("cidr_block_associations", cidrAssociations); err != nil { + return fmt.Errorf("error setting cidr_block_associations: %s", err) + } + if vpc.Ipv6CidrBlockAssociationSet != nil { d.Set("ipv6_association_id", vpc.Ipv6CidrBlockAssociationSet[0].AssociationId) d.Set("ipv6_cidr_block", vpc.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go new file mode 100644 index 000000000..00be63080 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_dhcp_options.go @@ -0,0 +1,126 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsVpcDhcpOptions() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsVpcDhcpOptionsRead, + + Schema: map[string]*schema.Schema{ + "dhcp_options_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "domain_name_servers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "filter": ec2CustomFiltersSchema(), + "netbios_name_servers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "netbios_node_type": { + Type: schema.TypeString, + Computed: true, + }, + "ntp_servers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tags": tagsSchemaComputed(), + }, + } +} + +func dataSourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeDhcpOptionsInput{} + + if v, ok := d.GetOk("dhcp_options_id"); ok && v.(string) != "" { + input.DhcpOptionsIds = []*string{aws.String(v.(string))} + } + + input.Filters = append(input.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(input.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + input.Filters = nil + } + + log.Printf("[DEBUG] Reading EC2 DHCP Options: %s", input) + output, err := conn.DescribeDhcpOptions(input) + if err != nil { + if isNoSuchDhcpOptionIDErr(err) { + return errors.New("No matching EC2 DHCP Options found") + } + return fmt.Errorf("error reading EC2 DHCP Options: %s", err) + } + + if len(output.DhcpOptions) == 0 { + return errors.New("No matching EC2 DHCP Options found") + } + + if len(output.DhcpOptions) > 1 { + return errors.New("Multiple matching EC2 DHCP Options found") + } + + dhcpOptionID := aws.StringValue(output.DhcpOptions[0].DhcpOptionsId) + d.SetId(dhcpOptionID) + d.Set("dhcp_options_id", dhcpOptionID) + + dhcpConfigurations := output.DhcpOptions[0].DhcpConfigurations + + for _, dhcpConfiguration := range dhcpConfigurations { + key := aws.StringValue(dhcpConfiguration.Key) + tfKey := strings.Replace(key, "-", "_", -1) + + if len(dhcpConfiguration.Values) == 0 { + continue + } + + switch key { + case "domain-name": + d.Set(tfKey, aws.StringValue(dhcpConfiguration.Values[0].Value)) + case "domain-name-servers": + if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { + return fmt.Errorf("error setting %s: %s", tfKey, err) + } + case "netbios-name-servers": + if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { + return fmt.Errorf("error setting %s: %s", tfKey, err) + } + case "netbios-node-type": + d.Set(tfKey, aws.StringValue(dhcpConfiguration.Values[0].Value)) + case "ntp-servers": + if err := d.Set(tfKey, flattenEc2AttributeValues(dhcpConfiguration.Values)); err != nil { + return fmt.Errorf("error setting %s: %s", tfKey, err) + } + } + } + + if err := d.Set("tags", d.Set("tags", tagsToMap(output.DhcpOptions[0].Tags))); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go index 62a5d342b..b4eaa5e7d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go @@ -86,20 +86,28 @@ func dataSourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error fetching VPC Endpoint Services: %s", err) } - if resp == nil || len(resp.ServiceNames) == 0 { + if resp == nil || (len(resp.ServiceNames) == 0 && len(resp.ServiceDetails) == 0) { return fmt.Errorf("no matching VPC Endpoint Service found") } - if len(resp.ServiceNames) > 1 { - return fmt.Errorf("multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service") - } - // Note: AWS Commercial now returns a response with `ServiceNames` and // `ServiceDetails`, but GovCloud responses only include `ServiceNames` if len(resp.ServiceDetails) == 0 { - d.SetId(strconv.Itoa(hashcode.String(*resp.ServiceNames[0]))) - d.Set("service_name", resp.ServiceNames[0]) - return nil + // GovCloud doesn't respect the filter. + names := aws.StringValueSlice(resp.ServiceNames) + for _, name := range names { + if name == serviceName { + d.SetId(strconv.Itoa(hashcode.String(name))) + d.Set("service_name", name) + return nil + } + } + + return fmt.Errorf("no matching VPC Endpoint Service found") + } + + if len(resp.ServiceDetails) > 1 { + return fmt.Errorf("multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service") } sd := resp.ServiceDetails[0] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go index a78e35f03..b3f1cca8e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc_peering_connection.go @@ -67,12 +67,12 @@ func dataSourceAwsVpcPeeringConnection() *schema.Resource { "accepter": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "requester": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "filter": ec2CustomFiltersSchema(), "tags": tagsSchemaComputed(), @@ -140,13 +140,13 @@ func dataSourceAwsVpcPeeringConnectionRead(d *schema.ResourceData, meta interfac d.Set("tags", tagsToMap(pcx.Tags)) if pcx.AccepterVpcInfo.PeeringOptions != nil { - if err := d.Set("accepter", flattenPeeringOptions(pcx.AccepterVpcInfo.PeeringOptions)[0]); err != nil { + if err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pcx.AccepterVpcInfo.PeeringOptions)[0]); err != nil { return err } } if pcx.RequesterVpcInfo.PeeringOptions != nil { - if err := d.Set("requester", flattenPeeringOptions(pcx.RequesterVpcInfo.PeeringOptions)[0]); err != nil { + if err := d.Set("requester", flattenVpcPeeringConnectionOptions(pcx.RequesterVpcInfo.PeeringOptions)[0]); err != nil { return err } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go new file mode 100644 index 000000000..b51053d8c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpcs.go @@ -0,0 +1,77 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsVpcs() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsVpcsRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsVpcsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + req := &ec2.DescribeVpcsInput{} + + if tagsOk { + req.Filters = buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + ) + } + + if filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeVpcs %s\n", req) + resp, err := conn.DescribeVpcs(req) + if err != nil { + return err + } + + if resp == nil || len(resp.Vpcs) == 0 { + return fmt.Errorf("no matching VPC found") + } + + vpcs := make([]string, 0) + + for _, vpc := range resp.Vpcs { + vpcs = append(vpcs, aws.StringValue(vpc.VpcId)) + } + + d.SetId(time.Now().UTC().String()) + if err := d.Set("ids", vpcs); err != nil { + return fmt.Errorf("Error setting vpc ids: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go new file mode 100644 index 000000000..ea659c7b6 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go @@ -0,0 +1,114 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { + resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() + if err != nil { + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) + } + if state == directconnect.VirtualInterfaceStateDeleted { + return nil, nil + } + + return resp.(*directconnect.VirtualInterface), nil +} + +func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + log.Printf("[DEBUG] Deleting Direct Connect virtual interface: %s", d.Id()) + _, err := conn.DeleteVirtualInterface(&directconnect.DeleteVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { + return nil + } + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) + } + + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDeleting, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStatePending, + directconnect.VirtualInterfaceStateRejected, + directconnect.VirtualInterfaceStateVerifying, + }, + Target: []string{ + directconnect.VirtualInterfaceStateDeleted, + }, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeVirtualInterfaces(&directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(vifId), + }) + if err != nil { + return nil, "", err + } + + n := len(resp.VirtualInterfaces) + switch n { + case 0: + return "", directconnect.VirtualInterfaceStateDeleted, nil + + case 1: + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) + } + } +} + +func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go index 9c74e297a..08ea5c78e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go @@ -73,13 +73,14 @@ func (self *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc) { func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { raw := map[string]interface{}{} - // As a special case, IAM considers the string value "*" to be - // equivalent to "AWS": "*", and normalizes policies as such. - // We'll follow their lead and do the same normalization here. - // IAM also considers {"*": "*"} to be equivalent to this. + // Although IAM documentation says, that "*" and {"AWS": "*"} are equivalent + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html), + // in practice they are not for IAM roles. IAM will return an error if trust + // policy have "*" or {"*": "*"} as principal, but will accept {"AWS": "*"}. + // Only {"*": "*"} should be normalized to "*". if len(ps) == 1 { p := ps[0] - if p.Type == "AWS" || p.Type == "*" { + if p.Type == "*" { if sv, ok := p.Identifiers.(string); ok && sv == "*" { return []byte(`"*"`), nil } @@ -101,7 +102,7 @@ func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { case string: raw[p.Type] = i default: - panic("Unsupported data type for IAMPolicyStatementPrincipalSet") + return []byte{}, fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", i) } } @@ -121,10 +122,21 @@ func (ps *IAMPolicyStatementPrincipalSet) UnmarshalJSON(b []byte) error { out = append(out, IAMPolicyStatementPrincipal{Type: "*", Identifiers: []string{"*"}}) case map[string]interface{}: for key, value := range data.(map[string]interface{}) { - out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: value}) + switch vt := value.(type) { + case string: + out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: value.(string)}) + case []interface{}: + values := []string{} + for _, v := range value.([]interface{}) { + values = append(values, v.(string)) + } + out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: values}) + default: + return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet.Identifiers", vt) + } } default: - return fmt.Errorf("Unsupported data type %s for IAMPolicyStatementPrincipalSet", t) + return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", t) } *ps = out diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go new file mode 100644 index 000000000..067e704e2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_dx_gateway.go @@ -0,0 +1,48 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +// Direct Connect Gateway import also imports all assocations +func resourceAwsDxGatewayImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + conn := meta.(*AWSClient).dxconn + + id := d.Id() + resp, err := conn.DescribeDirectConnectGateways(&directconnect.DescribeDirectConnectGatewaysInput{ + DirectConnectGatewayId: aws.String(id), + }) + if err != nil { + return nil, err + } + if len(resp.DirectConnectGateways) < 1 || resp.DirectConnectGateways[0] == nil { + return nil, fmt.Errorf("Direct Connect Gateway %s was not found", id) + } + results := make([]*schema.ResourceData, 1) + results[0] = d + + { + subResource := resourceAwsDxGatewayAssociation() + resp, err := conn.DescribeDirectConnectGatewayAssociations(&directconnect.DescribeDirectConnectGatewayAssociationsInput{ + DirectConnectGatewayId: aws.String(id), + }) + if err != nil { + return nil, err + } + + for _, assoc := range resp.DirectConnectGatewayAssociations { + d := subResource.Data(nil) + d.SetType("aws_dx_gateway_association") + d.Set("dx_gateway_id", assoc.DirectConnectGatewayId) + d.Set("vpn_gateway_id", assoc.VirtualGatewayId) + d.SetId(dxGatewayAssociationId(aws.StringValue(assoc.DirectConnectGatewayId), aws.StringValue(assoc.VirtualGatewayId))) + results = append(results, d) + } + } + + return results, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go index 185d99411..d96b73249 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_route_table.go @@ -40,6 +40,10 @@ func resourceAwsRouteTableImportState( continue } + if route.Origin != nil && *route.Origin == "EnableVgwRoutePropagation" { + continue + } + if route.DestinationPrefixListId != nil { // Skipping because VPC endpoint routes are handled separately // See aws_vpc_endpoint diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go index c57f82222..5b92c8d9f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go @@ -99,13 +99,151 @@ func protocolIntegers() map[string]int { var protocolIntegers = make(map[string]int) protocolIntegers = map[string]int{ // defined at https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - "ah": 51, - "esp": 50, - "udp": 17, - "tcp": 6, - "icmp": 1, - "all": -1, - "vrrp": 112, + "all": -1, + "hopopt": 0, + "icmp": 1, + "igmp": 2, + "ggp": 3, + "ipv4": 4, + "st": 5, + "tcp": 6, + "cbt": 7, + "egp": 8, + "igp": 9, + "bbn-rcc-mon": 10, + "nvp-ii": 11, + "pup": 12, + "argus": 13, + "emcon": 14, + "xnet": 15, + "chaos": 16, + "udp": 17, + "mux": 18, + "dcn-meas": 19, + "hmp": 20, + "prm": 21, + "xns-idp": 22, + "trunk-1": 23, + "trunk-2": 24, + "leaf-1": 25, + "leaf-2": 26, + "rdp": 27, + "irtp": 28, + "iso-tp4": 29, + "netblt": 30, + "mfe-nsp": 31, + "merit-inp": 32, + "dccp": 33, + "3pc": 34, + "idpr": 35, + "xtp": 36, + "ddp": 37, + "idpr-cmtp": 38, + "tp++": 39, + "il": 40, + "ipv6": 41, + "sdrp": 42, + "ipv6-route": 43, + "ipv6-frag": 44, + "idrp": 45, + "rsvp": 46, + "gre": 47, + "dsr": 48, + "bna": 49, + "esp": 50, + "ah": 51, + "i-nlsp": 52, + "swipe": 53, + "narp": 54, + "mobile": 55, + "tlsp": 56, + "ipv6-icmp": 58, + "ipv6-nonxt": 59, + "ipv6-opts": 60, + "61": 61, + "cftp": 62, + "63": 63, + "sat-expak": 64, + "kryptolan": 65, + "rvd": 66, + "ippc": 67, + "68": 68, + "sat-mon": 69, + "visa": 70, + "ipcv": 71, + "cpnx": 72, + "cphb": 73, + "wsn": 74, + "pvp": 75, + "br-sat-mon": 76, + "sun-nd": 77, + "wb-mon": 78, + "wb-expak": 79, + "iso-ip": 80, + "vmtp": 81, + "secure-vmtp": 82, + "vines": 83, + "ttp": 84, + "nsfnet-igp": 85, + "dgp": 86, + "tcf": 87, + "eigrp": 88, + "ospfigp": 89, + "sprite-rpc": 90, + "larp": 91, + "mtp": 92, + "ax.25": 93, + "ipip": 94, + "micp": 95, + "scc-sp": 96, + "etherip": 97, + "encap": 98, + "99": 99, + "gmtp": 100, + "ifmp": 101, + "pnni": 102, + "pim": 103, + "aris": 104, + "scps": 105, + "qnx": 106, + "a/n": 107, + "ipcomp": 108, + "snp": 109, + "compaq-peer": 110, + "ipx-in-ip": 111, + "vrrp": 112, + "pgm": 113, + "114": 114, + "l2tp": 115, + "dd": 116, + "iatp": 117, + "stp": 118, + "srp": 119, + "uti": 120, + "smp": 121, + "sm": 122, + "ptp": 123, + "isis-over-ipv4": 124, + "fire": 125, + "crtp": 126, + "crudp": 127, + "sscopmce": 128, + "iplt": 129, + "sps": 130, + "pipe": 131, + "sctp": 132, + "fc": 133, + "rsvp-e2e-ignore": 134, + "mobility-header": 135, + "udplite": 136, + "mpls-in-ip": 137, + "manet": 138, + "hip": 139, + "shim6": 140, + "wesp": 141, + "rohc": 142, + "253": 253, + "254": 254, } return protocolIntegers } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go index 682ed272f..398b0388d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go @@ -161,18 +161,28 @@ func Provider() terraform.ResourceProvider { DataSourcesMap: map[string]*schema.Resource{ "aws_acm_certificate": dataSourceAwsAcmCertificate(), + "aws_acmpca_certificate_authority": dataSourceAwsAcmpcaCertificateAuthority(), "aws_ami": dataSourceAwsAmi(), "aws_ami_ids": dataSourceAwsAmiIds(), + "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), + "aws_arn": dataSourceAwsArn(), "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), "aws_availability_zone": dataSourceAwsAvailabilityZone(), "aws_availability_zones": dataSourceAwsAvailabilityZones(), + "aws_batch_compute_environment": dataSourceAwsBatchComputeEnvironment(), + "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), "aws_caller_identity": dataSourceAwsCallerIdentity(), "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), + "aws_cloudformation_export": dataSourceAwsCloudFormationExport(), "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), + "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), + "aws_cognito_user_pools": dataSourceAwsCognitoUserPools(), + "aws_codecommit_repository": dataSourceAwsCodeCommitRepository(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), + "aws_dx_gateway": dataSourceAwsDxGateway(), "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), @@ -180,10 +190,12 @@ func Provider() terraform.ResourceProvider { "aws_ecr_repository": dataSourceAwsEcrRepository(), "aws_ecs_cluster": dataSourceAwsEcsCluster(), "aws_ecs_container_definition": dataSourceAwsEcsContainerDefinition(), + "aws_ecs_service": dataSourceAwsEcsService(), "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), "aws_efs_file_system": dataSourceAwsEfsFileSystem(), "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), "aws_eip": dataSourceAwsEip(), + "aws_eks_cluster": dataSourceAwsEksCluster(), "aws_elastic_beanstalk_hosted_zone": dataSourceAwsElasticBeanstalkHostedZone(), "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), @@ -191,6 +203,7 @@ func Provider() terraform.ResourceProvider { "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), "aws_elb_service_account": dataSourceAwsElbServiceAccount(), + "aws_glue_script": dataSourceAwsGlueScript(), "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), "aws_iam_group": dataSourceAwsIAMGroup(), "aws_iam_instance_profile": dataSourceAwsIAMInstanceProfile(), @@ -200,6 +213,7 @@ func Provider() terraform.ResourceProvider { "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), "aws_iam_user": dataSourceAwsIAMUser(), "aws_internet_gateway": dataSourceAwsInternetGateway(), + "aws_iot_endpoint": dataSourceAwsIotEndpoint(), "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), "aws_instance": dataSourceAwsInstance(), "aws_instances": dataSourceAwsInstances(), @@ -209,23 +223,40 @@ func Provider() terraform.ResourceProvider { "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), "aws_kms_key": dataSourceAwsKmsKey(), "aws_kms_secret": dataSourceAwsKmsSecret(), + "aws_kms_secrets": dataSourceAwsKmsSecrets(), + "aws_lambda_function": dataSourceAwsLambdaFunction(), + "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), + "aws_launch_configuration": dataSourceAwsLaunchConfiguration(), + "aws_mq_broker": dataSourceAwsMqBroker(), "aws_nat_gateway": dataSourceAwsNatGateway(), + "aws_network_acls": dataSourceAwsNetworkAcls(), "aws_network_interface": dataSourceAwsNetworkInterface(), + "aws_network_interfaces": dataSourceAwsNetworkInterfaces(), "aws_partition": dataSourceAwsPartition(), "aws_prefix_list": dataSourceAwsPrefixList(), + "aws_pricing_product": dataSourceAwsPricingProduct(), "aws_rds_cluster": dataSourceAwsRdsCluster(), + "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), "aws_region": dataSourceAwsRegion(), + "aws_route": dataSourceAwsRoute(), "aws_route_table": dataSourceAwsRouteTable(), + "aws_route_tables": dataSourceAwsRouteTables(), "aws_route53_zone": dataSourceAwsRoute53Zone(), "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), + "aws_secretsmanager_secret": dataSourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": dataSourceAwsSecretsManagerSecretVersion(), "aws_sns_topic": dataSourceAwsSnsTopic(), + "aws_sqs_queue": dataSourceAwsSqsQueue(), "aws_ssm_parameter": dataSourceAwsSsmParameter(), "aws_subnet": dataSourceAwsSubnet(), "aws_subnet_ids": dataSourceAwsSubnetIDs(), + "aws_vpcs": dataSourceAwsVpcs(), "aws_security_group": dataSourceAwsSecurityGroup(), + "aws_security_groups": dataSourceAwsSecurityGroups(), "aws_vpc": dataSourceAwsVpc(), + "aws_vpc_dhcp_options": dataSourceAwsVpcDhcpOptions(), "aws_vpc_endpoint": dataSourceAwsVpcEndpoint(), "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), @@ -241,341 +272,387 @@ func Provider() terraform.ResourceProvider { }, ResourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": resourceAwsAcmCertificate(), - "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), - "aws_ami": resourceAwsAmi(), - "aws_ami_copy": resourceAwsAmiCopy(), - "aws_ami_from_instance": resourceAwsAmiFromInstance(), - "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), - "aws_api_gateway_account": resourceAwsApiGatewayAccount(), - "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), - "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), - "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), - "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), - "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), - "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), - "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), - "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), - "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), - "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), - "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), - "aws_api_gateway_method": resourceAwsApiGatewayMethod(), - "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), - "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), - "aws_api_gateway_model": resourceAwsApiGatewayModel(), - "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), - "aws_api_gateway_resource": resourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), - "aws_api_gateway_stage": resourceAwsApiGatewayStage(), - "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), - "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), - "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), - "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), - "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), - "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), - "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), - "aws_appsync_datasource": resourceAwsAppsyncDatasource(), - "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), - "aws_athena_database": resourceAwsAthenaDatabase(), - "aws_athena_named_query": resourceAwsAthenaNamedQuery(), - "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), - "aws_autoscaling_group": resourceAwsAutoscalingGroup(), - "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), - "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), - "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), - "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), - "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), - "aws_cloudformation_stack": resourceAwsCloudFormationStack(), - "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), - "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), - "aws_cloudtrail": resourceAwsCloudTrail(), - "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), - "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), - "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), - "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), - "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), - "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), - "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), - "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), - "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), - "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), - "aws_config_config_rule": resourceAwsConfigConfigRule(), - "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), - "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), - "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), - "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), - "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), - "aws_cognito_user_group": resourceAwsCognitoUserGroup(), - "aws_cognito_user_pool": resourceAwsCognitoUserPool(), - "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), - "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), - "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), - "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), - "aws_codedeploy_app": resourceAwsCodeDeployApp(), - "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), - "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), - "aws_codecommit_repository": resourceAwsCodeCommitRepository(), - "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), - "aws_codebuild_project": resourceAwsCodeBuildProject(), - "aws_codepipeline": resourceAwsCodePipeline(), - "aws_customer_gateway": resourceAwsCustomerGateway(), - "aws_dax_cluster": resourceAwsDaxCluster(), - "aws_db_event_subscription": resourceAwsDbEventSubscription(), - "aws_db_instance": resourceAwsDbInstance(), - "aws_db_option_group": resourceAwsDbOptionGroup(), - "aws_db_parameter_group": resourceAwsDbParameterGroup(), - "aws_db_security_group": resourceAwsDbSecurityGroup(), - "aws_db_snapshot": resourceAwsDbSnapshot(), - "aws_db_subnet_group": resourceAwsDbSubnetGroup(), - "aws_devicefarm_project": resourceAwsDevicefarmProject(), - "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), - "aws_dms_certificate": resourceAwsDmsCertificate(), - "aws_dms_endpoint": resourceAwsDmsEndpoint(), - "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), - "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), - "aws_dms_replication_task": resourceAwsDmsReplicationTask(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_connection": resourceAwsDxConnection(), - "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_acm_certificate": resourceAwsAcmCertificate(), + "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), + "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), + "aws_ami": resourceAwsAmi(), + "aws_ami_copy": resourceAwsAmiCopy(), + "aws_ami_from_instance": resourceAwsAmiFromInstance(), + "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), + "aws_api_gateway_account": resourceAwsApiGatewayAccount(), + "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), + "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), + "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), + "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), + "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), + "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), + "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), + "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), + "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), + "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), + "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), + "aws_api_gateway_method": resourceAwsApiGatewayMethod(), + "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), + "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), + "aws_api_gateway_model": resourceAwsApiGatewayModel(), + "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), + "aws_api_gateway_resource": resourceAwsApiGatewayResource(), + "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), + "aws_api_gateway_stage": resourceAwsApiGatewayStage(), + "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), + "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), + "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), + "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), + "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), + "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), + "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appsync_api_key": resourceAwsAppsyncApiKey(), + "aws_appsync_datasource": resourceAwsAppsyncDatasource(), + "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), + "aws_athena_database": resourceAwsAthenaDatabase(), + "aws_athena_named_query": resourceAwsAthenaNamedQuery(), + "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), + "aws_autoscaling_group": resourceAwsAutoscalingGroup(), + "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), + "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), + "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), + "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), + "aws_budgets_budget": resourceAwsBudgetsBudget(), + "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), + "aws_cloudformation_stack": resourceAwsCloudFormationStack(), + "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), + "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), + "aws_cloudtrail": resourceAwsCloudTrail(), + "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), + "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), + "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), + "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), + "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), + "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), + "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), + "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), + "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), + "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), + "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), + "aws_config_config_rule": resourceAwsConfigConfigRule(), + "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), + "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), + "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), + "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), + "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), + "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), + "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), + "aws_cognito_user_group": resourceAwsCognitoUserGroup(), + "aws_cognito_user_pool": resourceAwsCognitoUserPool(), + "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), + "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), + "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), + "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), + "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), + "aws_codedeploy_app": resourceAwsCodeDeployApp(), + "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), + "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), + "aws_codecommit_repository": resourceAwsCodeCommitRepository(), + "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), + "aws_codebuild_project": resourceAwsCodeBuildProject(), + "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), + "aws_codepipeline": resourceAwsCodePipeline(), + "aws_customer_gateway": resourceAwsCustomerGateway(), + "aws_dax_cluster": resourceAwsDaxCluster(), + "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), + "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), + "aws_db_event_subscription": resourceAwsDbEventSubscription(), + "aws_db_instance": resourceAwsDbInstance(), + "aws_db_option_group": resourceAwsDbOptionGroup(), + "aws_db_parameter_group": resourceAwsDbParameterGroup(), + "aws_db_security_group": resourceAwsDbSecurityGroup(), + "aws_db_snapshot": resourceAwsDbSnapshot(), + "aws_db_subnet_group": resourceAwsDbSubnetGroup(), + "aws_devicefarm_project": resourceAwsDevicefarmProject(), + "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), + "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), + "aws_dms_certificate": resourceAwsDmsCertificate(), + "aws_dms_endpoint": resourceAwsDmsEndpoint(), + "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), + "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), + "aws_dms_replication_task": resourceAwsDmsReplicationTask(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_connection": resourceAwsDxConnection(), + "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), + "aws_dx_gateway": resourceAwsDxGateway(), + "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), + "aws_dx_hosted_private_virtual_interface": resourceAwsDxHostedPrivateVirtualInterface(), + "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), + "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), + "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), + "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point @@ -650,6 +727,10 @@ func init() { "ec2_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "autoscaling_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + + "efs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "elb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "es_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -662,6 +743,8 @@ func init() { "sqs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "ssm_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "insecure": "Explicitly allow the provider to perform \"insecure\" SSL requests. If omitted," + "default value is `false`", @@ -753,8 +836,10 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.DeviceFarmEndpoint = endpoints["devicefarm"].(string) config.DynamoDBEndpoint = endpoints["dynamodb"].(string) config.Ec2Endpoint = endpoints["ec2"].(string) + config.AutoscalingEndpoint = endpoints["autoscaling"].(string) config.EcrEndpoint = endpoints["ecr"].(string) config.EcsEndpoint = endpoints["ecs"].(string) + config.EfsEndpoint = endpoints["efs"].(string) config.ElbEndpoint = endpoints["elb"].(string) config.EsEndpoint = endpoints["es"].(string) config.IamEndpoint = endpoints["iam"].(string) @@ -767,6 +852,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.SnsEndpoint = endpoints["sns"].(string) config.SqsEndpoint = endpoints["sqs"].(string) config.StsEndpoint = endpoints["sts"].(string) + config.SsmEndpoint = endpoints["ssm"].(string) } if v, ok := d.GetOk("allowed_account_ids"); ok { @@ -886,6 +972,13 @@ func endpointsSchema() *schema.Schema { Description: descriptions["ec2_endpoint"], }, + "autoscaling": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["autoscaling_endpoint"], + }, + "ecr": { Type: schema.TypeString, Optional: true, @@ -900,6 +993,13 @@ func endpointsSchema() *schema.Schema { Description: descriptions["ecs_endpoint"], }, + "efs": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["efs_endpoint"], + }, + "elb": { Type: schema.TypeString, Optional: true, @@ -966,6 +1066,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["sts_endpoint"], }, + "ssm": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["ssm_endpoint"], + }, }, }, Set: endpointsToHash, @@ -984,6 +1090,8 @@ func endpointsToHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["dynamodb"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["iam"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["ec2"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["autoscaling"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["efs"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["elb"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["kinesis"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["kms"].(string))) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go index c045f62d7..14beef1d3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go @@ -251,6 +251,5 @@ func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error deleting certificate: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go index 024b26897..226759b71 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go @@ -160,6 +160,5 @@ func resourceAwsAcmCertificateValidationRead(d *schema.ResourceData, meta interf func resourceAwsAcmCertificateValidationDelete(d *schema.ResourceData, meta interface{}) error { // No need to do anything, certificate will be deleted when acm_certificate is deleted - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go new file mode 100644 index 000000000..81bc3479f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go @@ -0,0 +1,736 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAcmpcaCertificateAuthority() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAcmpcaCertificateAuthorityCreate, + Read: resourceAwsAcmpcaCertificateAuthorityRead, + Update: resourceAwsAcmpcaCertificateAuthorityUpdate, + Delete: resourceAwsAcmpcaCertificateAuthorityDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "certificate": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html + "certificate_authority_configuration": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key_algorithm": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.KeyAlgorithmEcPrime256v1, + acmpca.KeyAlgorithmEcSecp384r1, + acmpca.KeyAlgorithmRsa2048, + acmpca.KeyAlgorithmRsa4096, + }, false), + }, + "signing_algorithm": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.SigningAlgorithmSha256withecdsa, + acmpca.SigningAlgorithmSha256withrsa, + acmpca.SigningAlgorithmSha384withecdsa, + acmpca.SigningAlgorithmSha384withrsa, + acmpca.SigningAlgorithmSha512withecdsa, + acmpca.SigningAlgorithmSha512withrsa, + }, false), + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ASN1Subject.html + "subject": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "common_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "country": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 2), + }, + "distinguished_name_qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "generation_qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 3), + }, + "given_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 16), + }, + "initials": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 5), + }, + "locality": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "organization": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "organizational_unit": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "pseudonym": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "state": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "surname": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 40), + }, + "title": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + }, + }, + }, + }, + }, + }, + "certificate_chain": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_signing_request": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "not_after": { + Type: schema.TypeString, + Computed: true, + }, + "not_before": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html + "revocation_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html + "crl_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "custom_cname": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 253), + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + }, + // ValidationException: 1 validation error detected: Value null or empty at 'expirationInDays' failed to satisfy constraint: Member must not be null or empty. + // InvalidParameter: 1 validation error(s) found. minimum field value of 1, CreateCertificateAuthorityInput.RevocationConfiguration.CrlConfiguration.ExpirationInDays. + "expiration_in_days": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 5000), + }, + "s3_bucket_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 255), + }, + }, + }, + }, + }, + }, + }, + "serial": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), + "type": { + Type: schema.TypeString, + Optional: true, + Default: acmpca.CertificateAuthorityTypeSubordinate, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.CertificateAuthorityTypeSubordinate, + }, false), + }, + }, + } +} + +func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + input := &acmpca.CreateCertificateAuthorityInput{ + CertificateAuthorityConfiguration: expandAcmpcaCertificateAuthorityConfiguration(d.Get("certificate_authority_configuration").([]interface{})), + CertificateAuthorityType: aws.String(d.Get("type").(string)), + RevocationConfiguration: expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})), + } + + log.Printf("[DEBUG] Creating ACMPCA Certificate Authority: %s", input) + var output *acmpca.CreateCertificateAuthorityOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = conn.CreateCertificateAuthority(input) + if err != nil { + // ValidationException: The ACM Private CA service account 'acm-pca-prod-pdx' requires getBucketAcl permissions for your S3 bucket 'tf-acc-test-5224996536060125340'. Check your S3 bucket permissions and try again. + if isAWSErr(err, "ValidationException", "Check your S3 bucket permissions and try again") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating ACMPCA Certificate Authority: %s", err) + } + + d.SetId(aws.StringValue(output.CertificateAuthorityArn)) + + if v, ok := d.GetOk("tags"); ok { + input := &acmpca.TagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: tagsFromMapACMPCA(v.(map[string]interface{})), + } + + log.Printf("[DEBUG] Tagging ACMPCA Certificate Authority: %s", input) + _, err := conn.TagCertificateAuthority(input) + if err != nil { + return fmt.Errorf("error tagging ACMPCA Certificate Authority %q: %s", d.Id(), input) + } + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + "", + acmpca.CertificateAuthorityStatusCreating, + }, + Target: []string{ + acmpca.CertificateAuthorityStatusActive, + acmpca.CertificateAuthorityStatusPendingCertificate, + }, + Refresh: acmpcaCertificateAuthorityRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for ACMPCA Certificate Authority %q to be active or pending certificate: %s", d.Id(), err) + } + + return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) +} + +func resourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) + + describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) + } + + if describeCertificateAuthorityOutput.CertificateAuthority == nil { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority + + d.Set("arn", certificateAuthority.Arn) + + if err := d.Set("certificate_authority_configuration", flattenAcmpcaCertificateAuthorityConfiguration(certificateAuthority.CertificateAuthorityConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("enabled", (aws.StringValue(certificateAuthority.Status) != acmpca.CertificateAuthorityStatusDisabled)) + d.Set("not_after", certificateAuthority.NotAfter) + d.Set("not_before", certificateAuthority.NotBefore) + + if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("serial", certificateAuthority.Serial) + d.Set("status", certificateAuthority.Status) + d.Set("type", certificateAuthority.Type) + + getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) + + getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + // Returned when in PENDING_CERTIFICATE status + // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. + if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) + } + } + + d.Set("certificate", "") + d.Set("certificate_chain", "") + if getCertificateAuthorityCertificateOutput != nil { + d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) + d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) + } + + getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) + + getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) + } + + d.Set("certificate_signing_request", "") + if getCertificateAuthorityCsrOutput != nil { + d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) + } + + tags, err := listAcmpcaTags(conn, d.Id()) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + updateCertificateAuthority := false + + input := &acmpca.UpdateCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + if d.HasChange("enabled") { + input.Status = aws.String(acmpca.CertificateAuthorityStatusActive) + if !d.Get("enabled").(bool) { + input.Status = aws.String(acmpca.CertificateAuthorityStatusDisabled) + } + updateCertificateAuthority = true + } + + if d.HasChange("revocation_configuration") { + input.RevocationConfiguration = expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})) + updateCertificateAuthority = true + } + + if updateCertificateAuthority { + log.Printf("[DEBUG] Updating ACMPCA Certificate Authority: %s", input) + _, err := conn.UpdateCertificateAuthority(input) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority: %s", err) + } + } + + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsACMPCA(tagsFromMapACMPCA(o), tagsFromMapACMPCA(n)) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing ACMPCA Certificate Authority %q tags: %#v", d.Id(), remove) + _, err := conn.UntagCertificateAuthority(&acmpca.UntagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: remove, + }) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating ACMPCA Certificate Authority %q tags: %#v", d.Id(), create) + _, err := conn.TagCertificateAuthority(&acmpca.TagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + } + } + + return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) +} + +func resourceAwsAcmpcaCertificateAuthorityDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + input := &acmpca.DeleteCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting ACMPCA Certificate Authority: %s", input) + _, err := conn.DeleteCertificateAuthority(input) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting ACMPCA Certificate Authority: %s", err) + } + + return nil +} + +func acmpcaCertificateAuthorityRefreshFunc(conn *acmpca.ACMPCA, certificateAuthorityArn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", input) + output, err := conn.DescribeCertificateAuthority(input) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + return nil, "", nil + } + return nil, "", err + } + + if output == nil || output.CertificateAuthority == nil { + return nil, "", nil + } + + return output.CertificateAuthority, aws.StringValue(output.CertificateAuthority.Status), nil + } +} + +func expandAcmpcaASN1Subject(l []interface{}) *acmpca.ASN1Subject { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + subject := &acmpca.ASN1Subject{} + if v, ok := m["common_name"]; ok && v.(string) != "" { + subject.CommonName = aws.String(v.(string)) + } + if v, ok := m["country"]; ok && v.(string) != "" { + subject.Country = aws.String(v.(string)) + } + if v, ok := m["distinguished_name_qualifier"]; ok && v.(string) != "" { + subject.DistinguishedNameQualifier = aws.String(v.(string)) + } + if v, ok := m["generation_qualifier"]; ok && v.(string) != "" { + subject.GenerationQualifier = aws.String(v.(string)) + } + if v, ok := m["given_name"]; ok && v.(string) != "" { + subject.GivenName = aws.String(v.(string)) + } + if v, ok := m["initials"]; ok && v.(string) != "" { + subject.Initials = aws.String(v.(string)) + } + if v, ok := m["locality"]; ok && v.(string) != "" { + subject.Locality = aws.String(v.(string)) + } + if v, ok := m["organization"]; ok && v.(string) != "" { + subject.Organization = aws.String(v.(string)) + } + if v, ok := m["organizational_unit"]; ok && v.(string) != "" { + subject.OrganizationalUnit = aws.String(v.(string)) + } + if v, ok := m["pseudonym"]; ok && v.(string) != "" { + subject.Pseudonym = aws.String(v.(string)) + } + if v, ok := m["state"]; ok && v.(string) != "" { + subject.State = aws.String(v.(string)) + } + if v, ok := m["surname"]; ok && v.(string) != "" { + subject.Surname = aws.String(v.(string)) + } + if v, ok := m["title"]; ok && v.(string) != "" { + subject.Title = aws.String(v.(string)) + } + + return subject +} + +func expandAcmpcaCertificateAuthorityConfiguration(l []interface{}) *acmpca.CertificateAuthorityConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.CertificateAuthorityConfiguration{ + KeyAlgorithm: aws.String(m["key_algorithm"].(string)), + SigningAlgorithm: aws.String(m["signing_algorithm"].(string)), + Subject: expandAcmpcaASN1Subject(m["subject"].([]interface{})), + } + + return config +} + +func expandAcmpcaCrlConfiguration(l []interface{}) *acmpca.CrlConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.CrlConfiguration{ + Enabled: aws.Bool(m["enabled"].(bool)), + } + + if v, ok := m["custom_cname"]; ok && v.(string) != "" { + config.CustomCname = aws.String(v.(string)) + } + if v, ok := m["expiration_in_days"]; ok && v.(int) > 0 { + config.ExpirationInDays = aws.Int64(int64(v.(int))) + } + if v, ok := m["s3_bucket_name"]; ok && v.(string) != "" { + config.S3BucketName = aws.String(v.(string)) + } + + return config +} + +func expandAcmpcaRevocationConfiguration(l []interface{}) *acmpca.RevocationConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.RevocationConfiguration{ + CrlConfiguration: expandAcmpcaCrlConfiguration(m["crl_configuration"].([]interface{})), + } + + return config +} + +func flattenAcmpcaASN1Subject(subject *acmpca.ASN1Subject) []interface{} { + if subject == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "common_name": aws.StringValue(subject.CommonName), + "country": aws.StringValue(subject.Country), + "distinguished_name_qualifier": aws.StringValue(subject.DistinguishedNameQualifier), + "generation_qualifier": aws.StringValue(subject.GenerationQualifier), + "given_name": aws.StringValue(subject.GivenName), + "initials": aws.StringValue(subject.Initials), + "locality": aws.StringValue(subject.Locality), + "organization": aws.StringValue(subject.Organization), + "organizational_unit": aws.StringValue(subject.OrganizationalUnit), + "pseudonym": aws.StringValue(subject.Pseudonym), + "state": aws.StringValue(subject.State), + "surname": aws.StringValue(subject.Surname), + "title": aws.StringValue(subject.Title), + } + + return []interface{}{m} +} + +func flattenAcmpcaCertificateAuthorityConfiguration(config *acmpca.CertificateAuthorityConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "key_algorithm": aws.StringValue(config.KeyAlgorithm), + "signing_algorithm": aws.StringValue(config.SigningAlgorithm), + "subject": flattenAcmpcaASN1Subject(config.Subject), + } + + return []interface{}{m} +} + +func flattenAcmpcaCrlConfiguration(config *acmpca.CrlConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "custom_cname": aws.StringValue(config.CustomCname), + "enabled": aws.BoolValue(config.Enabled), + "expiration_in_days": int(aws.Int64Value(config.ExpirationInDays)), + "s3_bucket_name": aws.StringValue(config.S3BucketName), + } + + return []interface{}{m} +} + +func flattenAcmpcaRevocationConfiguration(config *acmpca.RevocationConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "crl_configuration": flattenAcmpcaCrlConfiguration(config.CrlConfiguration), + } + + return []interface{}{m} +} + +func listAcmpcaCertificateAuthorities(conn *acmpca.ACMPCA) ([]*acmpca.CertificateAuthority, error) { + certificateAuthorities := []*acmpca.CertificateAuthority{} + input := &acmpca.ListCertificateAuthoritiesInput{} + + for { + output, err := conn.ListCertificateAuthorities(input) + if err != nil { + return certificateAuthorities, err + } + for _, certificateAuthority := range output.CertificateAuthorities { + certificateAuthorities = append(certificateAuthorities, certificateAuthority) + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + return certificateAuthorities, nil +} + +func listAcmpcaTags(conn *acmpca.ACMPCA, certificateAuthorityArn string) ([]*acmpca.Tag, error) { + tags := []*acmpca.Tag{} + input := &acmpca.ListTagsInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + for { + output, err := conn.ListTags(input) + if err != nil { + return tags, err + } + for _, tag := range output.Tags { + tags = append(tags, tag) + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + return tags, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go index bab340bf7..71b8f1e5b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go @@ -307,8 +307,6 @@ func resourceAwsAmiDelete(d *schema.ResourceData, meta interface{}) error { return err } - // No error, ami was deleted successfully - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go index 7b786270a..29365633b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_account.go @@ -22,21 +22,21 @@ func resourceAwsApiGatewayAccount() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "cloudwatch_role_arn": &schema.Schema{ + "cloudwatch_role_arn": { Type: schema.TypeString, Optional: true, }, - "throttle_settings": &schema.Schema{ + "throttle_settings": { Type: schema.TypeList, Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "burst_limit": &schema.Schema{ + "burst_limit": { Type: schema.TypeInt, Computed: true, }, - "rate_limit": &schema.Schema{ + "rate_limit": { Type: schema.TypeFloat, Computed: true, }, @@ -122,6 +122,5 @@ func resourceAwsApiGatewayAccountUpdate(d *schema.ResourceData, meta interface{} func resourceAwsApiGatewayAccountDelete(d *schema.ResourceData, meta interface{}) error { // There is no API for "deleting" account or resetting it to "default" settings - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go index ec8b151a6..7748a74ec 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_api_key.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -98,7 +97,7 @@ func resourceAwsApiGatewayApiKeyCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error creating API Gateway: %s", err) } - d.SetId(*apiKey.Id) + d.SetId(aws.StringValue(apiKey.Id)) return resourceAwsApiGatewayApiKeyRead(d, meta) } @@ -112,7 +111,7 @@ func resourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) e IncludeValue: aws.Bool(true), }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { log.Printf("[WARN] API Gateway API Key (%s) not found, removing from state", d.Id()) d.SetId("") return nil @@ -195,8 +194,10 @@ func resourceAwsApiGatewayApiKeyDelete(d *schema.ResourceData, meta interface{}) return nil } - if apigatewayErr, ok := err.(awserr.Error); ok && apigatewayErr.Code() == "NotFoundException" { - return nil + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return nil + } } return resource.NonRetryableError(err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go index 2e9c557c3..f8fff84d4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go @@ -48,7 +48,7 @@ func resourceAwsApiGatewayDeployment() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "created_date": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go index d06298503..1ff513f16 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_domain_name.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsApiGatewayDomainName() *schema.Resource { @@ -28,20 +29,20 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { Type: schema.TypeString, ForceNew: true, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, }, "certificate_chain": { Type: schema.TypeString, ForceNew: true, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, }, "certificate_name": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, }, "certificate_private_key": { @@ -49,7 +50,7 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { ForceNew: true, Optional: true, Sensitive: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn"}, }, "domain_name": { @@ -61,7 +62,7 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { "certificate_arn": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"certificate_body", "certificate_chain", "certificate_name", "certificate_private_key"}, + ConflictsWith: []string{"certificate_body", "certificate_chain", "certificate_name", "certificate_private_key", "regional_certificate_arn", "regional_certificate_name"}, }, "cloudfront_domain_name": { @@ -78,6 +79,54 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { Type: schema.TypeString, Computed: true, }, + + "endpoint_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "types": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + // BadRequestException: Cannot create an api with multiple Endpoint Types + MaxItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + apigateway.EndpointTypeEdge, + apigateway.EndpointTypeRegional, + }, false), + }, + }, + }, + }, + }, + + "regional_certificate_arn": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"certificate_arn", "certificate_body", "certificate_chain", "certificate_name", "certificate_private_key", "regional_certificate_name"}, + }, + + "regional_certificate_name": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"certificate_arn", "certificate_name", "regional_certificate_arn"}, + }, + + "regional_domain_name": { + Type: schema.TypeString, + Computed: true, + }, + + "regional_zone_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -110,14 +159,24 @@ func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interfac params.CertificatePrivateKey = aws.String(v.(string)) } + if v, ok := d.GetOk("endpoint_configuration"); ok { + params.EndpointConfiguration = expandApiGatewayEndpointConfiguration(v.([]interface{})) + } + + if v, ok := d.GetOk("regional_certificate_arn"); ok && v.(string) != "" { + params.RegionalCertificateArn = aws.String(v.(string)) + } + + if v, ok := d.GetOk("regional_certificate_name"); ok && v.(string) != "" { + params.RegionalCertificateName = aws.String(v.(string)) + } + domainName, err := conn.CreateDomainName(params) if err != nil { return fmt.Errorf("Error creating API Gateway Domain Name: %s", err) } d.SetId(*domainName.DomainName) - d.Set("cloudfront_domain_name", domainName.DistributionDomainName) - d.Set("cloudfront_zone_id", cloudFrontRoute53ZoneID) return resourceAwsApiGatewayDomainNameRead(d, meta) } @@ -139,13 +198,23 @@ func resourceAwsApiGatewayDomainNameRead(d *schema.ResourceData, meta interface{ return err } + d.Set("certificate_arn", domainName.CertificateArn) d.Set("certificate_name", domainName.CertificateName) if err := d.Set("certificate_upload_date", domainName.CertificateUploadDate.Format(time.RFC3339)); err != nil { log.Printf("[DEBUG] Error setting certificate_upload_date: %s", err) } d.Set("cloudfront_domain_name", domainName.DistributionDomainName) + d.Set("cloudfront_zone_id", cloudFrontRoute53ZoneID) d.Set("domain_name", domainName.DomainName) - d.Set("certificate_arn", domainName.CertificateArn) + + if err := d.Set("endpoint_configuration", flattenApiGatewayEndpointConfiguration(domainName.EndpointConfiguration)); err != nil { + return fmt.Errorf("error setting endpoint_configuration: %s", err) + } + + d.Set("regional_certificate_arn", domainName.RegionalCertificateArn) + d.Set("regional_certificate_name", domainName.RegionalCertificateName) + d.Set("regional_domain_name", domainName.RegionalDomainName) + d.Set("regional_zone_id", domainName.RegionalHostedZoneId) return nil } @@ -169,6 +238,36 @@ func resourceAwsApiGatewayDomainNameUpdateOperations(d *schema.ResourceData) []* }) } + if d.HasChange("regional_certificate_name") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/regionalCertificateName"), + Value: aws.String(d.Get("regional_certificate_name").(string)), + }) + } + + if d.HasChange("regional_certificate_arn") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/regionalCertificateArn"), + Value: aws.String(d.Get("regional_certificate_arn").(string)), + }) + } + + if d.HasChange("endpoint_configuration.0.types") { + // The domain name must have an endpoint type. + // If attempting to remove the configuration, do nothing. + if v, ok := d.GetOk("endpoint_configuration"); ok && len(v.([]interface{})) > 0 { + m := v.([]interface{})[0].(map[string]interface{}) + + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/endpointConfiguration/types/0"), + Value: aws.String(m["types"].([]interface{})[0].(string)), + }) + } + } + return operations } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go index 105d1227f..bf9639960 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_gateway_response.go @@ -39,13 +39,13 @@ func resourceAwsApiGatewayGatewayResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go index bfbfb05dd..e1b39b37d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "log" + "strconv" "strings" "time" @@ -55,6 +56,21 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { }, false), }, + "connection_type": { + Type: schema.TypeString, + Optional: true, + Default: apigateway.ConnectionTypeInternet, + ValidateFunc: validation.StringInSlice([]string{ + apigateway.ConnectionTypeInternet, + apigateway.ConnectionTypeVpcLink, + }, false), + }, + + "connection_id": { + Type: schema.TypeString, + Optional: true, + }, + "uri": { Type: schema.TypeString, Optional: true, @@ -76,12 +92,12 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { "request_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, @@ -123,6 +139,13 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { Optional: true, Computed: true, }, + + "timeout_milliseconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(50, 29000), + Default: 29000, + }, }, } } @@ -131,14 +154,26 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa conn := meta.(*AWSClient).apigateway log.Print("[DEBUG] Creating API Gateway Integration") + + connectionType := aws.String(d.Get("connection_type").(string)) + var connectionId *string + if *connectionType == apigateway.ConnectionTypeVpcLink { + if _, ok := d.GetOk("connection_id"); !ok { + return fmt.Errorf("connection_id required when connection_type set to VPC_LINK") + } + connectionId = aws.String(d.Get("connection_id").(string)) + } + var integrationHttpMethod *string if v, ok := d.GetOk("integration_http_method"); ok { integrationHttpMethod = aws.String(v.(string)) } + var uri *string if v, ok := d.GetOk("uri"); ok { uri = aws.String(v.(string)) } + templates := make(map[string]string) for k, v := range d.Get("request_templates").(map[string]interface{}) { templates[k] = v.(string) @@ -186,6 +221,11 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa cacheNamespace = aws.String(v.(string)) } + var timeoutInMillis *int64 + if v, ok := d.GetOk("timeout_milliseconds"); ok { + timeoutInMillis = aws.Int64(int64(v.(int))) + } + _, err := conn.PutIntegration(&apigateway.PutIntegrationInput{ HttpMethod: aws.String(d.Get("http_method").(string)), ResourceId: aws.String(d.Get("resource_id").(string)), @@ -200,6 +240,9 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa CacheKeyParameters: cacheKeyParameters, PassthroughBehavior: passthroughBehavior, ContentHandling: contentHandling, + ConnectionType: connectionType, + ConnectionId: connectionId, + TimeoutInMillis: timeoutInMillis, }) if err != nil { return fmt.Errorf("Error creating API Gateway Integration: %s", err) @@ -240,6 +283,12 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface d.Set("request_parameters", aws.StringValueMap(integration.RequestParameters)) d.Set("request_parameters_in_json", aws.StringValueMap(integration.RequestParameters)) d.Set("passthrough_behavior", integration.PassthroughBehavior) + if integration.ConnectionType != nil { + d.Set("connection_type", integration.ConnectionType) + } else { + d.Set("connection_type", apigateway.ConnectionTypeInternet) + } + d.Set("connection_id", integration.ConnectionId) if integration.Uri != nil { d.Set("uri", integration.Uri) @@ -259,6 +308,10 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface d.Set("cache_namespace", integration.CacheNamespace) } + if integration.TimeoutInMillis != nil { + d.Set("timeout_milliseconds", integration.TimeoutInMillis) + } + return nil } @@ -398,6 +451,30 @@ func resourceAwsApiGatewayIntegrationUpdate(d *schema.ResourceData, meta interfa }) } + if d.HasChange("connection_type") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/connectionType"), + Value: aws.String(d.Get("connection_type").(string)), + }) + } + + if d.HasChange("connection_id") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/connectionId"), + Value: aws.String(d.Get("connection_id").(string)), + }) + } + + if d.HasChange("timeout_milliseconds") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/timeoutInMillis"), + Value: aws.String(strconv.Itoa(d.Get("timeout_milliseconds").(int))), + }) + } + params := &apigateway.UpdateIntegrationInput{ HttpMethod: aws.String(d.Get("http_method").(string)), ResourceId: aws.String(d.Get("resource_id").(string)), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go index 5462d92d7..6faab5f18 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_integration_response.go @@ -53,12 +53,12 @@ func resourceAwsApiGatewayIntegrationResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go index d35fb20eb..d04efde88 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method.go @@ -51,6 +51,13 @@ func resourceAwsApiGatewayMethod() *schema.Resource { Optional: true, }, + "authorization_scopes": &schema.Schema{ + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + Optional: true, + }, + "api_key_required": &schema.Schema{ Type: schema.TypeBool, Optional: true, @@ -60,12 +67,12 @@ func resourceAwsApiGatewayMethod() *schema.Resource { "request_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, @@ -126,6 +133,10 @@ func resourceAwsApiGatewayMethodCreate(d *schema.ResourceData, meta interface{}) input.AuthorizerId = aws.String(v.(string)) } + if v, ok := d.GetOk("authorization_scopes"); ok { + input.AuthorizationScopes = expandStringList(v.(*schema.Set).List()) + } + if v, ok := d.GetOk("request_validator_id"); ok { input.RequestValidatorId = aws.String(v.(string)) } @@ -168,6 +179,10 @@ func resourceAwsApiGatewayMethodRead(d *schema.ResourceData, meta interface{}) e d.Set("request_models", aws.StringValueMap(out.RequestModels)) d.Set("request_validator_id", out.RequestValidatorId) + if err := d.Set("authorization_scopes", flattenStringList(out.AuthorizationScopes)); err != nil { + return fmt.Errorf("error setting authorization_scopes: %s", err) + } + return nil } @@ -229,6 +244,32 @@ func resourceAwsApiGatewayMethodUpdate(d *schema.ResourceData, meta interface{}) }) } + if d.HasChange("authorization_scopes") { + old, new := d.GetChange("authorization_scopes") + path := "/authorizationScopes" + + os := old.(*schema.Set) + ns := new.(*schema.Set) + + additionList := ns.Difference(os) + for _, v := range additionList.List() { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("add"), + Path: aws.String(path), + Value: aws.String(v.(string)), + }) + } + + removalList := os.Difference(ns) + for _, v := range removalList.List() { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("remove"), + Path: aws.String(path), + Value: aws.String(v.(string)), + }) + } + } + if d.HasChange("api_key_required") { operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go index 8c4ab7af3..a92b24a3f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_response.go @@ -52,12 +52,12 @@ func resourceAwsApiGatewayMethodResponse() *schema.Resource { "response_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go index 377b63130..fdf2debb5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go @@ -7,11 +7,14 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsApiGatewayRestApi() *schema.Resource { @@ -32,6 +35,19 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Optional: true, }, + "api_key_source": { + Type: schema.TypeString, + Optional: true, + Default: "HEADER", + }, + + "policy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + "binary_media_types": { Type: schema.TypeList, Optional: true, @@ -59,6 +75,36 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "execution_arn": { + Type: schema.TypeString, + Computed: true, + }, + + "endpoint_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "types": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + apigateway.EndpointTypeEdge, + apigateway.EndpointTypeRegional, + apigateway.EndpointTypePrivate, + }, false), + }, + }, + }, + }, + }, }, } } @@ -77,6 +123,18 @@ func resourceAwsApiGatewayRestApiCreate(d *schema.ResourceData, meta interface{} Description: description, } + if v, ok := d.GetOk("endpoint_configuration"); ok { + params.EndpointConfiguration = expandApiGatewayEndpointConfiguration(v.([]interface{})) + } + + if v, ok := d.GetOk("api_key_source"); ok && v.(string) != "" { + params.ApiKeySource = aws.String(v.(string)) + } + + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + params.Policy = aws.String(v.(string)) + } + binaryMediaTypes, binaryMediaTypesOk := d.GetOk("binary_media_types") if binaryMediaTypesOk { params.BinaryMediaTypes = expandStringList(binaryMediaTypes.([]interface{})) @@ -151,7 +209,35 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("name", api.Name) d.Set("description", api.Description) + d.Set("api_key_source", api.ApiKeySource) + + // The API returns policy as an escaped JSON string + // {\\\"Version\\\":\\\"2012-10-17\\\",...} + // The string must be normalized before unquoting as it may contain escaped + // forward slashes in CIDR blocks, which will break strconv.Unquote + + // I'm not sure why it needs to be wrapped with double quotes first, but it does + normalized_policy, err := structure.NormalizeJsonString(`"` + aws.StringValue(api.Policy) + `"`) + if err != nil { + fmt.Printf("error normalizing policy JSON: %s\n", err) + } + policy, err := strconv.Unquote(normalized_policy) + if err != nil { + return fmt.Errorf("error unescaping policy: %s", err) + } + d.Set("policy", policy) + d.Set("binary_media_types", api.BinaryMediaTypes) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "execute-api", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: d.Id(), + }.String() + d.Set("execution_arn", arn) + if api.MinimumCompressionSize == nil { d.Set("minimum_compression_size", -1) } else { @@ -161,6 +247,10 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Error setting created_date: %s", err) } + if err := d.Set("endpoint_configuration", flattenApiGatewayEndpointConfiguration(api.EndpointConfiguration)); err != nil { + return fmt.Errorf("error setting endpoint_configuration: %s", err) + } + return nil } @@ -183,6 +273,22 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api }) } + if d.HasChange("api_key_source") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/apiKeySource"), + Value: aws.String(d.Get("api_key_source").(string)), + }) + } + + if d.HasChange("policy") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/policy"), + Value: aws.String(d.Get("policy").(string)), + }) + } + if d.HasChange("minimum_compression_size") { minimumCompressionSize := d.Get("minimum_compression_size").(int) var value string @@ -223,6 +329,20 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api } } + if d.HasChange("endpoint_configuration.0.types") { + // The REST API must have an endpoint type. + // If attempting to remove the configuration, do nothing. + if v, ok := d.GetOk("endpoint_configuration"); ok && len(v.([]interface{})) > 0 { + m := v.([]interface{})[0].(map[string]interface{}) + + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/endpointConfiguration/types/0"), + Value: aws.String(m["types"].([]interface{})[0].(string)), + }) + } + } + return operations } @@ -276,3 +396,29 @@ func resourceAwsApiGatewayRestApiDelete(d *schema.ResourceData, meta interface{} return resource.NonRetryableError(err) }) } + +func expandApiGatewayEndpointConfiguration(l []interface{}) *apigateway.EndpointConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + endpointConfiguration := &apigateway.EndpointConfiguration{ + Types: expandStringList(m["types"].([]interface{})), + } + + return endpointConfiguration +} + +func flattenApiGatewayEndpointConfiguration(endpointConfiguration *apigateway.EndpointConfiguration) []interface{} { + if endpointConfiguration == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "types": flattenStringList(endpointConfiguration.Types), + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go index 7ce0abda3..2bd4a3c3a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go @@ -3,9 +3,11 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" @@ -20,6 +22,27 @@ func resourceAwsApiGatewayStage() *schema.Resource { Delete: resourceAwsApiGatewayStageDelete, Schema: map[string]*schema.Schema{ + "access_log_settings": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "destination_arn": { + Type: schema.TypeString, + Required: true, + StateFunc: func(arn interface{}) string { + // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid + return strings.TrimSuffix(arn.(string), ":*") + }, + }, + "format": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "cache_cluster_enabled": { Type: schema.TypeBool, Optional: true, @@ -44,6 +67,14 @@ func resourceAwsApiGatewayStage() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "execution_arn": { + Type: schema.TypeString, + Computed: true, + }, + "invoke_url": { + Type: schema.TypeString, + Computed: true, + }, "rest_api_id": { Type: schema.TypeString, Required: true, @@ -58,6 +89,7 @@ func resourceAwsApiGatewayStage() *schema.Resource { Type: schema.TypeMap, Optional: true, }, + "tags": tagsSchema(), }, } } @@ -95,6 +127,13 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) } input.Variables = aws.StringMap(variables) } + if vars, ok := d.GetOk("tags"); ok { + newMap := make(map[string]string, len(vars.(map[string]interface{}))) + for k, v := range vars.(map[string]interface{}) { + newMap[k] = v.(string) + } + input.Tags = aws.StringMap(newMap) + } out, err := conn.CreateStage(&input) if err != nil { @@ -136,6 +175,9 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) if _, ok := d.GetOk("client_certificate_id"); ok { return resourceAwsApiGatewayStageUpdate(d, meta) } + if _, ok := d.GetOk("access_log_settings"); ok { + return resourceAwsApiGatewayStageUpdate(d, meta) + } return resourceAwsApiGatewayStageRead(d, meta) } @@ -143,9 +185,11 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Reading API Gateway Stage %s", d.Id()) + restApiId := d.Get("rest_api_id").(string) + stageName := d.Get("stage_name").(string) input := apigateway.GetStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), + RestApiId: aws.String(restApiId), + StageName: aws.String(stageName), } stage, err := conn.GetStage(&input) if err != nil { @@ -158,6 +202,10 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er } log.Printf("[DEBUG] Received API Gateway Stage: %s", stage) + if err := d.Set("access_log_settings", flattenApiGatewayStageAccessLogSettings(stage.AccessLogSettings)); err != nil { + return fmt.Errorf("error setting access_log_settings: %s", err) + } + d.Set("client_certificate_id", stage.ClientCertificateId) if stage.CacheClusterStatus != nil && *stage.CacheClusterStatus == "DELETE_IN_PROGRESS" { @@ -172,6 +220,19 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er d.Set("description", stage.Description) d.Set("documentation_version", stage.DocumentationVersion) d.Set("variables", aws.StringValueMap(stage.Variables)) + d.Set("tags", aws.StringValueMap(stage.Tags)) + + region := meta.(*AWSClient).region + d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) + + executionArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "execute-api", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("%s/%s", restApiId, stageName), + }.String() + d.Set("execution_arn", executionArn) return nil } @@ -180,6 +241,18 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).apigateway d.Partial(true) + + stageArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "apigateway", + Resource: fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)), + }.String() + if tagErr := setTagsAPIGatewayStage(conn, d, stageArn); tagErr != nil { + return tagErr + } + d.SetPartial("tags") + operations := make([]*apigateway.PatchOperation, 0) waitForCache := false if d.HasChange("cache_cluster_enabled") { @@ -232,6 +305,27 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) newV := n.(map[string]interface{}) operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) } + if d.HasChange("access_log_settings") { + accessLogSettings := d.Get("access_log_settings").([]interface{}) + if len(accessLogSettings) == 1 { + operations = append(operations, + &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/accessLogSettings/destinationArn"), + // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid + Value: aws.String(strings.TrimSuffix(d.Get("access_log_settings.0.destination_arn").(string), ":*")), + }, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/accessLogSettings/format"), + Value: aws.String(d.Get("access_log_settings.0.format").(string)), + }) + } else if len(accessLogSettings) == 0 { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("remove"), + Path: aws.String("/accessLogSettings"), + }) + } + } input := apigateway.UpdateStageInput{ RestApiId: aws.String(d.Get("rest_api_id").(string)), @@ -340,3 +434,14 @@ func resourceAwsApiGatewayStageDelete(d *schema.ResourceData, meta interface{}) return nil } + +func flattenApiGatewayStageAccessLogSettings(accessLogSettings *apigateway.AccessLogSettings) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + if accessLogSettings != nil { + result = append(result, map[string]interface{}{ + "destination_arn": aws.StringValue(accessLogSettings.DestinationArn), + "format": aws.StringValue(accessLogSettings.Format), + }) + } + return result +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go index 62f10d8a5..ae7e45572 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go @@ -17,6 +17,9 @@ func resourceAwsApiGatewayVpcLink() *schema.Resource { Read: resourceAwsApiGatewayVpcLinkRead, Update: resourceAwsApiGatewayVpcLinkUpdate, Delete: resourceAwsApiGatewayVpcLinkDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go index 8e885662e..030cfc5ad 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go @@ -256,7 +256,7 @@ func resourceAwsAppautoscalingPolicyCreate(d *schema.ResourceData, meta interfac log.Printf("[DEBUG] ApplicationAutoScaling PutScalingPolicy: %#v", params) var resp *applicationautoscaling.PutScalingPolicyOutput - err = resource.Retry(1*time.Minute, func() *resource.RetryError { + err = resource.Retry(2*time.Minute, func() *resource.RetryError { var err error resp, err = conn.PutScalingPolicy(¶ms) if err != nil { @@ -285,10 +285,23 @@ func resourceAwsAppautoscalingPolicyCreate(d *schema.ResourceData, meta interfac } func resourceAwsAppautoscalingPolicyRead(d *schema.ResourceData, meta interface{}) error { - p, err := getAwsAppautoscalingPolicy(d, meta) + var p *applicationautoscaling.ScalingPolicy + + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + var err error + p, err = getAwsAppautoscalingPolicy(d, meta) + if err != nil { + if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - return err + return fmt.Errorf("Failed to read scaling policy: %s", err) } + if p == nil { log.Printf("[WARN] Application AutoScaling Policy (%s) not found, removing from state", d.Id()) d.SetId("") @@ -320,7 +333,16 @@ func resourceAwsAppautoscalingPolicyUpdate(d *schema.ResourceData, meta interfac } log.Printf("[DEBUG] Application Autoscaling Update Scaling Policy: %#v", params) - _, err := conn.PutScalingPolicy(¶ms) + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + _, err := conn.PutScalingPolicy(¶ms) + if err != nil { + if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Failed to update scaling policy: %s", err) } @@ -345,11 +367,19 @@ func resourceAwsAppautoscalingPolicyDelete(d *schema.ResourceData, meta interfac ServiceNamespace: aws.String(d.Get("service_namespace").(string)), } log.Printf("[DEBUG] Deleting Application AutoScaling Policy opts: %#v", params) - if _, err := conn.DeleteScalingPolicy(¶ms); err != nil { - return fmt.Errorf("Failed to delete autoscaling policy: %s", err) + err = resource.Retry(2*time.Minute, func() *resource.RetryError { + _, err = conn.DeleteScalingPolicy(¶ms) + if err != nil { + if isAWSErr(err, applicationautoscaling.ErrCodeFailedResourceAccessException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Failed to delete scaling policy: %s", err) } - - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go index 71613ea55..841668f81 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_scheduled_action.go @@ -184,11 +184,10 @@ func resourceAwsAppautoscalingScheduledActionDelete(d *schema.ResourceData, meta if err != nil { if isAWSErr(err, applicationautoscaling.ErrCodeObjectNotFoundException, "") { log.Printf("[WARN] Application Autoscaling Scheduled Action (%s) already gone, removing from state", d.Id()) - d.SetId("") return nil } return err } - d.SetId("") + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go index 851f8057d..d23bb194c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_target.go @@ -130,7 +130,6 @@ func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interfac } if t == nil { log.Printf("[INFO] Application AutoScaling Target %q not found", d.Id()) - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go new file mode 100644 index 000000000..fd519e348 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_api_key.go @@ -0,0 +1,184 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppsyncApiKey() *schema.Resource { + + return &schema.Resource{ + Create: resourceAwsAppsyncApiKeyCreate, + Read: resourceAwsAppsyncApiKeyRead, + Update: resourceAwsAppsyncApiKeyUpdate, + Delete: resourceAwsAppsyncApiKeyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + Default: "Managed by Terraform", + }, + "api_id": { + Type: schema.TypeString, + Required: true, + }, + "expires": { + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Ignore unsetting value + if old != "" && new == "" { + return true + } + return false + }, + ValidateFunc: validation.ValidateRFC3339TimeString, + }, + "key": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + apiID := d.Get("api_id").(string) + + params := &appsync.CreateApiKeyInput{ + ApiId: aws.String(apiID), + Description: aws.String(d.Get("description").(string)), + } + if v, ok := d.GetOk("expires"); ok { + t, _ := time.Parse(time.RFC3339, v.(string)) + params.Expires = aws.Int64(t.Unix()) + } + resp, err := conn.CreateApiKey(params) + if err != nil { + return fmt.Errorf("error creating Appsync API Key: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", apiID, aws.StringValue(resp.ApiKey.Id))) + return resourceAwsAppsyncApiKeyRead(d, meta) +} + +func resourceAwsAppsyncApiKeyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) + if err != nil { + return err + } + + key, err := getAppsyncApiKey(apiID, keyID, conn) + if err != nil { + return fmt.Errorf("error getting Appsync API Key %q: %s", d.Id(), err) + } + if key == nil { + log.Printf("[WARN] AppSync API Key %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("api_id", apiID) + d.Set("key", key.Id) + d.Set("description", key.Description) + d.Set("expires", time.Unix(aws.Int64Value(key.Expires), 0).UTC().Format(time.RFC3339)) + return nil +} + +func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) + if err != nil { + return err + } + + params := &appsync.UpdateApiKeyInput{ + ApiId: aws.String(apiID), + Id: aws.String(keyID), + } + if d.HasChange("description") { + params.Description = aws.String(d.Get("description").(string)) + } + if d.HasChange("expires") { + t, _ := time.Parse(time.RFC3339, d.Get("expires").(string)) + params.Expires = aws.Int64(t.Unix()) + } + + _, err = conn.UpdateApiKey(params) + if err != nil { + return err + } + + return resourceAwsAppsyncApiKeyRead(d, meta) + +} + +func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) + if err != nil { + return err + } + + input := &appsync.DeleteApiKeyInput{ + ApiId: aws.String(apiID), + Id: aws.String(keyID), + } + _, err = conn.DeleteApiKey(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func decodeAppSyncApiKeyId(id string) (string, string, error) { + parts := strings.Split(id, ":") + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected API-ID:API-KEY-ID", id) + } + return parts[0], parts[1], nil +} + +func getAppsyncApiKey(apiID, keyID string, conn *appsync.AppSync) (*appsync.ApiKey, error) { + input := &appsync.ListApiKeysInput{ + ApiId: aws.String(apiID), + } + for { + resp, err := conn.ListApiKeys(input) + if err != nil { + return nil, err + } + for _, apiKey := range resp.ApiKeys { + if aws.StringValue(apiKey.Id) == keyID { + return apiKey, nil + } + } + if resp.NextToken == nil { + break + } + input.NextToken = resp.NextToken + } + return nil, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go index 3156c69d7..b00489372 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go @@ -2,9 +2,12 @@ package aws import ( "fmt" + "regexp" "strings" "time" + "github.com/hashicorp/terraform/helper/validation" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/athena" "github.com/hashicorp/terraform/helper/resource" @@ -20,9 +23,10 @@ func resourceAwsAthenaDatabase() *schema.Resource { Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^[_a-z0-9]+$"), "see https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html"), }, "bucket": { Type: schema.TypeString, @@ -42,7 +46,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).athenaconn input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprintf("create database %s;", d.Get("name").(string))), + QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), ResultConfiguration: &athena.ResultConfiguration{ OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), }, @@ -92,7 +96,7 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e name := d.Get("name").(string) bucket := d.Get("bucket").(string) - queryString := fmt.Sprintf("drop database %s", name) + queryString := fmt.Sprintf("drop database `%s`", name) if d.Get("force_destroy").(bool) { queryString += " cascade" } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go index f7299cbcf..49afe4e4d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go @@ -7,8 +7,10 @@ import ( "time" "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -48,8 +50,39 @@ func resourceAwsAutoscalingGroup() *schema.Resource { }, "launch_configuration": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"launch_template"}, + }, + + "launch_template": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + ConflictsWith: []string{"launch_configuration"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{"launch_template.0.name"}, + ValidateFunc: validateLaunchTemplateId, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{"launch_template.0.id"}, + ValidateFunc: validateLaunchTemplateName, + }, + "version": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + }, + }, }, "desired_capacity": { @@ -249,6 +282,15 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Computed: true, }, }, + + CustomizeDiff: customdiff.Sequence( + customdiff.ComputedIf("launch_template.0.id", func(diff *schema.ResourceDiff, meta interface{}) bool { + return diff.HasChange("launch_template.0.name") + }), + customdiff.ComputedIf("launch_template.0.name", func(diff *schema.ResourceDiff, meta interface{}) bool { + return diff.HasChange("launch_template.0.id") + }), + ), } } @@ -310,7 +352,6 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) createOpts := autoscaling.CreateAutoScalingGroupInput{ AutoScalingGroupName: aws.String(asgName), - LaunchConfigurationName: aws.String(d.Get("launch_configuration").(string)), NewInstancesProtectedFromScaleIn: aws.Bool(d.Get("protect_from_scale_in").(bool)), } updateOpts := autoscaling.UpdateAutoScalingGroupInput{ @@ -342,6 +383,25 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) } } + launchConfigurationValue, launchConfigurationOk := d.GetOk("launch_configuration") + launchTemplateValue, launchTemplateOk := d.GetOk("launch_template") + + if !launchConfigurationOk && !launchTemplateOk { + return fmt.Errorf("One of `launch_configuration` or `launch_template` must be set for an autoscaling group") + } + + if launchConfigurationOk { + createOpts.LaunchConfigurationName = aws.String(launchConfigurationValue.(string)) + } + + if launchTemplateOk { + var err error + createOpts.LaunchTemplate, err = expandLaunchTemplateSpecification(launchTemplateValue.([]interface{})) + if err != nil { + return err + } + } + // Availability Zones are optional if VPC Zone Identifer(s) are specified if v, ok := d.GetOk("availability_zones"); ok && v.(*schema.Set).Len() > 0 { createOpts.AvailabilityZones = expandStringList(v.(*schema.Set).List()) @@ -465,9 +525,16 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e d.Set("desired_capacity", g.DesiredCapacity) d.Set("health_check_grace_period", g.HealthCheckGracePeriod) d.Set("health_check_type", g.HealthCheckType) - d.Set("launch_configuration", g.LaunchConfigurationName) d.Set("load_balancers", flattenStringList(g.LoadBalancerNames)) + d.Set("launch_configuration", g.LaunchConfigurationName) + + if g.LaunchTemplate != nil { + d.Set("launch_template", flattenLaunchTemplateSpecification(g.LaunchTemplate)) + } else { + d.Set("launch_template", nil) + } + if err := d.Set("suspended_processes", flattenAsgSuspendedProcesses(g.SuspendedProcesses)); err != nil { log.Printf("[WARN] Error setting suspended_processes for %q: %s", d.Id(), err) } @@ -572,7 +639,15 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) } if d.HasChange("launch_configuration") { - opts.LaunchConfigurationName = aws.String(d.Get("launch_configuration").(string)) + if v, ok := d.GetOk("launch_configuration"); ok { + opts.LaunchConfigurationName = aws.String(v.(string)) + } + } + + if d.HasChange("launch_template") { + if v, ok := d.GetOk("launch_template"); ok && len(v.([]interface{})) > 0 { + opts.LaunchTemplate, _ = expandLaunchTemplateSpecification(v.([]interface{})) + } } if d.HasChange("min_size") { @@ -746,7 +821,6 @@ func resourceAwsAutoscalingGroupDelete(d *schema.ResourceData, meta interface{}) } if g == nil { log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") return nil } if len(g.Instances) > 0 || *g.DesiredCapacity > 0 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go index 2684a4ef3..073151145 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go @@ -131,7 +131,6 @@ func resourceAwsAutoscalingLifecycleHookDelete(d *schema.ResourceData, meta inte return errwrap.Wrapf("Autoscaling Lifecycle Hook: {{err}}", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go index 1289667cb..aafccced1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go @@ -273,7 +273,6 @@ func resourceAwsAutoscalingPolicyDelete(d *schema.ResourceData, meta interface{} return fmt.Errorf("Autoscaling Scaling Policy: %s ", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go index 1bef71db7..755559501 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_definition.go @@ -40,7 +40,7 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "retry_strategy": { Type: schema.TypeList, @@ -50,8 +50,26 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attempts": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 10), + }, + }, + }, + }, + "timeout": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attempt_duration_seconds": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(60), }, }, }, @@ -99,6 +117,10 @@ func resourceAwsBatchJobDefinitionCreate(d *schema.ResourceData, meta interface{ input.RetryStrategy = expandJobDefinitionRetryStrategy(v.([]interface{})) } + if v, ok := d.GetOk("timeout"); ok { + input.Timeout = expandJobDefinitionTimeout(v.([]interface{})) + } + out, err := conn.RegisterJobDefinition(input) if err != nil { return fmt.Errorf("%s %q", err, name) @@ -122,7 +144,15 @@ func resourceAwsBatchJobDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("arn", job.JobDefinitionArn) d.Set("container_properties", job.ContainerProperties) d.Set("parameters", aws.StringValueMap(job.Parameters)) - d.Set("retry_strategy", flattenRetryStrategy(job.RetryStrategy)) + + if err := d.Set("retry_strategy", flattenBatchRetryStrategy(job.RetryStrategy)); err != nil { + return fmt.Errorf("error setting retry_strategy: %s", err) + } + + if err := d.Set("timeout", flattenBatchJobTimeout(job.Timeout)); err != nil { + return fmt.Errorf("error setting timeout: %s", err) + } + d.Set("revision", job.Revision) d.Set("type", job.Type) return nil @@ -137,7 +167,7 @@ func resourceAwsBatchJobDefinitionDelete(d *schema.ResourceData, meta interface{ if err != nil { return fmt.Errorf("%s %q", err, arn) } - d.SetId("") + return nil } @@ -195,17 +225,42 @@ func expandJobDefinitionParameters(params map[string]interface{}) map[string]*st } func expandJobDefinitionRetryStrategy(item []interface{}) *batch.RetryStrategy { + retryStrategy := &batch.RetryStrategy{} data := item[0].(map[string]interface{}) - return &batch.RetryStrategy{ - Attempts: aws.Int64(int64(data["attempts"].(int))), + + if v, ok := data["attempts"].(int); ok && v > 0 && v <= 10 { + retryStrategy.Attempts = aws.Int64(int64(v)) } + + return retryStrategy } -func flattenRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { +func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { data := []map[string]interface{}{} - if item != nil { + if item != nil && item.Attempts != nil { data = append(data, map[string]interface{}{ - "attempts": item.Attempts, + "attempts": int(aws.Int64Value(item.Attempts)), + }) + } + return data +} + +func expandJobDefinitionTimeout(item []interface{}) *batch.JobTimeout { + timeout := &batch.JobTimeout{} + data := item[0].(map[string]interface{}) + + if v, ok := data["attempt_duration_seconds"].(int); ok && v >= 60 { + timeout.AttemptDurationSeconds = aws.Int64(int64(v)) + } + + return timeout +} + +func flattenBatchJobTimeout(item *batch.JobTimeout) []map[string]interface{} { + data := []map[string]interface{}{} + if item != nil && item.AttemptDurationSeconds != nil { + data = append(data, map[string]interface{}{ + "attempt_duration_seconds": int(aws.Int64Value(item.AttemptDurationSeconds)), }) } return data diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go new file mode 100644 index 000000000..b38dc19bc --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go @@ -0,0 +1,399 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/budgets" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsBudgetsBudget() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "account_id": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "name": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + }, + "name_prefix": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + }, + "budget_type": { + Type: schema.TypeString, + Required: true, + }, + "limit_amount": { + Type: schema.TypeString, + Required: true, + }, + "limit_unit": { + Type: schema.TypeString, + Required: true, + }, + "cost_types": { + Type: schema.TypeList, + Computed: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "include_credit": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_discount": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_other_subscription": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_recurring": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_refund": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_subscription": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_support": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_tax": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "include_upfront": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "use_amortized": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "use_blended": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, + "time_period_start": { + Type: schema.TypeString, + Required: true, + }, + "time_period_end": { + Type: schema.TypeString, + Optional: true, + Default: "2087-06-15_00:00", + }, + "time_unit": { + Type: schema.TypeString, + Required: true, + }, + "cost_filters": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + }, + }, + Create: resourceAwsBudgetsBudgetCreate, + Read: resourceAwsBudgetsBudgetRead, + Update: resourceAwsBudgetsBudgetUpdate, + Delete: resourceAwsBudgetsBudgetDelete, + } +} + +func resourceAwsBudgetsBudgetCreate(d *schema.ResourceData, meta interface{}) error { + budget, err := expandBudgetsBudgetUnmarshal(d) + if err != nil { + return fmt.Errorf("failed unmarshalling budget: %v", err) + } + + if v, ok := d.GetOk("name"); ok { + budget.BudgetName = aws.String(v.(string)) + + } else if v, ok := d.GetOk("name_prefix"); ok { + budget.BudgetName = aws.String(resource.PrefixedUniqueId(v.(string))) + + } else { + budget.BudgetName = aws.String(resource.UniqueId()) + } + + client := meta.(*AWSClient).budgetconn + var accountID string + if v, ok := d.GetOk("account_id"); ok { + accountID = v.(string) + } else { + accountID = meta.(*AWSClient).accountid + } + + _, err = client.CreateBudget(&budgets.CreateBudgetInput{ + AccountId: aws.String(accountID), + Budget: budget, + }) + if err != nil { + return fmt.Errorf("create budget failed: %v", err) + } + + d.SetId(fmt.Sprintf("%s:%s", accountID, *budget.BudgetName)) + return resourceAwsBudgetsBudgetRead(d, meta) +} + +func resourceAwsBudgetsBudgetRead(d *schema.ResourceData, meta interface{}) error { + accountID, budgetName, err := decodeBudgetsBudgetID(d.Id()) + if err != nil { + return err + } + + client := meta.(*AWSClient).budgetconn + describeBudgetOutput, err := client.DescribeBudget(&budgets.DescribeBudgetInput{ + BudgetName: aws.String(budgetName), + AccountId: aws.String(accountID), + }) + if isAWSErr(err, budgets.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Budget %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("describe budget failed: %v", err) + } + + budget := describeBudgetOutput.Budget + if budget == nil { + log.Printf("[WARN] Budget %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("account_id", accountID) + d.Set("budget_type", budget.BudgetType) + + if err := d.Set("cost_filters", convertCostFiltersToStringMap(budget.CostFilters)); err != nil { + return fmt.Errorf("error setting cost_filters: %s", err) + } + + if err := d.Set("cost_types", flattenBudgetsCostTypes(budget.CostTypes)); err != nil { + return fmt.Errorf("error setting cost_types: %s %s", err, budget.CostTypes) + } + + if budget.BudgetLimit != nil { + d.Set("limit_amount", budget.BudgetLimit.Amount) + d.Set("limit_unit", budget.BudgetLimit.Unit) + } + + d.Set("name", budget.BudgetName) + + if budget.TimePeriod != nil { + d.Set("time_period_end", budget.TimePeriod.End) + d.Set("time_period_start", budget.TimePeriod.Start) + } + + d.Set("time_unit", budget.TimeUnit) + + return nil +} + +func resourceAwsBudgetsBudgetUpdate(d *schema.ResourceData, meta interface{}) error { + accountID, _, err := decodeBudgetsBudgetID(d.Id()) + if err != nil { + return err + } + + client := meta.(*AWSClient).budgetconn + budget, err := expandBudgetsBudgetUnmarshal(d) + if err != nil { + return fmt.Errorf("could not create budget: %v", err) + } + + _, err = client.UpdateBudget(&budgets.UpdateBudgetInput{ + AccountId: aws.String(accountID), + NewBudget: budget, + }) + if err != nil { + return fmt.Errorf("update budget failed: %v", err) + } + + return resourceAwsBudgetsBudgetRead(d, meta) +} + +func resourceAwsBudgetsBudgetDelete(d *schema.ResourceData, meta interface{}) error { + accountID, budgetName, err := decodeBudgetsBudgetID(d.Id()) + if err != nil { + return err + } + + client := meta.(*AWSClient).budgetconn + _, err = client.DeleteBudget(&budgets.DeleteBudgetInput{ + BudgetName: aws.String(budgetName), + AccountId: aws.String(accountID), + }) + if err != nil { + if isAWSErr(err, budgets.ErrCodeNotFoundException, "") { + log.Printf("[INFO] budget %s could not be found. skipping delete.", d.Id()) + return nil + } + + return fmt.Errorf("delete budget failed: %v", err) + } + + return nil +} + +func flattenBudgetsCostTypes(costTypes *budgets.CostTypes) []map[string]interface{} { + if costTypes == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "include_credit": aws.BoolValue(costTypes.IncludeCredit), + "include_discount": aws.BoolValue(costTypes.IncludeDiscount), + "include_other_subscription": aws.BoolValue(costTypes.IncludeOtherSubscription), + "include_recurring": aws.BoolValue(costTypes.IncludeRecurring), + "include_refund": aws.BoolValue(costTypes.IncludeRefund), + "include_subscription": aws.BoolValue(costTypes.IncludeSubscription), + "include_support": aws.BoolValue(costTypes.IncludeSupport), + "include_tax": aws.BoolValue(costTypes.IncludeTax), + "include_upfront": aws.BoolValue(costTypes.IncludeUpfront), + "use_amortized": aws.BoolValue(costTypes.UseAmortized), + "use_blended": aws.BoolValue(costTypes.UseBlended), + } + return []map[string]interface{}{m} +} + +func convertCostFiltersToStringMap(costFilters map[string][]*string) map[string]string { + convertedCostFilters := make(map[string]string) + for k, v := range costFilters { + filterValues := make([]string, 0) + for _, singleFilterValue := range v { + filterValues = append(filterValues, *singleFilterValue) + } + + convertedCostFilters[k] = strings.Join(filterValues, ",") + } + + return convertedCostFilters +} + +func expandBudgetsBudgetUnmarshal(d *schema.ResourceData) (*budgets.Budget, error) { + budgetName := d.Get("name").(string) + budgetType := d.Get("budget_type").(string) + budgetLimitAmount := d.Get("limit_amount").(string) + budgetLimitUnit := d.Get("limit_unit").(string) + costTypes := expandBudgetsCostTypesUnmarshal(d.Get("cost_types").([]interface{})) + budgetTimeUnit := d.Get("time_unit").(string) + budgetCostFilters := make(map[string][]*string) + for k, v := range d.Get("cost_filters").(map[string]interface{}) { + filterValue := v.(string) + budgetCostFilters[k] = append(budgetCostFilters[k], aws.String(filterValue)) + } + + budgetTimePeriodStart, err := time.Parse("2006-01-02_15:04", d.Get("time_period_start").(string)) + if err != nil { + return nil, fmt.Errorf("failure parsing time: %v", err) + } + + budgetTimePeriodEnd, err := time.Parse("2006-01-02_15:04", d.Get("time_period_end").(string)) + if err != nil { + return nil, fmt.Errorf("failure parsing time: %v", err) + } + + budget := &budgets.Budget{ + BudgetName: aws.String(budgetName), + BudgetType: aws.String(budgetType), + BudgetLimit: &budgets.Spend{ + Amount: aws.String(budgetLimitAmount), + Unit: aws.String(budgetLimitUnit), + }, + CostTypes: costTypes, + TimePeriod: &budgets.TimePeriod{ + End: &budgetTimePeriodEnd, + Start: &budgetTimePeriodStart, + }, + TimeUnit: aws.String(budgetTimeUnit), + CostFilters: budgetCostFilters, + } + return budget, nil +} + +func decodeBudgetsBudgetID(id string) (string, string, error) { + parts := strings.Split(id, ":") + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected AccountID:BudgetName", id) + } + return parts[0], parts[1], nil +} + +func expandBudgetsCostTypesUnmarshal(budgetCostTypes []interface{}) *budgets.CostTypes { + costTypes := &budgets.CostTypes{ + IncludeCredit: aws.Bool(true), + IncludeDiscount: aws.Bool(true), + IncludeOtherSubscription: aws.Bool(true), + IncludeRecurring: aws.Bool(true), + IncludeRefund: aws.Bool(true), + IncludeSubscription: aws.Bool(true), + IncludeSupport: aws.Bool(true), + IncludeTax: aws.Bool(true), + IncludeUpfront: aws.Bool(true), + UseAmortized: aws.Bool(false), + UseBlended: aws.Bool(false), + } + if len(budgetCostTypes) == 1 { + costTypesMap := budgetCostTypes[0].(map[string]interface{}) + for k, v := range map[string]*bool{ + "include_credit": costTypes.IncludeCredit, + "include_discount": costTypes.IncludeDiscount, + "include_other_subscription": costTypes.IncludeOtherSubscription, + "include_recurring": costTypes.IncludeRecurring, + "include_refund": costTypes.IncludeRefund, + "include_subscription": costTypes.IncludeSubscription, + "include_support": costTypes.IncludeSupport, + "include_tax": costTypes.IncludeTax, + "include_upfront": costTypes.IncludeUpfront, + "use_amortized": costTypes.UseAmortized, + "use_blended": costTypes.UseBlended, + } { + if val, ok := costTypesMap[k]; ok { + *v = val.(bool) + } + } + } + + return costTypes +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go index 43e9472e8..db28c4983 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go @@ -559,8 +559,6 @@ func resourceAwsCloudFormationStackDelete(d *schema.ResourceData, meta interface log.Printf("[DEBUG] CloudFormation stack %q has been deleted", d.Id()) - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go index 216f46695..640fe06ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go @@ -36,9 +36,11 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Set: aliasesHash, }, "cache_behavior": { - Type: schema.TypeSet, - Optional: true, - Set: cacheBehaviorHash, + Type: schema.TypeSet, + Optional: true, + Set: cacheBehaviorHash, + ConflictsWith: []string{"ordered_cache_behavior"}, + Deprecated: "Use `ordered_cache_behavior` instead", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "allowed_methods": { @@ -160,6 +162,131 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { }, }, }, + "ordered_cache_behavior": { + Type: schema.TypeList, + Optional: true, + ConflictsWith: []string{"cache_behavior"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allowed_methods": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "cached_methods": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "compress": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "default_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 86400, + }, + "field_level_encryption_id": { + Type: schema.TypeString, + Optional: true, + }, + "forwarded_values": { + Type: schema.TypeSet, + Required: true, + Set: forwardedValuesHash, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cookies": { + Type: schema.TypeSet, + Required: true, + Set: cookiePreferenceHash, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "forward": { + Type: schema.TypeString, + Required: true, + }, + "whitelisted_names": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "headers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "query_string": { + Type: schema.TypeBool, + Required: true, + }, + "query_string_cache_keys": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "lambda_function_association": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 4, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "event_type": { + Type: schema.TypeString, + Required: true, + }, + "lambda_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + Set: lambdaFunctionAssociationHash, + }, + "max_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 31536000, + }, + "min_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 0, + }, + "path_pattern": { + Type: schema.TypeString, + Required: true, + }, + "smooth_streaming": { + Type: schema.TypeBool, + Optional: true, + }, + "target_origin_id": { + Type: schema.TypeString, + Required: true, + }, + "trusted_signers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "viewer_protocol_policy": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "comment": { Type: schema.TypeString, Optional: true, @@ -575,10 +702,25 @@ func resourceAwsCloudFrontDistributionCreate(d *schema.ResourceData, meta interf }, } - resp, err := conn.CreateDistributionWithTags(params) + var resp *cloudfront.CreateDistributionWithTagsOutput + // Handle eventual consistency issues + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDistributionWithTags(params) + if err != nil { + // ACM and IAM certificate eventual consistency + // InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain. + if isAWSErr(err, cloudfront.ErrCodeInvalidViewerCertificate, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - return err + return fmt.Errorf("error creating CloudFront Distribution: %s", err) } + d.SetId(*resp.Distribution.Id) return resourceAwsCloudFrontDistributionRead(d, meta) } @@ -606,7 +748,6 @@ func resourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interfac return err } // Update other attributes outside of DistributionConfig - d.SetId(*resp.Distribution.Id) err = d.Set("active_trusted_signers", flattenActiveTrustedSigners(resp.Distribution.ActiveTrustedSigners)) if err != nil { return err @@ -642,9 +783,22 @@ func resourceAwsCloudFrontDistributionUpdate(d *schema.ResourceData, meta interf DistributionConfig: expandDistributionConfig(d), IfMatch: aws.String(d.Get("etag").(string)), } - _, err := conn.UpdateDistribution(params) + + // Handle eventual consistency issues + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateDistribution(params) + if err != nil { + // ACM and IAM certificate eventual consistency + // InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain. + if isAWSErr(err, cloudfront.ErrCodeInvalidViewerCertificate, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - return err + return fmt.Errorf("error updating CloudFront Distribution (%s): %s", d.Id(), err) } if err := setTagsCloudFront(conn, d, d.Get("arn").(string)); err != nil { @@ -667,7 +821,6 @@ func resourceAwsCloudFrontDistributionDelete(d *schema.ResourceData, meta interf // skip delete if retain_on_delete is enabled if d.Get("retain_on_delete").(bool) { log.Printf("[WARN] Removing CloudFront Distribution ID %q with `retain_on_delete` set. Please delete this distribution manually.", d.Id()) - d.SetId("") return nil } @@ -698,8 +851,6 @@ func resourceAwsCloudFrontDistributionDelete(d *schema.ResourceData, meta interf return fmt.Errorf("CloudFront Distribution %s cannot be deleted: %s", d.Id(), err) } - // Done - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go index 55585b0ff..00f6b6587 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go @@ -119,8 +119,6 @@ func resourceAwsCloudFrontOriginAccessIdentityDelete(d *schema.ResourceData, met return err } - // Done - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go index dea7c2fa1..d203aead4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go @@ -102,15 +102,12 @@ func resourceAwsCloudWatchDashboardDelete(d *schema.ResourceData, meta interface if _, err := conn.DeleteDashboards(¶ms); err != nil { if isCloudWatchDashboardNotFoundErr(err) { - log.Printf("[WARN] CloudWatch Dashboard %s is already gone", d.Id()) - d.SetId("") return nil } return fmt.Errorf("Error deleting CloudWatch Dashboard: %s", err) } log.Printf("[INFO] CloudWatch Dashboard %s deleted", d.Id()) - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go index e0c087097..3ff15d37e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go @@ -27,8 +27,16 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { Schema: map[string]*schema.Schema{ "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateCloudWatchEventRuleName, + }, + "name_prefix": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validateCloudWatchEventRuleName, }, @@ -72,7 +80,16 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatcheventsconn - input, err := buildPutRuleInputStruct(d) + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + + input, err := buildPutRuleInputStruct(d, name) if err != nil { return errwrap.Wrapf("Creating CloudWatch Event Rule failed: {{err}}", err) } @@ -100,7 +117,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface } d.Set("arn", out.RuleArn) - d.SetId(d.Get("name").(string)) + d.SetId(*input.Name) log.Printf("[INFO] CloudWatch Event Rule %q created", *out.RuleArn) @@ -164,7 +181,7 @@ func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface log.Printf("[DEBUG] CloudWatch Event Rule (%q) enabled", d.Id()) } - input, err := buildPutRuleInputStruct(d) + input, err := buildPutRuleInputStruct(d, d.Id()) if err != nil { return errwrap.Wrapf("Updating CloudWatch Event Rule failed: {{err}}", err) } @@ -215,14 +232,12 @@ func resourceAwsCloudWatchEventRuleDelete(d *schema.ResourceData, meta interface } log.Println("[INFO] CloudWatch Event Rule deleted") - d.SetId("") - return nil } -func buildPutRuleInputStruct(d *schema.ResourceData) (*events.PutRuleInput, error) { +func buildPutRuleInputStruct(d *schema.ResourceData, name string) (*events.PutRuleInput, error) { input := events.PutRuleInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(name), } if v, ok := d.GetOk("description"); ok { input.Description = aws.String(v.(string)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go index 15561a760..4b9af0e93 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go @@ -102,6 +102,63 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { }, }, + "batch_target": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "job_definition": { + Type: schema.TypeString, + Required: true, + }, + "job_name": { + Type: schema.TypeString, + Required: true, + }, + "array_size": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(2, 10000), + }, + "job_attempts": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 10), + }, + }, + }, + }, + + "kinesis_target": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "partition_key_path": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 256), + }, + }, + }, + }, + + "sqs_target": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "message_group_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "input_transformer": { Type: schema.TypeList, Optional: true, @@ -209,6 +266,24 @@ func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface } } + if t.BatchParameters != nil { + if err := d.Set("batch_target", flattenAwsCloudWatchEventTargetBatchParameters(t.BatchParameters)); err != nil { + return fmt.Errorf("[DEBUG] Error setting batch_target error: %#v", err) + } + } + + if t.KinesisParameters != nil { + if err := d.Set("kinesis_target", flattenAwsCloudWatchEventTargetKinesisParameters(t.KinesisParameters)); err != nil { + return fmt.Errorf("[DEBUG] Error setting kinesis_target error: %#v", err) + } + } + + if t.SqsParameters != nil { + if err := d.Set("sqs_target", flattenAwsCloudWatchEventTargetSqsParameters(t.SqsParameters)); err != nil { + return fmt.Errorf("[DEBUG] Error setting sqs_target error: %#v", err) + } + } + if t.InputTransformer != nil { if err := d.Set("input_transformer", flattenAwsCloudWatchInputTransformer(t.InputTransformer)); err != nil { return fmt.Errorf("[DEBUG] Error setting input_transformer error: %#v", err) @@ -271,8 +346,6 @@ func resourceAwsCloudWatchEventTargetDelete(d *schema.ResourceData, meta interfa } log.Println("[INFO] CloudWatch Event Target deleted") - d.SetId("") - return nil } @@ -299,6 +372,17 @@ func buildPutTargetInputStruct(d *schema.ResourceData) *events.PutTargetsInput { if v, ok := d.GetOk("ecs_target"); ok { e.EcsParameters = expandAwsCloudWatchEventTargetEcsParameters(v.([]interface{})) } + if v, ok := d.GetOk("batch_target"); ok { + e.BatchParameters = expandAwsCloudWatchEventTargetBatchParameters(v.([]interface{})) + } + + if v, ok := d.GetOk("kinesis_target"); ok { + e.KinesisParameters = expandAwsCloudWatchEventTargetKinesisParameters(v.([]interface{})) + } + + if v, ok := d.GetOk("sqs_target"); ok { + e.SqsParameters = expandAwsCloudWatchEventTargetSqsParameters(v.([]interface{})) + } if v, ok := d.GetOk("input_transformer"); ok { e.InputTransformer = expandAwsCloudWatchEventTransformerParameters(v.([]interface{})) @@ -344,6 +428,51 @@ func expandAwsCloudWatchEventTargetEcsParameters(config []interface{}) *events.E return ecsParameters } +func expandAwsCloudWatchEventTargetBatchParameters(config []interface{}) *events.BatchParameters { + batchParameters := &events.BatchParameters{} + for _, c := range config { + param := c.(map[string]interface{}) + batchParameters.JobDefinition = aws.String(param["job_definition"].(string)) + batchParameters.JobName = aws.String(param["job_name"].(string)) + if v, ok := param["array_size"].(int); ok && v > 1 && v <= 10000 { + arrayProperties := &events.BatchArrayProperties{} + arrayProperties.Size = aws.Int64(int64(v)) + batchParameters.ArrayProperties = arrayProperties + } + if v, ok := param["job_attempts"].(int); ok && v > 0 && v <= 10 { + retryStrategy := &events.BatchRetryStrategy{} + retryStrategy.Attempts = aws.Int64(int64(v)) + batchParameters.RetryStrategy = retryStrategy + } + } + + return batchParameters +} + +func expandAwsCloudWatchEventTargetKinesisParameters(config []interface{}) *events.KinesisParameters { + kinesisParameters := &events.KinesisParameters{} + for _, c := range config { + param := c.(map[string]interface{}) + if v, ok := param["partition_key_path"].(string); ok && v != "" { + kinesisParameters.PartitionKeyPath = aws.String(v) + } + } + + return kinesisParameters +} + +func expandAwsCloudWatchEventTargetSqsParameters(config []interface{}) *events.SqsParameters { + sqsParameters := &events.SqsParameters{} + for _, c := range config { + param := c.(map[string]interface{}) + if v, ok := param["message_group_id"].(string); ok && v != "" { + sqsParameters.MessageGroupId = aws.String(v) + } + } + + return sqsParameters +} + func expandAwsCloudWatchEventTransformerParameters(config []interface{}) *events.InputTransformer { transformerParameters := &events.InputTransformer{} @@ -385,6 +514,34 @@ func flattenAwsCloudWatchEventTargetEcsParameters(ecsParameters *events.EcsParam return result } +func flattenAwsCloudWatchEventTargetBatchParameters(batchParameters *events.BatchParameters) []map[string]interface{} { + config := make(map[string]interface{}) + config["job_definition"] = aws.StringValue(batchParameters.JobDefinition) + config["job_name"] = aws.StringValue(batchParameters.JobName) + if batchParameters.ArrayProperties != nil { + config["array_size"] = int(aws.Int64Value(batchParameters.ArrayProperties.Size)) + } + if batchParameters.RetryStrategy != nil { + config["job_attempts"] = int(aws.Int64Value(batchParameters.RetryStrategy.Attempts)) + } + result := []map[string]interface{}{config} + return result +} + +func flattenAwsCloudWatchEventTargetKinesisParameters(kinesisParameters *events.KinesisParameters) []map[string]interface{} { + config := make(map[string]interface{}) + config["partition_key_path"] = *kinesisParameters.PartitionKeyPath + result := []map[string]interface{}{config} + return result +} + +func flattenAwsCloudWatchEventTargetSqsParameters(sqsParameters *events.SqsParameters) []map[string]interface{} { + config := make(map[string]interface{}) + config["message_group_id"] = *sqsParameters.MessageGroupId + result := []map[string]interface{}{config} + return result +} + func flattenAwsCloudWatchInputTransformer(inputTransformer *events.InputTransformer) []map[string]interface{} { config := make(map[string]interface{}) inputPathsMap := make(map[string]string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go index 172630648..018088801 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination.go @@ -121,7 +121,7 @@ func resourceAwsCloudWatchLogDestinationDelete(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("Error deleting Destination with name %s", name) } - d.SetId("") + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go index 704dacf45..8064a25db 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_destination_policy.go @@ -83,6 +83,5 @@ func resourceAwsCloudWatchLogDestinationPolicyRead(d *schema.ResourceData, meta } func resourceAwsCloudWatchLogDestinationPolicyDelete(d *schema.ResourceData, meta interface{}) error { - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go index 5132d97fc..1e5b13b0b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/errwrap" ) func resourceAwsCloudWatchLogGroup() *schema.Resource { @@ -100,12 +99,12 @@ func resourceAwsCloudWatchLogGroupCreate(d *schema.ResourceData, meta interface{ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatchlogsconn log.Printf("[DEBUG] Reading CloudWatch Log Group: %q", d.Get("name").(string)) - lg, exists, err := lookupCloudWatchLogGroup(conn, d.Id(), nil) + lg, err := lookupCloudWatchLogGroup(conn, d.Id()) if err != nil { return err } - if !exists { + if lg == nil { log.Printf("[DEBUG] CloudWatch Group %q Not Found", d.Id()) d.SetId("") return nil @@ -116,44 +115,42 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) d.Set("arn", lg.Arn) d.Set("name", lg.LogGroupName) d.Set("kms_key_id", lg.KmsKeyId) + d.Set("retention_in_days", lg.RetentionInDays) - if lg.RetentionInDays != nil { - d.Set("retention_in_days", lg.RetentionInDays) + tags := make(map[string]string, 0) + tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ + LogGroupName: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("error listing CloudWatch Logs Group %q tags: %s", d.Id(), err) } - - if !meta.(*AWSClient).IsChinaCloud() && !meta.(*AWSClient).IsGovCloud() { - tags, err := flattenCloudWatchTags(d, conn) - if err != nil { - return err - } - d.Set("tags", tags) + if tagsOutput != nil { + tags = aws.StringValueMap(tagsOutput.Tags) } + d.Set("tags", tags) return nil } -func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, - name string, nextToken *string) (*cloudwatchlogs.LogGroup, bool, error) { +func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, name string) (*cloudwatchlogs.LogGroup, error) { input := &cloudwatchlogs.DescribeLogGroupsInput{ LogGroupNamePrefix: aws.String(name), - NextToken: nextToken, } - resp, err := conn.DescribeLogGroups(input) - if err != nil { - return nil, true, err - } - - for _, lg := range resp.LogGroups { - if *lg.LogGroupName == name { - return lg, true, nil + var logGroup *cloudwatchlogs.LogGroup + err := conn.DescribeLogGroupsPages(input, func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { + for _, lg := range page.LogGroups { + if aws.StringValue(lg.LogGroupName) == name { + logGroup = lg + return false + } } + return !lastPage + }) + if err != nil { + return nil, err } - if resp.NextToken != nil { - return lookupCloudWatchLogGroup(conn, name, resp.NextToken) - } - - return nil, false, nil + return logGroup, nil } func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{}) error { @@ -184,9 +181,7 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{ } } - restricted := meta.(*AWSClient).IsChinaCloud() || meta.(*AWSClient).IsGovCloud() - - if !restricted && d.HasChange("tags") { + if d.HasChange("tags") { oraw, nraw := d.GetChange("tags") o := oraw.(map[string]interface{}) n := nraw.(map[string]interface{}) @@ -267,27 +262,5 @@ func resourceAwsCloudWatchLogGroupDelete(d *schema.ResourceData, meta interface{ } log.Println("[INFO] CloudWatch Log Group deleted") - d.SetId("") - return nil } - -func flattenCloudWatchTags(d *schema.ResourceData, conn *cloudwatchlogs.CloudWatchLogs) (map[string]interface{}, error) { - tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ - LogGroupName: aws.String(d.Get("name").(string)), - }) - if err != nil { - return nil, errwrap.Wrapf("Error Getting CloudWatch Logs Tag List: {{err}}", err) - } - if tagsOutput != nil { - output := make(map[string]interface{}, len(tagsOutput.Tags)) - - for i, v := range tagsOutput.Tags { - output[i] = *v - } - - return output, nil - } - - return make(map[string]interface{}), nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go index f87751ad2..80ea7cfdf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go @@ -189,7 +189,5 @@ func resourceAwsCloudWatchLogMetricFilterDelete(d *schema.ResourceData, meta int } log.Println("[INFO] CloudWatch Log Metric Filter deleted") - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go index 1598b748f..99e303020 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go @@ -180,7 +180,7 @@ func resourceAwsCloudwatchLogSubscriptionFilterDelete(d *schema.ResourceData, me return fmt.Errorf( "Error deleting Subscription Filter from log group: %s with name filter name %s: %+v", log_group_name, name, err) } - d.SetId("") + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go index 9c21dac34..c3824434a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go @@ -35,8 +35,9 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Required: true, }, "evaluation_periods": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(1), }, "metric_name": { Type: schema.TypeString, @@ -75,8 +76,9 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Optional: true, }, "datapoints_to_alarm": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(1), }, "dimensions": { Type: schema.TypeMap, @@ -224,7 +226,6 @@ func resourceAwsCloudWatchMetricAlarmDelete(d *schema.ResourceData, meta interfa } log.Println("[INFO] CloudWatch Metric Alarm deleted") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go index 95724b9b6..275c04ce8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "regexp" + "strconv" "time" "github.com/aws/aws-sdk-go/aws" @@ -22,6 +23,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Read: resourceAwsCodeBuildProjectRead, Update: resourceAwsCodeBuildProjectUpdate, Delete: resourceAwsCodeBuildProjectDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "artifacts": { @@ -135,6 +139,15 @@ func resourceAwsCodeBuildProject() *schema.Resource { Type: schema.TypeString, Required: true, }, + "type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.EnvironmentVariableTypePlaintext, + codebuild.EnvironmentVariableTypeParameterStore, + }, false), + Default: codebuild.EnvironmentVariableTypePlaintext, + }, }, }, }, @@ -147,6 +160,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { Required: true, ValidateFunc: validation.StringInSlice([]string{ codebuild.EnvironmentTypeLinuxContainer, + codebuild.EnvironmentTypeWindowsContainer, }, false), }, "privileged_mode": { @@ -166,8 +180,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, "service_role": { Type: schema.TypeString, - Optional: true, - Computed: true, + Required: true, }, "source": { Type: schema.TypeSet, @@ -178,8 +191,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "resource": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Sensitive: true, + Optional: true, }, "type": { Type: schema.TypeString, @@ -213,6 +227,19 @@ func resourceAwsCodeBuildProject() *schema.Resource { codebuild.SourceTypeGithubEnterprise, }, false), }, + "git_clone_depth": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "insecure_ssl": { + Type: schema.TypeBool, + Optional: true, + }, + "report_build_status": { + Type: schema.TypeBool, + Optional: true, + }, }, }, Required: true, @@ -231,6 +258,15 @@ func resourceAwsCodeBuildProject() *schema.Resource { Default: "60", ValidateFunc: validation.IntBetween(5, 480), }, + "badge_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "badge_url": { + Type: schema.TypeString, + Computed: true, + }, "tags": tagsSchema(), "vpc_config": { Type: schema.TypeList, @@ -315,6 +351,10 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) params.VpcConfig = expandCodeBuildVpcConfig(v.([]interface{})) } + if v, ok := d.GetOk("badge_enabled"); ok { + params.BadgeEnabled = aws.Bool(v.(bool)) + } + if v, ok := d.GetOk("tags"); ok { params.Tags = tagsFromMapCodeBuild(v.(map[string]interface{})) } @@ -436,6 +476,10 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnvironmentVar.Value = &v } + if v := config["type"].(string); v != "" { + projectEnvironmentVar.Type = &v + } + projectEnvironmentVariables = append(projectEnvironmentVariables, projectEnvironmentVar) } @@ -448,17 +492,16 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm func expandCodeBuildVpcConfig(rawVpcConfig []interface{}) *codebuild.VpcConfig { vpcConfig := codebuild.VpcConfig{} - if len(rawVpcConfig) == 0 { - return &vpcConfig - } else { - - data := rawVpcConfig[0].(map[string]interface{}) - vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) - vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) - vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) - + if len(rawVpcConfig) == 0 || rawVpcConfig[0] == nil { return &vpcConfig } + + data := rawVpcConfig[0].(map[string]interface{}) + vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) + vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) + vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) + + return &vpcConfig } func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { @@ -469,13 +512,19 @@ func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { data := configRaw.(map[string]interface{}) sourceType := data["type"].(string) - location := data["location"].(string) - buildspec := data["buildspec"].(string) projectSource = codebuild.ProjectSource{ - Type: &sourceType, - Location: &location, - Buildspec: &buildspec, + Buildspec: aws.String(data["buildspec"].(string)), + GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), + InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), + Location: aws.String(data["location"].(string)), + Type: aws.String(sourceType), + } + + // Only valid for GITHUB source type, e.g. + // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus + if sourceType == codebuild.SourceTypeGithub { + projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) } if v, ok := data["auth"]; ok { @@ -540,6 +589,13 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e d.Set("name", project.Name) d.Set("service_role", project.ServiceRole) d.Set("build_timeout", project.TimeoutInMinutes) + if project.Badge != nil { + d.Set("badge_enabled", project.Badge.BadgeEnabled) + d.Set("badge_url", project.Badge.BadgeRequestUrl) + } else { + d.Set("badge_enabled", false) + d.Set("badge_url", "") + } if err := d.Set("tags", tagsToMapCodeBuild(project.Tags)); err != nil { return err @@ -600,11 +656,30 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) params.TimeoutInMinutes = aws.Int64(int64(d.Get("build_timeout").(int))) } + if d.HasChange("badge_enabled") { + params.BadgeEnabled = aws.Bool(d.Get("badge_enabled").(bool)) + } + // The documentation clearly says "The replacement set of tags for this build project." // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - _, err := conn.UpdateProject(params) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + + _, err = conn.UpdateProject(params) + if err != nil { + // Work around eventual consistency of IAM + if isAWSErr(err, "InvalidInputException", "CodeBuild is not authorized to perform") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + + }) if err != nil { return fmt.Errorf( @@ -626,8 +701,6 @@ func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) return err } - d.SetId("") - return nil } @@ -697,22 +770,19 @@ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnviron func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interface{} { l := make([]interface{}, 1) - m := map[string]interface{}{} - - m["type"] = *source.Type + m := map[string]interface{}{ + "buildspec": aws.StringValue(source.Buildspec), + "location": aws.StringValue(source.Location), + "git_clone_depth": int(aws.Int64Value(source.GitCloneDepth)), + "insecure_ssl": aws.BoolValue(source.InsecureSsl), + "report_build_status": aws.BoolValue(source.ReportBuildStatus), + "type": aws.StringValue(source.Type), + } if source.Auth != nil { m["auth"] = schema.NewSet(resourceAwsCodeBuildProjectSourceAuthHash, []interface{}{sourceAuthToMap(source.Auth)}) } - if source.Buildspec != nil { - m["buildspec"] = *source.Buildspec - } - - if source.Location != nil { - m["location"] = *source.Location - } - l[0] = m return l @@ -758,7 +828,12 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them ev := e.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s:%s-", ev["name"].(string), ev["value"].(string))) + buf.WriteString(fmt.Sprintf("%s:", ev["name"].(string))) + // type is sometimes not returned by the API + if v, ok := ev["type"]; ok { + buf.WriteString(fmt.Sprintf("%s:", v.(string))) + } + buf.WriteString(fmt.Sprintf("%s-", ev["value"].(string))) } } @@ -776,6 +851,15 @@ func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { if v, ok := m["location"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["git_clone_depth"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) + } + if v, ok := m["insecure_ssl"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) + } + if v, ok := m["report_build_status"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) + } return hashcode.String(buf.String()) } @@ -801,6 +885,9 @@ func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVari item := map[string]interface{}{} item["name"] = *env.Name item["value"] = *env.Value + if env.Type != nil { + item["type"] = *env.Type + } envVariables = append(envVariables, item) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go new file mode 100644 index 000000000..6022d4fd1 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_webhook.go @@ -0,0 +1,134 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codebuild" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCodeBuildWebhook() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCodeBuildWebhookCreate, + Read: resourceAwsCodeBuildWebhookRead, + Delete: resourceAwsCodeBuildWebhookDelete, + Update: resourceAwsCodeBuildWebhookUpdate, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "project_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "branch_filter": { + Type: schema.TypeString, + Optional: true, + }, + "payload_url": { + Type: schema.TypeString, + Computed: true, + }, + "secret": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "url": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsCodeBuildWebhookCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + resp, err := conn.CreateWebhook(&codebuild.CreateWebhookInput{ + ProjectName: aws.String(d.Get("project_name").(string)), + BranchFilter: aws.String(d.Get("branch_filter").(string)), + }) + if err != nil { + return err + } + + // Secret is only returned on create, so capture it at the start + d.Set("secret", resp.Webhook.Secret) + d.SetId(d.Get("project_name").(string)) + + return resourceAwsCodeBuildWebhookRead(d, meta) +} + +func resourceAwsCodeBuildWebhookRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ + Names: []*string{ + aws.String(d.Id()), + }, + }) + + if err != nil { + return err + } + + if len(resp.Projects) == 0 { + log.Printf("[WARN] CodeBuild Project %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + project := resp.Projects[0] + + if project.Webhook == nil { + log.Printf("[WARN] CodeBuild Project %q webhook not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("branch_filter", project.Webhook.BranchFilter) + d.Set("payload_url", project.Webhook.PayloadUrl) + d.Set("project_name", project.Name) + d.Set("url", project.Webhook.Url) + // The secret is never returned after creation, so don't set it here + + return nil +} + +func resourceAwsCodeBuildWebhookUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + _, err := conn.UpdateWebhook(&codebuild.UpdateWebhookInput{ + ProjectName: aws.String(d.Id()), + BranchFilter: aws.String(d.Get("branch_filter").(string)), + RotateSecret: aws.Bool(false), + }) + + if err != nil { + return err + } + + return resourceAwsCodeBuildWebhookRead(d, meta) +} + +func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + _, err := conn.DeleteWebhook(&codebuild.DeleteWebhookInput{ + ProjectName: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, codebuild.ErrCodeResourceNotFoundException, "") { + return nil + } + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go index 365fb29a8..57cdfb4a3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go @@ -112,7 +112,13 @@ func resourceAwsCodeCommitRepositoryRead(d *schema.ResourceData, meta interface{ out, err := conn.GetRepository(input) if err != nil { - return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error()) + if isAWSErr(err, codecommit.ErrCodeRepositoryDoesNotExistException, "") { + log.Printf("[WARN] CodeCommit Repository (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } else { + return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error()) + } } d.Set("repository_id", out.RepositoryMetadata.RepositoryId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go index 706bd7afa..6c539c382 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/codedeploy" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCodeDeployApp() *schema.Resource { @@ -20,14 +21,25 @@ func resourceAwsCodeDeployApp() *schema.Resource { Delete: resourceAwsCodeDeployAppDelete, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ForceNew: true, }, + "compute_platform": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + codedeploy.ComputePlatformServer, + codedeploy.ComputePlatformLambda, + }, false), + Default: codedeploy.ComputePlatformServer, + }, + // The unique ID is set by AWS on create. - "unique_id": &schema.Schema{ + "unique_id": { Type: schema.TypeString, Optional: true, Computed: true, @@ -40,10 +52,12 @@ func resourceAwsCodeDeployAppCreate(d *schema.ResourceData, meta interface{}) er conn := meta.(*AWSClient).codedeployconn application := d.Get("name").(string) + computePlatform := d.Get("compute_platform").(string) log.Printf("[DEBUG] Creating CodeDeploy application %s", application) resp, err := conn.CreateApplication(&codedeploy.CreateApplicationInput{ ApplicationName: aws.String(application), + ComputePlatform: aws.String(computePlatform), }) if err != nil { return err @@ -78,6 +92,7 @@ func resourceAwsCodeDeployAppRead(d *schema.ResourceData, meta interface{}) erro } } + d.Set("compute_platform", resp.Application.ComputePlatform) d.Set("name", resp.Application.ApplicationName) return nil @@ -110,7 +125,6 @@ func resourceAwsCodeDeployAppDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if cderr, ok := err.(awserr.Error); ok && cderr.Code() == "InvalidApplicationNameException" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting CodeDeploy application: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go index 886e4f25a..0c5e1fce7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go @@ -34,6 +34,7 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ codedeploy.MinimumHealthyHostsTypeHostCount, codedeploy.MinimumHealthyHostsTypeFleetPercent, @@ -42,6 +43,7 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { "value": { Type: schema.TypeInt, Optional: true, + ForceNew: true, }, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go index 956932f0a..875a24adb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go @@ -245,6 +245,40 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { ValidateFunc: validateMaxLength(100), }, + "ec2_tag_set": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ec2_tag_filter": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + + "type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateTagFilters, + }, + + "value": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + }, + Set: resourceAwsCodeDeployTagFilterHash, + }, + }, + }, + Set: resourceAwsCodeDeployTagSetHash, + }, + "ec2_tag_filter": &schema.Schema{ Type: schema.TypeSet, Optional: true, @@ -367,9 +401,12 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int input.OnPremisesInstanceTagFilters = onPremFilters } + if attr, ok := d.GetOk("ec2_tag_set"); ok { + input.Ec2TagSet = buildEC2TagSet(attr.(*schema.Set).List()) + } + if attr, ok := d.GetOk("ec2_tag_filter"); ok { - ec2TagFilters := buildEC2TagFilters(attr.(*schema.Set).List()) - input.Ec2TagFilters = ec2TagFilters + input.Ec2TagFilters = buildEC2TagFilters(attr.(*schema.Set).List()) } if attr, ok := d.GetOk("trigger_configuration"); ok { @@ -460,6 +497,10 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter return err } + if err := d.Set("ec2_tag_set", ec2TagSetToMap(resp.DeploymentGroupInfo.Ec2TagSet)); err != nil { + return err + } + if err := d.Set("ec2_tag_filter", ec2TagFiltersToMap(resp.DeploymentGroupInfo.Ec2TagFilters)); err != nil { return err } @@ -527,6 +568,12 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int input.OnPremisesInstanceTagFilters = onPremFilters } + if d.HasChange("ec2_tag_set") { + _, n := d.GetChange("ec2_tag_set") + ec2TagSet := buildEC2TagSet(n.(*schema.Set).List()) + input.Ec2TagSet = ec2TagSet + } + if d.HasChange("ec2_tag_filter") { _, n := d.GetChange("ec2_tag_filter") ec2Filters := buildEC2TagFilters(n.(*schema.Set).List()) @@ -608,8 +655,6 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int return err } - d.SetId("") - return nil } @@ -655,6 +700,18 @@ func buildEC2TagFilters(configured []interface{}) []*codedeploy.EC2TagFilter { return filters } +// buildEC2TagSet converts raw schema lists into a codedeploy.EC2TagSet. +func buildEC2TagSet(configured []interface{}) *codedeploy.EC2TagSet { + filterSets := make([][]*codedeploy.EC2TagFilter, 0) + for _, raw := range configured { + m := raw.(map[string]interface{}) + rawFilters := m["ec2_tag_filter"].(*schema.Set) + filters := buildEC2TagFilters(rawFilters.List()) + filterSets = append(filterSets, filters) + } + return &codedeploy.EC2TagSet{Ec2TagSetList: filterSets} +} + // buildTriggerConfigs converts a raw schema list into a list of // codedeploy.TriggerConfig. func buildTriggerConfigs(configured []interface{}) []*codedeploy.TriggerConfig { @@ -846,11 +903,11 @@ func expandBlueGreenDeploymentConfig(list []interface{}) *codedeploy.BlueGreenDe return blueGreenDeploymentConfig } -// ec2TagFiltersToMap converts lists of tag filters into a []map[string]string. -func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]string { - result := make([]map[string]string, 0, len(list)) +// ec2TagFiltersToMap converts lists of tag filters into a []map[string]interface{}. +func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]interface{} { + result := make([]map[string]interface{}, 0, len(list)) for _, tf := range list { - l := make(map[string]string) + l := make(map[string]interface{}) if tf.Key != nil && *tf.Key != "" { l["key"] = *tf.Key } @@ -884,6 +941,28 @@ func onPremisesTagFiltersToMap(list []*codedeploy.TagFilter) []map[string]string return result } +// ec2TagSetToMap converts lists of tag filters into a [][]map[string]string. +func ec2TagSetToMap(tagSet *codedeploy.EC2TagSet) []map[string]interface{} { + var result []map[string]interface{} + if tagSet == nil { + result = make([]map[string]interface{}, 0) + } else { + result = make([]map[string]interface{}, 0, len(tagSet.Ec2TagSetList)) + for _, filterSet := range tagSet.Ec2TagSetList { + filters := ec2TagFiltersToMap(filterSet) + filtersAsIntfSlice := make([]interface{}, 0, len(filters)) + for _, item := range filters { + filtersAsIntfSlice = append(filtersAsIntfSlice, item) + } + tagFilters := map[string]interface{}{ + "ec2_tag_filter": schema.NewSet(resourceAwsCodeDeployTagFilterHash, filtersAsIntfSlice), + } + result = append(result, tagFilters) + } + } + return result +} + // triggerConfigsToMap converts a list of []*codedeploy.TriggerConfig into a []map[string]interface{} func triggerConfigsToMap(list []*codedeploy.TriggerConfig) []map[string]interface{} { result := make([]map[string]interface{}, 0, len(list)) @@ -1067,6 +1146,19 @@ func resourceAwsCodeDeployTagFilterHash(v interface{}) int { return hashcode.String(buf.String()) } +func resourceAwsCodeDeployTagSetHash(v interface{}) int { + tagSetMap := v.(map[string]interface{}) + filterSet := tagSetMap["ec2_tag_filter"] + filterSetSlice := filterSet.(*schema.Set).List() + + var x uint64 + x = 1 + for i, filter := range filterSetSlice { + x = ((x << 7) | (x >> (64 - 7))) ^ uint64(i) ^ uint64(resourceAwsCodeDeployTagFilterHash(filter)) + } + return int(x) +} + func resourceAwsCodeDeployTriggerConfigHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go index ff35e5b8f..b9148fff8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go @@ -488,7 +488,5 @@ func resourceAwsCodePipelineDelete(d *schema.ResourceData, meta interface{}) err return err } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go index a4629b399..8730192c9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cognitoidentity" "github.com/hashicorp/terraform/helper/resource" @@ -30,6 +31,11 @@ func resourceAwsCognitoIdentityPool() *schema.Resource { ValidateFunc: validateCognitoIdentityPoolName, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cognito_identity_providers": { Type: schema.TypeSet, Optional: true, @@ -151,6 +157,14 @@ func resourceAwsCognitoIdentityPoolRead(d *schema.ResourceData, meta interface{} return err } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "cognito-identity", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("identitypool/%s", d.Id()), + } + d.Set("arn", arn.String()) d.Set("identity_pool_name", ip.IdentityPoolName) d.Set("allow_unauthenticated_identities", ip.AllowUnauthenticatedIdentities) d.Set("developer_provider_name", ip.DeveloperProviderName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go new file mode 100644 index 000000000..57b25f8ca --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_provider.go @@ -0,0 +1,209 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCognitoIdentityProvider() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCognitoIdentityProviderCreate, + Read: resourceAwsCognitoIdentityProviderRead, + Update: resourceAwsCognitoIdentityProviderUpdate, + Delete: resourceAwsCognitoIdentityProviderDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "attribute_mapping": { + Type: schema.TypeMap, + Optional: true, + }, + + "idp_identifiers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "provider_details": { + Type: schema.TypeMap, + Required: true, + }, + + "provider_name": { + Type: schema.TypeString, + Required: true, + }, + + "provider_type": { + Type: schema.TypeString, + Required: true, + }, + + "user_pool_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsCognitoIdentityProviderCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Print("[DEBUG] Creating Cognito Identity Provider") + + providerName := d.Get("provider_name").(string) + userPoolID := d.Get("user_pool_id").(string) + params := &cognitoidentityprovider.CreateIdentityProviderInput{ + ProviderName: aws.String(providerName), + ProviderType: aws.String(d.Get("provider_type").(string)), + UserPoolId: aws.String(userPoolID), + } + + if v, ok := d.GetOk("attribute_mapping"); ok { + params.AttributeMapping = stringMapToPointers(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("provider_details"); ok { + params.ProviderDetails = stringMapToPointers(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("idp_identifiers"); ok { + params.IdpIdentifiers = expandStringList(v.([]interface{})) + } + + _, err := conn.CreateIdentityProvider(params) + if err != nil { + return fmt.Errorf("Error creating Cognito Identity Provider: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", userPoolID, providerName)) + + return resourceAwsCognitoIdentityProviderRead(d, meta) +} + +func resourceAwsCognitoIdentityProviderRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Printf("[DEBUG] Reading Cognito Identity Provider: %s", d.Id()) + + userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) + if err != nil { + return err + } + + ret, err := conn.DescribeIdentityProvider(&cognitoidentityprovider.DescribeIdentityProviderInput{ + ProviderName: aws.String(providerName), + UserPoolId: aws.String(userPoolID), + }) + + if err != nil { + if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Cognito Identity Provider %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if ret == nil || ret.IdentityProvider == nil { + log.Printf("[WARN] Cognito Identity Provider %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + ip := ret.IdentityProvider + d.Set("provider_name", ip.ProviderName) + d.Set("provider_type", ip.ProviderType) + d.Set("user_pool_id", ip.UserPoolId) + + if err := d.Set("attribute_mapping", aws.StringValueMap(ip.AttributeMapping)); err != nil { + return fmt.Errorf("error setting attribute_mapping error: %s", err) + } + + if err := d.Set("provider_details", aws.StringValueMap(ip.ProviderDetails)); err != nil { + return fmt.Errorf("error setting provider_details error: %s", err) + } + + if err := d.Set("idp_identifiers", flattenStringList(ip.IdpIdentifiers)); err != nil { + return fmt.Errorf("error setting idp_identifiers error: %s", err) + } + + return nil +} + +func resourceAwsCognitoIdentityProviderUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Print("[DEBUG] Updating Cognito Identity Provider") + + userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) + if err != nil { + return err + } + + params := &cognitoidentityprovider.UpdateIdentityProviderInput{ + ProviderName: aws.String(providerName), + UserPoolId: aws.String(userPoolID), + } + + if d.HasChange("attribute_mapping") { + params.AttributeMapping = stringMapToPointers(d.Get("attribute_mapping").(map[string]interface{})) + } + + if d.HasChange("provider_details") { + params.ProviderDetails = stringMapToPointers(d.Get("provider_details").(map[string]interface{})) + } + + if d.HasChange("idp_identifiers") { + params.IdpIdentifiers = expandStringList(d.Get("supported_login_providers").([]interface{})) + } + + _, err = conn.UpdateIdentityProvider(params) + if err != nil { + return fmt.Errorf("Error updating Cognito Identity Provider: %s", err) + } + + return resourceAwsCognitoIdentityProviderRead(d, meta) +} + +func resourceAwsCognitoIdentityProviderDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Printf("[DEBUG] Deleting Cognito Identity Provider: %s", d.Id()) + + userPoolID, providerName, err := decodeCognitoIdentityProviderID(d.Id()) + if err != nil { + return err + } + + _, err = conn.DeleteIdentityProvider(&cognitoidentityprovider.DeleteIdentityProviderInput{ + ProviderName: aws.String(providerName), + UserPoolId: aws.String(userPoolID), + }) + + if err != nil { + if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func decodeCognitoIdentityProviderID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format UserPoolID:ProviderName, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go new file mode 100644 index 000000000..5870d9984 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go @@ -0,0 +1,211 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsCognitoResourceServer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCognitoResourceServerCreate, + Read: resourceAwsCognitoResourceServerRead, + Update: resourceAwsCognitoResourceServerUpdate, + Delete: resourceAwsCognitoResourceServerDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html + Schema: map[string]*schema.Schema{ + "identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "scope": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 25, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope_description": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 256), + }, + "scope_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoResourceServerScopeName, + }, + }, + }, + }, + "user_pool_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "scope_identifiers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + } +} + +func resourceAwsCognitoResourceServerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + identifier := d.Get("identifier").(string) + userPoolID := d.Get("user_pool_id").(string) + + params := &cognitoidentityprovider.CreateResourceServerInput{ + Identifier: aws.String(identifier), + Name: aws.String(d.Get("name").(string)), + UserPoolId: aws.String(userPoolID), + } + + if v, ok := d.GetOk("scope"); ok { + configs := v.(*schema.Set).List() + params.Scopes = expandCognitoResourceServerScope(configs) + } + + log.Printf("[DEBUG] Creating Cognito Resource Server: %s", params) + + _, err := conn.CreateResourceServer(params) + + if err != nil { + return fmt.Errorf("Error creating Cognito Resource Server: %s", err) + } + + d.SetId(fmt.Sprintf("%s|%s", userPoolID, identifier)) + + return resourceAwsCognitoResourceServerRead(d, meta) +} + +func resourceAwsCognitoResourceServerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) + if err != nil { + return err + } + + params := &cognitoidentityprovider.DescribeResourceServerInput{ + Identifier: aws.String(identifier), + UserPoolId: aws.String(userPoolID), + } + + log.Printf("[DEBUG] Reading Cognito Resource Server: %s", params) + + resp, err := conn.DescribeResourceServer(params) + + if err != nil { + if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Cognito Resource Server %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp == nil || resp.ResourceServer == nil { + log.Printf("[WARN] Cognito Resource Server %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("identifier", resp.ResourceServer.Identifier) + d.Set("name", resp.ResourceServer.Name) + d.Set("user_pool_id", resp.ResourceServer.UserPoolId) + + scopes := flattenCognitoResourceServerScope(resp.ResourceServer.Scopes) + if err := d.Set("scope", scopes); err != nil { + return fmt.Errorf("Failed setting schema: %s", err) + } + + var scopeIdentifiers []string + for _, elem := range scopes { + + scopeIdentifier := fmt.Sprintf("%s/%s", aws.StringValue(resp.ResourceServer.Identifier), elem["scope_name"].(string)) + scopeIdentifiers = append(scopeIdentifiers, scopeIdentifier) + } + d.Set("scope_identifiers", scopeIdentifiers) + return nil +} + +func resourceAwsCognitoResourceServerUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) + if err != nil { + return err + } + + params := &cognitoidentityprovider.UpdateResourceServerInput{ + Identifier: aws.String(identifier), + Name: aws.String(d.Get("name").(string)), + Scopes: expandCognitoResourceServerScope(d.Get("scope").(*schema.Set).List()), + UserPoolId: aws.String(userPoolID), + } + + log.Printf("[DEBUG] Updating Cognito Resource Server: %s", params) + + _, err = conn.UpdateResourceServer(params) + if err != nil { + return fmt.Errorf("Error updating Cognito Resource Server: %s", err) + } + + return resourceAwsCognitoResourceServerRead(d, meta) +} + +func resourceAwsCognitoResourceServerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + userPoolID, identifier, err := decodeCognitoResourceServerID(d.Id()) + if err != nil { + return err + } + + params := &cognitoidentityprovider.DeleteResourceServerInput{ + Identifier: aws.String(identifier), + UserPoolId: aws.String(userPoolID), + } + + log.Printf("[DEBUG] Deleting Resource Server: %s", params) + + _, err = conn.DeleteResourceServer(params) + + if err != nil { + if isAWSErr(err, cognitoidentityprovider.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("Error deleting Resource Server: %s", err) + } + + return nil +} + +func decodeCognitoResourceServerID(id string) (string, string, error) { + idParts := strings.Split(id, "|") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format UserPoolID|Identifier, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go index f8f4464f0..98f9748ff 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go @@ -130,7 +130,7 @@ func resourceAwsCognitoUserGroupUpdate(d *schema.ResourceData, meta interface{}) } if d.HasChange("role_arn") { - params.RoleArn = aws.String(d.Get("description").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) } log.Print("[DEBUG] Updating Cognito User Group") diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go index 25ef24a9b..2d7f28e9f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go @@ -163,6 +163,11 @@ func resourceAwsCognitoUserPool() *schema.Resource { ValidateFunc: validateCognitoUserPoolEmailVerificationMessage, }, + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "lambda_config": { Type: schema.TypeList, Optional: true, @@ -210,6 +215,11 @@ func resourceAwsCognitoUserPool() *schema.Resource { Optional: true, ValidateFunc: validateArn, }, + "user_migration": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, "verify_auth_challenge_response": { Type: schema.TypeString, Optional: true, @@ -650,6 +660,7 @@ func resourceAwsCognitoUserPoolRead(d *schema.ResourceData, meta interface{}) er Resource: fmt.Sprintf("userpool/%s", d.Id()), } d.Set("arn", arn.String()) + d.Set("endpoint", fmt.Sprintf("cognito-idp.%s.amazonaws.com/%s", meta.(*AWSClient).region, d.Id())) d.Set("auto_verified_attributes", flattenStringList(resp.UserPool.AutoVerifiedAttributes)) if resp.UserPool.EmailVerificationSubject != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go index 692f8bcf9..57c2fda25 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go @@ -1,7 +1,9 @@ package aws import ( + "fmt" "log" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" @@ -18,7 +20,7 @@ func resourceAwsCognitoUserPoolClient() *schema.Resource { Delete: resourceAwsCognitoUserPoolClientDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsCognitoUserPoolClientImport, }, // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html @@ -281,7 +283,7 @@ func resourceAwsCognitoUserPoolClientUpdate(d *schema.ResourceData, meta interfa } if d.HasChange("refresh_token_validity") { - params.RefreshTokenValidity = aws.Int64(d.Get("refresh_token_validity").(int64)) + params.RefreshTokenValidity = aws.Int64(int64(d.Get("refresh_token_validity").(int))) } if d.HasChange("allowed_oauth_flows") { @@ -340,3 +342,16 @@ func resourceAwsCognitoUserPoolClientDelete(d *schema.ResourceData, meta interfa return nil } + +func resourceAwsCognitoUserPoolClientImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + if len(strings.Split(d.Id(), "/")) != 2 || len(d.Id()) < 3 { + return []*schema.ResourceData{}, fmt.Errorf("[ERR] Wrong format of resource: %s. Please follow 'user-pool-id/client-id'", d.Id()) + } + userPoolId := strings.Split(d.Id(), "/")[0] + clientId := strings.Split(d.Id(), "/")[1] + d.SetId(clientId) + d.Set("user_pool_id", userPoolId) + log.Printf("[DEBUG] Importing client %s for user pool %s", clientId, userPoolId) + + return []*schema.ResourceData{d}, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go new file mode 100644 index 000000000..88738864e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go @@ -0,0 +1,143 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/configservice" + + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsConfigAggregateAuthorization() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsConfigAggregateAuthorizationPut, + Read: resourceAwsConfigAggregateAuthorizationRead, + Delete: resourceAwsConfigAggregateAuthorizationDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsConfigAggregateAuthorizationPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + accountId := d.Get("account_id").(string) + region := d.Get("region").(string) + + req := &configservice.PutAggregationAuthorizationInput{ + AuthorizedAccountId: aws.String(accountId), + AuthorizedAwsRegion: aws.String(region), + } + + _, err := conn.PutAggregationAuthorization(req) + if err != nil { + return fmt.Errorf("Error creating aggregate authorization: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", accountId, region)) + return resourceAwsConfigAggregateAuthorizationRead(d, meta) +} + +func resourceAwsConfigAggregateAuthorizationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + accountId, region, err := resourceAwsConfigAggregateAuthorizationParseID(d.Id()) + if err != nil { + return err + } + + d.Set("account_id", accountId) + d.Set("region", region) + + aggregateAuthorizations, err := describeConfigAggregateAuthorizations(conn) + if err != nil { + return fmt.Errorf("Error retrieving list of aggregate authorizations: %s", err) + } + + // Check for existing authorization + for _, auth := range aggregateAuthorizations { + if accountId == aws.StringValue(auth.AuthorizedAccountId) && region == aws.StringValue(auth.AuthorizedAwsRegion) { + d.Set("arn", auth.AggregationAuthorizationArn) + return nil + } + } + + log.Printf("[WARN] Aggregate Authorization not found, removing from state: %s", d.Id()) + d.SetId("") + return nil +} + +func resourceAwsConfigAggregateAuthorizationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + accountId, region, err := resourceAwsConfigAggregateAuthorizationParseID(d.Id()) + if err != nil { + return err + } + + req := &configservice.DeleteAggregationAuthorizationInput{ + AuthorizedAccountId: aws.String(accountId), + AuthorizedAwsRegion: aws.String(region), + } + + _, err = conn.DeleteAggregationAuthorization(req) + if err != nil { + return fmt.Errorf("Error deleting aggregate authorization: %s", err) + } + + return nil +} + +func describeConfigAggregateAuthorizations(conn *configservice.ConfigService) ([]*configservice.AggregationAuthorization, error) { + aggregationAuthorizations := []*configservice.AggregationAuthorization{} + input := &configservice.DescribeAggregationAuthorizationsInput{} + + for { + output, err := conn.DescribeAggregationAuthorizations(input) + if err != nil { + return aggregationAuthorizations, err + } + for _, aggregationAuthorization := range output.AggregationAuthorizations { + aggregationAuthorizations = append(aggregationAuthorizations, aggregationAuthorization) + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + return aggregationAuthorizations, nil +} + +func resourceAwsConfigAggregateAuthorizationParseID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("Please make sure the ID is in the form account_id:region (i.e. 123456789012:us-east-1") + } + accountId := idParts[0] + region := idParts[1] + return accountId, region, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go index 7d10647dd..9f055b5b6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go @@ -295,7 +295,6 @@ func resourceAwsConfigConfigRuleDelete(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] AWS Config config rule %q deleted", name) - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go new file mode 100644 index 000000000..7224331f9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go @@ -0,0 +1,191 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/configservice" + + "github.com/hashicorp/terraform/helper/customdiff" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsConfigConfigurationAggregator() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsConfigConfigurationAggregatorPut, + Read: resourceAwsConfigConfigurationAggregatorRead, + Update: resourceAwsConfigConfigurationAggregatorPut, + Delete: resourceAwsConfigConfigurationAggregatorDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + CustomizeDiff: customdiff.Sequence( + // This is to prevent this error: + // All fields are ForceNew or Computed w/out Optional, Update is superfluous + customdiff.ForceNewIfChange("account_aggregation_source", func(old, new, meta interface{}) bool { + return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 + }), + customdiff.ForceNewIfChange("organization_aggregation_source", func(old, new, meta interface{}) bool { + return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 + }), + ), + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateMaxLength(256), + }, + "account_aggregation_source": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"organization_aggregation_source"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "account_ids": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateAwsAccountId, + }, + }, + "all_regions": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, + "regions": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "organization_aggregation_source": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"account_aggregation_source"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "all_regions": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, + "regions": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + }, + } +} + +func resourceAwsConfigConfigurationAggregatorPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + name := d.Get("name").(string) + + req := &configservice.PutConfigurationAggregatorInput{ + ConfigurationAggregatorName: aws.String(name), + } + + account_aggregation_sources := d.Get("account_aggregation_source").([]interface{}) + if len(account_aggregation_sources) > 0 { + req.AccountAggregationSources = expandConfigAccountAggregationSources(account_aggregation_sources) + } + + organization_aggregation_sources := d.Get("organization_aggregation_source").([]interface{}) + if len(organization_aggregation_sources) > 0 { + req.OrganizationAggregationSource = expandConfigOrganizationAggregationSource(organization_aggregation_sources[0].(map[string]interface{})) + } + + _, err := conn.PutConfigurationAggregator(req) + if err != nil { + return fmt.Errorf("Error creating aggregator: %s", err) + } + + d.SetId(strings.ToLower(name)) + + return resourceAwsConfigConfigurationAggregatorRead(d, meta) +} + +func resourceAwsConfigConfigurationAggregatorRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + req := &configservice.DescribeConfigurationAggregatorsInput{ + ConfigurationAggregatorNames: []*string{aws.String(d.Id())}, + } + + res, err := conn.DescribeConfigurationAggregators(req) + if err != nil { + if isAWSErr(err, configservice.ErrCodeNoSuchConfigurationAggregatorException, "") { + log.Printf("[WARN] No such configuration aggregator (%s), removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if res == nil || len(res.ConfigurationAggregators) == 0 { + log.Printf("[WARN] No aggregators returned (%s), removing from state", d.Id()) + d.SetId("") + return nil + } + + aggregator := res.ConfigurationAggregators[0] + d.Set("arn", aggregator.ConfigurationAggregatorArn) + d.Set("name", aggregator.ConfigurationAggregatorName) + + if err := d.Set("account_aggregation_source", flattenConfigAccountAggregationSources(aggregator.AccountAggregationSources)); err != nil { + return fmt.Errorf("error setting account_aggregation_source: %s", err) + } + + if err := d.Set("organization_aggregation_source", flattenConfigOrganizationAggregationSource(aggregator.OrganizationAggregationSource)); err != nil { + return fmt.Errorf("error setting organization_aggregation_source: %s", err) + } + + return nil +} + +func resourceAwsConfigConfigurationAggregatorDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + req := &configservice.DeleteConfigurationAggregatorInput{ + ConfigurationAggregatorName: aws.String(d.Id()), + } + _, err := conn.DeleteConfigurationAggregator(req) + if err != nil { + return err + } + + d.SetId("") + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go index 9c5ae064a..df8319bce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go @@ -144,6 +144,5 @@ func resourceAwsConfigConfigurationRecorderDelete(d *schema.ResourceData, meta i return fmt.Errorf("Deleting Configuration Recorder failed: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go index a2ba85b5d..3420ed5f5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder_status.go @@ -117,6 +117,5 @@ func resourceAwsConfigConfigurationRecorderStatusDelete(d *schema.ResourceData, return fmt.Errorf("Stopping Configuration Recorder failed: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go index bd3b70e17..f2fbe930f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go @@ -178,6 +178,5 @@ func resourceAwsConfigDeliveryChannelDelete(d *schema.ResourceData, meta interfa return fmt.Errorf("Unable to delete delivery channel: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go index 668f8a80c..7e5dda3b0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go @@ -236,7 +236,6 @@ func resourceAwsCustomerGatewayDelete(d *schema.ResourceData, meta interface{}) }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidCustomerGatewayID.NotFound" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting CustomerGateway: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go index 0acf9a86e..c5884a257 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go @@ -485,8 +485,6 @@ func resourceAwsDaxClusterDelete(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error waiting for DAX (%s) to delete: %s", d.Id(), sterr) } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go new file mode 100644 index 000000000..76df02b2a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_parameter_group.go @@ -0,0 +1,191 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDaxParameterGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDaxParameterGroupCreate, + Read: resourceAwsDaxParameterGroupRead, + Update: resourceAwsDaxParameterGroupUpdate, + Delete: resourceAwsDaxParameterGroupDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "parameters": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsDaxParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.CreateParameterGroupInput{ + ParameterGroupName: aws.String(d.Get("name").(string)), + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.CreateParameterGroup(input) + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + + if len(d.Get("parameters").(*schema.Set).List()) > 0 { + return resourceAwsDaxParameterGroupUpdate(d, meta) + } + return resourceAwsDaxParameterGroupRead(d, meta) +} + +func resourceAwsDaxParameterGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + resp, err := conn.DescribeParameterGroups(&dax.DescribeParameterGroupsInput{ + ParameterGroupNames: []*string{aws.String(d.Id())}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if len(resp.ParameterGroups) == 0 { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + pg := resp.ParameterGroups[0] + + paramresp, err := conn.DescribeParameters(&dax.DescribeParametersInput{ + ParameterGroupName: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("name", pg.ParameterGroupName) + desc := pg.Description + // default description is " " + if desc != nil && *desc == " " { + *desc = "" + } + d.Set("description", desc) + d.Set("parameters", flattenDaxParameterGroupParameters(paramresp.Parameters)) + return nil +} + +func resourceAwsDaxParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.UpdateParameterGroupInput{ + ParameterGroupName: aws.String(d.Id()), + } + + if d.HasChange("parameters") { + input.ParameterNameValues = expandDaxParameterGroupParameterNameValue( + d.Get("parameters").(*schema.Set).List(), + ) + } + + _, err := conn.UpdateParameterGroup(input) + if err != nil { + return err + } + + return resourceAwsDaxParameterGroupRead(d, meta) +} + +func resourceAwsDaxParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.DeleteParameterGroupInput{ + ParameterGroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteParameterGroup(input) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + return nil + } + return err + } + + return nil +} + +func expandDaxParameterGroupParameterNameValue(config []interface{}) []*dax.ParameterNameValue { + if len(config) == 0 { + return nil + } + results := make([]*dax.ParameterNameValue, 0, len(config)) + for _, raw := range config { + m := raw.(map[string]interface{}) + pnv := &dax.ParameterNameValue{ + ParameterName: aws.String(m["name"].(string)), + ParameterValue: aws.String(m["value"].(string)), + } + results = append(results, pnv) + } + return results +} + +func flattenDaxParameterGroupParameters(params []*dax.Parameter) []map[string]interface{} { + if len(params) == 0 { + return nil + } + results := make([]map[string]interface{}, 0) + for _, p := range params { + m := map[string]interface{}{ + "name": aws.StringValue(p.ParameterName), + "value": aws.StringValue(p.ParameterValue), + } + results = append(results, m) + } + return results +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go new file mode 100644 index 000000000..9ce8128e5 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_subnet_group.go @@ -0,0 +1,132 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDaxSubnetGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDaxSubnetGroupCreate, + Read: resourceAwsDaxSubnetGroupRead, + Update: resourceAwsDaxSubnetGroupUpdate, + Delete: resourceAwsDaxSubnetGroupDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "subnet_ids": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDaxSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.CreateSubnetGroupInput{ + SubnetGroupName: aws.String(d.Get("name").(string)), + SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.CreateSubnetGroup(input) + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + return resourceAwsDaxSubnetGroupRead(d, meta) +} + +func resourceAwsDaxSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + resp, err := conn.DescribeSubnetGroups(&dax.DescribeSubnetGroupsInput{ + SubnetGroupNames: []*string{aws.String(d.Id())}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { + log.Printf("[WARN] DAX SubnetGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + sg := resp.SubnetGroups[0] + + d.Set("name", sg.SubnetGroupName) + d.Set("description", sg.Description) + subnetIDs := make([]*string, 0, len(sg.Subnets)) + for _, v := range sg.Subnets { + subnetIDs = append(subnetIDs, v.SubnetIdentifier) + } + d.Set("subnet_ids", flattenStringList(subnetIDs)) + d.Set("vpc_id", sg.VpcId) + return nil +} + +func resourceAwsDaxSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.UpdateSubnetGroupInput{ + SubnetGroupName: aws.String(d.Id()), + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + + if d.HasChange("subnet_ids") { + input.SubnetIds = expandStringSet(d.Get("subnet_ids").(*schema.Set)) + } + + _, err := conn.UpdateSubnetGroup(input) + if err != nil { + return err + } + + return resourceAwsDaxSubnetGroupRead(d, meta) +} + +func resourceAwsDaxSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.DeleteSubnetGroupInput{ + SubnetGroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteSubnetGroup(input) + if err != nil { + if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { + return nil + } + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go index aca39ccc1..e3838695e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_event_subscription.go @@ -31,10 +31,19 @@ func resourceAwsDbEventSubscription() *schema.Resource { Computed: true, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateDbEventSubscriptionName, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateDbEventSubscriptionName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbEventSubscriptionName, }, "sns_topic": { Type: schema.TypeString, @@ -74,7 +83,15 @@ func resourceAwsDbEventSubscription() *schema.Resource { func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - name := d.Get("name").(string) + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) sourceIdsSet := d.Get("source_ids").(*schema.Set) @@ -136,7 +153,7 @@ func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Get("name").(string), conn) + sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Id(), conn) if err != nil { return fmt.Errorf("Error retrieving RDS Event Subscription %s: %s", d.Id(), err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go index b24346593..92b4a3070 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go @@ -8,12 +8,11 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDbInstance() *schema.Resource { @@ -219,6 +218,46 @@ func resourceAwsDbInstance() *schema.Resource { }, }, + "s3_import": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{ + "snapshot_identifier", + "replicate_source_db", + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bucket_prefix": { + Type: schema.TypeString, + Required: false, + Optional: true, + ForceNew: true, + }, + "ingestion_role": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + }, + }, + "skip_final_snapshot": { Type: schema.TypeBool, Optional: true, @@ -351,6 +390,20 @@ func resourceAwsDbInstance() *schema.Resource { Computed: true, }, + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + "audit", + "error", + "general", + "slowquery", + }, false), + }, + }, + "tags": tagsSchema(), }, } @@ -408,6 +461,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("kms_key_id"); ok { opts.KmsKeyId = aws.String(attr.(string)) if arnParts := strings.Split(v.(string), ":"); len(arnParts) >= 4 { @@ -432,6 +489,173 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Error creating DB Instance: %s", err) } + } else if v, ok := d.GetOk("s3_import"); ok { + + if _, ok := d.GetOk("allocated_storage"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "allocated_storage": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("engine"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "engine": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("password"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("username"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) + } + + s3_bucket := v.([]interface{})[0].(map[string]interface{}) + opts := rds.RestoreDBInstanceFromS3Input{ + AllocatedStorage: aws.Int64(int64(d.Get("allocated_storage").(int))), + AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), + CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), + DBName: aws.String(d.Get("name").(string)), + DBInstanceClass: aws.String(d.Get("instance_class").(string)), + DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + EngineVersion: aws.String(d.Get("engine_version").(string)), + S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), + S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), + S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), + MasterUsername: aws.String(d.Get("username").(string)), + MasterUserPassword: aws.String(d.Get("password").(string)), + PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + SourceEngine: aws.String(s3_bucket["source_engine"].(string)), + SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), + Tags: tags, + } + + if attr, ok := d.GetOk("multi_az"); ok { + opts.MultiAZ = aws.Bool(attr.(bool)) + + } + + if _, ok := d.GetOk("character_set_name"); ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "character_set_name" doesn't work with with restores"`, d.Get("name").(string)) + } + if _, ok := d.GetOk("timezone"); ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "timezone" doesn't work with with restores"`, d.Get("name").(string)) + } + + attr := d.Get("backup_retention_period") + opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) + + if attr, ok := d.GetOk("maintenance_window"); ok { + opts.PreferredMaintenanceWindow = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("backup_window"); ok { + opts.PreferredBackupWindow = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("license_model"); ok { + opts.LicenseModel = aws.String(attr.(string)) + } + if attr, ok := d.GetOk("parameter_group_name"); ok { + opts.DBParameterGroupName = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + var s []*string + for _, v := range attr.List() { + s = append(s, aws.String(v.(string))) + } + opts.VpcSecurityGroupIds = s + } + + if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { + var s []*string + for _, v := range attr.List() { + s = append(s, aws.String(v.(string))) + } + opts.DBSecurityGroups = s + } + if attr, ok := d.GetOk("storage_type"); ok { + opts.StorageType = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + opts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iops"); ok { + opts.Iops = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("port"); ok { + opts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("availability_zone"); ok { + opts.AvailabilityZone = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("monitoring_role_arn"); ok { + opts.MonitoringRoleArn = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("monitoring_interval"); ok { + opts.MonitoringInterval = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("option_group_name"); ok { + opts.OptionGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + opts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) + } + + log.Printf("[DEBUG] DB Instance S3 Restore configuration: %#v", opts) + var err error + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err = conn.RestoreDBInstanceFromS3(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "ENHANCED_MONITORING") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidParameterValue", "S3_SNAPSHOT_INGESTION") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidParameterValue", "S3 bucket cannot be found") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating DB Instance: %s", err) + } + + d.SetId(d.Get("identifier").(string)) + + log.Printf("[INFO] DB Instance ID: %s", d.Id()) + + log.Println( + "[INFO] Waiting for DB Instance to be available") + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsDbInstanceCreatePendingStates, + Target: []string{"available", "storage-optimization"}, + Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return err + } + + return resourceAwsDbInstanceRead(d, meta) } else if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBInstanceFromDBSnapshotInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), @@ -462,6 +686,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("engine"); ok { opts.Engine = aws.String(attr.(string)) } @@ -486,7 +714,6 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error if attr, ok := d.GetOk("port"); ok { opts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("tde_credential_arn"); ok { opts.TdeCredentialArn = aws.String(attr.(string)) } @@ -628,6 +855,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("iops"); ok { opts.Iops = aws.Int64(int64(attr.(int))) } @@ -665,17 +896,19 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error err = resource.Retry(5*time.Minute, func() *resource.RetryError { _, err = conn.CreateDBInstance(&opts) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "InvalidParameterValue" && strings.Contains(awsErr.Message(), "ENHANCED_MONITORING") { - return resource.RetryableError(awsErr) - } + if isAWSErr(err, "InvalidParameterValue", "ENHANCED_MONITORING") { + return resource.RetryableError(err) } return resource.NonRetryableError(err) } return nil }) if err != nil { + if isAWSErr(err, "InvalidParameterValue", "") { + return fmt.Errorf("Error creating DB Instance: %s, %+v", err, opts) + } return fmt.Errorf("Error creating DB Instance: %s", err) + } } @@ -775,24 +1008,22 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("monitoring_role_arn", v.MonitoringRoleArn) } + if err := d.Set("enabled_cloudwatch_logs_exports", flattenStringList(v.EnabledCloudwatchLogsExports)); err != nil { + return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) + } + // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("db:%s", d.Id()), - }.String() + arn := aws.StringValue(v.DBInstanceArn) d.Set("arn", arn) resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(arn), }) if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + return fmt.Errorf("Error retrieving tags for ARN: %s", arn) } var dt []*rds.Tag @@ -1020,6 +1251,12 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("enabled_cloudwatch_logs_exports") && !d.IsNewResource() { + d.SetPartial("enabled_cloudwatch_logs_exports") + req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) + requestUpdate = true + } + if d.HasChange("iam_database_authentication_enabled") { req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) requestUpdate = true @@ -1073,14 +1310,7 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("db:%s", d.Id()), - }.String() - if err := setTagsRDS(conn, d, arn); err != nil { + if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { return err } else { d.SetPartial("tags") @@ -1104,8 +1334,7 @@ func resourceAwsDbInstanceRetrieve(id string, conn *rds.RDS) (*rds.DBInstance, e resp, err := conn.DescribeDBInstances(&opts) if err != nil { - dbinstanceerr, ok := err.(awserr.Error) - if ok && dbinstanceerr.Code() == "DBInstanceNotFound" { + if isAWSErr(err, rds.ErrCodeDBInstanceNotFoundFault, "") { return nil, nil } return nil, fmt.Errorf("Error retrieving DB Instances: %s", err) @@ -1151,10 +1380,44 @@ func resourceAwsDbInstanceStateRefreshFunc(id string, conn *rds.RDS) resource.St } } +func buildCloudwatchLogsExportConfiguration(d *schema.ResourceData) *rds.CloudwatchLogsExportConfiguration { + + oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") + o := oraw.([]interface{}) + n := nraw.([]interface{}) + + create, disable := diffCloudwatchLogsExportConfiguration(o, n) + + return &rds.CloudwatchLogsExportConfiguration{ + EnableLogTypes: expandStringList(create), + DisableLogTypes: expandStringList(disable), + } +} + +func diffCloudwatchLogsExportConfiguration(old, new []interface{}) ([]interface{}, []interface{}) { + create := make([]interface{}, 0) + disable := make([]interface{}, 0) + + for _, n := range new { + if _, contains := sliceContainsString(old, n.(string)); !contains { + create = append(create, n) + } + } + + for _, o := range old { + if _, contains := sliceContainsString(new, o.(string)); !contains { + disable = append(disable, o) + } + } + + return create, disable +} + // Database instance status: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html var resourceAwsDbInstanceCreatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "maintenance", "modifying", @@ -1170,6 +1433,7 @@ var resourceAwsDbInstanceDeletePendingStates = []string{ "available", "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "deleting", "incompatible-parameters", @@ -1183,6 +1447,7 @@ var resourceAwsDbInstanceDeletePendingStates = []string{ var resourceAwsDbInstanceUpdatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "maintenance", "modifying", diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go index f84fbd3bd..4651f4437 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go @@ -45,11 +45,12 @@ func resourceAwsDbOptionGroup() *schema.Resource { ValidateFunc: validateDbOptionGroupName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbOptionGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbOptionGroupNamePrefix, }, "engine_name": { Type: schema.TypeString, @@ -109,6 +110,10 @@ func resourceAwsDbOptionGroup() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, + "version": { + Type: schema.TypeString, + Optional: true, + }, }, }, Set: resourceAwsDbOptionHash, @@ -357,5 +362,10 @@ func resourceAwsDbOptionHash(v interface{}) int { for _, sgRaw := range m["db_security_group_memberships"].(*schema.Set).List() { buf.WriteString(fmt.Sprintf("%s-", sgRaw.(string))) } + + if v, ok := m["version"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + return hashcode.String(buf.String()) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go index aab4fe97d..505510b02 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" ) @@ -41,11 +40,12 @@ func resourceAwsDbParameterGroup() *schema.Resource { ValidateFunc: validateDbParamGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbParamGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbParamGroupNamePrefix, }, "family": &schema.Schema{ Type: schema.TypeString, @@ -109,7 +109,7 @@ func resourceAwsDbParameterGroupCreate(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Create DB Parameter Group: %#v", createOpts) - _, err := rdsconn.CreateDBParameterGroup(&createOpts) + resp, err := rdsconn.CreateDBParameterGroup(&createOpts) if err != nil { return fmt.Errorf("Error creating DB Parameter Group: %s", err) } @@ -120,7 +120,8 @@ func resourceAwsDbParameterGroupCreate(d *schema.ResourceData, meta interface{}) d.SetPartial("description") d.Partial(false) - d.SetId(*createOpts.DBParameterGroupName) + d.SetId(aws.StringValue(resp.DBParameterGroup.DBParameterGroupName)) + d.Set("arn", resp.DBParameterGroup.DBParameterGroupArn) log.Printf("[INFO] DB Parameter Group ID: %s", d.Id()) return resourceAwsDbParameterGroupUpdate(d, meta) @@ -227,14 +228,9 @@ func resourceAwsDbParameterGroupRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error setting 'parameter' in state: %#v", err) } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("pg:%s", d.Id()), - }.String() + arn := aws.StringValue(describeResp.DBParameterGroups[0].DBParameterGroupArn) d.Set("arn", arn) + resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(arn), }) @@ -301,14 +297,7 @@ func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{}) } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("pg:%s", d.Id()), - }.String() - if err := setTagsRDS(rdsconn, d, arn); err != nil { + if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { return err } else { d.SetPartial("tags") diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go index b46f5066e..7170b5dfb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" @@ -40,11 +39,12 @@ func resourceAwsDbSubnetGroup() *schema.Resource { ValidateFunc: validateDbSubnetGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbSubnetGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbSubnetGroupNamePrefix, }, "description": &schema.Schema{ @@ -150,13 +150,7 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro // set tags conn := meta.(*AWSClient).rdsconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() + arn := aws.StringValue(subnetGroup.DBSubnetGroupArn) d.Set("arn", arn) resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(arn), @@ -200,13 +194,7 @@ func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) er } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() + arn := d.Get("arn").(string) if err := setTagsRDS(conn, d, arn); err != nil { return err } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go index 7a11dee72..138de0176 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go @@ -243,7 +243,6 @@ func resourceAwsDefaultNetworkAclUpdate(d *schema.ResourceData, meta interface{} func resourceAwsDefaultNetworkAclDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Network ACL. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go index 987dd4a7d..c372ed347 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_route_table.go @@ -155,7 +155,6 @@ func resourceAwsDefaultRouteTableRead(d *schema.ResourceData, meta interface{}) func resourceAwsDefaultRouteTableDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Route Table. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go index f4fb748bb..f76af2d0f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go @@ -101,7 +101,6 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac func resourceAwsDefaultSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Security Group. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go index fc10723db..932d8d23d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_subnet.go @@ -38,6 +38,7 @@ func resourceAwsDefaultSubnet() *schema.Resource { // map_public_ip_on_launch is a computed value for Default Subnets dsubnet.Schema["map_public_ip_on_launch"] = &schema.Schema{ Type: schema.TypeBool, + Optional: true, Computed: true, } // assign_ipv6_address_on_creation is a computed value for Default Subnets @@ -51,35 +52,29 @@ func resourceAwsDefaultSubnet() *schema.Resource { func resourceAwsDefaultSubnetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeSubnetsInput{ - Filters: []*ec2.Filter{ - &ec2.Filter{ - Name: aws.String("availabilityZone"), - Values: aws.StringSlice([]string{d.Get("availability_zone").(string)}), - }, - &ec2.Filter{ - Name: aws.String("defaultForAz"), - Values: aws.StringSlice([]string{"true"}), - }, - }, - } + req := &ec2.DescribeSubnetsInput{} + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "availabilityZone": d.Get("availability_zone").(string), + "defaultForAz": "true", + }, + ) + + log.Printf("[DEBUG] Reading Default Subnet: %s", req) resp, err := conn.DescribeSubnets(req) if err != nil { return err } - if len(resp.Subnets) != 1 || resp.Subnets[0] == nil { return fmt.Errorf("Default subnet not found") } d.SetId(aws.StringValue(resp.Subnets[0].SubnetId)) - return resourceAwsSubnetUpdate(d, meta) } func resourceAwsDefaultSubnetDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Subnet. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go index 8953534a0..345325fb8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc.go @@ -61,6 +61,5 @@ func resourceAwsDefaultVpcCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsDefaultVpcDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default VPC. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go index cb433ff4b..36e0d2b95 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_vpc_dhcp_options.go @@ -85,6 +85,5 @@ func resourceAwsDefaultVpcDhcpOptionsCreate(d *schema.ResourceData, meta interfa func resourceAwsDefaultVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default DHCP Options Set. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go new file mode 100644 index 000000000..8927fc9bd --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go @@ -0,0 +1,164 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directoryservice" +) + +func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDirectoryServiceConditionalForwarderCreate, + Read: resourceAwsDirectoryServiceConditionalForwarderRead, + Update: resourceAwsDirectoryServiceConditionalForwarderUpdate, + Delete: resourceAwsDirectoryServiceConditionalForwarderDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "directory_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "dns_ips": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "remote_domain_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+[.]?$"), "invalid value, see the RemoteDomainName attribute documentation: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_ConditionalForwarder.html"), + }, + }, + } +} + +func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) + + directoryId := d.Get("directory_id").(string) + domainName := d.Get("remote_domain_name").(string) + + _, err := conn.CreateConditionalForwarder(&directoryservice.CreateConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), + DnsIpAddrs: dnsIps, + RemoteDomainName: aws.String(domainName), + }) + + if err != nil { + return err + } + + d.SetId(fmt.Sprintf("%s:%s", directoryId, domainName)) + + return nil +} + +func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err + } + + res, err := conn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainNames: []*string{aws.String(domainName)}, + }) + + if err != nil { + if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if len(res.ConditionalForwarders) == 0 { + log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + cfd := res.ConditionalForwarders[0] + + d.Set("dns_ips", flattenStringList(cfd.DnsIpAddrs)) + d.Set("directory_id", directoryId) + d.Set("remote_domain_name", cfd.RemoteDomainName) + + return nil +} + +func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err + } + + dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) + + _, err = conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), + DnsIpAddrs: dnsIps, + RemoteDomainName: aws.String(domainName), + }) + + if err != nil { + return err + } + + return resourceAwsDirectoryServiceConditionalForwarderRead(d, meta) +} + +func resourceAwsDirectoryServiceConditionalForwarderDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err + } + + _, err = conn.DeleteConditionalForwarder(&directoryservice.DeleteConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainName: aws.String(domainName), + }) + + if err != nil && !isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + return err + } + + return nil +} + +func parseDSConditionalForwarderId(id string) (directoryId, domainName string, err error) { + parts := strings.SplitN(id, ":", 2) + + if len(parts) != 2 { + return "", "", fmt.Errorf("please make sure ID is in format DIRECTORY_ID:DOMAIN_NAME") + } + + return parts[0], parts[1], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go index 67f746c11..572102f41 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_endpoint.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "strings" "time" @@ -71,6 +72,9 @@ func resourceAwsDmsEndpoint() *schema.Resource { "redshift", "sybase", "sqlserver", + "mongodb", + "s3", + "azuredb", }, false), }, "extra_connection_attributes": { @@ -117,6 +121,102 @@ func resourceAwsDmsEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, }, + // With default values as per https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html + "mongodb_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_type": { + Type: schema.TypeString, + Optional: true, + Default: "PASSWORD", + }, + "auth_mechanism": { + Type: schema.TypeString, + Optional: true, + Default: "DEFAULT", + }, + "nesting_level": { + Type: schema.TypeString, + Optional: true, + Default: "NONE", + }, + "extract_doc_id": { + Type: schema.TypeString, + Optional: true, + Default: "false", + }, + "docs_to_investigate": { + Type: schema.TypeString, + Optional: true, + Default: "1000", + }, + "auth_source": { + Type: schema.TypeString, + Optional: true, + Default: "admin", + }, + }, + }, + }, + "s3_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_access_role_arn": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "external_table_definition": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "csv_row_delimiter": { + Type: schema.TypeString, + Optional: true, + Default: "\\n", + }, + "csv_delimiter": { + Type: schema.TypeString, + Optional: true, + Default: ",", + }, + "bucket_folder": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "bucket_name": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "compression_type": { + Type: schema.TypeString, + Optional: true, + Default: "NONE", + }, + }, + }, + }, }, } } @@ -131,12 +231,46 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), } + switch d.Get("engine_name").(string) { // if dynamodb then add required params - if d.Get("engine_name").(string) == "dynamodb" { + case "dynamodb": request.DynamoDbSettings = &dms.DynamoDbSettings{ ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), } - } else { + case "mongodb": + request.MongoDbSettings = &dms.MongoDbSettings{ + Username: aws.String(d.Get("username").(string)), + Password: aws.String(d.Get("password").(string)), + ServerName: aws.String(d.Get("server_name").(string)), + Port: aws.Int64(int64(d.Get("port").(int))), + DatabaseName: aws.String(d.Get("database_name").(string)), + KmsKeyId: aws.String(d.Get("kms_key_arn").(string)), + + AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), + AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), + NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), + ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), + DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), + AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), + } + + // Set connection info in top-level namespace as well + request.Username = aws.String(d.Get("username").(string)) + request.Password = aws.String(d.Get("password").(string)) + request.ServerName = aws.String(d.Get("server_name").(string)) + request.Port = aws.Int64(int64(d.Get("port").(int))) + request.DatabaseName = aws.String(d.Get("database_name").(string)) + case "s3": + request.S3Settings = &dms.S3Settings{ + ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), + ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), + CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), + CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), + BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), + BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), + CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), + } + default: request.Password = aws.String(d.Get("password").(string)) request.Port = aws.Int64(int64(d.Get("port").(int))) request.ServerName = aws.String(d.Get("server_name").(string)) @@ -148,14 +282,14 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("extra_connection_attributes"); ok { request.ExtraConnectionAttributes = aws.String(v.(string)) } + if v, ok := d.GetOk("kms_key_arn"); ok { + request.KmsKeyId = aws.String(v.(string)) + } } if v, ok := d.GetOk("certificate_arn"); ok { request.CertificateArn = aws.String(v.(string)) } - if v, ok := d.GetOk("kms_key_arn"); ok { - request.KmsKeyId = aws.String(v.(string)) - } if v, ok := d.GetOk("ssl_mode"); ok { request.SslMode = aws.String(v.(string)) } @@ -215,9 +349,7 @@ func resourceAwsDmsEndpointRead(d *schema.ResourceData, meta interface{}) error if err != nil { return err } - d.Set("tags", dmsTagsToMap(tagsResp.TagList)) - - return nil + return d.Set("tags", dmsTagsToMap(tagsResp.TagList)) } func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) error { @@ -228,13 +360,13 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } hasChanges := false - if d.HasChange("certificate_arn") { - request.CertificateArn = aws.String(d.Get("certificate_arn").(string)) + if d.HasChange("endpoint_type") { + request.EndpointType = aws.String(d.Get("endpoint_type").(string)) hasChanges = true } - if d.HasChange("database_name") { - request.DatabaseName = aws.String(d.Get("database_name").(string)) + if d.HasChange("certificate_arn") { + request.CertificateArn = aws.String(d.Get("certificate_arn").(string)) hasChanges = true } @@ -260,31 +392,11 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro hasChanges = true } - if d.HasChange("password") { - request.Password = aws.String(d.Get("password").(string)) - hasChanges = true - } - - if d.HasChange("port") { - request.Port = aws.Int64(int64(d.Get("port").(int))) - hasChanges = true - } - - if d.HasChange("server_name") { - request.ServerName = aws.String(d.Get("server_name").(string)) - hasChanges = true - } - if d.HasChange("ssl_mode") { request.SslMode = aws.String(d.Get("ssl_mode").(string)) hasChanges = true } - if d.HasChange("username") { - request.Username = aws.String(d.Get("username").(string)) - hasChanges = true - } - if d.HasChange("tags") { err := dmsSetTags(d.Get("endpoint_arn").(string), d, meta) if err != nil { @@ -292,6 +404,99 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } } + switch d.Get("engine_name").(string) { + case "dynamodb": + if d.HasChange("service_access_role") { + request.DynamoDbSettings = &dms.DynamoDbSettings{ + ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), + } + hasChanges = true + } + case "mongodb": + if d.HasChange("username") || + d.HasChange("password") || + d.HasChange("server_name") || + d.HasChange("port") || + d.HasChange("database_name") || + d.HasChange("mongodb_settings.0.auth_type") || + d.HasChange("mongodb_settings.0.auth_mechanism") || + d.HasChange("mongodb_settings.0.nesting_level") || + d.HasChange("mongodb_settings.0.extract_doc_id") || + d.HasChange("mongodb_settings.0.docs_to_investigate") || + d.HasChange("mongodb_settings.0.auth_source") { + request.MongoDbSettings = &dms.MongoDbSettings{ + Username: aws.String(d.Get("username").(string)), + Password: aws.String(d.Get("password").(string)), + ServerName: aws.String(d.Get("server_name").(string)), + Port: aws.Int64(int64(d.Get("port").(int))), + DatabaseName: aws.String(d.Get("database_name").(string)), + KmsKeyId: aws.String(d.Get("kms_key_arn").(string)), + + AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), + AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), + NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), + ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), + DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), + AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 'mongodb') + + // Update connection info in top-level namespace as well + request.Username = aws.String(d.Get("username").(string)) + request.Password = aws.String(d.Get("password").(string)) + request.ServerName = aws.String(d.Get("server_name").(string)) + request.Port = aws.Int64(int64(d.Get("port").(int))) + request.DatabaseName = aws.String(d.Get("database_name").(string)) + + hasChanges = true + } + case "s3": + if d.HasChange("s3_settings.0.service_access_role_arn") || + d.HasChange("s3_settings.0.external_table_definition") || + d.HasChange("s3_settings.0.csv_row_delimiter") || + d.HasChange("s3_settings.0.csv_delimiter") || + d.HasChange("s3_settings.0.bucket_folder") || + d.HasChange("s3_settings.0.bucket_name") || + d.HasChange("s3_settings.0.compression_type") { + request.S3Settings = &dms.S3Settings{ + ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), + ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), + CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), + CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), + BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), + BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), + CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 's3') + hasChanges = true + } + default: + if d.HasChange("database_name") { + request.DatabaseName = aws.String(d.Get("database_name").(string)) + hasChanges = true + } + + if d.HasChange("password") { + request.Password = aws.String(d.Get("password").(string)) + hasChanges = true + } + + if d.HasChange("port") { + request.Port = aws.Int64(int64(d.Get("port").(int))) + hasChanges = true + } + + if d.HasChange("server_name") { + request.ServerName = aws.String(d.Get("server_name").(string)) + hasChanges = true + } + + if d.HasChange("username") { + request.Username = aws.String(d.Get("username").(string)) + hasChanges = true + } + } + if hasChanges { log.Println("[DEBUG] DMS update endpoint:", request) @@ -316,11 +521,7 @@ func resourceAwsDmsEndpointDelete(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] DMS delete endpoint: %#v", request) _, err := conn.DeleteEndpoint(request) - if err != nil { - return err - } - - return nil + return err } func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoint) error { @@ -333,13 +534,33 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi d.Set("endpoint_type", strings.ToLower(*endpoint.EndpointType)) d.Set("engine_name", endpoint.EngineName) - if *endpoint.EngineName == "dynamodb" { + switch *endpoint.EngineName { + case "dynamodb": if endpoint.DynamoDbSettings != nil { d.Set("service_access_role", endpoint.DynamoDbSettings.ServiceAccessRoleArn) } else { d.Set("service_access_role", "") } - } else { + case "mongodb": + if endpoint.MongoDbSettings != nil { + d.Set("username", endpoint.MongoDbSettings.Username) + d.Set("server_name", endpoint.MongoDbSettings.ServerName) + d.Set("port", endpoint.MongoDbSettings.Port) + d.Set("database_name", endpoint.MongoDbSettings.DatabaseName) + } else { + d.Set("username", endpoint.Username) + d.Set("server_name", endpoint.ServerName) + d.Set("port", endpoint.Port) + d.Set("database_name", endpoint.DatabaseName) + } + if err := d.Set("mongodb_settings", flattenDmsMongoDbSettings(endpoint.MongoDbSettings)); err != nil { + return fmt.Errorf("Error setting mongodb_settings for DMS: %s", err) + } + case "s3": + if err := d.Set("s3_settings", flattenDmsS3Settings(endpoint.S3Settings)); err != nil { + return fmt.Errorf("Error setting s3_settings for DMS: %s", err) + } + default: d.Set("database_name", endpoint.DatabaseName) d.Set("extra_connection_attributes", endpoint.ExtraConnectionAttributes) d.Set("port", endpoint.Port) @@ -352,3 +573,38 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi return nil } + +func flattenDmsMongoDbSettings(settings *dms.MongoDbSettings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "auth_type": aws.StringValue(settings.AuthType), + "auth_mechanism": aws.StringValue(settings.AuthMechanism), + "nesting_level": aws.StringValue(settings.NestingLevel), + "extract_doc_id": aws.StringValue(settings.ExtractDocId), + "docs_to_investigate": aws.StringValue(settings.DocsToInvestigate), + "auth_source": aws.StringValue(settings.AuthSource), + } + + return []map[string]interface{}{m} +} + +func flattenDmsS3Settings(settings *dms.S3Settings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "service_access_role_arn": aws.StringValue(settings.ServiceAccessRoleArn), + "external_table_definition": aws.StringValue(settings.ExternalTableDefinition), + "csv_row_delimiter": aws.StringValue(settings.CsvRowDelimiter), + "csv_delimiter": aws.StringValue(settings.CsvDelimiter), + "bucket_folder": aws.StringValue(settings.BucketFolder), + "bucket_name": aws.StringValue(settings.BucketName), + "compression_type": aws.StringValue(settings.CompressionType), + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go index 526ce9eae..49bab71fa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go @@ -258,7 +258,6 @@ func resourceAwsDmsReplicationTaskDelete(d *schema.ResourceData, meta interface{ if err != nil { if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { log.Printf("[DEBUG] DMS Replication Task %q Not Found", d.Id()) - d.SetId("") return nil } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go new file mode 100644 index 000000000..65668a7c8 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go @@ -0,0 +1,154 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxGateway() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxGatewayCreate, + Read: resourceAwsDxGatewayRead, + Delete: resourceAwsDxGatewayDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxGatewayImportState, + }, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "amazon_side_asn": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAmazonSideAsn, + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxGatewayCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + req := &directconnect.CreateDirectConnectGatewayInput{ + DirectConnectGatewayName: aws.String(d.Get("name").(string)), + } + if asn, ok := d.GetOk("amazon_side_asn"); ok { + i, err := strconv.ParseInt(asn.(string), 10, 64) + if err != nil { + return err + } + req.AmazonSideAsn = aws.Int64(i) + } + + log.Printf("[DEBUG] Creating Direct Connect gateway: %#v", req) + resp, err := conn.CreateDirectConnectGateway(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect gateway: %s", err) + } + + d.SetId(aws.StringValue(resp.DirectConnectGateway.DirectConnectGatewayId)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayStatePending}, + Target: []string{directconnect.GatewayStateAvailable}, + Refresh: dxGatewayStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect gateway (%s) to become available: %s", d.Id(), err) + } + + return resourceAwsDxGatewayRead(d, meta) +} + +func resourceAwsDxGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + dxGwRaw, state, err := dxGatewayStateRefresh(conn, d.Id())() + if err != nil { + return fmt.Errorf("Error reading Direct Connect gateway: %s", err) + } + if state == directconnect.GatewayStateDeleted { + log.Printf("[WARN] Direct Connect gateway (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + dxGw := dxGwRaw.(*directconnect.Gateway) + d.Set("name", aws.StringValue(dxGw.DirectConnectGatewayName)) + d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(dxGw.AmazonSideAsn), 10)) + + return nil +} + +func resourceAwsDxGatewayDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + _, err := conn.DeleteDirectConnectGateway(&directconnect.DeleteDirectConnectGatewayInput{ + DirectConnectGatewayId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, "DirectConnectClientException", "does not exist") { + return nil + } + return fmt.Errorf("Error deleting Direct Connect gateway: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayStatePending, directconnect.GatewayStateAvailable, directconnect.GatewayStateDeleting}, + Target: []string{directconnect.GatewayStateDeleted}, + Refresh: dxGatewayStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect gateway (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxGatewayStateRefresh(conn *directconnect.DirectConnect, dxgwId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeDirectConnectGateways(&directconnect.DescribeDirectConnectGatewaysInput{ + DirectConnectGatewayId: aws.String(dxgwId), + }) + if err != nil { + return nil, "", err + } + + n := len(resp.DirectConnectGateways) + switch n { + case 0: + return "", directconnect.GatewayStateDeleted, nil + + case 1: + dxgw := resp.DirectConnectGateways[0] + return dxgw, aws.StringValue(dxgw.DirectConnectGatewayState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect gateways for %s, expected 1", n, dxgwId) + } + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go new file mode 100644 index 000000000..e8694ce99 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go @@ -0,0 +1,158 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +const ( + GatewayAssociationStateDeleted = "deleted" +) + +func resourceAwsDxGatewayAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxGatewayAssociationCreate, + Read: resourceAwsDxGatewayAssociationRead, + Delete: resourceAwsDxGatewayAssociationDelete, + + Schema: map[string]*schema.Schema{ + "dx_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vpn_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(15 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxGatewayAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + dxgwId := d.Get("dx_gateway_id").(string) + vgwId := d.Get("vpn_gateway_id").(string) + req := &directconnect.CreateDirectConnectGatewayAssociationInput{ + DirectConnectGatewayId: aws.String(dxgwId), + VirtualGatewayId: aws.String(vgwId), + } + + log.Printf("[DEBUG] Creating Direct Connect gateway association: %#v", req) + _, err := conn.CreateDirectConnectGatewayAssociation(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect gateway association: %s", err) + } + + d.SetId(dxGatewayAssociationId(dxgwId, vgwId)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayAssociationStateAssociating}, + Target: []string{directconnect.GatewayAssociationStateAssociated}, + Refresh: dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect gateway association (%s) to become available: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsDxGatewayAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + dxgwId := d.Get("dx_gateway_id").(string) + vgwId := d.Get("vpn_gateway_id").(string) + _, state, err := dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId)() + if err != nil { + return fmt.Errorf("Error reading Direct Connect gateway association: %s", err) + } + if state == GatewayAssociationStateDeleted { + log.Printf("[WARN] Direct Connect gateway association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return nil +} + +func resourceAwsDxGatewayAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + dxgwId := d.Get("dx_gateway_id").(string) + vgwId := d.Get("vpn_gateway_id").(string) + + log.Printf("[DEBUG] Deleting Direct Connect gateway association: %s", d.Id()) + + _, err := conn.DeleteDirectConnectGatewayAssociation(&directconnect.DeleteDirectConnectGatewayAssociationInput{ + DirectConnectGatewayId: aws.String(dxgwId), + VirtualGatewayId: aws.String(vgwId), + }) + if err != nil { + if isAWSErr(err, "DirectConnectClientException", "No association exists") { + return nil + } + return fmt.Errorf("Error deleting Direct Connect gateway association: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayAssociationStateDisassociating}, + Target: []string{directconnect.GatewayAssociationStateDisassociated, GatewayAssociationStateDeleted}, + Refresh: dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect gateway association (%s) to be deleted: %s", d.Id(), err.Error()) + } + + return nil +} + +func dxGatewayAssociationStateRefresh(conn *directconnect.DirectConnect, dxgwId, vgwId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeDirectConnectGatewayAssociations(&directconnect.DescribeDirectConnectGatewayAssociationsInput{ + DirectConnectGatewayId: aws.String(dxgwId), + VirtualGatewayId: aws.String(vgwId), + }) + if err != nil { + return nil, "", err + } + + n := len(resp.DirectConnectGatewayAssociations) + switch n { + case 0: + return "", GatewayAssociationStateDeleted, nil + + case 1: + assoc := resp.DirectConnectGatewayAssociations[0] + return assoc, aws.StringValue(assoc.AssociationState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect gateway associations for %s, expected 1", n, dxGatewayAssociationId(dxgwId, vgwId)) + } + } +} + +func dxGatewayAssociationId(dxgwId, vgwId string) string { + return fmt.Sprintf("ga-%s%s", dxgwId, vgwId) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go new file mode 100644 index 000000000..f0ce581ff --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -0,0 +1,190 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPrivateVirtualInterfaceCreate, + Read: resourceAwsDxHostedPrivateVirtualInterfaceRead, + Delete: resourceAwsDxHostedPrivateVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxHostedPrivateVirtualInterfaceImport, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + req := &directconnect.AllocatePrivateVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + OwnerAccount: aws.String(d.Get("owner_account_id").(string)), + NewPrivateVirtualInterfaceAllocation: &directconnect.NewPrivateVirtualInterfaceAllocation{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(d.Get("address_family").(string)), + }, + } + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { + req.NewPrivateVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { + req.NewPrivateVirtualInterfaceAllocation.CustomerAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { + req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Direct Connect hosted private virtual interface: %#v", req) + resp, err := conn.AllocatePrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect hosted private virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("owner_account_id", vif.OwnerAccount) + + return nil +} + +func resourceAwsDxHostedPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go new file mode 100644 index 000000000..855061c9e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -0,0 +1,168 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate, + Read: resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead, + Update: resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate, + Delete: resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_interface_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vpn_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"dx_gateway_id"}, + }, + "dx_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") + dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") + if vgwOk == dxgwOk { + return fmt.Errorf( + "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface accepter") + } + + vifId := d.Get("virtual_interface_id").(string) + req := &directconnect.ConfirmPrivateVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(vifId), + } + if vgwOk && vgwIdRaw.(string) != "" { + req.VirtualGatewayId = aws.String(vgwIdRaw.(string)) + } + if dxgwOk && dxgwIdRaw.(string) != "" { + req.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) + } + + log.Printf("[DEBUG] Accepting Direct Connect hosted private virtual interface: %#v", req) + _, err := conn.ConfirmPrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error accepting Direct Connect hosted private virtual interface: %s", err.Error()) + } + + d.SetId(vifId) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + vifState := aws.StringValue(vif.VirtualInterfaceState) + if vifState != directconnect.VirtualInterfaceStateAvailable && + vifState != directconnect.VirtualInterfaceStateDown { + log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) + d.SetId("") + return nil + } + + d.Set("virtual_interface_id", vif.VirtualInterfaceId) + d.Set("vpn_gateway_id", vif.VirtualGatewayId) + d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go new file mode 100644 index 000000000..b82a04e36 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -0,0 +1,214 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPublicVirtualInterfaceCreate, + Read: resourceAwsDxHostedPublicVirtualInterfaceRead, + Delete: resourceAwsDxHostedPublicVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxHostedPublicVirtualInterfaceImport, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "route_filter_prefixes": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MinItems: 1, + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + addressFamily := d.Get("address_family").(string) + caRaw, caOk := d.GetOk("customer_address") + aaRaw, aaOk := d.GetOk("amazon_address") + if addressFamily == directconnect.AddressFamilyIpv4 { + if !caOk { + return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) + } + if !aaOk { + return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) + } + } + + req := &directconnect.AllocatePublicVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + OwnerAccount: aws.String(d.Get("owner_account_id").(string)), + NewPublicVirtualInterfaceAllocation: &directconnect.NewPublicVirtualInterfaceAllocation{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(addressFamily), + }, + } + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { + req.NewPublicVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) + } + if caOk && caRaw.(string) != "" { + req.NewPublicVirtualInterfaceAllocation.CustomerAddress = aws.String(caRaw.(string)) + } + if aaOk && aaRaw.(string) != "" { + req.NewPublicVirtualInterfaceAllocation.AmazonAddress = aws.String(aaRaw.(string)) + } + if v, ok := d.GetOk("route_filter_prefixes"); ok { + req.NewPublicVirtualInterfaceAllocation.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Allocating Direct Connect hosted public virtual interface: %#v", req) + resp, err := conn.AllocatePublicVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error allocating Direct Connect hosted public virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) + d.Set("owner_account_id", vif.OwnerAccount) + + return nil +} + +func resourceAwsDxHostedPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func dxHostedPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStateVerifying, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go new file mode 100644 index 000000000..46bafff59 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -0,0 +1,143 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPublicVirtualInterfaceAccepter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate, + Read: resourceAwsDxHostedPublicVirtualInterfaceAccepterRead, + Update: resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate, + Delete: resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxHostedPublicVirtualInterfaceAccepterImport, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_interface_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vifId := d.Get("virtual_interface_id").(string) + req := &directconnect.ConfirmPublicVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(vifId), + } + + log.Printf("[DEBUG] Accepting Direct Connect hosted public virtual interface: %#v", req) + _, err := conn.ConfirmPublicVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error accepting Direct Connect hosted public virtual interface: %s", err.Error()) + } + + d.SetId(vifId) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + vifState := aws.StringValue(vif.VirtualInterfaceState) + if vifState != directconnect.VirtualInterfaceStateAvailable && + vifState != directconnect.VirtualInterfaceStateDown && + vifState != directconnect.VirtualInterfaceStateVerifying { + log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) + d.SetId("") + return nil + } + + d.Set("virtual_interface_id", vif.VirtualInterfaceId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStateVerifying, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go new file mode 100644 index 000000000..cd92f28b6 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go @@ -0,0 +1,221 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDxPrivateVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxPrivateVirtualInterfaceCreate, + Read: resourceAwsDxPrivateVirtualInterfaceRead, + Update: resourceAwsDxPrivateVirtualInterfaceUpdate, + Delete: resourceAwsDxPrivateVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxPrivateVirtualInterfaceImport, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vpn_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"dx_gateway_id"}, + }, + "dx_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") + dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") + if vgwOk == dxgwOk { + return fmt.Errorf( + "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface") + } + + req := &directconnect.CreatePrivateVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + NewPrivateVirtualInterface: &directconnect.NewPrivateVirtualInterface{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(d.Get("address_family").(string)), + }, + } + if vgwOk && vgwIdRaw.(string) != "" { + req.NewPrivateVirtualInterface.VirtualGatewayId = aws.String(vgwIdRaw.(string)) + } + if dxgwOk && dxgwIdRaw.(string) != "" { + req.NewPrivateVirtualInterface.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) + } + if v, ok := d.GetOk("bgp_auth_key"); ok { + req.NewPrivateVirtualInterface.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { + req.NewPrivateVirtualInterface.CustomerAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { + req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) + resp, err := conn.CreatePrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect private virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxPrivateVirtualInterfaceUpdate(d, meta) +} + +func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("vpn_gateway_id", vif.VirtualGatewayId) + d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go new file mode 100644 index 000000000..c12ba2502 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go @@ -0,0 +1,223 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDxPublicVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxPublicVirtualInterfaceCreate, + Read: resourceAwsDxPublicVirtualInterfaceRead, + Update: resourceAwsDxPublicVirtualInterfaceUpdate, + Delete: resourceAwsDxPublicVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDxPublicVirtualInterfaceImport, + }, + CustomizeDiff: resourceAwsDxPublicVirtualInterfaceCustomizeDiff, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "route_filter_prefixes": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MinItems: 1, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + req := &directconnect.CreatePublicVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + NewPublicVirtualInterface: &directconnect.NewPublicVirtualInterface{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(d.Get("address_family").(string)), + }, + } + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { + req.NewPublicVirtualInterface.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { + req.NewPublicVirtualInterface.CustomerAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { + req.NewPublicVirtualInterface.AmazonAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("route_filter_prefixes"); ok { + req.NewPublicVirtualInterface.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Creating Direct Connect public virtual interface: %#v", req) + resp, err := conn.CreatePublicVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect public virtual interface: %s", err) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + if err := dxPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxPublicVirtualInterfaceUpdate(d, meta) +} + +func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) + if err != nil { + return err + } + if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxPublicVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxPublicVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func resourceAwsDxPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + +func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error { + if diff.Id() == "" { + // New resource. + if addressFamily := diff.Get("address_family").(string); addressFamily == directconnect.AddressFamilyIpv4 { + if _, ok := diff.GetOk("customer_address"); !ok { + return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) + } + if _, ok := diff.GetOk("amazon_address"); !ok { + return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) + } + } + } + + return nil +} + +func dxPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStateVerifying, + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go index 25bd461e8..3969f515b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go @@ -2,6 +2,7 @@ package aws import ( "bytes" + "errors" "fmt" "log" "strings" @@ -42,12 +43,21 @@ func resourceAwsDynamoDbTable() *schema.Resource { func(diff *schema.ResourceDiff, v interface{}) error { if diff.Id() != "" && diff.HasChange("server_side_encryption") { o, n := diff.GetChange("server_side_encryption") - if isDynamoDbTableSSEDisabled(o) && isDynamoDbTableSSEDisabled(n) { + if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { return diff.Clear("server_side_encryption") } } return nil }, + func(diff *schema.ResourceDiff, v interface{}) error { + if diff.Id() != "" && diff.HasChange("point_in_time_recovery") { + o, n := diff.GetChange("point_in_time_recovery") + if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { + return diff.Clear("point_in_time_recovery") + } + } + return nil + }, ), SchemaVersion: 1, @@ -238,6 +248,20 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, }, "tags": tagsSchema(), + "point_in_time_recovery": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, + }, }, } } @@ -448,6 +472,15 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er } } + if d.HasChange("point_in_time_recovery") { + _, enabled := d.GetChange("point_in_time_recovery.0.enabled") + if !d.IsNewResource() || enabled.(bool) { + if err := updateDynamoDbPITR(d, conn); err != nil { + return err + } + } + } + return resourceAwsDynamoDbTableRead(d, meta) } @@ -491,6 +524,14 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro } d.Set("tags", tags) + pitrOut, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(d.Id()), + }) + if err != nil && !isAWSErr(err, "UnknownOperationException", "") { + return err + } + d.Set("point_in_time_recovery", flattenDynamoDbPitr(pitrOut)) + return nil } @@ -608,6 +649,41 @@ func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) e return nil } +func updateDynamoDbPITR(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { + toEnable := d.Get("point_in_time_recovery.0.enabled").(bool) + + input := &dynamodb.UpdateContinuousBackupsInput{ + TableName: aws.String(d.Id()), + PointInTimeRecoverySpecification: &dynamodb.PointInTimeRecoverySpecification{ + PointInTimeRecoveryEnabled: aws.Bool(toEnable), + }, + } + + log.Printf("[DEBUG] Updating DynamoDB point in time recovery status to %v", toEnable) + + err := resource.Retry(20*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateContinuousBackups(input) + if err != nil { + // Backups are still being enabled for this newly created table + if isAWSErr(err, dynamodb.ErrCodeContinuousBackupsUnavailableException, "Backups are being enabled") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return err + } + + if err := waitForDynamoDbBackupUpdateToBeCompleted(d.Id(), toEnable, conn); err != nil { + return fmt.Errorf("Error waiting for DynamoDB PITR update: %s", err) + } + + return nil +} + func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]string, error) { output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ ResourceArn: aws.String(arn), @@ -623,6 +699,18 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri return result, nil } +func readDynamoDbPITR(table string, conn *dynamodb.DynamoDB) (bool, error) { + output, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(table), + }) + if err != nil { + return false, fmt.Errorf("Error reading backup status from dynamodb resource: %s", err) + } + + pitr := output.ContinuousBackupsDescription.PointInTimeRecoveryDescription + return *pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled, nil +} + // Waiters func waitForDynamoDbGSIToBeActive(tableName string, gsiName string, conn *dynamodb.DynamoDB) error { @@ -720,6 +808,41 @@ func waitForDynamoDbTableToBeActive(tableName string, timeout time.Duration, con return err } +func waitForDynamoDbBackupUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { + var pending []string + target := []string{dynamodb.TimeToLiveStatusDisabled} + + if toEnable { + pending = []string{ + "ENABLING", + } + target = []string{dynamodb.PointInTimeRecoveryStatusEnabled} + } + + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Timeout: 10 * time.Second, + Refresh: func() (interface{}, string, error) { + result, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(tableName), + }) + if err != nil { + return 42, "", err + } + + if result.ContinuousBackupsDescription == nil || result.ContinuousBackupsDescription.PointInTimeRecoveryDescription == nil { + return 42, "", errors.New("Error reading backup status from dynamodb resource: empty description") + } + pitr := result.ContinuousBackupsDescription.PointInTimeRecoveryDescription + + return result, *pitr.PointInTimeRecoveryStatus, nil + }, + } + _, err := stateConf.WaitForState() + return err +} + func waitForDynamoDbTtlUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { pending := []string{ dynamodb.TimeToLiveStatusEnabled, @@ -757,7 +880,7 @@ func waitForDynamoDbTtlUpdateToBeCompleted(tableName string, toEnable bool, conn return err } -func isDynamoDbTableSSEDisabled(v interface{}) bool { +func isDynamoDbTableOptionDisabled(v interface{}) bool { options := v.([]interface{}) if len(options) == 0 { return true diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go index 4f5f4e658..6725ea8fa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go @@ -91,11 +91,9 @@ func resourceAwsEcrLifecyclePolicyDelete(d *schema.ResourceData, meta interface{ _, err := conn.DeleteLifecyclePolicy(input) if err != nil { if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - d.SetId("") return nil } if isAWSErr(err, ecr.ErrCodeLifecyclePolicyNotFoundException, "") { - d.SetId("") return nil } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go index 3a2447435..1de9cff36 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go @@ -113,7 +113,6 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { - d.SetId("") return nil } return err @@ -145,7 +144,6 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er return err } - d.SetId("") log.Printf("[DEBUG] repository %q deleted.", d.Get("name").(string)) return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go index a58a5d60b..83d56f183 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository_policy.go @@ -153,7 +153,6 @@ func resourceAwsEcrRepositoryPolicyDelete(d *schema.ResourceData, meta interface if ecrerr, ok := err.(awserr.Error); ok { switch ecrerr.Code() { case "RepositoryNotFoundException", "RepositoryPolicyNotFoundException": - d.SetId("") return nil default: return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go index dd270ed05..5b5111c2f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) var taskDefinitionRE = regexp.MustCompile("^([a-zA-Z0-9_-]+):([0-9]+)$") @@ -50,12 +51,18 @@ func resourceAwsEcsService() *schema.Resource { "desired_count": { Type: schema.TypeInt, Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "health_check_grace_period_seconds": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validateAwsEcsServiceHealthCheckGracePeriodSeconds, + ValidateFunc: validation.IntBetween(0, 7200), }, "launch_type": { @@ -65,6 +72,17 @@ func resourceAwsEcsService() *schema.Resource { Default: "EC2", }, + "scheduling_strategy": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ecs.SchedulingStrategyReplica, + ValidateFunc: validation.StringInSlice([]string{ + ecs.SchedulingStrategyDaemon, + ecs.SchedulingStrategyReplica, + }, false), + }, + "iam_role": { Type: schema.TypeString, ForceNew: true, @@ -76,12 +94,24 @@ func resourceAwsEcsService() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 200, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "deployment_minimum_healthy_percent": { Type: schema.TypeInt, Optional: true, Default: 100, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "load_balancer": { @@ -145,10 +175,12 @@ func resourceAwsEcsService() *schema.Resource { }, }, "placement_strategy": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 5, + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + MaxItems: 5, + ConflictsWith: []string{"ordered_placement_strategy"}, + Deprecated: "Use `ordered_placement_strategy` instead", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { @@ -184,7 +216,40 @@ func resourceAwsEcsService() *schema.Resource { return hashcode.String(buf.String()) }, }, - + "ordered_placement_strategy": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 5, + ConflictsWith: []string{"placement_strategy"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "field": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + StateFunc: func(v interface{}) string { + value := v.(string) + if value == "host" { + return "instanceId" + } + return value + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if strings.ToLower(old) == strings.ToLower(new) { + return true + } + return false + }, + }, + }, + }, + }, "placement_constraints": { Type: schema.TypeSet, Optional: true, @@ -205,6 +270,36 @@ func resourceAwsEcsService() *schema.Resource { }, }, }, + + "service_registries": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "container_name": { + Type: schema.TypeString, + Optional: true, + }, + "container_port": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 65536), + }, + "port": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 65536), + }, + "registry_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, }, } } @@ -255,6 +350,14 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.LaunchType = aws.String(v.(string)) } + schedulingStrategy := d.Get("scheduling_strategy").(string) + input.SchedulingStrategy = aws.String(schedulingStrategy) + if schedulingStrategy == ecs.SchedulingStrategyDaemon { + // unset these if DAEMON + input.DeploymentConfiguration = nil + input.DesiredCount = nil + } + loadBalancers := expandEcsLoadBalancers(d.Get("load_balancer").(*schema.Set).List()) if len(loadBalancers) > 0 { log.Printf("[DEBUG] Adding ECS load balancers: %s", loadBalancers) @@ -266,20 +369,16 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) - strategies := d.Get("placement_strategy").(*schema.Set).List() - if len(strategies) > 0 { - var ps []*ecs.PlacementStrategy - for _, raw := range strategies { - p := raw.(map[string]interface{}) - t := p["type"].(string) - f := p["field"].(string) - if err := validateAwsEcsPlacementStrategy(t, f); err != nil { - return err - } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(p["type"].(string)), - Field: aws.String(p["field"].(string)), - }) + if v, ok := d.GetOk("ordered_placement_strategy"); ok { + ps, err := expandPlacementStrategy(v.([]interface{})) + if err != nil { + return err + } + input.PlacementStrategy = ps + } else { + ps, err := expandPlacementStrategyDeprecated(d.Get("placement_strategy").(*schema.Set)) + if err != nil { + return err } input.PlacementStrategy = ps } @@ -306,6 +405,29 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.PlacementConstraints = pc } + serviceRegistries := d.Get("service_registries").(*schema.Set).List() + if len(serviceRegistries) > 0 { + srs := make([]*ecs.ServiceRegistry, 0, len(serviceRegistries)) + for _, v := range serviceRegistries { + raw := v.(map[string]interface{}) + sr := &ecs.ServiceRegistry{ + RegistryArn: aws.String(raw["registry_arn"].(string)), + } + if port, ok := raw["port"].(int); ok && port != 0 { + sr.Port = aws.Int64(int64(port)) + } + if raw, ok := raw["container_port"].(int); ok && raw != 0 { + sr.ContainerPort = aws.Int64(int64(raw)) + } + if raw, ok := raw["container_name"].(string); ok && raw != "" { + sr.ContainerName = aws.String(raw) + } + + srs = append(srs, sr) + } + input.ServiceRegistries = srs + } + log.Printf("[DEBUG] Creating ECS service: %s", input) // Retry due to AWS IAM & ECS eventual consistency @@ -404,6 +526,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("task_definition", taskDefinition) } + d.Set("scheduling_strategy", service.SchedulingStrategy) d.Set("desired_count", service.DesiredCount) d.Set("health_check_grace_period_seconds", service.HealthCheckGracePeriodSeconds) d.Set("launch_type", service.LaunchType) @@ -435,8 +558,14 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("load_balancer", flattenEcsLoadBalancers(service.LoadBalancers)) } - if err := d.Set("placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { - log.Printf("[ERR] Error setting placement_strategy for (%s): %s", d.Id(), err) + if _, ok := d.GetOk("placement_strategy"); ok { + if err := d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)); err != nil { + return fmt.Errorf("error setting placement_strategy: %s", err) + } + } else { + if err := d.Set("ordered_placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { + return fmt.Errorf("error setting ordered_placement_strategy: %s", err) + } } if err := d.Set("placement_constraints", flattenServicePlacementConstraints(service.PlacementConstraints)); err != nil { log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) @@ -446,6 +575,10 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("[ERR] Error setting network_configuration for (%s): %s", d.Id(), err) } + if err := d.Set("service_registries", flattenServiceRegistries(service.ServiceRegistries)); err != nil { + return fmt.Errorf("[ERR] Error setting service_registries for (%s): %s", d.Id(), err) + } + return nil } @@ -502,7 +635,7 @@ func flattenServicePlacementConstraints(pcs []*ecs.PlacementConstraint) []map[st return results } -func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interface{} { +func flattenPlacementStrategyDeprecated(pss []*ecs.PlacementStrategy) []map[string]interface{} { if len(pss) == 0 { return nil } @@ -522,6 +655,89 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interfa return results } +func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) { + if len(s) == 0 { + return nil, nil + } + ps := make([]*ecs.PlacementStrategy, 0) + for _, raw := range s { + p := raw.(map[string]interface{}) + t := p["type"].(string) + f := p["field"].(string) + if err := validateAwsEcsPlacementStrategy(t, f); err != nil { + return nil, err + } + ps = append(ps, &ecs.PlacementStrategy{ + Type: aws.String(t), + Field: aws.String(f), + }) + } + return ps, nil +} + +func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, error) { + if len(s.List()) == 0 { + return nil, nil + } + ps := make([]*ecs.PlacementStrategy, 0) + for _, raw := range s.List() { + p := raw.(map[string]interface{}) + t := p["type"].(string) + f := p["field"].(string) + if err := validateAwsEcsPlacementStrategy(t, f); err != nil { + return nil, err + } + ps = append(ps, &ecs.PlacementStrategy{ + Type: aws.String(t), + Field: aws.String(f), + }) + } + return ps, nil +} + +func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { + if len(pss) == 0 { + return nil + } + results := make([]interface{}, 0, len(pss)) + for _, ps := range pss { + c := make(map[string]interface{}) + c["type"] = *ps.Type + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } + + results = append(results, c) + } + return results +} + +func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface{} { + if len(srs) == 0 { + return nil + } + results := make([]map[string]interface{}, 0) + for _, sr := range srs { + c := map[string]interface{}{ + "registry_arn": aws.StringValue(sr.RegistryArn), + } + if sr.Port != nil { + c["port"] = int(aws.Int64Value(sr.Port)) + } + if sr.ContainerPort != nil { + c["container_port"] = int(aws.Int64Value(sr.ContainerPort)) + } + if sr.ContainerName != nil { + c["container_name"] = aws.StringValue(sr.ContainerName) + } + results = append(results, c) + } + return results +} + func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn @@ -531,7 +747,9 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error Cluster: aws.String(d.Get("cluster").(string)), } - if d.HasChange("desired_count") { + schedulingStrategy := d.Get("scheduling_strategy").(string) + // Automatically ignore desired count if DAEMON + if schedulingStrategy != ecs.SchedulingStrategyDaemon && d.HasChange("desired_count") { _, n := d.GetChange("desired_count") input.DesiredCount = aws.Int64(int64(n.(int))) } @@ -544,7 +762,7 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error input.TaskDefinition = aws.String(n.(string)) } - if d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent") { + if schedulingStrategy != ecs.SchedulingStrategyDaemon && (d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent")) { input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), @@ -586,7 +804,6 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error if err != nil { if isAWSErr(err, ecs.ErrCodeServiceNotFoundException, "") { log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - d.SetId("") return nil } return err @@ -594,7 +811,6 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error if len(resp.Services) == 0 { log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - d.SetId("") return nil } @@ -605,7 +821,7 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error } // Drain the ECS service - if *resp.Services[0].Status != "DRAINING" { + if *resp.Services[0].Status != "DRAINING" && aws.StringValue(resp.Services[0].SchedulingStrategy) != ecs.SchedulingStrategyDaemon { log.Printf("[DEBUG] Draining ECS service %s", d.Id()) _, err = conn.UpdateService(&ecs.UpdateServiceInput{ Service: aws.String(d.Id()), @@ -705,11 +921,3 @@ func parseTaskDefinition(taskDefinition string) (string, string, error) { return matches[0][1], matches[0][2], nil } - -func validateAwsEcsServiceHealthCheckGracePeriodSeconds(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if (value < 0) || (value > 1800) { - errors = append(errors, fmt.Errorf("%q must be between 0 and 1800", k)) - } - return -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go index 697c623de..ffe3981d4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go @@ -4,13 +4,13 @@ import ( "bytes" "fmt" "log" - "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEcsTaskDefinition() *schema.Resource { @@ -79,11 +79,16 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { }, "network_mode": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateAwsEcsTaskDefinitionNetworkMode, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ecs.NetworkModeBridge, + ecs.NetworkModeHost, + ecs.NetworkModeAwsvpc, + ecs.NetworkModeNone, + }, false), }, "volume": { @@ -139,21 +144,6 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { } } -func validateAwsEcsTaskDefinitionNetworkMode(v interface{}, k string) (ws []string, errors []error) { - value := strings.ToLower(v.(string)) - validTypes := map[string]struct{}{ - "bridge": {}, - "host": {}, - "awsvpc": {}, - "none": {}, - } - - if _, ok := validTypes[value]; !ok { - errors = append(errors, fmt.Errorf("ECS Task Definition network_mode %q is invalid, must be `bridge`, `host`, `awsvpc` or `none`", value)) - } - return -} - func validateAwsEcsTaskDefinitionContainerDefinitions(v interface{}, k string) (ws []string, errors []error) { value := v.(string) _, err := expandEcsContainerDefinitions(value) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go index b842e506c..3674c9118 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go @@ -221,7 +221,7 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro return err } - var fs *efs.FileSystemDescription + var fs *efs.UpdateFileSystemOutput for _, f := range resp.FileSystems { if d.Id() == *f.FileSystemId { fs = f diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go index e5a051631..7c53cf44e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip_association.go @@ -18,6 +18,9 @@ func resourceAwsEipAssociation() *schema.Resource { Create: resourceAwsEipAssociationCreate, Read: resourceAwsEipAssociationRead, Delete: resourceAwsEipAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "allocation_id": &schema.Schema{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go new file mode 100644 index 000000000..87abe5115 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eks_cluster.go @@ -0,0 +1,326 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/eks" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsEksCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEksClusterCreate, + Read: resourceAwsEksClusterRead, + Delete: resourceAwsEksClusterDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(15 * time.Minute), + Delete: schema.DefaultTimeout(15 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_authority": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "created_at": { + Type: schema.TypeString, + Computed: true, + }, + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "vpc_config": { + Type: schema.TypeList, + MinItems: 1, + MaxItems: 1, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "security_group_ids": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsEksClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).eksconn + name := d.Get("name").(string) + + input := &eks.CreateClusterInput{ + Name: aws.String(name), + RoleArn: aws.String(d.Get("role_arn").(string)), + ResourcesVpcConfig: expandEksVpcConfigRequest(d.Get("vpc_config").([]interface{})), + } + + if v, ok := d.GetOk("version"); ok && v.(string) != "" { + input.Version = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating EKS Cluster: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.CreateCluster(input) + if err != nil { + // InvalidParameterException: roleArn, arn:aws:iam::123456789012:role/XXX, does not exist + if isAWSErr(err, eks.ErrCodeInvalidParameterException, "does not exist") { + return resource.RetryableError(err) + } + if isAWSErr(err, eks.ErrCodeInvalidParameterException, "Role could not be assumed because the trusted entity is not correct") { + return resource.RetryableError(err) + } + // InvalidParameterException: The provided role doesn't have the Amazon EKS Managed Policies associated with it. Please ensure the following policies [arn:aws:iam::aws:policy/AmazonEKSClusterPolicy, arn:aws:iam::aws:policy/AmazonEKSServicePolicy] are attached + if isAWSErr(err, eks.ErrCodeInvalidParameterException, "The provided role doesn't have the Amazon EKS Managed Policies associated with it") { + return resource.RetryableError(err) + } + // InvalidParameterException: IAM role's policy must include the `ec2:DescribeSubnets` action + if isAWSErr(err, eks.ErrCodeInvalidParameterException, "IAM role's policy must include") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("error creating EKS Cluster (%s): %s", name, err) + } + + d.SetId(name) + + stateConf := resource.StateChangeConf{ + Pending: []string{eks.ClusterStatusCreating}, + Target: []string{eks.ClusterStatusActive}, + Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: refreshEksClusterStatus(conn, name), + } + _, err = stateConf.WaitForState() + if err != nil { + return err + } + + return resourceAwsEksClusterRead(d, meta) +} + +func resourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).eksconn + + input := &eks.DescribeClusterInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading EKS Cluster: %s", input) + output, err := conn.DescribeCluster(input) + if err != nil { + if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] EKS Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading EKS Cluster (%s): %s", d.Id(), err) + } + + cluster := output.Cluster + if cluster == nil { + log.Printf("[WARN] EKS Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", cluster.Arn) + + if err := d.Set("certificate_authority", flattenEksCertificate(cluster.CertificateAuthority)); err != nil { + return fmt.Errorf("error setting certificate_authority: %s", err) + } + + d.Set("created_at", aws.TimeValue(cluster.CreatedAt).String()) + d.Set("endpoint", cluster.Endpoint) + d.Set("name", cluster.Name) + d.Set("role_arn", cluster.RoleArn) + d.Set("version", cluster.Version) + + if err := d.Set("vpc_config", flattenEksVpcConfigResponse(cluster.ResourcesVpcConfig)); err != nil { + return fmt.Errorf("error setting vpc_config: %s", err) + } + + return nil +} + +func resourceAwsEksClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).eksconn + + log.Printf("[DEBUG] Deleting EKS Cluster: %s", d.Id()) + err := deleteEksCluster(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting EKS Cluster (%s): %s", d.Id(), err) + } + + err = waitForDeleteEksCluster(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) + if err != nil { + return fmt.Errorf("error waiting for EKS Cluster (%s) deletion: %s", d.Id(), err) + } + + return nil +} + +func deleteEksCluster(conn *eks.EKS, clusterName string) error { + input := &eks.DeleteClusterInput{ + Name: aws.String(clusterName), + } + + _, err := conn.DeleteCluster(input) + if err != nil { + if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { + return nil + } + // Sometimes the EKS API returns the ResourceNotFound error in this form: + // ClientException: No cluster found for name: tf-acc-test-0o1f8 + if isAWSErr(err, eks.ErrCodeClientException, "No cluster found for name:") { + return nil + } + return err + } + + return nil +} + +func expandEksVpcConfigRequest(l []interface{}) *eks.VpcConfigRequest { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &eks.VpcConfigRequest{ + SecurityGroupIds: expandStringSet(m["security_group_ids"].(*schema.Set)), + SubnetIds: expandStringSet(m["subnet_ids"].(*schema.Set)), + } +} + +func flattenEksCertificate(certificate *eks.Certificate) []map[string]interface{} { + if certificate == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "data": aws.StringValue(certificate.Data), + } + + return []map[string]interface{}{m} +} + +func flattenEksVpcConfigResponse(vpcConfig *eks.VpcConfigResponse) []map[string]interface{} { + if vpcConfig == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "security_group_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)), + "subnet_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SubnetIds)), + "vpc_id": aws.StringValue(vpcConfig.VpcId), + } + + return []map[string]interface{}{m} +} + +func refreshEksClusterStatus(conn *eks.EKS, clusterName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + output, err := conn.DescribeCluster(&eks.DescribeClusterInput{ + Name: aws.String(clusterName), + }) + if err != nil { + return 42, "", err + } + cluster := output.Cluster + if cluster == nil { + return cluster, "", fmt.Errorf("EKS Cluster (%s) missing", clusterName) + } + return cluster, aws.StringValue(cluster.Status), nil + } +} + +func waitForDeleteEksCluster(conn *eks.EKS, clusterName string, timeout time.Duration) error { + stateConf := resource.StateChangeConf{ + Pending: []string{ + eks.ClusterStatusActive, + eks.ClusterStatusDeleting, + }, + Target: []string{""}, + Timeout: timeout, + Refresh: refreshEksClusterStatus(conn, clusterName), + } + cluster, err := stateConf.WaitForState() + if err != nil { + if isAWSErr(err, eks.ErrCodeResourceNotFoundException, "") { + return nil + } + // Sometimes the EKS API returns the ResourceNotFound error in this form: + // ClientException: No cluster found for name: tf-acc-test-0o1f8 + if isAWSErr(err, eks.ErrCodeClientException, "No cluster found for name:") { + return nil + } + } + if cluster == nil { + return nil + } + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go index fdb6c199b..33b249fc2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application.go @@ -33,6 +33,31 @@ func resourceAwsElasticBeanstalkApplication() *schema.Resource { Optional: true, ForceNew: false, }, + "appversion_lifecycle": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_role": { + Type: schema.TypeString, + Required: true, + }, + "max_age_in_days": { + Type: schema.TypeInt, + Optional: true, + }, + "max_count": { + Type: schema.TypeInt, + Optional: true, + }, + "delete_source_from_s3": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + }, }, } } @@ -51,13 +76,17 @@ func resourceAwsElasticBeanstalkApplicationCreate(d *schema.ResourceData, meta i Description: aws.String(description), } - _, err := beanstalkConn.CreateApplication(req) + app, err := beanstalkConn.CreateApplication(req) if err != nil { return err } d.SetId(name) + if err = resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, app.Application); err != nil { + return err + } + return resourceAwsElasticBeanstalkApplicationRead(d, meta) } @@ -70,6 +99,12 @@ func resourceAwsElasticBeanstalkApplicationUpdate(d *schema.ResourceData, meta i } } + if d.HasChange("appversion_lifecycle") { + if err := resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, nil); err != nil { + return err + } + } + return resourceAwsElasticBeanstalkApplicationRead(d, meta) } @@ -87,6 +122,78 @@ func resourceAwsElasticBeanstalkApplicationDescriptionUpdate(beanstalkConn *elas return err } +func resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData, app *elasticbeanstalk.ApplicationDescription) error { + name := d.Get("name").(string) + appversion_lifecycles := d.Get("appversion_lifecycle").([]interface{}) + var appversion_lifecycle map[string]interface{} = nil + if len(appversion_lifecycles) == 1 { + appversion_lifecycle = appversion_lifecycles[0].(map[string]interface{}) + } + + if appversion_lifecycle == nil && app != nil && app.ResourceLifecycleConfig.ServiceRole == nil { + // We want appversion lifecycle management to be disabled, and it currently is, and there's no way to reproduce + // this state in a UpdateApplicationResourceLifecycle service call (fails w/ ServiceRole is not a valid arn). So, + // in this special case we just do nothing. + log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle is anticipated no-op", name) + return nil + } + + log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle: %v", name, appversion_lifecycle) + + rlc := &elasticbeanstalk.ApplicationResourceLifecycleConfig{ + ServiceRole: nil, + VersionLifecycleConfig: &elasticbeanstalk.ApplicationVersionLifecycleConfig{ + MaxCountRule: &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(false), + }, + MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(false), + }, + }, + } + + if appversion_lifecycle != nil { + service_role, ok := appversion_lifecycle["service_role"] + if ok { + rlc.ServiceRole = aws.String(service_role.(string)) + } + + rlc.VersionLifecycleConfig = &elasticbeanstalk.ApplicationVersionLifecycleConfig{ + MaxCountRule: &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(false), + }, + MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(false), + }, + } + + max_age_in_days, ok := appversion_lifecycle["max_age_in_days"] + if ok && max_age_in_days != 0 { + rlc.VersionLifecycleConfig.MaxAgeRule = &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(true), + DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), + MaxAgeInDays: aws.Int64(int64(max_age_in_days.(int))), + } + } + + max_count, ok := appversion_lifecycle["max_count"] + if ok && max_count != 0 { + rlc.VersionLifecycleConfig.MaxCountRule = &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(true), + DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), + MaxCount: aws.Int64(int64(max_count.(int))), + } + } + } + + _, err := beanstalkConn.UpdateApplicationResourceLifecycle(&elasticbeanstalk.UpdateApplicationResourceLifecycleInput{ + ApplicationName: aws.String(name), + ResourceLifecycleConfig: rlc, + }) + + return err +} + func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn @@ -118,6 +225,11 @@ func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta int d.Set("name", app.ApplicationName) d.Set("description", app.Description) + + if app.ResourceLifecycleConfig != nil { + d.Set("appversion_lifecycle", flattenResourceLifecycleConfig(app.ResourceLifecycleConfig)) + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go index 97530839a..6290ef152 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go @@ -153,14 +153,12 @@ func resourceAwsElasticBeanstalkApplicationVersionDelete(d *schema.ResourceData, if awserr, ok := err.(awserr.Error); ok { // application version is pending delete, or no longer exists. if awserr.Code() == "InvalidParameterValue" { - d.SetId("") return nil } } return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go index 48f20587c..19aa4dffa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go @@ -124,8 +124,9 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { ConflictsWith: []string{"template_name"}, }, "template_name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"solution_stack_name"}, }, "wait_for_ready_timeout": { Type: schema.TypeString, @@ -584,7 +585,7 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int } if env.CNAME != nil { - beanstalkCnamePrefixRegexp := regexp.MustCompile(`(^[^.]+)(.\w{2}-\w{4,9}-\d)?.elasticbeanstalk.com$`) + beanstalkCnamePrefixRegexp := regexp.MustCompile(`(^[^.]+)(.\w{2}-\w{4,9}-\d)?.(elasticbeanstalk.com|eb.amazonaws.com.cn)$`) var cnamePrefix string cnamePrefixMatch := beanstalkCnamePrefixRegexp.FindStringSubmatch(*env.CNAME) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go index 745d9040b..f62557e48 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go @@ -180,6 +180,9 @@ func resourceAwsElasticacheCluster() *schema.Resource { ForceNew: true, } + resourceSchema["availability_zones"].ConflictsWith = []string{"preferred_availability_zones"} + resourceSchema["availability_zones"].Deprecated = "Use `preferred_availability_zones` instead" + resourceSchema["configuration_endpoint"] = &schema.Schema{ Type: schema.TypeString, Computed: true, @@ -215,6 +218,12 @@ func resourceAwsElasticacheCluster() *schema.Resource { }, } + resourceSchema["preferred_availability_zones"] = &schema.Schema{ + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + } + resourceSchema["replication_group_id"] = &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -286,27 +295,6 @@ func resourceAwsElasticacheCluster() *schema.Resource { } return diff.ForceNew("engine_version") }, - func(diff *schema.ResourceDiff, v interface{}) error { - // Plan time validation for node_type - // InvalidParameterCombination: Instance type cache.t2.micro can only be created in a VPC. - nodeType, nodeTypeOk := diff.GetOk("node_type") - if !nodeTypeOk { - return nil - } - vpcOnlyNodeTypes := []string{ - "cache.t2.micro", - "cache.t2.small", - "cache.t2.medium", - } - if _, ok := diff.GetOk("subnet_group_name"); !ok { - for _, vpcOnlyNodeType := range vpcOnlyNodeTypes { - if nodeType == vpcOnlyNodeType { - return fmt.Errorf("node_type %q can only be created in a VPC", nodeType) - } - } - } - return nil - }, func(diff *schema.ResourceDiff, v interface{}) error { // Plan time validation for num_cache_nodes // InvalidParameterValue: Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1. @@ -421,37 +409,26 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ req.PreferredAvailabilityZone = aws.String(v.(string)) } - preferred_azs := d.Get("availability_zones").(*schema.Set).List() - if len(preferred_azs) > 0 { - azs := expandStringList(preferred_azs) - req.PreferredAvailabilityZones = azs + if v, ok := d.GetOk("preferred_availability_zones"); ok && len(v.([]interface{})) > 0 { + req.PreferredAvailabilityZones = expandStringList(v.([]interface{})) + } else { + preferred_azs := d.Get("availability_zones").(*schema.Set).List() + if len(preferred_azs) > 0 { + azs := expandStringList(preferred_azs) + req.PreferredAvailabilityZones = azs + } } - resp, err := conn.CreateCacheCluster(req) + id, err := createElasticacheCacheCluster(conn, req) if err != nil { - return fmt.Errorf("Error creating Elasticache: %s", err) + return fmt.Errorf("error creating Elasticache Cache Cluster: %s", err) } - // Assign the cluster id as the resource ID - // Elasticache always retains the id in lower case, so we have to - // mimic that or else we won't be able to refresh a resource whose - // name contained uppercase characters. - d.SetId(strings.ToLower(*resp.CacheCluster.CacheClusterId)) + d.SetId(id) - pending := []string{"creating", "modifying", "restoring", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheClusterStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache (%s) to be created: %s", d.Id(), sterr) + err = waitForCreateElasticacheCacheCluster(conn, d.Id(), 40*time.Minute) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created: %s", d.Id(), err) } return resourceAwsElasticacheClusterRead(d, meta) @@ -625,6 +602,22 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ log.Printf("[INFO] Cluster %s is marked for Decreasing cache nodes from %d to %d", d.Id(), o, n) nodesToRemove := getCacheNodesToRemove(d, o, o-n) req.CacheNodeIdsToRemove = nodesToRemove + } else { + log.Printf("[INFO] Cluster %s is marked for increasing cache nodes from %d to %d", d.Id(), o, n) + // SDK documentation for NewAvailabilityZones states: + // The list of Availability Zones where the new Memcached cache nodes are created. + // + // This parameter is only valid when NumCacheNodes in the request is greater + // than the sum of the number of active cache nodes and the number of cache + // nodes pending creation (which may be zero). The number of Availability Zones + // supplied in this list must match the cache nodes being added in this request. + if v, ok := d.GetOk("preferred_availability_zones"); ok && len(v.([]interface{})) > 0 { + // Here we check the list length to prevent a potential panic :) + if len(v.([]interface{})) != n { + return fmt.Errorf("length of preferred_availability_zones (%d) must match num_cache_nodes (%d)", len(v.([]interface{})), n) + } + req.NewAvailabilityZones = expandStringList(v.([]interface{})[o:]) + } } req.NumCacheNodes = aws.Int64(int64(d.Get("num_cache_nodes").(int))) @@ -703,9 +696,16 @@ func (b byCacheNodeId) Less(i, j int) bool { func resourceAwsElasticacheClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - err := deleteElasticacheCluster(d.Id(), 40*time.Minute, conn) + err := deleteElasticacheCacheCluster(conn, d.Id()) if err != nil { - return fmt.Errorf("error deleting Elasticache Cluster (%s): %s", d.Id(), err) + if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s): %s", d.Id(), err) + } + err = waitForDeleteElasticacheCacheCluster(conn, d.Id(), 40*time.Minute) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted: %s", d.Id(), err) } return nil @@ -782,13 +782,49 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give } } -func deleteElasticacheCluster(clusterID string, timeout time.Duration, conn *elasticache.ElastiCache) error { - input := &elasticache.DeleteCacheClusterInput{ - CacheClusterId: aws.String(clusterID), +func createElasticacheCacheCluster(conn *elasticache.ElastiCache, input *elasticache.CreateCacheClusterInput) (string, error) { + log.Printf("[DEBUG] Creating Elasticache Cache Cluster: %s", input) + output, err := conn.CreateCacheCluster(input) + if err != nil { + return "", err } + if output == nil || output.CacheCluster == nil { + return "", errors.New("missing cluster ID after creation") + } + // Elasticache always retains the id in lower case, so we have to + // mimic that or else we won't be able to refresh a resource whose + // name contained uppercase characters. + return strings.ToLower(aws.StringValue(output.CacheCluster.CacheClusterId)), nil +} + +func waitForCreateElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { + pending := []string{"creating", "modifying", "restoring", "snapshotting"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "available", pending), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster (%s) to be created", cacheClusterID) + _, err := stateConf.WaitForState() + return err +} + +func deleteElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string) error { + input := &elasticache.DeleteCacheClusterInput{ + CacheClusterId: aws.String(cacheClusterID), + } + log.Printf("[DEBUG] Deleting Elasticache Cache Cluster: %s", input) err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.DeleteCacheCluster(input) if err != nil { + // This will not be fixed by retrying + if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { + return resource.NonRetryableError(err) + } // The cluster may be just snapshotting, so we retry until it's ready for deletion if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "") { return resource.RetryableError(err) @@ -797,20 +833,20 @@ func deleteElasticacheCluster(clusterID string, timeout time.Duration, conn *ela } return nil }) - if err != nil { - return err - } + return err +} - log.Printf("[DEBUG] Waiting for deletion: %v", clusterID) +func waitForDeleteElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network", "restore-failed", "snapshotting"}, Target: []string{}, - Refresh: cacheClusterStateRefreshFunc(conn, clusterID, "", []string{}), + Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "", []string{}), Timeout: timeout, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } + log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster deletion: %v", cacheClusterID) - _, err = stateConf.WaitForState() + _, err := stateConf.WaitForState() return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go index 3c84ae070..2689d67ce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go @@ -231,7 +231,6 @@ func resourceAwsElasticacheParameterGroupDelete(d *schema.ResourceData, meta int if err != nil { awsErr, ok := err.(awserr.Error) if ok && awsErr.Code() == "CacheParameterGroupNotFoundFault" { - d.SetId("") return nil } if ok && awsErr.Code() == "InvalidCacheParameterGroupState" { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go index 57b8d7080..af8bee447 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go @@ -48,7 +48,13 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { Type: schema.TypeInt, Computed: true, Optional: true, - ForceNew: true, + } + + resourceSchema["member_clusters"] = &schema.Schema{ + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, } resourceSchema["primary_endpoint_address"] = &schema.Schema{ @@ -125,7 +131,7 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { SchemaVersion: 1, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(50 * time.Minute), + Create: schema.DefaultTimeout(60 * time.Minute), Delete: schema.DefaultTimeout(40 * time.Minute), Update: schema.DefaultTimeout(40 * time.Minute), }, @@ -314,6 +320,9 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int d.Set("replication_group_description", rgp.Description) d.Set("number_cache_clusters", len(rgp.MemberClusters)) + if err := d.Set("member_clusters", flattenStringList(rgp.MemberClusters)); err != nil { + return fmt.Errorf("error setting member_clusters: %s", err) + } if err := d.Set("cluster_mode", flattenElasticacheNodeGroupsToClusterMode(aws.BoolValue(rgp.ClusterEnabled), rgp.NodeGroups)); err != nil { return fmt.Errorf("error setting cluster_mode attribute: %s", err) } @@ -405,23 +414,172 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i return fmt.Errorf("error modifying Elasticache Replication Group shard configuration: %s", err) } - pending := []string{"creating", "modifying", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) shard reconfiguration completion", d.Id()) - _, err = stateConf.WaitForState() + err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) if err != nil { return fmt.Errorf("error waiting for Elasticache Replication Group (%s) shard reconfiguration completion: %s", d.Id(), err) } } + if d.HasChange("number_cache_clusters") { + o, n := d.GetChange("number_cache_clusters") + oldNumberCacheClusters := o.(int) + newNumberCacheClusters := n.(int) + + // We will try to use similar naming to the console, which are 1 indexed: RGID-001 through RGID-006 + var addClusterIDs, removeClusterIDs []string + for clusterID := oldNumberCacheClusters + 1; clusterID <= newNumberCacheClusters; clusterID++ { + addClusterIDs = append(addClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) + } + for clusterID := oldNumberCacheClusters; clusterID >= (newNumberCacheClusters + 1); clusterID-- { + removeClusterIDs = append(removeClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) + } + + if len(addClusterIDs) > 0 { + // Kick off all the Cache Cluster creations + for _, cacheClusterID := range addClusterIDs { + input := &elasticache.CreateCacheClusterInput{ + CacheClusterId: aws.String(cacheClusterID), + ReplicationGroupId: aws.String(d.Id()), + } + _, err := createElasticacheCacheCluster(conn, input) + if err != nil { + // Future enhancement: we could retry creation with random ID on naming collision + // if isAWSErr(err, elasticache.ErrCodeCacheClusterAlreadyExistsFault, "") { ... } + return fmt.Errorf("error creating Elasticache Cache Cluster (adding replica): %s", err) + } + } + + // Wait for all Cache Cluster creations + for _, cacheClusterID := range addClusterIDs { + err := waitForCreateElasticacheCacheCluster(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created (adding replica): %s", cacheClusterID, err) + } + } + } + + if len(removeClusterIDs) > 0 { + // Cannot reassign primary cluster ID while automatic failover is enabled + // If we temporarily disable automatic failover, ensure we re-enable it + reEnableAutomaticFailover := false + + // Kick off all the Cache Cluster deletions + for _, cacheClusterID := range removeClusterIDs { + err := deleteElasticacheCacheCluster(conn, cacheClusterID) + if err != nil { + // Future enhancement: we could retry deletion with random existing ID on missing name + // if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { ... } + if !isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica): %s", cacheClusterID, err) + } + + // Use Replication Group MemberClusters to find a new primary cache cluster ID + // that is not in removeClusterIDs + newPrimaryClusterID := "" + + describeReplicationGroupInput := &elasticache.DescribeReplicationGroupsInput{ + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Elasticache Replication Group: %s", describeReplicationGroupInput) + output, err := conn.DescribeReplicationGroups(describeReplicationGroupInput) + if err != nil { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: %s", d.Id(), err) + } + if output == nil || len(output.ReplicationGroups) == 0 || len(output.ReplicationGroups[0].MemberClusters) == 0 { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: missing replication group information", d.Id()) + } + + for _, memberClusterPtr := range output.ReplicationGroups[0].MemberClusters { + memberCluster := aws.StringValue(memberClusterPtr) + memberClusterInRemoveClusterIDs := false + for _, removeClusterID := range removeClusterIDs { + if memberCluster == removeClusterID { + memberClusterInRemoveClusterIDs = true + break + } + } + if !memberClusterInRemoveClusterIDs { + newPrimaryClusterID = memberCluster + break + } + } + if newPrimaryClusterID == "" { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: unable to assign new primary", d.Id()) + } + + // Disable automatic failover if enabled + // Must be applied previous to trying to set new primary + // InvalidReplicationGroupState: Cannot manually promote a new master cache cluster while autofailover is enabled + if aws.StringValue(output.ReplicationGroups[0].AutomaticFailover) == elasticache.AutomaticFailoverStatusEnabled { + // Be kind and rewind + if d.Get("automatic_failover_enabled").(bool) { + reEnableAutomaticFailover = true + } + + modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(false), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) + _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) + } + err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) + } + } + + // Set new primary + modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + PrimaryClusterId: aws.String(newPrimaryClusterID), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) + _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) + } + err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) + } + + // Finally retry deleting the cache cluster + err = deleteElasticacheCacheCluster(conn, cacheClusterID) + if err != nil { + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica after setting new primary): %s", cacheClusterID, err) + } + } + } + + // Wait for all Cache Cluster deletions + for _, cacheClusterID := range removeClusterIDs { + err := waitForDeleteElasticacheCacheCluster(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted (removing replica): %s", cacheClusterID, err) + } + } + + // Re-enable automatic failover if we needed to temporarily disable it + if reEnableAutomaticFailover { + input := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(true), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", input) + _, err := conn.ModifyReplicationGroup(input) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to re-enable automatic failover: %s", d.Id(), err) + } + } + } + } + requestUpdate := false params := &elasticache.ModifyReplicationGroupInput{ ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), @@ -501,23 +659,12 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i if requestUpdate { _, err := conn.ModifyReplicationGroup(params) if err != nil { - return fmt.Errorf("Error updating Elasticache replication group: %s", err) + return fmt.Errorf("error updating Elasticache Replication Group (%s): %s", d.Id(), err) } - pending := []string{"creating", "modifying", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache replication group (%s) to be created: %s", d.Id(), sterr) + err = waitForModifyElasticacheReplicationGroup(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be updated: %s", d.Id(), err) } } return resourceAwsElasticacheReplicationGroupRead(d, meta) @@ -586,11 +733,23 @@ func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.D ReplicationGroupId: aws.String(replicationGroupID), } - _, err := conn.DeleteReplicationGroup(input) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { - return nil + // 10 minutes should give any creating/deleting cache clusters or snapshots time to complete + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteReplicationGroup(input) + if err != nil { + if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { + return nil + } + // Cache Cluster is creating/deleting or Replication Group is snapshotting + // InvalidReplicationGroupState: Cache cluster tf-acc-test-uqhe-003 is not in a valid state to be deleted + if isAWSErr(err, elasticache.ErrCodeInvalidReplicationGroupStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } + return nil + }) + if err != nil { return err } @@ -627,6 +786,22 @@ func flattenElasticacheNodeGroupsToClusterMode(clusterEnabled bool, nodeGroups [ return []map[string]interface{}{m} } +func waitForModifyElasticacheReplicationGroup(conn *elasticache.ElastiCache, replicationGroupID string, timeout time.Duration) error { + pending := []string{"creating", "modifying", "snapshotting"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "available", pending), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) to become available", replicationGroupID) + _, err := stateConf.WaitForState() + return err +} + func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws []string, errors []error) { if strings.ToLower(v.(string)) != "redis" { errors = append(errors, fmt.Errorf("The only acceptable Engine type when using Replication Groups is Redis")) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go index 7918ec584..da4e58816 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go @@ -122,6 +122,5 @@ func resourceAwsElasticSearchDomainPolicyDelete(d *schema.ResourceData, meta int return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go index eb26f9626..3a692a68c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go @@ -17,6 +17,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsElb() *schema.Resource { @@ -39,10 +40,11 @@ func resourceAwsElb() *schema.Resource { ValidateFunc: validateElbName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateElbNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateElbNamePrefix, }, "arn": &schema.Schema{ @@ -110,7 +112,7 @@ func resourceAwsElb() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 60, - ValidateFunc: validateIntegerInRange(1, 4000), + ValidateFunc: validation.IntBetween(1, 4000), }, "connection_draining": &schema.Schema{ @@ -162,25 +164,25 @@ func resourceAwsElb() *schema.Resource { "instance_port": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(1, 65535), + ValidateFunc: validation.IntBetween(1, 65535), }, "instance_protocol": &schema.Schema{ Type: schema.TypeString, Required: true, - ValidateFunc: validateListenerProtocol, + ValidateFunc: validateListenerProtocol(), }, "lb_port": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(1, 65535), + ValidateFunc: validation.IntBetween(1, 65535), }, "lb_protocol": &schema.Schema{ Type: schema.TypeString, Required: true, - ValidateFunc: validateListenerProtocol, + ValidateFunc: validateListenerProtocol(), }, "ssl_certificate_id": &schema.Schema{ @@ -203,13 +205,13 @@ func resourceAwsElb() *schema.Resource { "healthy_threshold": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 10), + ValidateFunc: validation.IntBetween(2, 10), }, "unhealthy_threshold": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 10), + ValidateFunc: validation.IntBetween(2, 10), }, "target": &schema.Schema{ @@ -221,13 +223,13 @@ func resourceAwsElb() *schema.Resource { "interval": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(5, 300), + ValidateFunc: validation.IntBetween(5, 300), }, "timeout": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 60), + ValidateFunc: validation.IntBetween(2, 60), }, }, }, @@ -584,17 +586,12 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error { logs := d.Get("access_logs").([]interface{}) if len(logs) == 1 { l := logs[0].(map[string]interface{}) - accessLog := &elb.AccessLog{ - Enabled: aws.Bool(l["enabled"].(bool)), - EmitInterval: aws.Int64(int64(l["interval"].(int))), - S3BucketName: aws.String(l["bucket"].(string)), + attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ + Enabled: aws.Bool(l["enabled"].(bool)), + EmitInterval: aws.Int64(int64(l["interval"].(int))), + S3BucketName: aws.String(l["bucket"].(string)), + S3BucketPrefix: aws.String(l["bucket_prefix"].(string)), } - - if l["bucket_prefix"] != "" { - accessLog.S3BucketPrefix = aws.String(l["bucket_prefix"].(string)) - } - - attrs.LoadBalancerAttributes.AccessLog = accessLog } else if len(logs) == 0 { // disable access logs attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ @@ -965,18 +962,6 @@ func validateHeathCheckTarget(v interface{}, k string) (ws []string, errors []er return } -func validateListenerProtocol(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if !isValidProtocol(value) { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Listener protocol %q. "+ - "Valid protocols are either %q, %q, %q, or %q.", - k, value, "TCP", "SSL", "HTTP", "HTTPS")) - } - return -} - func isValidProtocol(s string) bool { if s == "" { return false @@ -997,6 +982,15 @@ func isValidProtocol(s string) bool { return true } +func validateListenerProtocol() schema.SchemaValidateFunc { + return validation.StringInSlice([]string{ + "HTTP", + "HTTPS", + "SSL", + "TCP", + }, true) +} + // ELB automatically creates ENI(s) on creation // but the cleanup is asynchronous and may take time // which then blocks IGW, SG or VPC on deletion diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go index 0be3f0438..a8190f449 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go @@ -42,6 +42,17 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, ForceNew: true, }, + "additional_info": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + StateFunc: func(v interface{}) string { + json, _ := structure.NormalizeJsonString(v) + return json + }, + }, "core_instance_type": { Type: schema.TypeString, Optional: true, @@ -100,34 +111,42 @@ func resourceAwsEMRCluster() *schema.Resource { "key_name": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "subnet_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "additional_master_security_groups": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "additional_slave_security_groups": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "emr_managed_master_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "emr_managed_slave_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "instance_profile": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "service_access_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, @@ -470,6 +489,14 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error VisibleToAllUsers: aws.Bool(d.Get("visible_to_all_users").(bool)), } + if v, ok := d.GetOk("additional_info"); ok { + info, err := structure.NormalizeJsonString(v) + if err != nil { + return fmt.Errorf("Additional Info contains an invalid JSON: %v", err) + } + params.AdditionalInfo = aws.String(info) + } + if v, ok := d.GetOk("log_uri"); ok { params.LogUri = aws.String(v.(string)) } @@ -676,6 +703,15 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting step: %s", err) } + // AWS provides no other way to read back the additional_info + if v, ok := d.GetOk("additional_info"); ok { + info, err := structure.NormalizeJsonString(v) + if err != nil { + return fmt.Errorf("Additional Info contains an invalid JSON: %v", err) + } + d.Set("additional_info", info) + } + return nil } @@ -827,7 +863,6 @@ func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error log.Printf("[ERR] Error waiting for EMR Cluster (%s) Instances to drain", d.Id()) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go index 50400c407..45beffc6d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go @@ -28,10 +28,11 @@ func resourceAwsEMRSecurityConfiguration() *schema.Resource { ValidateFunc: validateMaxLength(10280), }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(10280 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(10280 - resource.UniqueIDSuffixLength), }, "configuration": { @@ -106,12 +107,10 @@ func resourceAwsEmrSecurityConfigurationDelete(d *schema.ResourceData, meta inte }) if err != nil { if isAWSErr(err, "InvalidRequestException", "does not exist") { - d.SetId("") return nil } return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go index 1f040be1b..8e9478dea 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_database.go @@ -44,7 +44,7 @@ func resourceAwsGlueCatalogDatabase() *schema.Resource { }, "parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, }, @@ -76,7 +76,10 @@ func resourceAwsGlueCatalogDatabaseCreate(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseUpdate(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } dbUpdateInput := &glue.UpdateDatabaseInput{ CatalogId: aws.String(catalogID), @@ -117,7 +120,10 @@ func resourceAwsGlueCatalogDatabaseUpdate(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } input := &glue.GetDatabaseInput{ CatalogId: aws.String(catalogID), @@ -130,6 +136,7 @@ func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{} if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { log.Printf("[WARN] Glue Catalog Database (%s) not found, removing from state", d.Id()) d.SetId("") + return nil } return fmt.Errorf("Error reading Glue Catalog Database: %s", err.Error()) @@ -153,10 +160,13 @@ func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{} func resourceAwsGlueCatalogDatabaseDelete(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } log.Printf("[DEBUG] Glue Catalog Database: %s:%s", catalogID, name) - _, err := glueconn.DeleteDatabase(&glue.DeleteDatabaseInput{ + _, err = glueconn.DeleteDatabase(&glue.DeleteDatabaseInput{ Name: aws.String(name), }) if err != nil { @@ -167,20 +177,32 @@ func resourceAwsGlueCatalogDatabaseDelete(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseExists(d *schema.ResourceData, meta interface{}) (bool, error) { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return false, err + } input := &glue.GetDatabaseInput{ CatalogId: aws.String(catalogID), Name: aws.String(name), } - _, err := glueconn.GetDatabase(input) - return err == nil, err + _, err = glueconn.GetDatabase(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return false, nil + } + return false, err + } + return true, nil } -func readAwsGlueCatalogID(id string) (catalogID string, name string) { +func readAwsGlueCatalogID(id string) (catalogID string, name string, err error) { idParts := strings.Split(id, ":") - return idParts[0], idParts[1] + if len(idParts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected CATALOG-ID:DATABASE-NAME", id) + } + return idParts[0], idParts[1], nil } func createAwsGlueCatalogID(d *schema.ResourceData, accountid string) (catalogID string) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go new file mode 100644 index 000000000..3f9c19b13 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_catalog_table.go @@ -0,0 +1,667 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsGlueCatalogTable() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueCatalogTableCreate, + Read: resourceAwsGlueCatalogTableRead, + Update: resourceAwsGlueCatalogTableUpdate, + Delete: resourceAwsGlueCatalogTableDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "catalog_id": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Computed: true, + }, + "database_name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "owner": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "partition_keys": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "comment": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "retention": { + Type: schema.TypeInt, + Optional: true, + }, + "storage_descriptor": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "comment": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "compressed": { + Type: schema.TypeBool, + Optional: true, + }, + "input_format": { + Type: schema.TypeString, + Optional: true, + }, + "location": { + Type: schema.TypeString, + Optional: true, + }, + "number_of_buckets": { + Type: schema.TypeInt, + Optional: true, + }, + "output_format": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ser_de_info": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "serialization_library": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "skewed_info": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "skewed_column_names": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "skewed_column_values": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "skewed_column_value_location_maps": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "sort_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "column": { + Type: schema.TypeString, + Required: true, + }, + "sort_order": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "stored_as_sub_directories": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + }, + "table_type": { + Type: schema.TypeString, + Optional: true, + }, + "view_original_text": { + Type: schema.TypeString, + Optional: true, + }, + "view_expanded_text": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func readAwsGlueTableID(id string) (catalogID string, dbName string, name string, error error) { + idParts := strings.Split(id, ":") + if len(idParts) != 3 { + return "", "", "", fmt.Errorf("expected ID in format catalog-id:database-name:table-name, received: %s", id) + } + return idParts[0], idParts[1], idParts[2], nil +} + +func resourceAwsGlueCatalogTableCreate(d *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + catalogID := createAwsGlueCatalogID(d, meta.(*AWSClient).accountid) + dbName := d.Get("database_name").(string) + name := d.Get("name").(string) + + input := &glue.CreateTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + TableInput: expandGlueTableInput(d), + } + + _, err := glueconn.CreateTable(input) + if err != nil { + return fmt.Errorf("Error creating Catalog Table: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s:%s", catalogID, dbName, name)) + + return resourceAwsGlueCatalogTableRead(d, meta) +} + +func resourceAwsGlueCatalogTableRead(d *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, name, err := readAwsGlueTableID(d.Id()) + if err != nil { + return err + } + + input := &glue.GetTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + Name: aws.String(name), + } + + out, err := glueconn.GetTable(input) + if err != nil { + + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Catalog Table (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + return fmt.Errorf("Error reading Glue Catalog Table: %s", err) + } + + d.Set("name", out.Table.Name) + d.Set("catalog_id", catalogID) + d.Set("database_name", dbName) + d.Set("description", out.Table.Description) + d.Set("owner", out.Table.Owner) + d.Set("retention", out.Table.Retention) + + if err := d.Set("storage_descriptor", flattenGlueStorageDescriptor(out.Table.StorageDescriptor)); err != nil { + return fmt.Errorf("error setting storage_descriptor: %s", err) + } + + if err := d.Set("partition_keys", flattenGlueColumns(out.Table.PartitionKeys)); err != nil { + return fmt.Errorf("error setting partition_keys: %s", err) + } + + d.Set("view_original_text", out.Table.ViewOriginalText) + d.Set("view_expanded_text", out.Table.ViewExpandedText) + d.Set("table_type", out.Table.TableType) + + if err := d.Set("parameters", aws.StringValueMap(out.Table.Parameters)); err != nil { + return fmt.Errorf("error setting parameters: %s", err) + } + + return nil +} + +func resourceAwsGlueCatalogTableUpdate(d *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, _, err := readAwsGlueTableID(d.Id()) + if err != nil { + return err + } + + updateTableInput := &glue.UpdateTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + TableInput: expandGlueTableInput(d), + } + + if _, err := glueconn.UpdateTable(updateTableInput); err != nil { + return fmt.Errorf("Error updating Glue Catalog Table: %s", err) + } + + return resourceAwsGlueCatalogTableRead(d, meta) +} + +func resourceAwsGlueCatalogTableDelete(d *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, name, tableIdErr := readAwsGlueTableID(d.Id()) + if tableIdErr != nil { + return tableIdErr + } + + log.Printf("[DEBUG] Glue Catalog Table: %s:%s:%s", catalogID, dbName, name) + _, err := glueconn.DeleteTable(&glue.DeleteTableInput{ + CatalogId: aws.String(catalogID), + Name: aws.String(name), + DatabaseName: aws.String(dbName), + }) + if err != nil { + return fmt.Errorf("Error deleting Glue Catalog Table: %s", err.Error()) + } + return nil +} + +func expandGlueTableInput(d *schema.ResourceData) *glue.TableInput { + tableInput := &glue.TableInput{ + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("description"); ok { + tableInput.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("owner"); ok { + tableInput.Owner = aws.String(v.(string)) + } + + if v, ok := d.GetOk("retention"); ok { + tableInput.Retention = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("storage_descriptor"); ok { + tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.([]interface{})) + } + + if v, ok := d.GetOk("partition_keys"); ok { + columns := expandGlueColumns(v.([]interface{})) + tableInput.PartitionKeys = columns + } + + if v, ok := d.GetOk("view_original_text"); ok { + tableInput.ViewOriginalText = aws.String(v.(string)) + } + + if v, ok := d.GetOk("view_expanded_text"); ok { + tableInput.ViewExpandedText = aws.String(v.(string)) + } + + if v, ok := d.GetOk("table_type"); ok { + tableInput.TableType = aws.String(v.(string)) + } + + if v, ok := d.GetOk("parameters"); ok { + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + tableInput.Parameters = aws.StringMap(paramsMap) + } + + return tableInput +} + +func expandGlueStorageDescriptor(l []interface{}) *glue.StorageDescriptor { + if len(l) == 0 { + return nil + } + + s := l[0].(map[string]interface{}) + storageDescriptor := &glue.StorageDescriptor{} + + if v, ok := s["columns"]; ok { + columns := expandGlueColumns(v.([]interface{})) + storageDescriptor.Columns = columns + } + + if v, ok := s["location"]; ok { + storageDescriptor.Location = aws.String(v.(string)) + } + + if v, ok := s["input_format"]; ok { + storageDescriptor.InputFormat = aws.String(v.(string)) + } + + if v, ok := s["output_format"]; ok { + storageDescriptor.OutputFormat = aws.String(v.(string)) + } + + if v, ok := s["compressed"]; ok { + storageDescriptor.Compressed = aws.Bool(v.(bool)) + } + + if v, ok := s["number_of_buckets"]; ok { + storageDescriptor.NumberOfBuckets = aws.Int64(int64(v.(int))) + } + + if v, ok := s["ser_de_info"]; ok { + storageDescriptor.SerdeInfo = expandGlueSerDeInfo(v.([]interface{})) + } + + if v, ok := s["bucket_columns"]; ok { + bucketColumns := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + bucketColumns[i] = fmt.Sprint(item) + } + storageDescriptor.BucketColumns = aws.StringSlice(bucketColumns) + } + + if v, ok := s["sort_columns"]; ok { + storageDescriptor.SortColumns = expandGlueSortColumns(v.([]interface{})) + } + + if v, ok := s["skewed_info"]; ok { + storageDescriptor.SkewedInfo = expandGlueSkewedInfo(v.([]interface{})) + } + + if v, ok := s["parameters"]; ok { + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + storageDescriptor.Parameters = aws.StringMap(paramsMap) + } + + if v, ok := s["stored_as_sub_directories"]; ok { + storageDescriptor.StoredAsSubDirectories = aws.Bool(v.(bool)) + } + + return storageDescriptor +} + +func expandGlueColumns(columns []interface{}) []*glue.Column { + columnSlice := []*glue.Column{} + for _, element := range columns { + elementMap := element.(map[string]interface{}) + + column := &glue.Column{ + Name: aws.String(elementMap["name"].(string)), + } + + if v, ok := elementMap["comment"]; ok { + column.Comment = aws.String(v.(string)) + } + + if v, ok := elementMap["type"]; ok { + column.Type = aws.String(v.(string)) + } + + columnSlice = append(columnSlice, column) + } + + return columnSlice +} + +func expandGlueSerDeInfo(l []interface{}) *glue.SerDeInfo { + if len(l) == 0 { + return nil + } + + s := l[0].(map[string]interface{}) + serDeInfo := &glue.SerDeInfo{} + + if v, ok := s["name"]; ok { + serDeInfo.Name = aws.String(v.(string)) + } + + if v, ok := s["parameters"]; ok { + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + serDeInfo.Parameters = aws.StringMap(paramsMap) + } + + if v, ok := s["serialization_library"]; ok { + serDeInfo.SerializationLibrary = aws.String(v.(string)) + } + + return serDeInfo +} + +func expandGlueSortColumns(columns []interface{}) []*glue.Order { + orderSlice := make([]*glue.Order, len(columns)) + + for i, element := range columns { + elementMap := element.(map[string]interface{}) + + order := &glue.Order{ + Column: aws.String(elementMap["column"].(string)), + } + + if v, ok := elementMap["sort_order"]; ok { + order.SortOrder = aws.Int64(int64(v.(int))) + } + + orderSlice[i] = order + } + + return orderSlice +} + +func expandGlueSkewedInfo(l []interface{}) *glue.SkewedInfo { + if len(l) == 0 { + return nil + } + + s := l[0].(map[string]interface{}) + skewedInfo := &glue.SkewedInfo{} + + if v, ok := s["skewed_column_names"]; ok { + columnsSlice := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + columnsSlice[i] = fmt.Sprint(item) + } + skewedInfo.SkewedColumnNames = aws.StringSlice(columnsSlice) + } + + if v, ok := s["skewed_column_value_location_maps"]; ok { + typeMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + typeMap[key] = value.(string) + } + skewedInfo.SkewedColumnValueLocationMaps = aws.StringMap(typeMap) + } + + if v, ok := s["skewed_column_values"]; ok { + columnsSlice := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + columnsSlice[i] = fmt.Sprint(item) + } + skewedInfo.SkewedColumnValues = aws.StringSlice(columnsSlice) + } + + return skewedInfo +} + +func flattenGlueStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { + if s == nil { + storageDescriptors := make([]map[string]interface{}, 0) + return storageDescriptors + } + + storageDescriptors := make([]map[string]interface{}, 1) + + storageDescriptor := make(map[string]interface{}) + + storageDescriptor["columns"] = flattenGlueColumns(s.Columns) + storageDescriptor["location"] = aws.StringValue(s.Location) + storageDescriptor["input_format"] = aws.StringValue(s.InputFormat) + storageDescriptor["output_format"] = aws.StringValue(s.OutputFormat) + storageDescriptor["compressed"] = aws.BoolValue(s.Compressed) + storageDescriptor["number_of_buckets"] = aws.Int64Value(s.NumberOfBuckets) + storageDescriptor["ser_de_info"] = flattenGlueSerDeInfo(s.SerdeInfo) + storageDescriptor["bucket_columns"] = flattenStringList(s.BucketColumns) + storageDescriptor["sort_columns"] = flattenGlueOrders(s.SortColumns) + storageDescriptor["parameters"] = aws.StringValueMap(s.Parameters) + storageDescriptor["skewed_info"] = flattenGlueSkewedInfo(s.SkewedInfo) + storageDescriptor["stored_as_sub_directories"] = aws.BoolValue(s.StoredAsSubDirectories) + + storageDescriptors[0] = storageDescriptor + + return storageDescriptors +} + +func flattenGlueColumns(cs []*glue.Column) []map[string]string { + columnsSlice := make([]map[string]string, len(cs)) + if len(cs) > 0 { + for i, v := range cs { + columnsSlice[i] = flattenGlueColumn(v) + } + } + + return columnsSlice +} + +func flattenGlueColumn(c *glue.Column) map[string]string { + column := make(map[string]string) + + if c == nil { + return column + } + + if v := aws.StringValue(c.Name); v != "" { + column["name"] = v + } + + if v := aws.StringValue(c.Type); v != "" { + column["type"] = v + } + + if v := aws.StringValue(c.Comment); v != "" { + column["comment"] = v + } + + return column +} + +func flattenGlueSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { + if s == nil { + serDeInfos := make([]map[string]interface{}, 0) + return serDeInfos + } + + serDeInfos := make([]map[string]interface{}, 1) + serDeInfo := make(map[string]interface{}) + + serDeInfo["name"] = aws.StringValue(s.Name) + serDeInfo["parameters"] = aws.StringValueMap(s.Parameters) + serDeInfo["serialization_library"] = aws.StringValue(s.SerializationLibrary) + + serDeInfos[0] = serDeInfo + return serDeInfos +} + +func flattenGlueOrders(os []*glue.Order) []map[string]interface{} { + orders := make([]map[string]interface{}, len(os)) + for i, v := range os { + order := make(map[string]interface{}) + order["column"] = aws.StringValue(v.Column) + order["sort_order"] = int(aws.Int64Value(v.SortOrder)) + orders[i] = order + } + + return orders +} + +func flattenGlueSkewedInfo(s *glue.SkewedInfo) []map[string]interface{} { + if s == nil { + skewedInfoSlice := make([]map[string]interface{}, 0) + return skewedInfoSlice + } + + skewedInfoSlice := make([]map[string]interface{}, 1) + + skewedInfo := make(map[string]interface{}) + skewedInfo["skewed_column_names"] = flattenStringList(s.SkewedColumnNames) + skewedInfo["skewed_column_value_location_maps"] = aws.StringValueMap(s.SkewedColumnValueLocationMaps) + skewedInfo["skewed_column_values"] = flattenStringList(s.SkewedColumnValues) + skewedInfoSlice[0] = skewedInfo + + return skewedInfoSlice +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go new file mode 100644 index 000000000..9505201cc --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_classifier.go @@ -0,0 +1,348 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/customdiff" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueClassifier() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueClassifierCreate, + Read: resourceAwsGlueClassifierRead, + Update: resourceAwsGlueClassifierUpdate, + Delete: resourceAwsGlueClassifierDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + CustomizeDiff: customdiff.Sequence( + func(diff *schema.ResourceDiff, v interface{}) error { + // ForceNew when changing classifier type + // InvalidInputException: UpdateClassifierRequest can't change the type of the classifier + if diff.HasChange("grok_classifier") && diff.HasChange("json_classifier") { + diff.ForceNew("grok_classifier") + diff.ForceNew("json_classifier") + } + if diff.HasChange("grok_classifier") && diff.HasChange("xml_classifier") { + diff.ForceNew("grok_classifier") + diff.ForceNew("xml_classifier") + } + if diff.HasChange("json_classifier") && diff.HasChange("xml_classifier") { + diff.ForceNew("json_classifier") + diff.ForceNew("xml_classifier") + } + return nil + }, + ), + + Schema: map[string]*schema.Schema{ + "grok_classifier": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"json_classifier", "xml_classifier"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "classification": { + Type: schema.TypeString, + Required: true, + }, + "custom_patterns": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 16000), + }, + "grok_pattern": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 2048), + }, + }, + }, + }, + "json_classifier": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"grok_classifier", "xml_classifier"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "json_path": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + "xml_classifier": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"grok_classifier", "json_classifier"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "classification": { + Type: schema.TypeString, + Required: true, + }, + "row_tag": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsGlueClassifierCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + input := &glue.CreateClassifierInput{} + + if v, ok := d.GetOk("grok_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.GrokClassifier = expandGlueGrokClassifierCreate(name, m) + } + + if v, ok := d.GetOk("json_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.JsonClassifier = expandGlueJsonClassifierCreate(name, m) + } + + if v, ok := d.GetOk("xml_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.XMLClassifier = expandGlueXmlClassifierCreate(name, m) + } + + log.Printf("[DEBUG] Creating Glue Classifier: %s", input) + _, err := conn.CreateClassifier(input) + if err != nil { + return fmt.Errorf("error creating Glue Classifier (%s): %s", name, err) + } + + d.SetId(name) + + return resourceAwsGlueClassifierRead(d, meta) +} + +func resourceAwsGlueClassifierRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.GetClassifierInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glue Classifier: %s", input) + output, err := conn.GetClassifier(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Classifier (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Glue Classifier (%s): %s", d.Id(), err) + } + + classifier := output.Classifier + if classifier == nil { + log.Printf("[WARN] Glue Classifier (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("grok_classifier", flattenGlueGrokClassifier(classifier.GrokClassifier)); err != nil { + return fmt.Errorf("error setting match_criteria: %s", err) + } + + if err := d.Set("json_classifier", flattenGlueJsonClassifier(classifier.JsonClassifier)); err != nil { + return fmt.Errorf("error setting json_classifier: %s", err) + } + + d.Set("name", d.Id()) + + if err := d.Set("xml_classifier", flattenGlueXmlClassifier(classifier.XMLClassifier)); err != nil { + return fmt.Errorf("error setting xml_classifier: %s", err) + } + + return nil +} + +func resourceAwsGlueClassifierUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.UpdateClassifierInput{} + + if v, ok := d.GetOk("grok_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.GrokClassifier = expandGlueGrokClassifierUpdate(d.Id(), m) + } + + if v, ok := d.GetOk("json_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.JsonClassifier = expandGlueJsonClassifierUpdate(d.Id(), m) + } + + if v, ok := d.GetOk("xml_classifier"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + input.XMLClassifier = expandGlueXmlClassifierUpdate(d.Id(), m) + } + + log.Printf("[DEBUG] Updating Glue Classifier: %s", input) + _, err := conn.UpdateClassifier(input) + if err != nil { + return fmt.Errorf("error updating Glue Classifier (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsGlueClassifierDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] Deleting Glue Classifier: %s", d.Id()) + err := deleteGlueClassifier(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting Glue Classifier (%s): %s", d.Id(), err) + } + + return nil +} + +func deleteGlueClassifier(conn *glue.Glue, name string) error { + input := &glue.DeleteClassifierInput{ + Name: aws.String(name), + } + + _, err := conn.DeleteClassifier(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandGlueGrokClassifierCreate(name string, m map[string]interface{}) *glue.CreateGrokClassifierRequest { + grokClassifier := &glue.CreateGrokClassifierRequest{ + Classification: aws.String(m["classification"].(string)), + GrokPattern: aws.String(m["grok_pattern"].(string)), + Name: aws.String(name), + } + + if v, ok := m["custom_patterns"]; ok && v.(string) != "" { + grokClassifier.CustomPatterns = aws.String(v.(string)) + } + + return grokClassifier +} + +func expandGlueGrokClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateGrokClassifierRequest { + grokClassifier := &glue.UpdateGrokClassifierRequest{ + Classification: aws.String(m["classification"].(string)), + GrokPattern: aws.String(m["grok_pattern"].(string)), + Name: aws.String(name), + } + + if v, ok := m["custom_patterns"]; ok && v.(string) != "" { + grokClassifier.CustomPatterns = aws.String(v.(string)) + } + + return grokClassifier +} + +func expandGlueJsonClassifierCreate(name string, m map[string]interface{}) *glue.CreateJsonClassifierRequest { + jsonClassifier := &glue.CreateJsonClassifierRequest{ + JsonPath: aws.String(m["json_path"].(string)), + Name: aws.String(name), + } + + return jsonClassifier +} + +func expandGlueJsonClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateJsonClassifierRequest { + jsonClassifier := &glue.UpdateJsonClassifierRequest{ + JsonPath: aws.String(m["json_path"].(string)), + Name: aws.String(name), + } + + return jsonClassifier +} + +func expandGlueXmlClassifierCreate(name string, m map[string]interface{}) *glue.CreateXMLClassifierRequest { + xmlClassifier := &glue.CreateXMLClassifierRequest{ + Classification: aws.String(m["classification"].(string)), + Name: aws.String(name), + RowTag: aws.String(m["row_tag"].(string)), + } + + return xmlClassifier +} + +func expandGlueXmlClassifierUpdate(name string, m map[string]interface{}) *glue.UpdateXMLClassifierRequest { + xmlClassifier := &glue.UpdateXMLClassifierRequest{ + Classification: aws.String(m["classification"].(string)), + Name: aws.String(name), + RowTag: aws.String(m["row_tag"].(string)), + } + + if v, ok := m["row_tag"]; ok && v.(string) != "" { + xmlClassifier.RowTag = aws.String(v.(string)) + } + + return xmlClassifier +} + +func flattenGlueGrokClassifier(grokClassifier *glue.GrokClassifier) []map[string]interface{} { + if grokClassifier == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "classification": aws.StringValue(grokClassifier.Classification), + "custom_patterns": aws.StringValue(grokClassifier.CustomPatterns), + "grok_pattern": aws.StringValue(grokClassifier.GrokPattern), + } + + return []map[string]interface{}{m} +} + +func flattenGlueJsonClassifier(jsonClassifier *glue.JsonClassifier) []map[string]interface{} { + if jsonClassifier == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "json_path": aws.StringValue(jsonClassifier.JsonPath), + } + + return []map[string]interface{}{m} +} + +func flattenGlueXmlClassifier(xmlClassifier *glue.XMLClassifier) []map[string]interface{} { + if xmlClassifier == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "classification": aws.StringValue(xmlClassifier.Classification), + "row_tag": aws.StringValue(xmlClassifier.RowTag), + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go new file mode 100644 index 000000000..546f3e9f4 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_connection.go @@ -0,0 +1,283 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueConnection() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueConnectionCreate, + Read: resourceAwsGlueConnectionRead, + Update: resourceAwsGlueConnectionUpdate, + Delete: resourceAwsGlueConnectionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "catalog_id": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + Computed: true, + }, + "connection_properties": { + Type: schema.TypeMap, + Required: true, + }, + "connection_type": { + Type: schema.TypeString, + Optional: true, + Default: glue.ConnectionTypeJdbc, + ValidateFunc: validation.StringInSlice([]string{ + glue.ConnectionTypeJdbc, + glue.ConnectionTypeSftp, + }, false), + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "match_criteria": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "physical_connection_requirements": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "availability_zone": { + Type: schema.TypeString, + Optional: true, + }, + "security_group_id_list": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsGlueConnectionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + var catalogID string + if v, ok := d.GetOkExists("catalog_id"); ok { + catalogID = v.(string) + } else { + catalogID = meta.(*AWSClient).accountid + } + name := d.Get("name").(string) + + input := &glue.CreateConnectionInput{ + CatalogId: aws.String(catalogID), + ConnectionInput: expandGlueConnectionInput(d), + } + + log.Printf("[DEBUG] Creating Glue Connection: %s", input) + _, err := conn.CreateConnection(input) + if err != nil { + return fmt.Errorf("error creating Glue Connection (%s): %s", name, err) + } + + d.SetId(fmt.Sprintf("%s:%s", catalogID, name)) + + return resourceAwsGlueConnectionRead(d, meta) +} + +func resourceAwsGlueConnectionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) + if err != nil { + return err + } + + input := &glue.GetConnectionInput{ + CatalogId: aws.String(catalogID), + Name: aws.String(connectionName), + } + + log.Printf("[DEBUG] Reading Glue Connection: %s", input) + output, err := conn.GetConnection(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Glue Connection (%s): %s", d.Id(), err) + } + + connection := output.Connection + if connection == nil { + log.Printf("[WARN] Glue Connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("catalog_id", catalogID) + if err := d.Set("connection_properties", aws.StringValueMap(connection.ConnectionProperties)); err != nil { + return fmt.Errorf("error setting connection_properties: %s", err) + } + d.Set("connection_type", connection.ConnectionType) + d.Set("description", connection.Description) + if err := d.Set("match_criteria", flattenStringList(connection.MatchCriteria)); err != nil { + return fmt.Errorf("error setting match_criteria: %s", err) + } + d.Set("name", connection.Name) + if err := d.Set("physical_connection_requirements", flattenGluePhysicalConnectionRequirements(connection.PhysicalConnectionRequirements)); err != nil { + return fmt.Errorf("error setting physical_connection_requirements: %s", err) + } + + return nil +} + +func resourceAwsGlueConnectionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) + if err != nil { + return err + } + + input := &glue.UpdateConnectionInput{ + CatalogId: aws.String(catalogID), + ConnectionInput: expandGlueConnectionInput(d), + Name: aws.String(connectionName), + } + + log.Printf("[DEBUG] Updating Glue Connection: %s", input) + _, err = conn.UpdateConnection(input) + if err != nil { + return fmt.Errorf("error updating Glue Connection (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsGlueConnectionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + catalogID, connectionName, err := decodeGlueConnectionID(d.Id()) + if err != nil { + return err + } + + log.Printf("[DEBUG] Deleting Glue Connection: %s", d.Id()) + err = deleteGlueConnection(conn, catalogID, connectionName) + if err != nil { + return fmt.Errorf("error deleting Glue Connection (%s): %s", d.Id(), err) + } + + return nil +} + +func decodeGlueConnectionID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format CATALOG-ID:NAME, provided: %s", id) + } + return idParts[0], idParts[1], nil +} + +func deleteGlueConnection(conn *glue.Glue, catalogID, connectionName string) error { + input := &glue.DeleteConnectionInput{ + CatalogId: aws.String(catalogID), + ConnectionName: aws.String(connectionName), + } + + _, err := conn.DeleteConnection(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandGlueConnectionInput(d *schema.ResourceData) *glue.ConnectionInput { + connectionProperties := make(map[string]string) + for k, v := range d.Get("connection_properties").(map[string]interface{}) { + connectionProperties[k] = v.(string) + } + + connectionInput := &glue.ConnectionInput{ + ConnectionProperties: aws.StringMap(connectionProperties), + ConnectionType: aws.String(d.Get("connection_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("description"); ok { + connectionInput.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("match_criteria"); ok { + connectionInput.MatchCriteria = expandStringList(v.([]interface{})) + } + + if v, ok := d.GetOk("physical_connection_requirements"); ok { + physicalConnectionRequirementsList := v.([]interface{}) + physicalConnectionRequirementsMap := physicalConnectionRequirementsList[0].(map[string]interface{}) + connectionInput.PhysicalConnectionRequirements = expandGluePhysicalConnectionRequirements(physicalConnectionRequirementsMap) + } + + return connectionInput +} + +func expandGluePhysicalConnectionRequirements(m map[string]interface{}) *glue.PhysicalConnectionRequirements { + physicalConnectionRequirements := &glue.PhysicalConnectionRequirements{} + + if v, ok := m["availability_zone"]; ok { + physicalConnectionRequirements.AvailabilityZone = aws.String(v.(string)) + } + + if v, ok := m["security_group_id_list"]; ok { + physicalConnectionRequirements.SecurityGroupIdList = expandStringList(v.([]interface{})) + } + + if v, ok := m["subnet_id"]; ok { + physicalConnectionRequirements.SubnetId = aws.String(v.(string)) + } + + return physicalConnectionRequirements +} + +func flattenGluePhysicalConnectionRequirements(physicalConnectionRequirements *glue.PhysicalConnectionRequirements) []map[string]interface{} { + if physicalConnectionRequirements == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "availability_zone": aws.StringValue(physicalConnectionRequirements.AvailabilityZone), + "security_group_id_list": flattenStringList(physicalConnectionRequirements.SecurityGroupIdList), + "subnet_id": aws.StringValue(physicalConnectionRequirements.SubnetId), + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go new file mode 100644 index 000000000..eaccef24c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go @@ -0,0 +1,437 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueCrawler() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueCrawlerCreate, + Read: resourceAwsGlueCrawlerRead, + Update: resourceAwsGlueCrawlerUpdate, + Delete: resourceAwsGlueCrawlerDelete, + Exists: resourceAwsGlueCrawlerExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "database_name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "role": { + Type: schema.TypeString, + Required: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "schedule": { + Type: schema.TypeString, + Optional: true, + }, + "classifiers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "schema_change_policy": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_behavior": { + Type: schema.TypeString, + Optional: true, + Default: glue.DeleteBehaviorDeprecateInDatabase, + ValidateFunc: validation.StringInSlice([]string{ + glue.DeleteBehaviorDeleteFromDatabase, + glue.DeleteBehaviorDeprecateInDatabase, + glue.DeleteBehaviorLog, + }, false), + }, + "update_behavior": { + Type: schema.TypeString, + Optional: true, + Default: glue.UpdateBehaviorUpdateInDatabase, + ValidateFunc: validation.StringInSlice([]string{ + glue.UpdateBehaviorLog, + glue.UpdateBehaviorUpdateInDatabase, + }, false), + }, + }, + }, + }, + "table_prefix": { + Type: schema.TypeString, + Optional: true, + }, + "s3_target": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "path": { + Type: schema.TypeString, + Required: true, + }, + "exclusions": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "jdbc_target": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "connection_name": { + Type: schema.TypeString, + Required: true, + }, + "path": { + Type: schema.TypeString, + Required: true, + }, + "exclusions": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "configuration": { + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + StateFunc: func(v interface{}) string { + json, _ := structure.NormalizeJsonString(v) + return json + }, + ValidateFunc: validateJsonString, + }, + }, + } +} + +func resourceAwsGlueCrawlerCreate(d *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + crawlerInput, err := createCrawlerInput(name, d) + if err != nil { + return resource.NonRetryableError(err) + } + + _, err = glueConn.CreateCrawler(crawlerInput) + if err != nil { + if isAWSErr(err, "InvalidInputException", "Service is unable to assume role") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("error creating Glue crawler: %s", err) + } + d.SetId(name) + + return resourceAwsGlueCrawlerRead(d, meta) +} + +func createCrawlerInput(crawlerName string, d *schema.ResourceData) (*glue.CreateCrawlerInput, error) { + crawlerTargets, err := expandGlueCrawlerTargets(d) + if err != nil { + return nil, err + } + crawlerInput := &glue.CreateCrawlerInput{ + Name: aws.String(crawlerName), + DatabaseName: aws.String(d.Get("database_name").(string)), + Role: aws.String(d.Get("role").(string)), + Targets: crawlerTargets, + } + if description, ok := d.GetOk("description"); ok { + crawlerInput.Description = aws.String(description.(string)) + } + if schedule, ok := d.GetOk("schedule"); ok { + crawlerInput.Schedule = aws.String(schedule.(string)) + } + if classifiers, ok := d.GetOk("classifiers"); ok { + crawlerInput.Classifiers = expandStringList(classifiers.([]interface{})) + } + + crawlerInput.SchemaChangePolicy = expandGlueSchemaChangePolicy(d.Get("schema_change_policy").([]interface{})) + + if tablePrefix, ok := d.GetOk("table_prefix"); ok { + crawlerInput.TablePrefix = aws.String(tablePrefix.(string)) + } + if configuration, ok := d.GetOk("configuration"); ok { + crawlerInput.Configuration = aws.String(configuration.(string)) + } + + if v, ok := d.GetOk("configuration"); ok { + configuration, err := structure.NormalizeJsonString(v) + if err != nil { + return nil, fmt.Errorf("Configuration contains an invalid JSON: %v", err) + } + crawlerInput.Configuration = aws.String(configuration) + } + + return crawlerInput, nil +} + +func expandGlueSchemaChangePolicy(v []interface{}) *glue.SchemaChangePolicy { + if len(v) == 0 { + return nil + } + + schemaPolicy := &glue.SchemaChangePolicy{} + + member := v[0].(map[string]interface{}) + + if updateBehavior, ok := member["update_behavior"]; ok && updateBehavior.(string) != "" { + schemaPolicy.UpdateBehavior = aws.String(updateBehavior.(string)) + } + + if deleteBehavior, ok := member["delete_behavior"]; ok && deleteBehavior.(string) != "" { + schemaPolicy.DeleteBehavior = aws.String(deleteBehavior.(string)) + } + return schemaPolicy +} + +func expandGlueCrawlerTargets(d *schema.ResourceData) (*glue.CrawlerTargets, error) { + crawlerTargets := &glue.CrawlerTargets{} + + jdbcTargets, jdbcTargetsOk := d.GetOk("jdbc_target") + s3Targets, s3TargetsOk := d.GetOk("s3_target") + if !jdbcTargetsOk && !s3TargetsOk { + return nil, fmt.Errorf("jdbc targets or s3 targets configuration is required") + } + + log.Print("[DEBUG] Creating crawler target") + crawlerTargets.S3Targets = expandGlueS3Targets(s3Targets.([]interface{})) + crawlerTargets.JdbcTargets = expandGlueJdbcTargets(jdbcTargets.([]interface{})) + + return crawlerTargets, nil +} + +func expandGlueS3Targets(targets []interface{}) []*glue.S3Target { + if len(targets) < 1 { + return []*glue.S3Target{} + } + + perms := make([]*glue.S3Target, len(targets), len(targets)) + for i, rawCfg := range targets { + cfg := rawCfg.(map[string]interface{}) + perms[i] = expandGlueS3Target(cfg) + } + return perms +} + +func expandGlueS3Target(cfg map[string]interface{}) *glue.S3Target { + target := &glue.S3Target{ + Path: aws.String(cfg["path"].(string)), + } + + if exclusions, ok := cfg["exclusions"]; ok { + target.Exclusions = expandStringList(exclusions.([]interface{})) + } + return target +} + +func expandGlueJdbcTargets(targets []interface{}) []*glue.JdbcTarget { + if len(targets) < 1 { + return []*glue.JdbcTarget{} + } + + perms := make([]*glue.JdbcTarget, len(targets), len(targets)) + for i, rawCfg := range targets { + cfg := rawCfg.(map[string]interface{}) + perms[i] = expandGlueJdbcTarget(cfg) + } + return perms +} + +func expandGlueJdbcTarget(cfg map[string]interface{}) *glue.JdbcTarget { + target := &glue.JdbcTarget{ + Path: aws.String(cfg["path"].(string)), + ConnectionName: aws.String(cfg["connection_name"].(string)), + } + + if exclusions, ok := cfg["exclusions"]; ok { + target.Exclusions = expandStringList(exclusions.([]interface{})) + } + return target +} + +func resourceAwsGlueCrawlerUpdate(d *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + crawlerInput, err := createCrawlerInput(name, d) + if err != nil { + return err + } + + crawlerUpdateInput := glue.UpdateCrawlerInput(*crawlerInput) + if _, err := glueConn.UpdateCrawler(&crawlerUpdateInput); err != nil { + return err + } + + return resourceAwsGlueCrawlerRead(d, meta) +} + +func resourceAwsGlueCrawlerRead(d *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + + input := &glue.GetCrawlerInput{ + Name: aws.String(d.Id()), + } + + crawlerOutput, err := glueConn.GetCrawler(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Crawler (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error reading Glue crawler: %s", err.Error()) + } + + if crawlerOutput.Crawler == nil { + log.Printf("[WARN] Glue Crawler (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", crawlerOutput.Crawler.Name) + d.Set("database_name", crawlerOutput.Crawler.DatabaseName) + d.Set("role", crawlerOutput.Crawler.Role) + d.Set("configuration", crawlerOutput.Crawler.Configuration) + d.Set("description", crawlerOutput.Crawler.Description) + d.Set("schedule", "") + if crawlerOutput.Crawler.Schedule != nil { + d.Set("schedule", crawlerOutput.Crawler.Schedule.ScheduleExpression) + } + if err := d.Set("classifiers", flattenStringList(crawlerOutput.Crawler.Classifiers)); err != nil { + return fmt.Errorf("error setting classifiers: %s", err) + } + d.Set("table_prefix", crawlerOutput.Crawler.TablePrefix) + + if crawlerOutput.Crawler.SchemaChangePolicy != nil { + schemaPolicy := map[string]string{ + "delete_behavior": aws.StringValue(crawlerOutput.Crawler.SchemaChangePolicy.DeleteBehavior), + "update_behavior": aws.StringValue(crawlerOutput.Crawler.SchemaChangePolicy.UpdateBehavior), + } + + if err := d.Set("schema_change_policy", []map[string]string{schemaPolicy}); err != nil { + return fmt.Errorf("error setting schema_change_policy: %s", schemaPolicy) + } + } + + if crawlerOutput.Crawler.Targets != nil { + if err := d.Set("s3_target", flattenGlueS3Targets(crawlerOutput.Crawler.Targets.S3Targets)); err != nil { + log.Printf("[ERR] Error setting Glue S3 Targets: %s", err) + } + + if err := d.Set("jdbc_target", flattenGlueJdbcTargets(crawlerOutput.Crawler.Targets.JdbcTargets)); err != nil { + log.Printf("[ERR] Error setting Glue JDBC Targets: %s", err) + } + } + + return nil +} + +func flattenGlueS3Targets(s3Targets []*glue.S3Target) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + + for _, s3Target := range s3Targets { + attrs := make(map[string]interface{}) + attrs["exclusions"] = flattenStringList(s3Target.Exclusions) + attrs["path"] = aws.StringValue(s3Target.Path) + + result = append(result, attrs) + } + return result +} + +func flattenGlueJdbcTargets(jdbcTargets []*glue.JdbcTarget) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + + for _, jdbcTarget := range jdbcTargets { + attrs := make(map[string]interface{}) + attrs["connection_name"] = aws.StringValue(jdbcTarget.ConnectionName) + attrs["exclusions"] = flattenStringList(jdbcTarget.Exclusions) + attrs["path"] = aws.StringValue(jdbcTarget.Path) + + result = append(result, attrs) + } + return result +} + +func resourceAwsGlueCrawlerDelete(d *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] deleting Glue crawler: %s", d.Id()) + _, err := glueConn.DeleteCrawler(&glue.DeleteCrawlerInput{ + Name: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Glue crawler: %s", err.Error()) + } + return nil +} + +func resourceAwsGlueCrawlerExists(d *schema.ResourceData, meta interface{}) (bool, error) { + glueConn := meta.(*AWSClient).glueconn + + input := &glue.GetCrawlerInput{ + Name: aws.String(d.Id()), + } + + _, err := glueConn.GetCrawler(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return false, nil + } + return false, err + } + return true, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go new file mode 100644 index 000000000..5fd1df863 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go @@ -0,0 +1,334 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueJob() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueJobCreate, + Read: resourceAwsGlueJobRead, + Update: resourceAwsGlueJobUpdate, + Delete: resourceAwsGlueJobDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "allocated_capacity": { + Type: schema.TypeInt, + Optional: true, + Default: 10, + ValidateFunc: validation.IntAtLeast(2), + }, + "command": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Default: "glueetl", + }, + "script_location": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "connections": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "default_arguments": { + Type: schema.TypeMap, + Optional: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "execution_property": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "max_concurrent_runs": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntAtLeast(1), + }, + }, + }, + }, + "max_retries": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 10), + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "timeout": { + Type: schema.TypeInt, + Optional: true, + Default: 2880, + }, + }, + } +} + +func resourceAwsGlueJobCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + input := &glue.CreateJobInput{ + Command: expandGlueJobCommand(d.Get("command").([]interface{})), + Name: aws.String(name), + Role: aws.String(d.Get("role_arn").(string)), + Timeout: aws.Int64(int64(d.Get("timeout").(int))), + } + + if v, ok := d.GetOk("allocated_capacity"); ok { + input.AllocatedCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("connections"); ok { + input.Connections = &glue.ConnectionsList{ + Connections: expandStringList(v.([]interface{})), + } + } + + if kv, ok := d.GetOk("default_arguments"); ok { + defaultArgumentsMap := make(map[string]string) + for k, v := range kv.(map[string]interface{}) { + defaultArgumentsMap[k] = v.(string) + } + input.DefaultArguments = aws.StringMap(defaultArgumentsMap) + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("execution_property"); ok { + input.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) + } + + if v, ok := d.GetOk("max_retries"); ok { + input.MaxRetries = aws.Int64(int64(v.(int))) + } + + log.Printf("[DEBUG] Creating Glue Job: %s", input) + _, err := conn.CreateJob(input) + if err != nil { + return fmt.Errorf("error creating Glue Job (%s): %s", name, err) + } + + d.SetId(name) + + return resourceAwsGlueJobRead(d, meta) +} + +func resourceAwsGlueJobRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.GetJobInput{ + JobName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glue Job: %s", input) + output, err := conn.GetJob(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Glue Job (%s): %s", d.Id(), err) + } + + job := output.Job + if job == nil { + log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("allocated_capacity", int(aws.Int64Value(job.AllocatedCapacity))) + if err := d.Set("command", flattenGlueJobCommand(job.Command)); err != nil { + return fmt.Errorf("error setting command: %s", err) + } + if err := d.Set("connections", flattenGlueConnectionsList(job.Connections)); err != nil { + return fmt.Errorf("error setting connections: %s", err) + } + if err := d.Set("default_arguments", aws.StringValueMap(job.DefaultArguments)); err != nil { + return fmt.Errorf("error setting default_arguments: %s", err) + } + d.Set("description", job.Description) + if err := d.Set("execution_property", flattenGlueExecutionProperty(job.ExecutionProperty)); err != nil { + return fmt.Errorf("error setting execution_property: %s", err) + } + d.Set("max_retries", int(aws.Int64Value(job.MaxRetries))) + d.Set("name", job.Name) + d.Set("role_arn", job.Role) + d.Set("timeout", int(aws.Int64Value(job.Timeout))) + + return nil +} + +func resourceAwsGlueJobUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + jobUpdate := &glue.JobUpdate{ + Command: expandGlueJobCommand(d.Get("command").([]interface{})), + Role: aws.String(d.Get("role_arn").(string)), + Timeout: aws.Int64(int64(d.Get("timeout").(int))), + } + + if v, ok := d.GetOk("allocated_capacity"); ok { + jobUpdate.AllocatedCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("connections"); ok { + jobUpdate.Connections = &glue.ConnectionsList{ + Connections: expandStringList(v.([]interface{})), + } + } + + if kv, ok := d.GetOk("default_arguments"); ok { + defaultArgumentsMap := make(map[string]string) + for k, v := range kv.(map[string]interface{}) { + defaultArgumentsMap[k] = v.(string) + } + jobUpdate.DefaultArguments = aws.StringMap(defaultArgumentsMap) + } + + if v, ok := d.GetOk("description"); ok { + jobUpdate.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("execution_property"); ok { + jobUpdate.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) + } + + if v, ok := d.GetOk("max_retries"); ok { + jobUpdate.MaxRetries = aws.Int64(int64(v.(int))) + } + + input := &glue.UpdateJobInput{ + JobName: aws.String(d.Id()), + JobUpdate: jobUpdate, + } + + log.Printf("[DEBUG] Updating Glue Job: %s", input) + _, err := conn.UpdateJob(input) + if err != nil { + return fmt.Errorf("error updating Glue Job (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsGlueJobDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] Deleting Glue Job: %s", d.Id()) + err := deleteGlueJob(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting Glue Job (%s): %s", d.Id(), err) + } + + return nil +} + +func deleteGlueJob(conn *glue.Glue, jobName string) error { + input := &glue.DeleteJobInput{ + JobName: aws.String(jobName), + } + + _, err := conn.DeleteJob(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandGlueExecutionProperty(l []interface{}) *glue.ExecutionProperty { + m := l[0].(map[string]interface{}) + + executionProperty := &glue.ExecutionProperty{ + MaxConcurrentRuns: aws.Int64(int64(m["max_concurrent_runs"].(int))), + } + + return executionProperty +} + +func expandGlueJobCommand(l []interface{}) *glue.JobCommand { + m := l[0].(map[string]interface{}) + + jobCommand := &glue.JobCommand{ + Name: aws.String(m["name"].(string)), + ScriptLocation: aws.String(m["script_location"].(string)), + } + + return jobCommand +} + +func flattenGlueConnectionsList(connectionsList *glue.ConnectionsList) []interface{} { + if connectionsList == nil { + return []interface{}{} + } + + return flattenStringList(connectionsList.Connections) +} + +func flattenGlueExecutionProperty(executionProperty *glue.ExecutionProperty) []map[string]interface{} { + if executionProperty == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "max_concurrent_runs": int(aws.Int64Value(executionProperty.MaxConcurrentRuns)), + } + + return []map[string]interface{}{m} +} + +func flattenGlueJobCommand(jobCommand *glue.JobCommand) []map[string]interface{} { + if jobCommand == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "name": aws.StringValue(jobCommand.Name), + "script_location": aws.StringValue(jobCommand.ScriptLocation), + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go new file mode 100644 index 000000000..903f9551a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_trigger.go @@ -0,0 +1,461 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueTrigger() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueTriggerCreate, + Read: resourceAwsGlueTriggerRead, + Update: resourceAwsGlueTriggerUpdate, + Delete: resourceAwsGlueTriggerDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "actions": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arguments": { + Type: schema.TypeMap, + Optional: true, + }, + "job_name": { + Type: schema.TypeString, + Required: true, + }, + "timeout": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "predicate": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "conditions": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "job_name": { + Type: schema.TypeString, + Required: true, + }, + "logical_operator": { + Type: schema.TypeString, + Optional: true, + Default: glue.LogicalOperatorEquals, + ValidateFunc: validation.StringInSlice([]string{ + glue.LogicalOperatorEquals, + }, false), + }, + "state": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + glue.JobRunStateFailed, + glue.JobRunStateStopped, + glue.JobRunStateSucceeded, + glue.JobRunStateTimeout, + }, false), + }, + }, + }, + }, + "logical": { + Type: schema.TypeString, + Optional: true, + Default: glue.LogicalAnd, + ValidateFunc: validation.StringInSlice([]string{ + glue.LogicalAnd, + glue.LogicalAny, + }, false), + }, + }, + }, + }, + "schedule": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + glue.TriggerTypeConditional, + glue.TriggerTypeOnDemand, + glue.TriggerTypeScheduled, + }, false), + }, + }, + } +} + +func resourceAwsGlueTriggerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + triggerType := d.Get("type").(string) + + input := &glue.CreateTriggerInput{ + Actions: expandGlueActions(d.Get("actions").([]interface{})), + Name: aws.String(name), + Type: aws.String(triggerType), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("predicate"); ok { + input.Predicate = expandGluePredicate(v.([]interface{})) + } + + if v, ok := d.GetOk("schedule"); ok { + input.Schedule = aws.String(v.(string)) + } + + if d.Get("enabled").(bool) && triggerType != glue.TriggerTypeOnDemand { + input.StartOnCreation = aws.Bool(true) + } + + log.Printf("[DEBUG] Creating Glue Trigger: %s", input) + _, err := conn.CreateTrigger(input) + if err != nil { + return fmt.Errorf("error creating Glue Trigger (%s): %s", name, err) + } + + d.SetId(name) + + log.Printf("[DEBUG] Waiting for Glue Trigger (%s) to create", d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{ + glue.TriggerStateActivating, + glue.TriggerStateCreating, + }, + Target: []string{ + glue.TriggerStateActivated, + glue.TriggerStateCreated, + }, + Refresh: resourceAwsGlueTriggerRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Glue Trigger (%s) to create", d.Id()) + } + + return resourceAwsGlueTriggerRead(d, meta) +} + +func resourceAwsGlueTriggerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.GetTriggerInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glue Trigger: %s", input) + output, err := conn.GetTrigger(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Trigger (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Glue Trigger (%s): %s", d.Id(), err) + } + + trigger := output.Trigger + if trigger == nil { + log.Printf("[WARN] Glue Trigger (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("actions", flattenGlueActions(trigger.Actions)); err != nil { + return fmt.Errorf("error setting actions: %s", err) + } + + d.Set("description", trigger.Description) + + var enabled bool + state := aws.StringValue(trigger.State) + + if aws.StringValue(trigger.Type) == glue.TriggerTypeOnDemand { + enabled = (state == glue.TriggerStateCreated || state == glue.TriggerStateCreating) + } else { + enabled = (state == glue.TriggerStateActivated || state == glue.TriggerStateActivating) + } + d.Set("enabled", enabled) + + if err := d.Set("predicate", flattenGluePredicate(trigger.Predicate)); err != nil { + return fmt.Errorf("error setting predicate: %s", err) + } + + d.Set("name", trigger.Name) + d.Set("schedule", trigger.Schedule) + d.Set("type", trigger.Type) + + return nil +} + +func resourceAwsGlueTriggerUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + if d.HasChange("actions") || + d.HasChange("description") || + d.HasChange("predicate") || + d.HasChange("schedule") { + triggerUpdate := &glue.TriggerUpdate{ + Actions: expandGlueActions(d.Get("actions").([]interface{})), + } + + if v, ok := d.GetOk("description"); ok { + triggerUpdate.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("predicate"); ok { + triggerUpdate.Predicate = expandGluePredicate(v.([]interface{})) + } + + if v, ok := d.GetOk("schedule"); ok { + triggerUpdate.Schedule = aws.String(v.(string)) + } + input := &glue.UpdateTriggerInput{ + Name: aws.String(d.Id()), + TriggerUpdate: triggerUpdate, + } + + log.Printf("[DEBUG] Updating Glue Trigger: %s", input) + _, err := conn.UpdateTrigger(input) + if err != nil { + return fmt.Errorf("error updating Glue Trigger (%s): %s", d.Id(), err) + } + } + + if d.HasChange("enabled") { + if d.Get("enabled").(bool) { + input := &glue.StartTriggerInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Starting Glue Trigger: %s", input) + _, err := conn.StartTrigger(input) + if err != nil { + return fmt.Errorf("error starting Glue Trigger (%s): %s", d.Id(), err) + } + } else { + input := &glue.StopTriggerInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Stopping Glue Trigger: %s", input) + _, err := conn.StopTrigger(input) + if err != nil { + return fmt.Errorf("error stopping Glue Trigger (%s): %s", d.Id(), err) + } + } + } + + return nil +} + +func resourceAwsGlueTriggerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] Deleting Glue Trigger: %s", d.Id()) + err := deleteGlueTrigger(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting Glue Trigger (%s): %s", d.Id(), err) + } + + log.Printf("[DEBUG] Waiting for Glue Trigger (%s) to delete", d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{glue.TriggerStateDeleting}, + Target: []string{""}, + Refresh: resourceAwsGlueTriggerRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + } + _, err = stateConf.WaitForState() + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return fmt.Errorf("error waiting for Glue Trigger (%s) to delete", d.Id()) + } + + return nil +} + +func resourceAwsGlueTriggerRefreshFunc(conn *glue.Glue, name string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + output, err := conn.GetTrigger(&glue.GetTriggerInput{ + Name: aws.String(name), + }) + if err != nil { + return output, "", err + } + + if output.Trigger == nil { + return output, "", nil + } + + return output, aws.StringValue(output.Trigger.State), nil + } +} + +func deleteGlueTrigger(conn *glue.Glue, Name string) error { + input := &glue.DeleteTriggerInput{ + Name: aws.String(Name), + } + + _, err := conn.DeleteTrigger(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandGlueActions(l []interface{}) []*glue.Action { + actions := []*glue.Action{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + + action := &glue.Action{ + JobName: aws.String(m["job_name"].(string)), + } + + argumentsMap := make(map[string]string) + for k, v := range m["arguments"].(map[string]interface{}) { + argumentsMap[k] = v.(string) + } + action.Arguments = aws.StringMap(argumentsMap) + + if v, ok := m["timeout"]; ok && v.(int) > 0 { + action.Timeout = aws.Int64(int64(v.(int))) + } + + actions = append(actions, action) + } + + return actions +} + +func expandGlueConditions(l []interface{}) []*glue.Condition { + conditions := []*glue.Condition{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + + condition := &glue.Condition{ + JobName: aws.String(m["job_name"].(string)), + LogicalOperator: aws.String(m["logical_operator"].(string)), + State: aws.String(m["state"].(string)), + } + + conditions = append(conditions, condition) + } + + return conditions +} + +func expandGluePredicate(l []interface{}) *glue.Predicate { + m := l[0].(map[string]interface{}) + + predicate := &glue.Predicate{ + Conditions: expandGlueConditions(m["conditions"].([]interface{})), + } + + if v, ok := m["logical"]; ok && v.(string) != "" { + predicate.Logical = aws.String(v.(string)) + } + + return predicate +} + +func flattenGlueActions(actions []*glue.Action) []interface{} { + l := []interface{}{} + + for _, action := range actions { + m := map[string]interface{}{ + "arguments": aws.StringValueMap(action.Arguments), + "job_name": aws.StringValue(action.JobName), + "timeout": int(aws.Int64Value(action.Timeout)), + } + l = append(l, m) + } + + return l +} + +func flattenGlueConditions(conditions []*glue.Condition) []interface{} { + l := []interface{}{} + + for _, condition := range conditions { + m := map[string]interface{}{ + "job_name": aws.StringValue(condition.JobName), + "logical_operator": aws.StringValue(condition.LogicalOperator), + "state": aws.StringValue(condition.State), + } + l = append(l, m) + } + + return l +} + +func flattenGluePredicate(predicate *glue.Predicate) []map[string]interface{} { + if predicate == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "conditions": flattenGlueConditions(predicate.Conditions), + "logical": aws.StringValue(predicate.Logical), + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go index 90cfbdc83..49ca3beb9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_member.go @@ -4,9 +4,11 @@ import ( "fmt" "log" "strings" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -14,6 +16,7 @@ func resourceAwsGuardDutyMember() *schema.Resource { return &schema.Resource{ Create: resourceAwsGuardDutyMemberCreate, Read: resourceAwsGuardDutyMemberRead, + Update: resourceAwsGuardDutyMemberUpdate, Delete: resourceAwsGuardDutyMemberDelete, Importer: &schema.ResourceImporter{ @@ -37,6 +40,28 @@ func resourceAwsGuardDutyMember() *schema.Resource { Required: true, ForceNew: true, }, + "relationship_status": { + Type: schema.TypeString, + Computed: true, + }, + "invite": { + Type: schema.TypeBool, + Optional: true, + }, + "disable_email_notification": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "invitation_message": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(60 * time.Second), + Update: schema.DefaultTimeout(60 * time.Second), }, } } @@ -59,8 +84,31 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Creating GuardDuty Member failed: %s", err.Error()) } + d.SetId(fmt.Sprintf("%s:%s", detectorID, accountID)) + if !d.Get("invite").(bool) { + return resourceAwsGuardDutyMemberRead(d, meta) + } + + imi := &guardduty.InviteMembersInput{ + DetectorId: aws.String(detectorID), + AccountIds: []*string{aws.String(accountID)}, + DisableEmailNotification: aws.Bool(d.Get("disable_email_notification").(bool)), + Message: aws.String(d.Get("invitation_message").(string)), + } + + log.Printf("[INFO] Inviting GuardDuty Member: %s", input) + _, err = conn.InviteMembers(imi) + if err != nil { + return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), err) + } + + err = inviteGuardDutyMemberWaiter(accountID, detectorID, d.Timeout(schema.TimeoutUpdate), conn) + if err != nil { + return fmt.Errorf("error waiting for GuardDuty Member %q invite: %s", d.Id(), err) + } + return resourceAwsGuardDutyMemberRead(d, meta) } @@ -93,14 +141,72 @@ func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) er d.SetId("") return nil } + member := gmo.Members[0] d.Set("account_id", member.AccountId) d.Set("detector_id", detectorID) d.Set("email", member.Email) + status := aws.StringValue(member.RelationshipStatus) + d.Set("relationship_status", status) + + // https://docs.aws.amazon.com/guardduty/latest/ug/list-members.html + d.Set("invite", false) + if status == "Disabled" || status == "Enabled" || status == "Invited" || status == "EmailVerificationInProgress" { + d.Set("invite", true) + } + return nil } +func resourceAwsGuardDutyMemberUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).guarddutyconn + + accountID, detectorID, err := decodeGuardDutyMemberID(d.Id()) + if err != nil { + return err + } + + if d.HasChange("invite") { + if d.Get("invite").(bool) { + input := &guardduty.InviteMembersInput{ + DetectorId: aws.String(detectorID), + AccountIds: []*string{aws.String(accountID)}, + DisableEmailNotification: aws.Bool(d.Get("disable_email_notification").(bool)), + Message: aws.String(d.Get("invitation_message").(string)), + } + + log.Printf("[INFO] Inviting GuardDuty Member: %s", input) + output, err := conn.InviteMembers(input) + if err != nil { + return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), err) + } + + // {"unprocessedAccounts":[{"result":"The request is rejected because the current account has already invited or is already the GuardDuty master of the given member account ID.","accountId":"067819342479"}]} + if len(output.UnprocessedAccounts) > 0 { + return fmt.Errorf("error inviting GuardDuty Member %q: %s", d.Id(), aws.StringValue(output.UnprocessedAccounts[0].Result)) + } + + err = inviteGuardDutyMemberWaiter(accountID, detectorID, d.Timeout(schema.TimeoutUpdate), conn) + if err != nil { + return fmt.Errorf("error waiting for GuardDuty Member %q invite: %s", d.Id(), err) + } + } else { + input := &guardduty.DisassociateMembersInput{ + AccountIds: []*string{aws.String(accountID)}, + DetectorId: aws.String(detectorID), + } + log.Printf("[INFO] Disassociating GuardDuty Member: %s", input) + _, err := conn.DisassociateMembers(input) + if err != nil { + return fmt.Errorf("error disassociating GuardDuty Member %q: %s", d.Id(), err) + } + } + } + + return resourceAwsGuardDutyMemberRead(d, meta) +} + func resourceAwsGuardDutyMemberDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).guarddutyconn @@ -122,6 +228,40 @@ func resourceAwsGuardDutyMemberDelete(d *schema.ResourceData, meta interface{}) return nil } +func inviteGuardDutyMemberWaiter(accountID, detectorID string, timeout time.Duration, conn *guardduty.GuardDuty) error { + input := guardduty.GetMembersInput{ + DetectorId: aws.String(detectorID), + AccountIds: []*string{aws.String(accountID)}, + } + + // wait until e-mail verification finishes + return resource.Retry(timeout, func() *resource.RetryError { + log.Printf("[DEBUG] Reading GuardDuty Member: %s", input) + gmo, err := conn.GetMembers(&input) + + if err != nil { + return resource.NonRetryableError(fmt.Errorf("error reading GuardDuty Member %q: %s", accountID, err)) + } + + if gmo == nil || len(gmo.Members) == 0 { + return resource.RetryableError(fmt.Errorf("error reading GuardDuty Member %q: member missing from response", accountID)) + } + + member := gmo.Members[0] + status := aws.StringValue(member.RelationshipStatus) + + if status == "Disabled" || status == "Enabled" || status == "Invited" { + return nil + } + + if status == "Created" || status == "EmailVerificationInProgress" { + return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) + } + + return resource.NonRetryableError(fmt.Errorf("error inviting GuardDuty Member %q: invalid status: %s", accountID, status)) + }) +} + func decodeGuardDutyMemberID(id string) (accountID, detectorID string, err error) { parts := strings.Split(id, ":") if len(parts) != 2 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go index 515069c03..fa5aa5ea2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go @@ -122,7 +122,7 @@ func resourceAwsIamAccessKeyRead(d *schema.ResourceData, meta interface{}) error d.SetId("") return nil } - return fmt.Errorf("Error reading IAM acces key: %s", err) + return fmt.Errorf("Error reading IAM access key: %s", err) } for _, key := range getResp.AccessKeyMetadata { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go index 3307ae1c2..717f8187e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_alias.go @@ -88,7 +88,5 @@ func resourceAwsIamAccountAliasDelete(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error deleting account alias with name '%s': %s", account_alias, err) } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go index 71dfbf0c8..115db808a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_account_password_policy.go @@ -161,7 +161,6 @@ func resourceAwsIamAccountPasswordPolicyDelete(d *schema.ResourceData, meta inte if _, err := iamconn.DeleteAccountPasswordPolicy(input); err != nil { return fmt.Errorf("Error deleting IAM Password Policy: %s", err) } - d.SetId("") log.Println("[DEBUG] Deleted IAM account password policy") return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go index 1bdf72545..83999bdf3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go @@ -35,9 +35,10 @@ func resourceAwsIamGroupPolicy() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "group": &schema.Schema{ Type: schema.TypeString, @@ -102,7 +103,12 @@ func resourceAwsIamGroupPolicyRead(d *schema.ResourceData, meta interface{}) err if err != nil { return err } - return d.Set("policy", policy) + + d.Set("group", group) + d.Set("name", name) + d.Set("policy", policy) + + return nil } func resourceAwsIamGroupPolicyDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go index 837a3a513..070614cb2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "regexp" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -60,9 +61,10 @@ func resourceAwsIamInstanceProfile() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8196-L8201 value := v.(string) @@ -295,7 +297,7 @@ func resourceAwsIamInstanceProfileDelete(d *schema.ResourceData, meta interface{ if err != nil { return fmt.Errorf("Error deleting IAM instance profile %s: %s", d.Id(), err) } - d.SetId("") + return nil } @@ -307,6 +309,9 @@ func instanceProfileReadResult(d *schema.ResourceData, result *iam.InstanceProfi if err := d.Set("arn", result.Arn); err != nil { return err } + if err := d.Set("create_date", result.CreateDate.Format(time.RFC3339)); err != nil { + return err + } if err := d.Set("path", result.Path); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go index 11c4fbf4d..7b208cf25 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go @@ -62,9 +62,10 @@ func resourceAwsIamPolicy() *schema.Resource { }, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 value := v.(string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go index 31c0455d1..a08150497 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "net/url" "regexp" "time" @@ -58,9 +59,10 @@ func resourceAwsIamRole() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 value := v.(string) @@ -317,7 +319,11 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { RoleName: aws.String(d.Id()), }) if err != nil { - return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] Role policy attachment (%s) was already removed from role (%s)", aws.StringValue(parn), d.Id()) + } else { + return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) + } } } } @@ -342,7 +348,11 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { RoleName: aws.String(d.Id()), }) if err != nil { - return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", d.Id(), err) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] Inline role policy (%s) was already removed from role (%s)", aws.StringValue(pname), d.Id()) + } else { + return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", d.Id(), err) + } } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go index ec05a2259..451e9211b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go @@ -41,10 +41,11 @@ func resourceAwsIamRolePolicy() *schema.Resource { ValidateFunc: validateIamRolePolicyName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateIamRolePolicyNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateIamRolePolicyNamePrefix, }, "role": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go index ab3caf961..2a14150ec 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go @@ -66,10 +66,11 @@ func resourceAwsIAMServerCertificate() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), }, "arn": { @@ -173,8 +174,6 @@ func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interfac return resource.RetryableError(err) } if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] IAM Server Certificate (%s) not found, removing from state", d.Id()) - d.SetId("") return nil } } @@ -187,7 +186,6 @@ func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interfac return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go new file mode 100644 index 000000000..9744dab0c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_service_linked_role.go @@ -0,0 +1,262 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIamServiceLinkedRole() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIamServiceLinkedRoleCreate, + Read: resourceAwsIamServiceLinkedRoleRead, + Update: resourceAwsIamServiceLinkedRoleUpdate, + Delete: resourceAwsIamServiceLinkedRoleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "aws_service_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + if !strings.HasSuffix(value, ".amazonaws.com") { + es = append(es, fmt.Errorf( + "%q must be a service URL e.g. elasticbeanstalk.amazonaws.com", k)) + } + return + }, + }, + + "name": { + Type: schema.TypeString, + Computed: true, + }, + + "path": { + Type: schema.TypeString, + Computed: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "create_date": { + Type: schema.TypeString, + Computed: true, + }, + + "unique_id": { + Type: schema.TypeString, + Computed: true, + }, + + "custom_suffix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + serviceName := d.Get("aws_service_name").(string) + + params := &iam.CreateServiceLinkedRoleInput{ + AWSServiceName: aws.String(serviceName), + } + + if v, ok := d.GetOk("custom_suffix"); ok && v.(string) != "" { + params.CustomSuffix = aws.String(v.(string)) + } + + if v, ok := d.GetOk("description"); ok && v.(string) != "" { + params.Description = aws.String(v.(string)) + } + + resp, err := conn.CreateServiceLinkedRole(params) + + if err != nil { + return fmt.Errorf("Error creating service-linked role with name %s: %s", serviceName, err) + } + d.SetId(*resp.Role.Arn) + + return resourceAwsIamServiceLinkedRoleRead(d, meta) +} + +func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + serviceName, roleName, customSuffix, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } + + params := &iam.GetRoleInput{ + RoleName: aws.String(roleName), + } + + resp, err := conn.GetRole(params) + + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM service linked role %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + role := resp.Role + + d.Set("arn", role.Arn) + d.Set("aws_service_name", serviceName) + d.Set("create_date", role.CreateDate) + d.Set("custom_suffix", customSuffix) + d.Set("description", role.Description) + d.Set("name", role.RoleName) + d.Set("path", role.Path) + d.Set("unique_id", role.RoleId) + + return nil +} + +func resourceAwsIamServiceLinkedRoleUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } + + params := &iam.UpdateRoleInput{ + Description: aws.String(d.Get("description").(string)), + RoleName: aws.String(roleName), + } + + _, err = conn.UpdateRole(params) + + if err != nil { + return fmt.Errorf("Error updating service-linked role %s: %s", d.Id(), err) + } + + return resourceAwsIamServiceLinkedRoleRead(d, meta) +} + +func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } + + deletionID, err := deleteIamServiceLinkedRole(conn, roleName) + if err != nil { + return fmt.Errorf("Error deleting service-linked role %s: %s", d.Id(), err) + } + if deletionID == "" { + return nil + } + + err = deleteIamServiceLinkedRoleWaiter(conn, deletionID) + if err != nil { + return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func decodeIamServiceLinkedRoleID(id string) (serviceName, roleName, customSuffix string, err error) { + idArn, err := arn.Parse(id) + if err != nil { + return "", "", "", err + } + + resourceParts := strings.Split(idArn.Resource, "/") + if len(resourceParts) != 4 { + return "", "", "", fmt.Errorf("expected IAM Service Role ARN (arn:PARTITION:iam::ACCOUNTID:role/aws-service-role/SERVICENAME/ROLENAME), received: %s", id) + } + + serviceName = resourceParts[2] + roleName = resourceParts[3] + + roleNameParts := strings.Split(roleName, "_") + if len(roleNameParts) == 2 { + customSuffix = roleNameParts[1] + } + + return +} + +func deleteIamServiceLinkedRole(conn *iam.IAM, roleName string) (string, error) { + params := &iam.DeleteServiceLinkedRoleInput{ + RoleName: aws.String(roleName), + } + + resp, err := conn.DeleteServiceLinkedRole(params) + + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return "", nil + } + return "", err + } + + return aws.StringValue(resp.DeletionTaskId), nil +} + +func deleteIamServiceLinkedRoleWaiter(conn *iam.IAM, deletionTaskID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{iam.DeletionTaskStatusTypeInProgress, iam.DeletionTaskStatusTypeNotStarted}, + Target: []string{iam.DeletionTaskStatusTypeSucceeded}, + Refresh: deleteIamServiceLinkedRoleRefreshFunc(conn, deletionTaskID), + Timeout: 5 * time.Minute, + Delay: 10 * time.Second, + } + + _, err := stateConf.WaitForState() + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + return err + } + + return nil +} + +func deleteIamServiceLinkedRoleRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + params := &iam.GetServiceLinkedRoleDeletionStatusInput{ + DeletionTaskId: aws.String(deletionTaskId), + } + + resp, err := conn.GetServiceLinkedRoleDeletionStatus(params) + if err != nil { + return nil, "", err + } + + return resp, aws.StringValue(resp.Status), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go new file mode 100644 index 000000000..83ef39df1 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go @@ -0,0 +1,167 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/service/iam" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIamUserGroupMembership() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIamUserGroupMembershipCreate, + Read: resourceAwsIamUserGroupMembershipRead, + Update: resourceAwsIamUserGroupMembershipUpdate, + Delete: resourceAwsIamUserGroupMembershipDelete, + + Schema: map[string]*schema.Schema{ + "user": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "groups": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsIamUserGroupMembershipCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + user := d.Get("user").(string) + groupList := expandStringList(d.Get("groups").(*schema.Set).List()) + + if err := addUserToGroups(conn, user, groupList); err != nil { + return err + } + + d.SetId(resource.UniqueId()) + + return resourceAwsIamUserGroupMembershipRead(d, meta) +} + +func resourceAwsIamUserGroupMembershipRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + user := d.Get("user").(string) + groups := d.Get("groups").(*schema.Set) + var gl []string + var marker *string + + for { + resp, err := conn.ListGroupsForUser(&iam.ListGroupsForUserInput{ + UserName: &user, + Marker: marker, + }) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + // no such user + log.Printf("[WARN] Groups not found for user (%s), removing from state", user) + d.SetId("") + return nil + } + return err + } + + for _, g := range resp.Groups { + // only read in the groups we care about + if groups.Contains(*g.GroupName) { + gl = append(gl, *g.GroupName) + } + } + + if !*resp.IsTruncated { + break + } + + marker = resp.Marker + } + + if err := d.Set("groups", gl); err != nil { + return fmt.Errorf("[WARN] Error setting group list from IAM (%s), error: %s", user, err) + } + + return nil +} + +func resourceAwsIamUserGroupMembershipUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + if d.HasChange("groups") { + user := d.Get("user").(string) + + o, n := d.GetChange("groups") + if o == nil { + o = new(schema.Set) + } + if n == nil { + n = new(schema.Set) + } + + os := o.(*schema.Set) + ns := n.(*schema.Set) + remove := expandStringList(os.Difference(ns).List()) + add := expandStringList(ns.Difference(os).List()) + + if err := removeUserFromGroups(conn, user, remove); err != nil { + return err + } + + if err := addUserToGroups(conn, user, add); err != nil { + return err + } + } + + return resourceAwsIamUserGroupMembershipRead(d, meta) +} + +func resourceAwsIamUserGroupMembershipDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + user := d.Get("user").(string) + groups := expandStringList(d.Get("groups").(*schema.Set).List()) + + if err := removeUserFromGroups(conn, user, groups); err != nil { + return err + } + + return nil +} + +func removeUserFromGroups(conn *iam.IAM, user string, groups []*string) error { + for _, group := range groups { + _, err := conn.RemoveUserFromGroup(&iam.RemoveUserFromGroupInput{ + UserName: &user, + GroupName: group, + }) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + continue + } + return err + } + } + + return nil +} + +func addUserToGroups(conn *iam.IAM, user string, groups []*string) error { + for _, group := range groups { + _, err := conn.AddUserToGroup(&iam.AddUserToGroupInput{ + UserName: &user, + GroupName: group, + }) + if err != nil { + return err + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go index 0c6e0f6ed..31df91f01 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go @@ -40,9 +40,10 @@ func resourceAwsIamUserPolicy() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "user": &schema.Schema{ Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go index 55f56696c..c51dfecaa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_resource_group.go @@ -69,8 +69,5 @@ func resourceAwsInspectorResourceGroupRead(d *schema.ResourceData, meta interfac } func resourceAwsInspectorResourceGroupDelete(d *schema.ResourceData, meta interface{}) error { - d.Set("arn", "") - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go index bea0347f1..187812058 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go @@ -119,6 +119,14 @@ func resourceAwsInstance() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"user_data_base64"}, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Sometimes the EC2 API responds with the equivalent, empty SHA1 sum + // echo -n "" | shasum + if old == "da39a3ee5e6b4b0d3255bfef95601890afd80709" && new == "" { + return true + } + return false + }, StateFunc: func(v interface{}) string { switch v.(type) { case string: @@ -272,6 +280,20 @@ func resourceAwsInstance() *schema.Resource { ForceNew: true, }, + "cpu_core_count": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "cpu_threads_per_core": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), "volume_tags": tagsSchemaComputed(), @@ -433,6 +455,27 @@ func resourceAwsInstance() *schema.Resource { }, }, }, + + "credit_specification": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Optional: true, + Default: "standard", + }, + }, + }, + }, }, } } @@ -475,6 +518,8 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { SecurityGroups: instanceOpts.SecurityGroups, SubnetId: instanceOpts.SubnetID, UserData: instanceOpts.UserData64, + CreditSpecification: instanceOpts.CreditSpecification, + CpuOptions: instanceOpts.CpuOptions, } _, ipv6CountOk := d.GetOk("ipv6_address_count") @@ -484,8 +529,9 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Only 1 of `ipv6_address_count` or `ipv6_addresses` can be specified") } - restricted := meta.(*AWSClient).IsGovCloud() || meta.(*AWSClient).IsChinaCloud() + restricted := meta.(*AWSClient).IsChinaCloud() if !restricted { + tagsSpec := make([]*ec2.TagSpecification, 0) if v, ok := d.GetOk("tags"); ok { @@ -641,6 +687,11 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("tenancy", instance.Placement.Tenancy) } + if instance.CpuOptions != nil { + d.Set("cpu_core_count", instance.CpuOptions.CoreCount) + d.Set("cpu_threads_per_core", instance.CpuOptions.ThreadsPerCore) + } + d.Set("ami", instance.ImageId) d.Set("instance_type", instance.InstanceType) d.Set("key_name", instance.KeyName) @@ -783,6 +834,15 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } } } + { + creditSpecifications, err := getCreditSpecifications(conn, d.Id()) + if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { + return err + } + if err := d.Set("credit_specification", creditSpecifications); err != nil { + return fmt.Errorf("error setting credit_specification: %s", err) + } + } if d.Get("get_password_data").(bool) { passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) @@ -802,8 +862,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn d.Partial(true) - - restricted := meta.(*AWSClient).IsGovCloud() || meta.(*AWSClient).IsChinaCloud() + restricted := meta.(*AWSClient).IsChinaCloud() if d.HasChange("tags") { if !d.IsNewResource() || restricted { @@ -815,7 +874,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } if d.HasChange("volume_tags") { - if !d.IsNewResource() || !restricted { + if !d.IsNewResource() || restricted { if err := setVolumeTags(conn, d); err != nil { return err } else { @@ -1036,7 +1095,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } - if d.HasChange("disable_api_termination") { + if d.HasChange("disable_api_termination") && !d.IsNewResource() { _, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ InstanceId: aws.String(d.Id()), DisableApiTermination: &ec2.AttributeBooleanValue{ @@ -1079,6 +1138,24 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("credit_specification") && !d.IsNewResource() { + if v, ok := d.GetOk("credit_specification"); ok { + creditSpecification := v.([]interface{})[0].(map[string]interface{}) + log.Printf("[DEBUG] Modifying credit specification for Instance (%s)", d.Id()) + _, err := conn.ModifyInstanceCreditSpecification(&ec2.ModifyInstanceCreditSpecificationInput{ + InstanceCreditSpecifications: []*ec2.InstanceCreditSpecificationRequest{ + { + InstanceId: aws.String(d.Id()), + CpuCredits: aws.String(creditSpecification["cpu_credits"].(string)), + }, + }, + }) + if err != nil { + return fmt.Errorf("[WARN] Error updating Instance credit specification: %s", err) + } + } + } + // TODO(mitchellh): wait for the attributes we modified to // persist the change... @@ -1094,7 +1171,6 @@ func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { return err } - d.SetId("") return nil } @@ -1287,7 +1363,7 @@ func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { // BlockDeviceMapping entry serves as the root device. rootDeviceNameInMapping := false for _, bdm := range image.BlockDeviceMappings { - if bdm.DeviceName == image.RootDeviceName { + if aws.StringValue(bdm.DeviceName) == aws.StringValue(image.RootDeviceName) { rootDeviceNameInMapping = true } } @@ -1631,17 +1707,32 @@ type awsInstanceOpts struct { SpotPlacement *ec2.SpotPlacement SubnetID *string UserData64 *string + CreditSpecification *ec2.CreditSpecificationRequest + CpuOptions *ec2.CpuOptionsRequest } func buildAwsInstanceOpts( d *schema.ResourceData, meta interface{}) (*awsInstanceOpts, error) { conn := meta.(*AWSClient).ec2conn + instanceType := d.Get("instance_type").(string) opts := &awsInstanceOpts{ DisableAPITermination: aws.Bool(d.Get("disable_api_termination").(bool)), EBSOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), ImageID: aws.String(d.Get("ami").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), + InstanceType: aws.String(instanceType), + } + + if v, ok := d.GetOk("credit_specification"); ok { + // Only T2 instances support T2 Unlimited + if strings.HasPrefix(instanceType, "t2") { + cs := v.([]interface{})[0].(map[string]interface{}) + opts.CreditSpecification = &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String(cs["cpu_credits"].(string)), + } + } else { + log.Print("[WARN] credit_specification is defined but instance type is not T2. Ignoring...") + } } if v := d.Get("instance_initiated_shutdown_behavior").(string); v != "" { @@ -1685,6 +1776,17 @@ func buildAwsInstanceOpts( opts.Placement.Tenancy = aws.String(v) } + if v := d.Get("cpu_core_count").(int); v > 0 { + tc := d.Get("cpu_threads_per_core").(int) + if tc < 0 { + tc = 2 + } + opts.CpuOptions = &ec2.CpuOptionsRequest{ + CoreCount: aws.Int64(int64(v)), + ThreadsPerCore: aws.Int64(int64(tc)), + } + } + var groups []*string if v := d.Get("security_groups"); v != nil { // Security group names. @@ -1833,3 +1935,21 @@ func getAwsInstanceVolumeIds(conn *ec2.EC2, d *schema.ResourceData) ([]*string, return volumeIds, nil } + +func getCreditSpecifications(conn *ec2.EC2, instanceId string) ([]map[string]interface{}, error) { + var creditSpecifications []map[string]interface{} + creditSpecification := make(map[string]interface{}) + + attr, err := conn.DescribeInstanceCreditSpecifications(&ec2.DescribeInstanceCreditSpecificationsInput{ + InstanceIds: []*string{aws.String(instanceId)}, + }) + if err != nil { + return creditSpecifications, err + } + if len(attr.InstanceCreditSpecifications) > 0 { + creditSpecification["cpu_credits"] = aws.StringValue(attr.InstanceCreditSpecifications[0].CpuCredits) + creditSpecifications = append(creditSpecifications, creditSpecification) + } + + return creditSpecifications, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go index a8f30c992..4d5f26e1c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go @@ -35,10 +35,11 @@ func resourceAwsKeyPair() *schema.Resource { ValidateFunc: validateMaxLength(255), }, "key_name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"key_name"}, + ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), }, "public_key": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go index c32bdba84..c28512b4f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func cloudWatchLoggingOptionsSchema() *schema.Schema { @@ -223,14 +224,15 @@ func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3Dest } m := map[string]interface{}{ - "bucket_arn": aws.StringValue(description.BucketARN), - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), - "compression_format": aws.StringValue(description.CompressionFormat), - "prefix": aws.StringValue(description.Prefix), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - "role_arn": aws.StringValue(description.RoleARN), - "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), + "bucket_arn": aws.StringValue(description.BucketARN), + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "compression_format": aws.StringValue(description.CompressionFormat), + "data_format_conversion_configuration": flattenFirehoseDataFormatConversionConfiguration(description.DataFormatConversionConfiguration), + "prefix": aws.StringValue(description.Prefix), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), + "role_arn": aws.StringValue(description.RoleARN), + "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), } if description.BufferingHints != nil { @@ -254,6 +256,7 @@ func flattenFirehoseRedshiftConfiguration(description *firehose.RedshiftDestinat "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), "cluster_jdbcurl": aws.StringValue(description.ClusterJDBCURL), "password": configuredPassword, + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), "role_arn": aws.StringValue(description.RoleARN), "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), "s3_backup_mode": aws.StringValue(description.S3BackupMode), @@ -319,6 +322,209 @@ func flattenFirehoseS3Configuration(description *firehose.S3DestinationDescripti return []map[string]interface{}{m} } +func flattenFirehoseDataFormatConversionConfiguration(dfcc *firehose.DataFormatConversionConfiguration) []map[string]interface{} { + if dfcc == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "enabled": aws.BoolValue(dfcc.Enabled), + "input_format_configuration": flattenFirehoseInputFormatConfiguration(dfcc.InputFormatConfiguration), + "output_format_configuration": flattenFirehoseOutputFormatConfiguration(dfcc.OutputFormatConfiguration), + "schema_configuration": flattenFirehoseSchemaConfiguration(dfcc.SchemaConfiguration), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseInputFormatConfiguration(ifc *firehose.InputFormatConfiguration) []map[string]interface{} { + if ifc == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "deserializer": flattenFirehoseDeserializer(ifc.Deserializer), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseDeserializer(deserializer *firehose.Deserializer) []map[string]interface{} { + if deserializer == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "hive_json_ser_de": flattenFirehoseHiveJsonSerDe(deserializer.HiveJsonSerDe), + "open_x_json_ser_de": flattenFirehoseOpenXJsonSerDe(deserializer.OpenXJsonSerDe), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseHiveJsonSerDe(hjsd *firehose.HiveJsonSerDe) []map[string]interface{} { + if hjsd == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "timestamp_formats": flattenStringList(hjsd.TimestampFormats), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseOpenXJsonSerDe(oxjsd *firehose.OpenXJsonSerDe) []map[string]interface{} { + if oxjsd == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "column_to_json_key_mappings": aws.StringValueMap(oxjsd.ColumnToJsonKeyMappings), + "convert_dots_in_json_keys_to_underscores": aws.BoolValue(oxjsd.ConvertDotsInJsonKeysToUnderscores), + } + + // API omits default values + // Return defaults that are not type zero values to prevent extraneous difference + + m["case_insensitive"] = true + if oxjsd.CaseInsensitive != nil { + m["case_insensitive"] = aws.BoolValue(oxjsd.CaseInsensitive) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseOutputFormatConfiguration(ofc *firehose.OutputFormatConfiguration) []map[string]interface{} { + if ofc == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "serializer": flattenFirehoseSerializer(ofc.Serializer), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseSerializer(serializer *firehose.Serializer) []map[string]interface{} { + if serializer == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "orc_ser_de": flattenFirehoseOrcSerDe(serializer.OrcSerDe), + "parquet_ser_de": flattenFirehoseParquetSerDe(serializer.ParquetSerDe), + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseOrcSerDe(osd *firehose.OrcSerDe) []map[string]interface{} { + if osd == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "bloom_filter_columns": aws.StringValueSlice(osd.BloomFilterColumns), + "dictionary_key_threshold": aws.Float64Value(osd.DictionaryKeyThreshold), + "enable_padding": aws.BoolValue(osd.EnablePadding), + } + + // API omits default values + // Return defaults that are not type zero values to prevent extraneous difference + + m["block_size_bytes"] = 268435456 + if osd.BlockSizeBytes != nil { + m["block_size_bytes"] = int(aws.Int64Value(osd.BlockSizeBytes)) + } + + m["bloom_filter_false_positive_probability"] = 0.05 + if osd.BloomFilterFalsePositiveProbability != nil { + m["bloom_filter_false_positive_probability"] = aws.Float64Value(osd.BloomFilterFalsePositiveProbability) + } + + m["compression"] = firehose.OrcCompressionSnappy + if osd.Compression != nil { + m["compression"] = aws.StringValue(osd.Compression) + } + + m["format_version"] = firehose.OrcFormatVersionV012 + if osd.FormatVersion != nil { + m["format_version"] = aws.StringValue(osd.FormatVersion) + } + + m["padding_tolerance"] = 0.05 + if osd.PaddingTolerance != nil { + m["padding_tolerance"] = aws.Float64Value(osd.PaddingTolerance) + } + + m["row_index_stride"] = 10000 + if osd.RowIndexStride != nil { + m["row_index_stride"] = int(aws.Int64Value(osd.RowIndexStride)) + } + + m["stripe_size_bytes"] = 67108864 + if osd.StripeSizeBytes != nil { + m["stripe_size_bytes"] = int(aws.Int64Value(osd.StripeSizeBytes)) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseParquetSerDe(psd *firehose.ParquetSerDe) []map[string]interface{} { + if psd == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "enable_dictionary_compression": aws.BoolValue(psd.EnableDictionaryCompression), + "max_padding_bytes": int(aws.Int64Value(psd.MaxPaddingBytes)), + } + + // API omits default values + // Return defaults that are not type zero values to prevent extraneous difference + + m["block_size_bytes"] = 268435456 + if psd.BlockSizeBytes != nil { + m["block_size_bytes"] = int(aws.Int64Value(psd.BlockSizeBytes)) + } + + m["compression"] = firehose.ParquetCompressionSnappy + if psd.Compression != nil { + m["compression"] = aws.StringValue(psd.Compression) + } + + m["page_size_bytes"] = 1048576 + if psd.PageSizeBytes != nil { + m["page_size_bytes"] = int(aws.Int64Value(psd.PageSizeBytes)) + } + + m["writer_version"] = firehose.ParquetWriterVersionV1 + if psd.WriterVersion != nil { + m["writer_version"] = aws.StringValue(psd.WriterVersion) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseSchemaConfiguration(sc *firehose.SchemaConfiguration) []map[string]interface{} { + if sc == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "catalog_id": aws.StringValue(sc.CatalogId), + "database_name": aws.StringValue(sc.DatabaseName), + "region": aws.StringValue(sc.Region), + "role_arn": aws.StringValue(sc.RoleARN), + "table_name": aws.StringValue(sc.TableName), + "version_id": aws.StringValue(sc.VersionId), + } + + return []map[string]interface{}{m} +} + func flattenProcessingConfiguration(pc *firehose.ProcessingConfiguration, roleArn string) []map[string]interface{} { if pc == nil { return []map[string]interface{}{} @@ -467,12 +673,14 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "kinesis_stream_arn": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validateArn, }, "role_arn": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validateArn, }, }, @@ -529,6 +737,264 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Default: "UNCOMPRESSED", }, + "data_format_conversion_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "input_format_configuration": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "deserializer": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "hive_json_ser_de": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.input_format_configuration.0.deserializer.0.open_x_json_ser_de"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "timestamp_formats": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "open_x_json_ser_de": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.input_format_configuration.0.deserializer.0.hive_json_ser_de"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "case_insensitive": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "column_to_json_key_mappings": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "convert_dots_in_json_keys_to_underscores": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "output_format_configuration": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "serializer": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "orc_ser_de": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.output_format_configuration.0.serializer.0.parquet_ser_de"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "block_size_bytes": { + Type: schema.TypeInt, + Optional: true, + // 256 MiB + Default: 268435456, + // 64 MiB + ValidateFunc: validation.IntAtLeast(67108864), + }, + "bloom_filter_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "bloom_filter_false_positive_probability": { + Type: schema.TypeFloat, + Optional: true, + Default: 0.05, + }, + "compression": { + Type: schema.TypeString, + Optional: true, + Default: firehose.OrcCompressionSnappy, + ValidateFunc: validation.StringInSlice([]string{ + firehose.OrcCompressionNone, + firehose.OrcCompressionSnappy, + firehose.OrcCompressionZlib, + }, false), + }, + "dictionary_key_threshold": { + Type: schema.TypeFloat, + Optional: true, + Default: 0.0, + }, + "enable_padding": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "format_version": { + Type: schema.TypeString, + Optional: true, + Default: firehose.OrcFormatVersionV012, + ValidateFunc: validation.StringInSlice([]string{ + firehose.OrcFormatVersionV011, + firehose.OrcFormatVersionV012, + }, false), + }, + "padding_tolerance": { + Type: schema.TypeFloat, + Optional: true, + Default: 0.05, + }, + "row_index_stride": { + Type: schema.TypeInt, + Optional: true, + Default: 10000, + ValidateFunc: validation.IntAtLeast(1000), + }, + "stripe_size_bytes": { + Type: schema.TypeInt, + Optional: true, + // 64 MiB + Default: 67108864, + // 8 MiB + ValidateFunc: validation.IntAtLeast(8388608), + }, + }, + }, + }, + "parquet_ser_de": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"extended_s3_configuration.0.data_format_conversion_configuration.0.output_format_configuration.0.serializer.0.orc_ser_de"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "block_size_bytes": { + Type: schema.TypeInt, + Optional: true, + // 256 MiB + Default: 268435456, + // 64 MiB + ValidateFunc: validation.IntAtLeast(67108864), + }, + "compression": { + Type: schema.TypeString, + Optional: true, + Default: firehose.ParquetCompressionSnappy, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ParquetCompressionGzip, + firehose.ParquetCompressionSnappy, + firehose.ParquetCompressionUncompressed, + }, false), + }, + "enable_dictionary_compression": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "max_padding_bytes": { + Type: schema.TypeInt, + Optional: true, + Default: 0, + }, + "page_size_bytes": { + Type: schema.TypeInt, + Optional: true, + // 1 MiB + Default: 1048576, + // 64 KiB + ValidateFunc: validation.IntAtLeast(65536), + }, + "writer_version": { + Type: schema.TypeString, + Optional: true, + Default: firehose.ParquetWriterVersionV1, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ParquetWriterVersionV1, + firehose.ParquetWriterVersionV2, + }, false), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "schema_configuration": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "catalog_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "database_name": { + Type: schema.TypeString, + Required: true, + }, + "region": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + "table_name": { + Type: schema.TypeString, + Required: true, + }, + "version_id": { + Type: schema.TypeString, + Optional: true, + Default: "LATEST", + }, + }, + }, + }, + }, + }, + }, + "kms_key_arn": { Type: schema.TypeString, Optional: true, @@ -590,6 +1056,8 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Sensitive: true, }, + "processing_configuration": processingConfigurationSchema(), + "role_arn": { Type: schema.TypeString, Required: true, @@ -911,9 +1379,10 @@ func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat IntervalInSeconds: aws.Int64(int64(s3["buffer_interval"].(int))), SizeInMBs: aws.Int64(int64(s3["buffer_size"].(int))), }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), + Prefix: extractPrefixConfiguration(s3), + CompressionFormat: aws.String(s3["compression_format"].(string)), + DataFormatConversionConfiguration: expandFirehoseDataFormatConversionConfiguration(s3["data_format_conversion_configuration"].([]interface{})), + EncryptionConfiguration: extractEncryptionConfiguration(s3), } if _, ok := s3["processing_configuration"]; ok { @@ -993,11 +1462,12 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat IntervalInSeconds: aws.Int64((int64)(s3["buffer_interval"].(int))), SizeInMBs: aws.Int64((int64)(s3["buffer_size"].(int))), }, - Prefix: extractPrefixConfiguration(s3), - CompressionFormat: aws.String(s3["compression_format"].(string)), - EncryptionConfiguration: extractEncryptionConfiguration(s3), - CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), - ProcessingConfiguration: extractProcessingConfiguration(s3), + Prefix: extractPrefixConfiguration(s3), + CompressionFormat: aws.String(s3["compression_format"].(string)), + EncryptionConfiguration: extractEncryptionConfiguration(s3), + DataFormatConversionConfiguration: expandFirehoseDataFormatConversionConfiguration(s3["data_format_conversion_configuration"].([]interface{})), + CloudWatchLoggingOptions: extractCloudWatchLoggingConfiguration(s3), + ProcessingConfiguration: extractProcessingConfiguration(s3), } if _, ok := s3["cloudwatch_logging_options"]; ok { @@ -1012,6 +1482,180 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat return configuration } +func expandFirehoseDataFormatConversionConfiguration(l []interface{}) *firehose.DataFormatConversionConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &firehose.DataFormatConversionConfiguration{ + Enabled: aws.Bool(m["enabled"].(bool)), + InputFormatConfiguration: expandFirehoseInputFormatConfiguration(m["input_format_configuration"].([]interface{})), + OutputFormatConfiguration: expandFirehoseOutputFormatConfiguration(m["output_format_configuration"].([]interface{})), + SchemaConfiguration: expandFirehoseSchemaConfiguration(m["schema_configuration"].([]interface{})), + } +} + +func expandFirehoseInputFormatConfiguration(l []interface{}) *firehose.InputFormatConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &firehose.InputFormatConfiguration{ + Deserializer: expandFirehoseDeserializer(m["deserializer"].([]interface{})), + } +} + +func expandFirehoseDeserializer(l []interface{}) *firehose.Deserializer { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &firehose.Deserializer{ + HiveJsonSerDe: expandFirehoseHiveJsonSerDe(m["hive_json_ser_de"].([]interface{})), + OpenXJsonSerDe: expandFirehoseOpenXJsonSerDe(m["open_x_json_ser_de"].([]interface{})), + } +} + +func expandFirehoseHiveJsonSerDe(l []interface{}) *firehose.HiveJsonSerDe { + if len(l) == 0 { + return nil + } + + if l[0] == nil { + return &firehose.HiveJsonSerDe{} + } + + m := l[0].(map[string]interface{}) + + return &firehose.HiveJsonSerDe{ + TimestampFormats: expandStringList(m["timestamp_formats"].([]interface{})), + } +} + +func expandFirehoseOpenXJsonSerDe(l []interface{}) *firehose.OpenXJsonSerDe { + if len(l) == 0 { + return nil + } + + if l[0] == nil { + return &firehose.OpenXJsonSerDe{} + } + + m := l[0].(map[string]interface{}) + + return &firehose.OpenXJsonSerDe{ + CaseInsensitive: aws.Bool(m["case_insensitive"].(bool)), + ColumnToJsonKeyMappings: stringMapToPointers(m["column_to_json_key_mappings"].(map[string]interface{})), + ConvertDotsInJsonKeysToUnderscores: aws.Bool(m["convert_dots_in_json_keys_to_underscores"].(bool)), + } +} + +func expandFirehoseOutputFormatConfiguration(l []interface{}) *firehose.OutputFormatConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &firehose.OutputFormatConfiguration{ + Serializer: expandFirehoseSerializer(m["serializer"].([]interface{})), + } +} + +func expandFirehoseSerializer(l []interface{}) *firehose.Serializer { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &firehose.Serializer{ + OrcSerDe: expandFirehoseOrcSerDe(m["orc_ser_de"].([]interface{})), + ParquetSerDe: expandFirehoseParquetSerDe(m["parquet_ser_de"].([]interface{})), + } +} + +func expandFirehoseOrcSerDe(l []interface{}) *firehose.OrcSerDe { + if len(l) == 0 { + return nil + } + + if l[0] == nil { + return &firehose.OrcSerDe{} + } + + m := l[0].(map[string]interface{}) + + orcSerDe := &firehose.OrcSerDe{ + BlockSizeBytes: aws.Int64(int64(m["block_size_bytes"].(int))), + BloomFilterFalsePositiveProbability: aws.Float64(m["bloom_filter_false_positive_probability"].(float64)), + Compression: aws.String(m["compression"].(string)), + DictionaryKeyThreshold: aws.Float64(m["dictionary_key_threshold"].(float64)), + EnablePadding: aws.Bool(m["enable_padding"].(bool)), + FormatVersion: aws.String(m["format_version"].(string)), + PaddingTolerance: aws.Float64(m["padding_tolerance"].(float64)), + RowIndexStride: aws.Int64(int64(m["row_index_stride"].(int))), + StripeSizeBytes: aws.Int64(int64(m["stripe_size_bytes"].(int))), + } + + if v, ok := m["bloom_filter_columns"].([]interface{}); ok && len(v) > 0 { + orcSerDe.BloomFilterColumns = expandStringList(v) + } + + return orcSerDe +} + +func expandFirehoseParquetSerDe(l []interface{}) *firehose.ParquetSerDe { + if len(l) == 0 { + return nil + } + + if l[0] == nil { + return &firehose.ParquetSerDe{} + } + + m := l[0].(map[string]interface{}) + + return &firehose.ParquetSerDe{ + BlockSizeBytes: aws.Int64(int64(m["block_size_bytes"].(int))), + Compression: aws.String(m["compression"].(string)), + EnableDictionaryCompression: aws.Bool(m["enable_dictionary_compression"].(bool)), + MaxPaddingBytes: aws.Int64(int64(m["max_padding_bytes"].(int))), + PageSizeBytes: aws.Int64(int64(m["page_size_bytes"].(int))), + WriterVersion: aws.String(m["writer_version"].(string)), + } +} + +func expandFirehoseSchemaConfiguration(l []interface{}) *firehose.SchemaConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &firehose.SchemaConfiguration{ + DatabaseName: aws.String(m["database_name"].(string)), + RoleARN: aws.String(m["role_arn"].(string)), + TableName: aws.String(m["table_name"].(string)), + VersionId: aws.String(m["version_id"].(string)), + } + + if v, ok := m["catalog_id"].(string); ok && v != "" { + config.CatalogId = aws.String(v) + } + if v, ok := m["region"].(string); ok && v != "" { + config.Region = aws.String(v) + } + + return config +} + func extractProcessingConfiguration(s3 map[string]interface{}) *firehose.ProcessingConfiguration { config := s3["processing_configuration"].([]interface{}) if len(config) == 0 { @@ -1129,6 +1773,9 @@ func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if _, ok := redshift["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) + } if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) @@ -1159,6 +1806,9 @@ func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if _, ok := redshift["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) + } if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) @@ -1411,15 +2061,13 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta } } - var lastError error err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.CreateDeliveryStream(createInput) if err != nil { log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) - lastError = err // Retry for IAM eventual consistency - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to perform") { + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { return resource.RetryableError(err) } // IAM roles can take ~10 seconds to propagate in AWS: @@ -1538,7 +2186,28 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta } } - _, err := conn.UpdateDestination(updateInput) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateDestination(updateInput) + if err != nil { + log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) + + // Retry for IAM eventual consistency + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { + return resource.RetryableError(err) + } + // IAM roles can take ~10 seconds to propagate in AWS: + // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") { + log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") + return resource.RetryableError(err) + } + // Not retryable + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { return fmt.Errorf( "Error Updating Kinesis Firehose Delivery Stream: \"%s\"\n%s", @@ -1601,7 +2270,6 @@ func resourceAwsKinesisFirehoseDeliveryStreamDelete(d *schema.ResourceData, meta sn, err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go index 45c7e2ec7..dede2bd9e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go @@ -229,7 +229,6 @@ func resourceAwsKinesisStreamDelete(d *schema.ResourceData, meta interface{}) er sn, err) } - d.SetId("") return nil } @@ -456,7 +455,12 @@ func readKinesisStreamState(conn *kinesis.Kinesis, sn string) (*kinesisStreamSta state.openShards = append(state.openShards, flattenShards(openShards(page.StreamDescription.Shards))...) state.closedShards = append(state.closedShards, flattenShards(closedShards(page.StreamDescription.Shards))...) state.shardLevelMetrics = flattenKinesisShardLevelMetrics(page.StreamDescription.EnhancedMonitoring) - state.encryptionType = aws.StringValue(page.StreamDescription.EncryptionType) + // EncryptionType can be nil in certain APIs, e.g. AWS China + if page.StreamDescription.EncryptionType != nil { + state.encryptionType = aws.StringValue(page.StreamDescription.EncryptionType) + } else { + state.encryptionType = kinesis.EncryptionTypeNone + } state.keyId = aws.StringValue(page.StreamDescription.KeyId) return !last }) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go index 6f724d7a9..68ee76f17 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_alias.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/hashicorp/terraform/helper/resource" @@ -37,14 +38,16 @@ func resourceAwsKmsAlias() *schema.Resource { ValidateFunc: validateAwsKmsName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsKmsName, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateAwsKmsName, }, "target_key_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: suppressEquivalentTargetKeyIdAndARN, }, "target_key_arn": { Type: schema.TypeString, @@ -166,7 +169,7 @@ func resourceAwsKmsAliasDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] KMS Alias: (%s) deleted.", d.Id()) - d.SetId("") + return nil } @@ -220,3 +223,14 @@ func resourceAwsKmsAliasImport(d *schema.ResourceData, meta interface{}) ([]*sch d.Set("name", d.Id()) return []*schema.ResourceData{d}, nil } + +func suppressEquivalentTargetKeyIdAndARN(k, old, new string, d *schema.ResourceData) bool { + newARN, err := arn.Parse(new) + if err != nil { + log.Printf("[DEBUG] %q can not be parsed as an ARN: %q", new, err) + return false + } + + resource := strings.TrimPrefix(newARN.Resource, "key/") + return old == resource +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go index 9d171dd5b..585ce6b93 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go @@ -393,13 +393,16 @@ func findKmsGrantById(conn *kms.KMS, keyId string, grantId string, marker *strin return nil }) + if err != nil { + return nil, fmt.Errorf("error listing KMS Grants: %s", err) + } grant = getKmsGrantById(out.Grants, grantId) if grant != nil { return grant, nil } - if *out.Truncated { - log.Printf("[DEBUG] KMS Grant list truncated, getting next page via marker: %s", *out.NextMarker) + if aws.BoolValue(out.Truncated) { + log.Printf("[DEBUG] KMS Grant list truncated, getting next page via marker: %s", aws.StringValue(out.NextMarker)) return findKmsGrantById(conn, keyId, grantId, out.NextMarker) } @@ -520,11 +523,24 @@ func flattenKmsGrantConstraints(constraint *kms.GrantConstraints) *schema.Set { } func decodeKmsGrantId(id string) (string, string, error) { - parts := strings.Split(id, ":") - if len(parts) != 2 { - return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) + if strings.HasPrefix(id, "arn:aws") { + arn_parts := strings.Split(id, "/") + if len(arn_parts) != 2 { + return "", "", fmt.Errorf("unexpected format of ARN (%q), expected KeyID:GrantID", id) + } + arn_prefix := arn_parts[0] + parts := strings.Split(arn_parts[1], ":") + if len(parts) != 2 { + return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) + } + return fmt.Sprintf("%s/%s", arn_prefix, parts[0]), parts[1], nil + } else { + parts := strings.Split(id, ":") + if len(parts) != 2 { + return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) + } + return parts[0], parts[1], nil } - return parts[0], parts[1], nil } // Custom error, so we don't have to rely on diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go index d86d1ab67..893eeb3d8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go @@ -473,6 +473,6 @@ func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] KMS Key %s deactivated.", keyId) - d.SetId("") + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go index eff4d20c8..fdd38fb83 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_alias.go @@ -19,27 +19,41 @@ func resourceAwsLambdaAlias() *schema.Resource { Delete: resourceAwsLambdaAliasDelete, Schema: map[string]*schema.Schema{ - "description": &schema.Schema{ + "description": { Type: schema.TypeString, Optional: true, }, - "function_name": &schema.Schema{ + "function_name": { Type: schema.TypeString, Required: true, }, - "function_version": &schema.Schema{ + "function_version": { Type: schema.TypeString, Required: true, }, - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "arn": &schema.Schema{ + "arn": { Type: schema.TypeString, Computed: true, }, + "routing_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "additional_version_weights": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeFloat}, + }, + }, + }, + }, }, } } @@ -59,6 +73,7 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(functionName), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(aliasName), + RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), } aliasConfiguration, err := conn.CreateAlias(params) @@ -99,6 +114,10 @@ func resourceAwsLambdaAliasRead(d *schema.ResourceData, meta interface{}) error d.Set("name", aliasConfiguration.Name) d.Set("arn", aliasConfiguration.AliasArn) + if err := d.Set("routing_config", flattenLambdaAliasRoutingConfiguration(aliasConfiguration.RoutingConfig)); err != nil { + return fmt.Errorf("error setting routing_config: %s", err) + } + return nil } @@ -119,8 +138,6 @@ func resourceAwsLambdaAliasDelete(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error deleting Lambda alias: %s", err) } - d.SetId("") - return nil } @@ -136,6 +153,7 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(d.Get("function_name").(string)), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(d.Get("name").(string)), + RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), } _, err := conn.UpdateAlias(params) @@ -145,3 +163,19 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro return nil } + +func expandLambdaAliasRoutingConfiguration(l []interface{}) *lambda.AliasRoutingConfiguration { + aliasRoutingConfiguration := &lambda.AliasRoutingConfiguration{} + + if len(l) == 0 || l[0] == nil { + return aliasRoutingConfiguration + } + + m := l[0].(map[string]interface{}) + + if v, ok := m["additional_version_weights"]; ok { + aliasRoutingConfiguration.AdditionalVersionWeights = expandFloat64Map(v.(map[string]interface{})) + } + + return aliasRoutingConfiguration +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go index dd8f64e35..8b20bb949 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go @@ -6,8 +6,12 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/lambda" + "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -35,13 +39,38 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { }, "starting_position": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, "batch_size": { Type: schema.TypeInt, Optional: true, - Default: 100, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // When AWS repurposed EventSourceMapping for use with SQS they kept + // the default for BatchSize at 100 for Kinesis and DynamoDB, but made + // the default 10 for SQS. As such, we had to make batch_size optional. + // Because of this, we need to ensure that if someone doesn't have + // batch_size specified that it is not treated as a diff for those + if new != "" && new != "0" { + return false + } + + eventSourceARN, err := arn.Parse(d.Get("event_source_arn").(string)) + if err != nil { + return false + } + switch eventSourceARN.Service { + case dynamodb.ServiceName, kinesis.ServiceName: + if old == "100" { + return true + } + case sqs.ServiceName: + if old == "10" { + return true + } + } + return false + }, }, "enabled": { Type: schema.TypeBool, @@ -87,11 +116,17 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte log.Printf("[DEBUG] Creating Lambda event source mapping: source %s to function %s", eventSourceArn, functionName) params := &lambda.CreateEventSourceMappingInput{ - EventSourceArn: aws.String(eventSourceArn), - FunctionName: aws.String(functionName), - StartingPosition: aws.String(d.Get("starting_position").(string)), - BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), - Enabled: aws.Bool(d.Get("enabled").(bool)), + EventSourceArn: aws.String(eventSourceArn), + FunctionName: aws.String(functionName), + Enabled: aws.Bool(d.Get("enabled").(bool)), + } + + if batchSize, ok := d.GetOk("batch_size"); ok { + params.BatchSize = aws.Int64(int64(batchSize.(int))) + } + + if startingPosition, ok := d.GetOk("starting_position"); ok { + params.StartingPosition = aws.String(startingPosition.(string)) } // IAM profiles and roles can take some time to propagate in AWS: @@ -170,13 +205,21 @@ func resourceAwsLambdaEventSourceMappingDelete(d *schema.ResourceData, meta inte UUID: aws.String(d.Id()), } - _, err := conn.DeleteEventSourceMapping(params) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteEventSourceMapping(params) + if err != nil { + if isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { return fmt.Errorf("Error deleting Lambda event source mapping: %s", err) } - d.SetId("") - return nil } @@ -197,10 +240,10 @@ func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta inte err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.UpdateEventSourceMapping(params) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "InvalidParameterValueException" { - return resource.RetryableError(awserr) - } + if isAWSErr(err, lambda.ErrCodeInvalidParameterValueException, "") || + isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { + + return resource.RetryableError(err) } return resource.NonRetryableError(err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go index f360dd46c..8144b2aed 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go @@ -104,6 +104,7 @@ func resourceAwsLambdaFunction() *schema.Resource { // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here lambda.RuntimeDotnetcore10, lambda.RuntimeDotnetcore20, + lambda.RuntimeDotnetcore21, lambda.RuntimeGo1X, lambda.RuntimeJava8, lambda.RuntimeNodejs43, @@ -174,6 +175,10 @@ func resourceAwsLambdaFunction() *schema.Resource { Optional: true, Computed: true, }, + "source_code_size": { + Type: schema.TypeInt, + Computed: true, + }, "environment": { Type: schema.TypeList, Optional: true, @@ -183,12 +188,11 @@ func resourceAwsLambdaFunction() *schema.Resource { "variables": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, }, - "tracing_config": { Type: schema.TypeList, MaxItems: 1, @@ -204,13 +208,11 @@ func resourceAwsLambdaFunction() *schema.Resource { }, }, }, - "kms_key_arn": { Type: schema.TypeString, Optional: true, ValidateFunc: validateArn, }, - "tags": tagsSchema(), }, @@ -443,12 +445,19 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).lambdaconn - log.Printf("[DEBUG] Fetching Lambda Function: %s", d.Id()) - params := &lambda.GetFunctionInput{ FunctionName: aws.String(d.Get("function_name").(string)), } + // qualifier for lambda function data source + qualifier, qualifierExistance := d.GetOk("qualifier") + if qualifierExistance { + params.Qualifier = aws.String(qualifier.(string)) + log.Printf("[DEBUG] Fetching Lambda Function: %s:%s", d.Id(), qualifier.(string)) + } else { + log.Printf("[DEBUG] Fetching Lambda Function: %s", d.Id()) + } + getFunctionOutput, err := conn.GetFunction(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" && !d.IsNewResource() { @@ -458,6 +467,18 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err return err } + if getFunctionOutput.Concurrency != nil { + d.Set("reserved_concurrent_executions", getFunctionOutput.Concurrency.ReservedConcurrentExecutions) + } else { + d.Set("reserved_concurrent_executions", nil) + } + + // Tagging operations are permitted on Lambda functions only. + // Tags on aliases and versions are not supported. + if !qualifierExistance { + d.Set("tags", tagsToMapGeneric(getFunctionOutput.Tags)) + } + // getFunctionOutput.Code.Location is a pre-signed URL pointing at the zip // file that we uploaded when we created the resource. You can use it to // download the code from AWS. The other part is @@ -474,18 +495,18 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("runtime", function.Runtime) d.Set("timeout", function.Timeout) d.Set("kms_key_arn", function.KMSKeyArn) - d.Set("tags", tagsToMapGeneric(getFunctionOutput.Tags)) + d.Set("source_code_hash", function.CodeSha256) + d.Set("source_code_size", function.CodeSize) config := flattenLambdaVpcConfigResponse(function.VpcConfig) log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), config) - vpcSetErr := d.Set("vpc_config", config) - if vpcSetErr != nil { - return fmt.Errorf("Failed setting vpc_config: %s", vpcSetErr) + if err := d.Set("vpc_config", config); err != nil { + return fmt.Errorf("[ERR] Error setting vpc_config for Lambda Function (%s): %s", d.Id(), err) } - d.Set("source_code_hash", function.CodeSha256) - - if err := d.Set("environment", flattenLambdaEnvironment(function.Environment)); err != nil { + environment := flattenLambdaEnvironment(function.Environment) + log.Printf("[INFO] Setting Lambda %s environment %#v from API", d.Id(), environment) + if err := d.Set("environment", environment); err != nil { log.Printf("[ERR] Error setting environment for Lambda Function (%s): %s", d.Id(), err) } @@ -499,35 +520,44 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("dead_letter_config", []interface{}{}) } + // Assume `PassThrough` on partitions that don't support tracing config + tracingConfigMode := "PassThrough" if function.TracingConfig != nil { - d.Set("tracing_config", []interface{}{ - map[string]interface{}{ - "mode": *function.TracingConfig.Mode, - }, - }) + tracingConfigMode = *function.TracingConfig.Mode } - - // List is sorted from oldest to latest - // so this may get costly over time :'( - var lastVersion, lastQualifiedArn string - err = listVersionsByFunctionPages(conn, &lambda.ListVersionsByFunctionInput{ - FunctionName: function.FunctionName, - MaxItems: aws.Int64(10000), - }, func(p *lambda.ListVersionsByFunctionOutput, lastPage bool) bool { - if lastPage { - last := p.Versions[len(p.Versions)-1] - lastVersion = *last.Version - lastQualifiedArn = *last.FunctionArn - return false - } - return true + d.Set("tracing_config", []interface{}{ + map[string]interface{}{ + "mode": tracingConfigMode, + }, }) - if err != nil { - return err - } - d.Set("version", lastVersion) - d.Set("qualified_arn", lastQualifiedArn) + // Get latest version and ARN unless qualifier is specified via data source + if qualifierExistance { + d.Set("version", function.Version) + d.Set("qualified_arn", function.FunctionArn) + } else { + // List is sorted from oldest to latest + // so this may get costly over time :'( + var lastVersion, lastQualifiedArn string + err = listVersionsByFunctionPages(conn, &lambda.ListVersionsByFunctionInput{ + FunctionName: function.FunctionName, + MaxItems: aws.Int64(10000), + }, func(p *lambda.ListVersionsByFunctionOutput, lastPage bool) bool { + if lastPage { + last := p.Versions[len(p.Versions)-1] + lastVersion = *last.Version + lastQualifiedArn = *last.FunctionArn + return false + } + return true + }) + if err != nil { + return err + } + + d.Set("version", lastVersion) + d.Set("qualified_arn", lastQualifiedArn) + } invokeArn := arn.ARN{ Partition: meta.(*AWSClient).partition, @@ -538,12 +568,6 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err }.String() d.Set("invoke_arn", invokeArn) - if getFunctionOutput.Concurrency != nil { - d.Set("reserved_concurrent_executions", getFunctionOutput.Concurrency.ReservedConcurrentExecutions) - } else { - d.Set("reserved_concurrent_executions", nil) - } - return nil } @@ -581,8 +605,6 @@ func resourceAwsLambdaFunctionDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error deleting Lambda Function: %s", err) } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go index f5b60e750..0ab996fc3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go @@ -30,6 +30,12 @@ func resourceAwsLambdaPermission() *schema.Resource { ForceNew: true, ValidateFunc: validateLambdaPermissionAction, }, + "event_source_token": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateLambdaPermissionEventSourceToken, + }, "function_name": { Type: schema.TypeString, Required: true, @@ -60,10 +66,19 @@ func resourceAwsLambdaPermission() *schema.Resource { ValidateFunc: validateArn, }, "statement_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validatePolicyStatementId, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"statement_id_prefix"}, + ValidateFunc: validatePolicyStatementId, + }, + "statement_id_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"statement_id"}, + ValidateFunc: validatePolicyStatementId, }, }, } @@ -74,6 +89,15 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) functionName := d.Get("function_name").(string) + var statementId string + if v, ok := d.GetOk("statement_id"); ok { + statementId = v.(string) + } else if v, ok := d.GetOk("statement_id_prefix"); ok { + statementId = resource.PrefixedUniqueId(v.(string)) + } else { + statementId = resource.UniqueId() + } + // There is a bug in the API (reported and acknowledged by AWS) // which causes some permissions to be ignored when API calls are sent in parallel // We work around this bug via mutex @@ -84,9 +108,12 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) Action: aws.String(d.Get("action").(string)), FunctionName: aws.String(functionName), Principal: aws.String(d.Get("principal").(string)), - StatementId: aws.String(d.Get("statement_id").(string)), + StatementId: aws.String(statementId), } + if v, ok := d.GetOk("event_source_token"); ok { + input.EventSourceToken = aws.String(v.(string)) + } if v, ok := d.GetOk("qualifier"); ok { input.Qualifier = aws.String(v.(string)) } @@ -127,10 +154,10 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Created new Lambda permission, but no Statement was included") } - d.SetId(d.Get("statement_id").(string)) + d.SetId(statementId) err = resource.Retry(5*time.Minute, func() *resource.RetryError { - // IAM is eventually cosistent :/ + // IAM is eventually consistent :/ err := resourceAwsLambdaPermissionRead(d, meta) if err != nil { if strings.HasPrefix(err.Error(), "Error reading Lambda policy: ResourceNotFoundException") { @@ -167,7 +194,7 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e var out *lambda.GetPolicyOutput var statement *LambdaPolicyStatement err := resource.Retry(1*time.Minute, func() *resource.RetryError { - // IAM is eventually cosistent :/ + // IAM is eventually consistent :/ var err error out, err = conn.GetPolicy(&input) if err != nil { @@ -239,12 +266,15 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e if stringEquals, ok := statement.Condition["StringEquals"]; ok { d.Set("source_account", stringEquals["AWS:SourceAccount"]) + d.Set("event_source_token", stringEquals["lambda:EventSourceToken"]) } if arnLike, ok := statement.Condition["ArnLike"]; ok { d.Set("source_arn", arnLike["AWS:SourceArn"]) } + d.Set("statement_id", statement.Sid) + return nil } @@ -321,7 +351,6 @@ func resourceAwsLambdaPermissionDelete(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Lambda permission with ID %q removed", d.Id()) - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go index 4ba3436da..ca406e305 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go @@ -2,8 +2,6 @@ package aws import ( "bytes" - "crypto/sha1" - "encoding/hex" "fmt" "log" "time" @@ -37,10 +35,11 @@ func resourceAwsLaunchConfiguration() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), }, "image_id": { @@ -69,14 +68,14 @@ func resourceAwsLaunchConfiguration() *schema.Resource { }, "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"user_data_base64"}, StateFunc: func(v interface{}) string { switch v.(type) { case string: - hash := sha1.Sum([]byte(v.(string))) - return hex.EncodeToString(hash[:]) + return userDataHashSum(v.(string)) default: return "" } @@ -84,6 +83,22 @@ func resourceAwsLaunchConfiguration() *schema.Resource { ValidateFunc: validation.StringLenBetween(1, 16384), }, + "user_data_base64": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"user_data"}, + ValidateFunc: func(v interface{}, name string) (warns []string, errs []error) { + s := v.(string) + if !isBase64Encoded([]byte(s)) { + errs = append(errs, fmt.Errorf( + "%s: must be base64-encoded", name, + )) + } + return + }, + }, + "security_groups": { Type: schema.TypeSet, Optional: true, @@ -286,6 +301,8 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("user_data"); ok { userData := base64Encode([]byte(v.(string))) createLaunchConfigurationOpts.UserData = aws.String(userData) + } else if v, ok := d.GetOk("user_data_base64"); ok { + createLaunchConfigurationOpts.UserData = aws.String(v.(string)) } createLaunchConfigurationOpts.InstanceMonitoring = &autoscaling.InstanceMonitoring{ @@ -523,8 +540,13 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{} if err := d.Set("security_groups", flattenStringList(lc.SecurityGroups)); err != nil { return fmt.Errorf("error setting security_groups: %s", err) } - if aws.StringValue(lc.UserData) != "" { - d.Set("user_data", userDataHashSum(*lc.UserData)) + if v := aws.StringValue(lc.UserData); v != "" { + _, b64 := d.GetOk("user_data_base64") + if b64 { + d.Set("user_data_base64", v) + } else { + d.Set("user_data", userDataHashSum(v)) + } } d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go new file mode 100644 index 000000000..aa9a93d1d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go @@ -0,0 +1,1168 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsLaunchTemplate() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLaunchTemplateCreate, + Read: resourceAwsLaunchTemplateRead, + Update: resourceAwsLaunchTemplateUpdate, + Delete: resourceAwsLaunchTemplateDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateLaunchTemplateName, + }, + + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateLaunchTemplateName, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 255), + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "default_version": { + Type: schema.TypeInt, + Computed: true, + }, + + "latest_version": { + Type: schema.TypeInt, + Computed: true, + }, + + "block_device_mappings": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "device_name": { + Type: schema.TypeString, + Optional: true, + }, + "no_device": { + Type: schema.TypeString, + Optional: true, + }, + "virtual_name": { + Type: schema.TypeString, + Optional: true, + }, + "ebs": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Optional: true, + }, + "encrypted": { + Type: schema.TypeBool, + Optional: true, + }, + "iops": { + Type: schema.TypeInt, + Computed: true, + Optional: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + "snapshot_id": { + Type: schema.TypeString, + Optional: true, + }, + "volume_size": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "volume_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + + "credit_specification": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "disable_api_termination": { + Type: schema.TypeBool, + Optional: true, + }, + + "ebs_optimized": { + Type: schema.TypeBool, + Optional: true, + }, + + "elastic_gpu_specifications": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "iam_instance_profile": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"iam_instance_profile.0.name"}, + ValidateFunc: validateArn, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "image_id": { + Type: schema.TypeString, + Optional: true, + }, + + "instance_initiated_shutdown_behavior": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.ShutdownBehaviorStop, + ec2.ShutdownBehaviorTerminate, + }, false), + }, + + "instance_market_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "market_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ec2.MarketTypeSpot}, false), + }, + "spot_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "block_duration_minutes": { + Type: schema.TypeInt, + Optional: true, + }, + "instance_interruption_behavior": { + Type: schema.TypeString, + Optional: true, + }, + "max_price": { + Type: schema.TypeString, + Optional: true, + }, + "spot_instance_type": { + Type: schema.TypeString, + Optional: true, + }, + "valid_until": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.ValidateRFC3339TimeString, + }, + }, + }, + }, + }, + }, + }, + + "instance_type": { + Type: schema.TypeString, + Optional: true, + }, + + "kernel_id": { + Type: schema.TypeString, + Optional: true, + }, + + "key_name": { + Type: schema.TypeString, + Optional: true, + }, + + "monitoring": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + }, + + "network_interfaces": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "associate_public_ip_address": { + Type: schema.TypeBool, + Optional: true, + }, + "delete_on_termination": { + Type: schema.TypeBool, + Optional: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "device_index": { + Type: schema.TypeInt, + Optional: true, + }, + "security_groups": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ipv6_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "ipv6_addresses": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "network_interface_id": { + Type: schema.TypeString, + Optional: true, + }, + "private_ip_address": { + Type: schema.TypeString, + Optional: true, + }, + "ipv4_addresses": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ipv4_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "placement": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "affinity": { + Type: schema.TypeString, + Optional: true, + }, + "availability_zone": { + Type: schema.TypeString, + Optional: true, + }, + "group_name": { + Type: schema.TypeString, + Optional: true, + }, + "host_id": { + Type: schema.TypeString, + Optional: true, + }, + "spread_domain": { + Type: schema.TypeString, + Optional: true, + }, + "tenancy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.TenancyDedicated, + ec2.TenancyDefault, + ec2.TenancyHost, + }, false), + }, + }, + }, + }, + + "ram_disk_id": { + Type: schema.TypeString, + Optional: true, + }, + + "security_group_names": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + ConflictsWith: []string{"vpc_security_group_ids"}, + }, + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + ConflictsWith: []string{"security_group_names"}, + }, + + "tag_specifications": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + "instance", + "volume", + }, false), + }, + "tags": tagsSchema(), + }, + }, + }, + + "user_data": { + Type: schema.TypeString, + Optional: true, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + var ltName string + if v, ok := d.GetOk("name"); ok { + ltName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + ltName = resource.PrefixedUniqueId(v.(string)) + } else { + ltName = resource.UniqueId() + } + + launchTemplateData, err := buildLaunchTemplateData(d, meta) + if err != nil { + return err + } + + launchTemplateOpts := &ec2.CreateLaunchTemplateInput{ + ClientToken: aws.String(resource.UniqueId()), + LaunchTemplateName: aws.String(ltName), + LaunchTemplateData: launchTemplateData, + } + + resp, err := conn.CreateLaunchTemplate(launchTemplateOpts) + if err != nil { + return err + } + + launchTemplate := resp.LaunchTemplate + d.SetId(*launchTemplate.LaunchTemplateId) + + log.Printf("[DEBUG] Launch Template created: %q (version %d)", + *launchTemplate.LaunchTemplateId, *launchTemplate.LatestVersionNumber) + + return resourceAwsLaunchTemplateUpdate(d, meta) +} + +func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Reading launch template %s", d.Id()) + + dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ + LaunchTemplateIds: []*string{aws.String(d.Id())}, + }) + if err != nil { + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error getting launch template: %s", err) + } + if len(dlt.LaunchTemplates) == 0 { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if *dlt.LaunchTemplates[0].LaunchTemplateId != d.Id() { + return fmt.Errorf("Unable to find launch template: %#v", dlt.LaunchTemplates) + } + + log.Printf("[DEBUG] Found launch template %s", d.Id()) + + lt := dlt.LaunchTemplates[0] + d.Set("name", lt.LaunchTemplateName) + d.Set("latest_version", lt.LatestVersionNumber) + d.Set("default_version", lt.DefaultVersionNumber) + d.Set("tags", tagsToMap(lt.Tags)) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("launch-template/%s", d.Id()), + }.String() + d.Set("arn", arn) + + version := strconv.Itoa(int(*lt.LatestVersionNumber)) + dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ + LaunchTemplateId: aws.String(d.Id()), + Versions: []*string{aws.String(version)}, + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Received launch template version %q (version %d)", d.Id(), *lt.LatestVersionNumber) + + ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData + + d.Set("disable_api_termination", ltData.DisableApiTermination) + d.Set("ebs_optimized", ltData.EbsOptimized) + d.Set("image_id", ltData.ImageId) + d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) + d.Set("instance_type", ltData.InstanceType) + d.Set("kernel_id", ltData.KernelId) + d.Set("key_name", ltData.KeyName) + d.Set("ram_disk_id", ltData.RamDiskId) + d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) + d.Set("user_data", ltData.UserData) + d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) + + if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { + return err + } + + if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") { + if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { + return err + } + } + + if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { + return err + } + + if err := d.Set("iam_instance_profile", getIamInstanceProfile(ltData.IamInstanceProfile)); err != nil { + return err + } + + if err := d.Set("instance_market_options", getInstanceMarketOptions(ltData.InstanceMarketOptions)); err != nil { + return err + } + + if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { + return err + } + + if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { + return err + } + + if err := d.Set("placement", getPlacement(ltData.Placement)); err != nil { + return err + } + + if err := d.Set("tag_specifications", getTagSpecifications(ltData.TagSpecifications)); err != nil { + return err + } + + return nil +} + +func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if !d.IsNewResource() { + launchTemplateData, err := buildLaunchTemplateData(d, meta) + if err != nil { + return err + } + + launchTemplateVersionOpts := &ec2.CreateLaunchTemplateVersionInput{ + ClientToken: aws.String(resource.UniqueId()), + LaunchTemplateId: aws.String(d.Id()), + LaunchTemplateData: launchTemplateData, + } + + _, createErr := conn.CreateLaunchTemplateVersion(launchTemplateVersionOpts) + if createErr != nil { + return createErr + } + } + + d.Partial(true) + + if err := setTags(conn, d); err != nil { + return err + } else { + d.SetPartial("tags") + } + + d.Partial(false) + + return resourceAwsLaunchTemplateRead(d, meta) +} + +func resourceAwsLaunchTemplateDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Launch Template destroy: %v", d.Id()) + _, err := conn.DeleteLaunchTemplate(&ec2.DeleteLaunchTemplateInput{ + LaunchTemplateId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + return nil + } + return err + } + + log.Printf("[DEBUG] Launch Template deleted: %v", d.Id()) + return nil +} + +func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interface{} { + s := []interface{}{} + for _, v := range m { + mapping := map[string]interface{}{ + "device_name": aws.StringValue(v.DeviceName), + "virtual_name": aws.StringValue(v.VirtualName), + } + if v.NoDevice != nil { + mapping["no_device"] = *v.NoDevice + } + if v.Ebs != nil { + ebs := map[string]interface{}{ + "delete_on_termination": aws.BoolValue(v.Ebs.DeleteOnTermination), + "encrypted": aws.BoolValue(v.Ebs.Encrypted), + "volume_size": int(aws.Int64Value(v.Ebs.VolumeSize)), + "volume_type": aws.StringValue(v.Ebs.VolumeType), + } + if v.Ebs.Iops != nil { + ebs["iops"] = aws.Int64Value(v.Ebs.Iops) + } + if v.Ebs.KmsKeyId != nil { + ebs["kms_key_id"] = aws.StringValue(v.Ebs.KmsKeyId) + } + if v.Ebs.SnapshotId != nil { + ebs["snapshot_id"] = aws.StringValue(v.Ebs.SnapshotId) + } + + mapping["ebs"] = []interface{}{ebs} + } + s = append(s, mapping) + } + return s +} + +func getCreditSpecification(cs *ec2.CreditSpecification) []interface{} { + s := []interface{}{} + if cs != nil { + s = append(s, map[string]interface{}{ + "cpu_credits": aws.StringValue(cs.CpuCredits), + }) + } + return s +} + +func getElasticGpuSpecifications(e []*ec2.ElasticGpuSpecificationResponse) []interface{} { + s := []interface{}{} + for _, v := range e { + s = append(s, map[string]interface{}{ + "type": aws.StringValue(v.Type), + }) + } + return s +} + +func getIamInstanceProfile(i *ec2.LaunchTemplateIamInstanceProfileSpecification) []interface{} { + s := []interface{}{} + if i != nil { + s = append(s, map[string]interface{}{ + "arn": aws.StringValue(i.Arn), + "name": aws.StringValue(i.Name), + }) + } + return s +} + +func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []interface{} { + s := []interface{}{} + if m != nil { + mo := map[string]interface{}{ + "market_type": aws.StringValue(m.MarketType), + } + spot := []interface{}{} + so := m.SpotOptions + if so != nil { + spot = append(spot, map[string]interface{}{ + "block_duration_minutes": aws.Int64Value(so.BlockDurationMinutes), + "instance_interruption_behavior": aws.StringValue(so.InstanceInterruptionBehavior), + "max_price": aws.StringValue(so.MaxPrice), + "spot_instance_type": aws.StringValue(so.SpotInstanceType), + "valid_until": aws.TimeValue(so.ValidUntil).Format(time.RFC3339), + }) + mo["spot_options"] = spot + } + s = append(s, mo) + } + return s +} + +func getMonitoring(m *ec2.LaunchTemplatesMonitoring) []interface{} { + s := []interface{}{} + if m != nil { + mo := map[string]interface{}{ + "enabled": aws.BoolValue(m.Enabled), + } + s = append(s, mo) + } + return s +} + +func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecification) []interface{} { + s := []interface{}{} + for _, v := range n { + var ipv6Addresses []string + var ipv4Addresses []string + + networkInterface := map[string]interface{}{ + "associate_public_ip_address": aws.BoolValue(v.AssociatePublicIpAddress), + "delete_on_termination": aws.BoolValue(v.DeleteOnTermination), + "description": aws.StringValue(v.Description), + "device_index": aws.Int64Value(v.DeviceIndex), + "ipv4_address_count": aws.Int64Value(v.SecondaryPrivateIpAddressCount), + "ipv6_address_count": aws.Int64Value(v.Ipv6AddressCount), + "network_interface_id": aws.StringValue(v.NetworkInterfaceId), + "private_ip_address": aws.StringValue(v.PrivateIpAddress), + "subnet_id": aws.StringValue(v.SubnetId), + } + + for _, address := range v.Ipv6Addresses { + ipv6Addresses = append(ipv6Addresses, aws.StringValue(address.Ipv6Address)) + } + if len(ipv6Addresses) > 0 { + networkInterface["ipv6_addresses"] = ipv6Addresses + } + + for _, address := range v.PrivateIpAddresses { + ipv4Addresses = append(ipv4Addresses, aws.StringValue(address.PrivateIpAddress)) + } + if len(ipv4Addresses) > 0 { + networkInterface["ipv4_addresses"] = ipv4Addresses + } + + if len(v.Groups) > 0 { + raw, ok := networkInterface["security_groups"] + if !ok { + raw = schema.NewSet(schema.HashString, nil) + } + list := raw.(*schema.Set) + + for _, group := range v.Groups { + list.Add(aws.StringValue(group)) + } + + networkInterface["security_groups"] = list + } + + s = append(s, networkInterface) + } + return s +} + +func getPlacement(p *ec2.LaunchTemplatePlacement) []interface{} { + s := []interface{}{} + if p != nil { + s = append(s, map[string]interface{}{ + "affinity": aws.StringValue(p.Affinity), + "availability_zone": aws.StringValue(p.AvailabilityZone), + "group_name": aws.StringValue(p.GroupName), + "host_id": aws.StringValue(p.HostId), + "spread_domain": aws.StringValue(p.SpreadDomain), + "tenancy": aws.StringValue(p.Tenancy), + }) + } + return s +} + +func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} { + s := []interface{}{} + for _, v := range t { + s = append(s, map[string]interface{}{ + "resource_type": aws.StringValue(v.ResourceType), + "tags": tagsToMap(v.Tags), + }) + } + return s +} + +func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.RequestLaunchTemplateData, error) { + opts := &ec2.RequestLaunchTemplateData{ + UserData: aws.String(d.Get("user_data").(string)), + } + + if v, ok := d.GetOk("image_id"); ok { + opts.ImageId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("instance_initiated_shutdown_behavior"); ok { + opts.InstanceInitiatedShutdownBehavior = aws.String(v.(string)) + } + + instanceType := d.Get("instance_type").(string) + if instanceType != "" { + opts.InstanceType = aws.String(instanceType) + } + + if v, ok := d.GetOk("kernel_id"); ok { + opts.KernelId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("key_name"); ok { + opts.KeyName = aws.String(v.(string)) + } + + if v, ok := d.GetOk("ram_disk_id"); ok { + opts.RamDiskId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("disable_api_termination"); ok { + opts.DisableApiTermination = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("ebs_optimized"); ok { + opts.EbsOptimized = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("security_group_names"); ok { + opts.SecurityGroups = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("vpc_security_group_ids"); ok { + opts.SecurityGroupIds = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("block_device_mappings"); ok { + var blockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest + bdms := v.([]interface{}) + + for _, bdm := range bdms { + blockDeviceMappings = append(blockDeviceMappings, readBlockDeviceMappingFromConfig(bdm.(map[string]interface{}))) + } + opts.BlockDeviceMappings = blockDeviceMappings + } + + if v, ok := d.GetOk("credit_specification"); ok && strings.HasPrefix(instanceType, "t2") { + cs := v.([]interface{}) + + if len(cs) > 0 { + opts.CreditSpecification = readCreditSpecificationFromConfig(cs[0].(map[string]interface{})) + } + } + + if v, ok := d.GetOk("elastic_gpu_specifications"); ok { + var elasticGpuSpecifications []*ec2.ElasticGpuSpecification + egsList := v.([]interface{}) + + for _, egs := range egsList { + elasticGpuSpecifications = append(elasticGpuSpecifications, readElasticGpuSpecificationsFromConfig(egs.(map[string]interface{}))) + } + opts.ElasticGpuSpecifications = elasticGpuSpecifications + } + + if v, ok := d.GetOk("iam_instance_profile"); ok { + iip := v.([]interface{}) + + if len(iip) > 0 { + opts.IamInstanceProfile = readIamInstanceProfileFromConfig(iip[0].(map[string]interface{})) + } + } + + if v, ok := d.GetOk("instance_market_options"); ok { + imo := v.([]interface{}) + + if len(imo) > 0 { + instanceMarketOptions, err := readInstanceMarketOptionsFromConfig(imo[0].(map[string]interface{})) + if err != nil { + return nil, err + } + opts.InstanceMarketOptions = instanceMarketOptions + } + } + + if v, ok := d.GetOk("monitoring"); ok { + m := v.([]interface{}) + if len(m) > 0 { + mData := m[0].(map[string]interface{}) + monitoring := &ec2.LaunchTemplatesMonitoringRequest{ + Enabled: aws.Bool(mData["enabled"].(bool)), + } + opts.Monitoring = monitoring + } + } + + if v, ok := d.GetOk("network_interfaces"); ok { + var networkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest + niList := v.([]interface{}) + + for _, ni := range niList { + niData := ni.(map[string]interface{}) + networkInterface := readNetworkInterfacesFromConfig(niData) + networkInterfaces = append(networkInterfaces, networkInterface) + } + opts.NetworkInterfaces = networkInterfaces + } + + if v, ok := d.GetOk("placement"); ok { + p := v.([]interface{}) + + if len(p) > 0 { + opts.Placement = readPlacementFromConfig(p[0].(map[string]interface{})) + } + } + + if v, ok := d.GetOk("tag_specifications"); ok { + var tagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest + t := v.([]interface{}) + + for _, ts := range t { + tsData := ts.(map[string]interface{}) + tags := tagsFromMap(tsData["tags"].(map[string]interface{})) + tagSpecification := &ec2.LaunchTemplateTagSpecificationRequest{ + ResourceType: aws.String(tsData["resource_type"].(string)), + Tags: tags, + } + tagSpecifications = append(tagSpecifications, tagSpecification) + } + opts.TagSpecifications = tagSpecifications + } + + return opts, nil +} + +func readBlockDeviceMappingFromConfig(bdm map[string]interface{}) *ec2.LaunchTemplateBlockDeviceMappingRequest { + blockDeviceMapping := &ec2.LaunchTemplateBlockDeviceMappingRequest{} + + if v := bdm["device_name"].(string); v != "" { + blockDeviceMapping.DeviceName = aws.String(v) + } + + if v := bdm["no_device"].(string); v != "" { + blockDeviceMapping.NoDevice = aws.String(v) + } + + if v := bdm["virtual_name"].(string); v != "" { + blockDeviceMapping.VirtualName = aws.String(v) + } + + if v := bdm["ebs"]; len(v.([]interface{})) > 0 { + ebs := v.([]interface{}) + if len(ebs) > 0 { + ebsData := ebs[0] + blockDeviceMapping.Ebs = readEbsBlockDeviceFromConfig(ebsData.(map[string]interface{})) + } + } + + return blockDeviceMapping +} + +func readEbsBlockDeviceFromConfig(ebs map[string]interface{}) *ec2.LaunchTemplateEbsBlockDeviceRequest { + ebsDevice := &ec2.LaunchTemplateEbsBlockDeviceRequest{} + + if v := ebs["delete_on_termination"]; v != nil { + ebsDevice.DeleteOnTermination = aws.Bool(v.(bool)) + } + + if v := ebs["encrypted"]; v != nil { + ebsDevice.Encrypted = aws.Bool(v.(bool)) + } + + if v := ebs["iops"].(int); v > 0 { + ebsDevice.Iops = aws.Int64(int64(v)) + } + + if v := ebs["kms_key_id"].(string); v != "" { + ebsDevice.KmsKeyId = aws.String(v) + } + + if v := ebs["snapshot_id"].(string); v != "" { + ebsDevice.SnapshotId = aws.String(v) + } + + if v := ebs["volume_size"]; v != nil { + ebsDevice.VolumeSize = aws.Int64(int64(v.(int))) + } + + if v := ebs["volume_type"].(string); v != "" { + ebsDevice.VolumeType = aws.String(v) + } + + return ebsDevice +} + +func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + var ipv4Addresses []*ec2.PrivateIpAddressSpecification + var ipv6Addresses []*ec2.InstanceIpv6AddressRequest + var privateIpAddress string + networkInterface := &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ + AssociatePublicIpAddress: aws.Bool(ni["associate_public_ip_address"].(bool)), + DeleteOnTermination: aws.Bool(ni["delete_on_termination"].(bool)), + } + + if v, ok := ni["description"].(string); ok && v != "" { + networkInterface.Description = aws.String(v) + } + + if v, ok := ni["device_index"].(int); ok { + networkInterface.DeviceIndex = aws.Int64(int64(v)) + } + + if v, ok := ni["network_interface_id"].(string); ok && v != "" { + networkInterface.NetworkInterfaceId = aws.String(v) + } + + if v, ok := ni["private_ip_address"].(string); ok && v != "" { + privateIpAddress = v + networkInterface.PrivateIpAddress = aws.String(v) + } + + if v, ok := ni["subnet_id"].(string); ok && v != "" { + networkInterface.SubnetId = aws.String(v) + } + + if v := ni["security_groups"].(*schema.Set); v.Len() > 0 { + for _, v := range v.List() { + networkInterface.Groups = append(networkInterface.Groups, aws.String(v.(string))) + } + } + + ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() + for _, address := range ipv6AddressList { + ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ + Ipv6Address: aws.String(address.(string)), + }) + } + networkInterface.Ipv6Addresses = ipv6Addresses + + if v := ni["ipv6_address_count"].(int); v > 0 { + networkInterface.Ipv6AddressCount = aws.Int64(int64(v)) + } + + ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() + for _, address := range ipv4AddressList { + privateIp := &ec2.PrivateIpAddressSpecification{ + Primary: aws.Bool(address.(string) == privateIpAddress), + PrivateIpAddress: aws.String(address.(string)), + } + ipv4Addresses = append(ipv4Addresses, privateIp) + } + networkInterface.PrivateIpAddresses = ipv4Addresses + + if v := ni["ipv4_address_count"].(int); v > 0 { + networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(v)) + } + + return networkInterface +} + +func readIamInstanceProfileFromConfig(iip map[string]interface{}) *ec2.LaunchTemplateIamInstanceProfileSpecificationRequest { + iamInstanceProfile := &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{} + + if v, ok := iip["arn"].(string); ok && v != "" { + iamInstanceProfile.Arn = aws.String(v) + } + + if v, ok := iip["name"].(string); ok && v != "" { + iamInstanceProfile.Name = aws.String(v) + } + + return iamInstanceProfile +} + +func readCreditSpecificationFromConfig(cs map[string]interface{}) *ec2.CreditSpecificationRequest { + creditSpecification := &ec2.CreditSpecificationRequest{} + + if v, ok := cs["cpu_credits"].(string); ok && v != "" { + creditSpecification.CpuCredits = aws.String(v) + } + + return creditSpecification +} + +func readElasticGpuSpecificationsFromConfig(egs map[string]interface{}) *ec2.ElasticGpuSpecification { + elasticGpuSpecification := &ec2.ElasticGpuSpecification{} + + if v, ok := egs["type"].(string); ok && v != "" { + elasticGpuSpecification.Type = aws.String(v) + } + + return elasticGpuSpecification +} + +func readInstanceMarketOptionsFromConfig(imo map[string]interface{}) (*ec2.LaunchTemplateInstanceMarketOptionsRequest, error) { + instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{} + spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} + + if v, ok := imo["market_type"].(string); ok && v != "" { + instanceMarketOptions.MarketType = aws.String(v) + } + + if v, ok := imo["spot_options"]; ok { + vL := v.([]interface{}) + for _, v := range vL { + so := v.(map[string]interface{}) + + if v, ok := so["block_duration_minutes"].(int); ok && v != 0 { + spotOptions.BlockDurationMinutes = aws.Int64(int64(v)) + } + + if v, ok := so["instance_interruption_behavior"].(string); ok && v != "" { + spotOptions.InstanceInterruptionBehavior = aws.String(v) + } + + if v, ok := so["max_price"].(string); ok && v != "" { + spotOptions.MaxPrice = aws.String(v) + } + + if v, ok := so["spot_instance_type"].(string); ok && v != "" { + spotOptions.SpotInstanceType = aws.String(v) + } + + if v, ok := so["valid_until"].(string); ok && v != "" { + t, err := time.Parse(time.RFC3339, v) + if err != nil { + return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + } + spotOptions.ValidUntil = aws.Time(t) + } + } + instanceMarketOptions.SpotOptions = spotOptions + } + + return instanceMarketOptions, nil +} + +func readPlacementFromConfig(p map[string]interface{}) *ec2.LaunchTemplatePlacementRequest { + placement := &ec2.LaunchTemplatePlacementRequest{} + + if v, ok := p["affinity"].(string); ok && v != "" { + placement.Affinity = aws.String(v) + } + + if v, ok := p["availability_zone"].(string); ok && v != "" { + placement.AvailabilityZone = aws.String(v) + } + + if v, ok := p["group_name"].(string); ok && v != "" { + placement.GroupName = aws.String(v) + } + + if v, ok := p["host_id"].(string); ok && v != "" { + placement.HostId = aws.String(v) + } + + if v, ok := p["spread_domain"].(string); ok && v != "" { + placement.SpreadDomain = aws.String(v) + } + + if v, ok := p["tenancy"].(string); ok && v != "" { + placement.Tenancy = aws.String(v) + } + + return placement +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go index ea1053d13..f9a6fd29d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go @@ -1,14 +1,13 @@ package aws import ( + "bytes" "fmt" "log" "regexp" "strconv" "time" - "bytes" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" @@ -57,10 +56,11 @@ func resourceAwsLb() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateElbNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateElbNamePrefix, }, "internal": { @@ -103,10 +103,12 @@ func resourceAwsLb() *schema.Resource { "subnet_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "allocation_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, @@ -137,13 +139,11 @@ func resourceAwsLb() *schema.Resource { "prefix": { Type: schema.TypeString, Optional: true, - Computed: true, DiffSuppressFunc: suppressIfLBType("network"), }, "enabled": { Type: schema.TypeBool, Optional: true, - Computed: true, DiffSuppressFunc: suppressIfLBType("network"), }, }, @@ -359,14 +359,11 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.bucket"), Value: aws.String(log["bucket"].(string)), - }) - - if prefix, ok := log["prefix"]; ok { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ + }, + &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.prefix"), - Value: aws.String(prefix.(string)), + Value: aws.String(log["prefix"].(string)), }) - } } else if len(logs) == 0 { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.enabled"), @@ -712,11 +709,11 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo for _, attr := range attributesResp.Attributes { switch *attr.Key { case "access_logs.s3.enabled": - accessLogMap["enabled"] = *attr.Value + accessLogMap["enabled"] = aws.StringValue(attr.Value) == "true" case "access_logs.s3.bucket": - accessLogMap["bucket"] = *attr.Value + accessLogMap["bucket"] = aws.StringValue(attr.Value) case "access_logs.s3.prefix": - accessLogMap["prefix"] = *attr.Value + accessLogMap["prefix"] = aws.StringValue(attr.Value) case "idle_timeout.timeout_seconds": timeout, err := strconv.Atoi(*attr.Value) if err != nil { @@ -739,9 +736,10 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo } } - log.Printf("[DEBUG] Setting ALB Access Logs: %#v", accessLogMap) if accessLogMap["bucket"] != "" || accessLogMap["prefix"] != "" { - d.Set("access_logs", []interface{}{accessLogMap}) + if err := d.Set("access_logs", []interface{}{accessLogMap}); err != nil { + return fmt.Errorf("error setting access_logs: %s", err) + } } else { d.Set("access_logs", []interface{}{}) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go index 7222b8533..a31d9ced6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go @@ -50,10 +50,11 @@ func resourceAwsLbTargetGroup() *schema.Resource { ValidateFunc: validateMaxLength(32), }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(32 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(32 - resource.UniqueIDSuffixLength), }, "port": { @@ -83,6 +84,19 @@ func resourceAwsLbTargetGroup() *schema.Resource { ValidateFunc: validation.IntBetween(0, 3600), }, + "slow_start": { + Type: schema.TypeInt, + Optional: true, + Default: 0, + ValidateFunc: validateSlowStart, + }, + + "proxy_protocol_v2": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "target_type": { Type: schema.TypeString, Optional: true, @@ -333,6 +347,20 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er }) } + if d.HasChange("slow_start") { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("slow_start.duration_seconds"), + Value: aws.String(fmt.Sprintf("%d", d.Get("slow_start").(int))), + }) + } + + if d.HasChange("proxy_protocol_v2") { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("proxy_protocol_v2.enabled"), + Value: aws.String(strconv.FormatBool(d.Get("proxy_protocol_v2").(bool))), + }) + } + // In CustomizeDiff we allow LB stickiness to be declared for TCP target // groups, so long as it's not enabled. This allows for better support for // modules, but also means we need to completely skip sending the data to the @@ -409,6 +437,19 @@ func validateAwsLbTargetGroupHealthCheckPath(v interface{}, k string) (ws []stri return } +func validateSlowStart(v interface{}, k string) (ws []string, errors []error) { + value := v.(int) + + // Check if the value is between 30-900 or 0 (seconds). + if value != 0 && !(value >= 30 && value <= 900) { + errors = append(errors, fmt.Errorf( + "%q contains an invalid Slow Start Duration \"%d\". "+ + "Valid intervals are 30-900 or 0 to disable.", + k, value)) + } + return +} + func validateAwsLbTargetGroupHealthCheckPort(v interface{}, k string) (ws []string, errors []error) { value := v.(string) @@ -480,6 +521,23 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t return errwrap.Wrapf("Error retrieving Target Group Attributes: {{err}}", err) } + for _, attr := range attrResp.Attributes { + switch *attr.Key { + case "proxy_protocol_v2.enabled": + enabled, err := strconv.ParseBool(*attr.Value) + if err != nil { + return fmt.Errorf("Error converting proxy_protocol_v2.enabled to bool: %s", *attr.Value) + } + d.Set("proxy_protocol_v2", enabled) + case "slow_start.duration_seconds": + slowStart, err := strconv.Atoi(aws.StringValue(attr.Value)) + if err != nil { + return fmt.Errorf("Error converting slow_start.duration_seconds to int: %s", aws.StringValue(attr.Value)) + } + d.Set("slow_start", slowStart) + } + } + // We only read in the stickiness attributes if the target group is not // TCP-based. This ensures we don't end up causing a spurious diff if someone // has defined the stickiness block on a TCP target group (albeit with diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go index 74eeaa850..525a7efdd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group_attachment.go @@ -104,8 +104,6 @@ func resourceAwsLbAttachmentDelete(d *schema.ResourceData, meta interface{}) err return errwrap.Wrapf("Error deregistering Targets: {{err}}", err) } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go index 34f249573..6876b10b7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go @@ -230,7 +230,6 @@ func resourceAwsLightsailInstanceDelete(d *schema.ResourceData, meta interface{} d.Id(), err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go index 24138aaa9..1d4ac5517 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go @@ -28,9 +28,10 @@ func resourceAwsLightsailKeyPair() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, // optional fields @@ -220,6 +221,5 @@ func resourceAwsLightsailKeyPairDelete(d *schema.ResourceData, meta interface{}) d.Id(), err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go index 325c4fd1a..bfa75a7ea 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go @@ -128,7 +128,6 @@ func resourceAwsLoadBalancerBackendServerPoliciesDelete(d *schema.ResourceData, return fmt.Errorf("Error setting LoadBalancerPoliciesForBackendServer: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go index d1c8cacbb..923290e66 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go @@ -128,7 +128,6 @@ func resourceAwsLoadBalancerListenerPoliciesDelete(d *schema.ResourceData, meta return fmt.Errorf("Error setting LoadBalancerPoliciesOfListener: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go index 8305cf992..89d8fa740 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go @@ -205,7 +205,6 @@ func resourceAwsLoadBalancerPolicyDelete(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error deleting Load Balancer Policy %s: %s", d.Id(), err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go new file mode 100644 index 000000000..8f8606eba --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_macie_s3_bucket_association.go @@ -0,0 +1,206 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/macie" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsMacieS3BucketAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsMacieS3BucketAssociationCreate, + Read: resourceAwsMacieS3BucketAssociationRead, + Update: resourceAwsMacieS3BucketAssociationUpdate, + Delete: resourceAwsMacieS3BucketAssociationDelete, + + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "member_account_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "classification_type": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "continuous": { + Type: schema.TypeString, + Optional: true, + Default: macie.S3ContinuousClassificationTypeFull, + ValidateFunc: validation.StringInSlice([]string{macie.S3ContinuousClassificationTypeFull}, false), + }, + "one_time": { + Type: schema.TypeString, + Optional: true, + Default: macie.S3OneTimeClassificationTypeNone, + ValidateFunc: validation.StringInSlice([]string{macie.S3OneTimeClassificationTypeFull, macie.S3OneTimeClassificationTypeNone}, false), + }, + }, + }, + }, + }, + } +} + +func resourceAwsMacieS3BucketAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + req := &macie.AssociateS3ResourcesInput{ + S3Resources: []*macie.S3ResourceClassification{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + ClassificationType: expandMacieClassificationType(d), + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.S3Resources[0].Prefix = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Macie S3 bucket association: %#v", req) + resp, err := conn.AssociateS3Resources(req) + if err != nil { + return fmt.Errorf("Error creating Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + return fmt.Errorf("Error creating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) + } + + d.SetId(fmt.Sprintf("%s/%s", d.Get("bucket_name"), d.Get("prefix"))) + return resourceAwsMacieS3BucketAssociationRead(d, meta) +} + +func resourceAwsMacieS3BucketAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + req := &macie.ListS3ResourcesInput{} + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + + bucketName := d.Get("bucket_name").(string) + prefix := d.Get("prefix") + + var res *macie.S3ResourceClassification + err := conn.ListS3ResourcesPages(req, func(page *macie.ListS3ResourcesOutput, lastPage bool) bool { + for _, v := range page.S3Resources { + if aws.StringValue(v.BucketName) == bucketName && aws.StringValue(v.Prefix) == prefix { + res = v + return false + } + } + + return true + }) + if err != nil { + return fmt.Errorf("Error listing Macie S3 bucket associations: %s", err) + } + + if res == nil { + log.Printf("[WARN] Macie S3 bucket association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("classification_type", flattenMacieClassificationType(res.ClassificationType)); err != nil { + return fmt.Errorf("error setting classification_type: %s", err) + } + + return nil +} + +func resourceAwsMacieS3BucketAssociationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + if d.HasChange("classification_type") { + req := &macie.UpdateS3ResourcesInput{ + S3ResourcesUpdate: []*macie.S3ResourceClassificationUpdate{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + ClassificationTypeUpdate: expandMacieClassificationTypeUpdate(d), + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.S3ResourcesUpdate[0].Prefix = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Updating Macie S3 bucket association: %#v", req) + resp, err := conn.UpdateS3Resources(req) + if err != nil { + return fmt.Errorf("Error updating Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + return fmt.Errorf("Error updating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) + } + } + + return resourceAwsMacieS3BucketAssociationRead(d, meta) +} + +func resourceAwsMacieS3BucketAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + log.Printf("[DEBUG] Deleting Macie S3 bucket association: %s", d.Id()) + + req := &macie.DisassociateS3ResourcesInput{ + AssociatedS3Resources: []*macie.S3Resource{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.AssociatedS3Resources[0].Prefix = aws.String(v.(string)) + } + + resp, err := conn.DisassociateS3Resources(req) + if err != nil { + return fmt.Errorf("Error deleting Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + failed := resp.FailedS3Resources[0] + // { + // ErrorCode: "InvalidInputException", + // ErrorMessage: "The request was rejected. The specified S3 resource (bucket or prefix) is not associated with Macie.", + // FailedItem: { + // BucketName: "tf-macie-example-002" + // } + // } + if aws.StringValue(failed.ErrorCode) == macie.ErrCodeInvalidInputException && + strings.Contains(aws.StringValue(failed.ErrorMessage), "is not associated with Macie") { + return nil + } + return fmt.Errorf("Error deleting Macie S3 bucket association: %s", failed) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go index 7380dad1f..6ce9a2e9e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go @@ -16,7 +16,9 @@ func resourceAwsMediaStoreContainer() *schema.Resource { Create: resourceAwsMediaStoreContainerCreate, Read: resourceAwsMediaStoreContainerRead, Delete: resourceAwsMediaStoreContainerDelete, - + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ Type: schema.TypeString, @@ -82,6 +84,7 @@ func resourceAwsMediaStoreContainerRead(d *schema.ResourceData, meta interface{} return err } d.Set("arn", resp.Container.ARN) + d.Set("name", resp.Container.Name) d.Set("endpoint", resp.Container.Endpoint) return nil } @@ -95,7 +98,6 @@ func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface _, err := conn.DeleteContainer(input) if err != nil { if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - d.SetId("") return nil } return err @@ -118,7 +120,6 @@ func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go new file mode 100644 index 000000000..b3469fe9c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container_policy.go @@ -0,0 +1,103 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsMediaStoreContainerPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsMediaStoreContainerPolicyPut, + Read: resourceAwsMediaStoreContainerPolicyRead, + Update: resourceAwsMediaStoreContainerPolicyPut, + Delete: resourceAwsMediaStoreContainerPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "container_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "policy": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateIAMPolicyJson, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + }, + } +} + +func resourceAwsMediaStoreContainerPolicyPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.PutContainerPolicyInput{ + ContainerName: aws.String(d.Get("container_name").(string)), + Policy: aws.String(d.Get("policy").(string)), + } + + _, err := conn.PutContainerPolicy(input) + if err != nil { + return err + } + + d.SetId(d.Get("container_name").(string)) + return resourceAwsMediaStoreContainerPolicyRead(d, meta) +} + +func resourceAwsMediaStoreContainerPolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.GetContainerPolicyInput{ + ContainerName: aws.String(d.Id()), + } + + resp, err := conn.GetContainerPolicy(input) + if err != nil { + if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { + log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { + log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("container_name", d.Id()) + d.Set("policy", resp.Policy) + return nil +} + +func resourceAwsMediaStoreContainerPolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.DeleteContainerPolicyInput{ + ContainerName: aws.String(d.Id()), + } + + _, err := conn.DeleteContainerPolicy(input) + if err != nil { + if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { + return nil + } + if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { + return nil + } + // if isAWSErr(err, mediastore.ErrCodeContainerInUseException, "Container must be ACTIVE in order to perform this operation") { + // return nil + // } + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go index aa80ed629..f3b4e0f8a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go @@ -152,7 +152,6 @@ func resourceAwsMqBroker() *schema.Resource { }, }, }, - "arn": { Type: schema.TypeString, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go new file mode 100644 index 000000000..d0f39b012 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go @@ -0,0 +1,827 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsNeptuneCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsNeptuneClusterCreate, + Read: resourceAwsNeptuneClusterRead, + Update: resourceAwsNeptuneClusterUpdate, + Delete: resourceAwsNeptuneClusterDelete, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(120 * time.Minute), + Delete: schema.DefaultTimeout(120 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + + // apply_immediately is used to determine when the update modifications + // take place. + "apply_immediately": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "availability_zones": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + ForceNew: true, + Computed: true, + Set: schema.HashString, + }, + + "backup_retention_period": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntAtMost(35), + }, + + "cluster_identifier": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier_prefix"}, + ValidateFunc: validateNeptuneIdentifier, + }, + + "cluster_identifier_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateNeptuneIdentifierPrefix, + }, + + "cluster_members": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Set: schema.HashString, + }, + + "cluster_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "engine": { + Type: schema.TypeString, + Optional: true, + Default: "neptune", + ForceNew: true, + ValidateFunc: validateNeptuneEngine(), + }, + + "engine_version": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + + "final_snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + es = append(es, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) + } + return + }, + }, + + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + + "iam_roles": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "iam_database_authentication_enabled": { + Type: schema.TypeBool, + Optional: true, + }, + + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + + "neptune_subnet_group_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + + "neptune_cluster_parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Default: "default.neptune1", + }, + + "port": { + Type: schema.TypeInt, + Optional: true, + Default: 8182, + ForceNew: true, + }, + + "preferred_backup_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateOnceADayWindowFormat, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + if val == nil { + return "" + } + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + + "reader_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "replication_source_identifier": { + Type: schema.TypeString, + Optional: true, + }, + + "storage_encrypted": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "skip_final_snapshot": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "tags": tagsSchema(), + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) + + // Check if any of the parameters that require a cluster modification after creation are set + var clusterUpdate bool + clusterUpdate = false + + if v, ok := d.GetOk("cluster_identifier"); ok { + d.Set("cluster_identifier", v.(string)) + } else { + if v, ok := d.GetOk("cluster_identifier_prefix"); ok { + d.Set("cluster_identifier", resource.PrefixedUniqueId(v.(string))) + } else { + d.Set("cluster_identifier", resource.PrefixedUniqueId("tf-")) + } + + } + + if _, ok := d.GetOk("snapshot_identifier"); ok { + opts := neptune.RestoreDBClusterFromSnapshotInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), + Tags: tags, + Port: aws.Int64(int64(d.Get("port").(int))), + } + + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + opts.AvailabilityZones = expandStringList(attr.List()) + } + + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { + opts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + clusterUpdate = true + opts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if _, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { + clusterUpdate = true + } + + if _, ok := d.GetOk("backup_retention_period"); ok { + clusterUpdate = true + } + + log.Printf("[DEBUG] Neptune Cluster restore from snapshot configuration: %s", opts) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RestoreDBClusterFromSnapshot(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating Neptune Cluster: %s", err) + } + } else if _, ok := d.GetOk("replication_source_identifier"); ok { + createOpts := &neptune.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)), + Tags: tags, + Port: aws.Int64(int64(d.Get("port").(int))), + } + + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_arn"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + log.Printf("[DEBUG] Create Neptune Cluster as read replica: %s", createOpts) + var resp *neptune.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating Neptune cluster: %s", err) + } + + log.Printf("[DEBUG]: Neptune Cluster create response: %s", resp) + + } else { + + createOpts := &neptune.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + Tags: tags, + Port: aws.Int64(int64(d.Get("port").(int))), + } + + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_arn"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) + } + + log.Printf("[DEBUG] Neptune Cluster create options: %s", createOpts) + var resp *neptune.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating Neptune cluster: %s", err) + } + + log.Printf("[DEBUG]: Neptune Cluster create response: %s", resp) + } + + d.SetId(d.Get("cluster_identifier").(string)) + + log.Printf("[INFO] Neptune Cluster ID: %s", d.Id()) + + log.Println( + "[INFO] Waiting for Neptune Cluster to be available") + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterCreatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error waiting for Neptune Cluster state to be \"available\": %s", err) + } + + if v, ok := d.GetOk("iam_roles"); ok { + for _, role := range v.(*schema.Set).List() { + err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + } + + if clusterUpdate { + return resourceAwsNeptuneClusterUpdate(d, meta) + } + + return resourceAwsNeptuneClusterRead(d, meta) + +} + +func resourceAwsNeptuneClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + d.SetId("") + log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) + return nil + } + log.Printf("[DEBUG] Error describing Neptune Cluster (%s) when waiting: %s", d.Id(), err) + return err + } + + var dbc *neptune.DBCluster + for _, v := range resp.DBClusters { + if aws.StringValue(v.DBClusterIdentifier) == d.Id() { + dbc = v + } + } + + if dbc == nil { + log.Printf("[WARN] Neptune Cluster (%s) not found", d.Id()) + d.SetId("") + return nil + } + + return flattenAwsNeptuneClusterResource(d, meta, dbc) +} + +func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, dbc *neptune.DBCluster) error { + conn := meta.(*AWSClient).neptuneconn + + if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { + return fmt.Errorf("[DEBUG] Error saving AvailabilityZones to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + d.Set("cluster_identifier", dbc.DBClusterIdentifier) + d.Set("cluster_resource_id", dbc.DbClusterResourceId) + d.Set("neptune_subnet_group_name", dbc.DBSubnetGroup) + d.Set("neptune_cluster_parameter_group_name", dbc.DBClusterParameterGroup) + d.Set("endpoint", dbc.Endpoint) + d.Set("engine", dbc.Engine) + d.Set("engine_version", dbc.EngineVersion) + d.Set("port", dbc.Port) + d.Set("storage_encrypted", dbc.StorageEncrypted) + d.Set("backup_retention_period", dbc.BackupRetentionPeriod) + d.Set("preferred_backup_window", dbc.PreferredBackupWindow) + d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) + d.Set("kms_key_arn", dbc.KmsKeyId) + d.Set("reader_endpoint", dbc.ReaderEndpoint) + d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) + d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) + d.Set("hosted_zone_id", dbc.HostedZoneId) + + var sg []string + for _, g := range dbc.VpcSecurityGroups { + sg = append(sg, aws.StringValue(g.VpcSecurityGroupId)) + } + if err := d.Set("vpc_security_group_ids", sg); err != nil { + return fmt.Errorf("Error saving VPC Security Group IDs to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + var cm []string + for _, m := range dbc.DBClusterMembers { + cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) + } + if err := d.Set("cluster_members", cm); err != nil { + return fmt.Errorf("Error saving Neptune Cluster Members to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + var roles []string + for _, r := range dbc.AssociatedRoles { + roles = append(roles, aws.StringValue(r.RoleArn)) + } + + if err := d.Set("iam_roles", roles); err != nil { + return fmt.Errorf("Error saving IAM Roles to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + arn := aws.StringValue(dbc.DBClusterArn) + d.Set("arn", arn) + + if err := saveTagsNeptune(conn, d, arn); err != nil { + return fmt.Errorf("Failed to save tags for Neptune Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) + } + + return nil +} + +func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + requestUpdate := false + + req := &neptune.ModifyDBClusterInput{ + ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), + DBClusterIdentifier: aws.String(d.Id()), + } + + if d.HasChange("vpc_security_group_ids") { + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + req.VpcSecurityGroupIds = expandStringList(attr.List()) + } else { + req.VpcSecurityGroupIds = []*string{} + } + requestUpdate = true + } + + if d.HasChange("preferred_backup_window") { + req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) + requestUpdate = true + } + + if d.HasChange("preferred_maintenance_window") { + req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) + requestUpdate = true + } + + if d.HasChange("backup_retention_period") { + req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) + requestUpdate = true + } + + if d.HasChange("neptune_cluster_parameter_group_name") { + d.SetPartial("neptune_cluster_parameter_group_name") + req.DBClusterParameterGroupName = aws.String(d.Get("neptune_cluster_parameter_group_name").(string)) + requestUpdate = true + } + + if d.HasChange("iam_database_authentication_enabled") { + req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) + requestUpdate = true + } + + if requestUpdate { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.ModifyDBCluster(req) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Failed to modify Neptune Cluster (%s): %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 10 * time.Second, + } + + log.Printf("[INFO] Waiting for Neptune Cluster (%s) to modify", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Neptune Cluster (%s) to modify: %s", d.Id(), err) + } + } + + if d.HasChange("iam_roles") { + oraw, nraw := d.GetChange("iam_roles") + if oraw == nil { + oraw = new(schema.Set) + } + if nraw == nil { + nraw = new(schema.Set) + } + + os := oraw.(*schema.Set) + ns := nraw.(*schema.Set) + removeRoles := os.Difference(ns) + enableRoles := ns.Difference(os) + + for _, role := range enableRoles.List() { + err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + + for _, role := range removeRoles.List() { + err := removeIamRoleFromNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + } + + if arn, ok := d.GetOk("arn"); ok { + if err := setTagsNeptune(conn, d, arn.(string)); err != nil { + return err + } else { + d.SetPartial("tags") + } + } + + return resourceAwsNeptuneClusterRead(d, meta) +} + +func resourceAwsNeptuneClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + log.Printf("[DEBUG] Destroying Neptune Cluster (%s)", d.Id()) + + deleteOpts := neptune.DeleteDBClusterInput{ + DBClusterIdentifier: aws.String(d.Id()), + } + + skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) + deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) + + if skipFinalSnapshot == false { + if name, present := d.GetOk("final_snapshot_identifier"); present { + deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) + } else { + return fmt.Errorf("Neptune Cluster FinalSnapshotIdentifier is required when a final snapshot is required") + } + } + + log.Printf("[DEBUG] Neptune Cluster delete options: %s", deleteOpts) + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteDBCluster(&deleteOpts) + if err != nil { + if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { + return resource.RetryableError(err) + } + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + return nil + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Neptune Cluster cannot be deleted: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterDeletePendingStates, + Target: []string{"destroyed"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error deleting Neptune Cluster (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsNeptuneClusterStateRefreshFunc( + d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + conn := meta.(*AWSClient).neptuneconn + + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) + return 42, "destroyed", nil + } + log.Printf("[DEBUG] Error on retrieving Neptune Cluster (%s) when waiting: %s", d.Id(), err) + return nil, "", err + } + + var dbc *neptune.DBCluster + + for _, v := range resp.DBClusters { + if aws.StringValue(v.DBClusterIdentifier) == d.Id() { + dbc = v + } + } + + if dbc == nil { + return 42, "destroyed", nil + } + + if dbc.Status != nil { + log.Printf("[DEBUG] Neptune Cluster status (%s): %s", d.Id(), aws.StringValue(dbc.Status)) + } + + return dbc, aws.StringValue(dbc.Status), nil + } +} + +func setIamRoleToNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { + params := &neptune.AddRoleToDBClusterInput{ + DBClusterIdentifier: aws.String(clusterIdentifier), + RoleArn: aws.String(roleArn), + } + _, err := conn.AddRoleToDBCluster(params) + if err != nil { + return err + } + + return nil +} + +func removeIamRoleFromNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { + params := &neptune.RemoveRoleFromDBClusterInput{ + DBClusterIdentifier: aws.String(clusterIdentifier), + RoleArn: aws.String(roleArn), + } + _, err := conn.RemoveRoleFromDBCluster(params) + if err != nil { + return err + } + + return nil +} + +var resourceAwsNeptuneClusterCreatePendingStates = []string{ + "creating", + "backing-up", + "modifying", + "preparing-data-migration", + "migrating", +} + +var resourceAwsNeptuneClusterUpdatePendingStates = []string{ + "backing-up", + "modifying", + "configuring-iam-database-auth", +} + +var resourceAwsNeptuneClusterDeletePendingStates = []string{ + "available", + "deleting", + "backing-up", + "modifying", +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go new file mode 100644 index 000000000..a04db20a2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go @@ -0,0 +1,260 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +const neptuneClusterParameterGroupMaxParamsBulkEdit = 20 + +func resourceAwsNeptuneClusterParameterGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsNeptuneClusterParameterGroupCreate, + Read: resourceAwsNeptuneClusterParameterGroupRead, + Update: resourceAwsNeptuneClusterParameterGroupUpdate, + Delete: resourceAwsNeptuneClusterParameterGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateNeptuneParamGroupName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateNeptuneParamGroupNamePrefix, + }, + "family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "Managed by Terraform", + }, + "parameter": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + "apply_method": { + Type: schema.TypeString, + Optional: true, + Default: neptune.ApplyMethodPendingReboot, + ValidateFunc: validation.StringInSlice([]string{ + neptune.ApplyMethodImmediate, + neptune.ApplyMethodPendingReboot, + }, false), + }, + }, + }, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsNeptuneClusterParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) + + var groupName string + if v, ok := d.GetOk("name"); ok { + groupName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + groupName = resource.PrefixedUniqueId(v.(string)) + } else { + groupName = resource.UniqueId() + } + + createOpts := neptune.CreateDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(groupName), + DBParameterGroupFamily: aws.String(d.Get("family").(string)), + Description: aws.String(d.Get("description").(string)), + Tags: tags, + } + + log.Printf("[DEBUG] Create Neptune Cluster Parameter Group: %#v", createOpts) + resp, err := conn.CreateDBClusterParameterGroup(&createOpts) + if err != nil { + return fmt.Errorf("Error creating Neptune Cluster Parameter Group: %s", err) + } + + d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) + log.Printf("[INFO] Neptune Cluster Parameter Group ID: %s", d.Id()) + + d.Set("arn", resp.DBClusterParameterGroup.DBClusterParameterGroupArn) + + return resourceAwsNeptuneClusterParameterGroupUpdate(d, meta) +} + +func resourceAwsNeptuneClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + describeOpts := neptune.DescribeDBClusterParameterGroupsInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + } + + describeResp, err := conn.DescribeDBClusterParameterGroups(&describeOpts) + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { + log.Printf("[WARN] Neptune Cluster Parameter Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + if len(describeResp.DBClusterParameterGroups) == 0 { + log.Printf("[WARN] Neptune Cluster Parameter Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName) + d.Set("family", describeResp.DBClusterParameterGroups[0].DBParameterGroupFamily) + d.Set("description", describeResp.DBClusterParameterGroups[0].Description) + arn := aws.StringValue(describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupArn) + d.Set("arn", arn) + + // Only include user customized parameters as there's hundreds of system/default ones + describeParametersOpts := neptune.DescribeDBClusterParametersInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + Source: aws.String("user"), + } + + describeParametersResp, err := conn.DescribeDBClusterParameters(&describeParametersOpts) + if err != nil { + return err + } + + if err := d.Set("parameter", flattenNeptuneParameters(describeParametersResp.Parameters)); err != nil { + return fmt.Errorf("error setting neptune parameter: %s", err) + } + + resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + if err := d.Set("tags", tagsToMapNeptune(resp.TagList)); err != nil { + return fmt.Errorf("error setting neptune tags: %s", err) + } + + return nil +} + +func resourceAwsNeptuneClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + d.Partial(true) + + if d.HasChange("parameter") { + o, n := d.GetChange("parameter") + if o == nil { + o = new(schema.Set) + } + if n == nil { + n = new(schema.Set) + } + + os := o.(*schema.Set) + ns := n.(*schema.Set) + + parameters, err := expandNeptuneParameters(ns.Difference(os).List()) + if err != nil { + return err + } + + if len(parameters) > 0 { + // We can only modify 20 parameters at a time, so walk them until + // we've got them all. + for parameters != nil { + paramsToModify := make([]*neptune.Parameter, 0) + if len(parameters) <= neptuneClusterParameterGroupMaxParamsBulkEdit { + paramsToModify, parameters = parameters[:], nil + } else { + paramsToModify, parameters = parameters[:neptuneClusterParameterGroupMaxParamsBulkEdit], parameters[neptuneClusterParameterGroupMaxParamsBulkEdit:] + } + parameterGroupName := d.Get("name").(string) + modifyOpts := neptune.ModifyDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(parameterGroupName), + Parameters: paramsToModify, + } + + log.Printf("[DEBUG] Modify Neptune Cluster Parameter Group: %s", modifyOpts) + _, err = conn.ModifyDBClusterParameterGroup(&modifyOpts) + if err != nil { + return fmt.Errorf("Error modifying Neptune Cluster Parameter Group: %s", err) + } + } + d.SetPartial("parameter") + } + } + + arn := d.Get("arn").(string) + if err := setTagsNeptune(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") + } + + d.Partial(false) + + return resourceAwsNeptuneClusterParameterGroupRead(d, meta) +} + +func resourceAwsNeptuneClusterParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + input := neptune.DeleteDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Neptune Cluster Parameter Group: %s", d.Id()) + _, err := conn.DeleteDBClusterParameterGroup(&input) + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting Neptune Cluster Parameter Group (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go new file mode 100644 index 000000000..4c20ee231 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go @@ -0,0 +1,291 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" +) + +// We can only modify 20 parameters at a time, so walk them until +// we've got them all. +const maxParams = 20 + +func resourceAwsNeptuneParameterGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsNeptuneParameterGroupCreate, + Read: resourceAwsNeptuneParameterGroupRead, + Update: resourceAwsNeptuneParameterGroupUpdate, + Delete: resourceAwsNeptuneParameterGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + StateFunc: func(val interface{}) string { + return strings.ToLower(val.(string)) + }, + }, + "family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "Managed by Terraform", + }, + "parameter": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + "apply_method": { + Type: schema.TypeString, + Optional: true, + Default: neptune.ApplyMethodPendingReboot, + ValidateFunc: validation.StringInSlice([]string{ + neptune.ApplyMethodImmediate, + neptune.ApplyMethodPendingReboot, + }, false), + }, + }, + }, + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsNeptuneParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + createOpts := neptune.CreateDBParameterGroupInput{ + DBParameterGroupName: aws.String(d.Get("name").(string)), + DBParameterGroupFamily: aws.String(d.Get("family").(string)), + Description: aws.String(d.Get("description").(string)), + } + + log.Printf("[DEBUG] Create Neptune Parameter Group: %#v", createOpts) + resp, err := conn.CreateDBParameterGroup(&createOpts) + if err != nil { + return fmt.Errorf("Error creating Neptune Parameter Group: %s", err) + } + + d.Partial(true) + d.SetPartial("name") + d.SetPartial("family") + d.SetPartial("description") + d.Partial(false) + + d.SetId(*resp.DBParameterGroup.DBParameterGroupName) + d.Set("arn", resp.DBParameterGroup.DBParameterGroupArn) + log.Printf("[INFO] Neptune Parameter Group ID: %s", d.Id()) + + return resourceAwsNeptuneParameterGroupUpdate(d, meta) +} + +func resourceAwsNeptuneParameterGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + describeOpts := neptune.DescribeDBParameterGroupsInput{ + DBParameterGroupName: aws.String(d.Id()), + } + + describeResp, err := conn.DescribeDBParameterGroups(&describeOpts) + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { + log.Printf("[WARN] Neptune Parameter Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if describeResp == nil { + return fmt.Errorf("Unable to get Describe Response for Neptune Parameter Group (%s)", d.Id()) + } + + if len(describeResp.DBParameterGroups) != 1 || + *describeResp.DBParameterGroups[0].DBParameterGroupName != d.Id() { + return fmt.Errorf("Unable to find Parameter Group: %#v", describeResp.DBParameterGroups) + } + + arn := aws.StringValue(describeResp.DBParameterGroups[0].DBParameterGroupArn) + d.Set("arn", arn) + d.Set("name", describeResp.DBParameterGroups[0].DBParameterGroupName) + d.Set("family", describeResp.DBParameterGroups[0].DBParameterGroupFamily) + d.Set("description", describeResp.DBParameterGroups[0].Description) + + // Only include user customized parameters as there's hundreds of system/default ones + describeParametersOpts := neptune.DescribeDBParametersInput{ + DBParameterGroupName: aws.String(d.Id()), + Source: aws.String("user"), + } + + var parameters []*neptune.Parameter + err = conn.DescribeDBParametersPages(&describeParametersOpts, + func(describeParametersResp *neptune.DescribeDBParametersOutput, lastPage bool) bool { + parameters = append(parameters, describeParametersResp.Parameters...) + return !lastPage + }) + if err != nil { + return err + } + + if err := d.Set("parameter", flattenNeptuneParameters(parameters)); err != nil { + return fmt.Errorf("error setting parameter: %s", err) + } + + resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + if err := d.Set("tags", tagsToMapNeptune(resp.TagList)); err != nil { + return fmt.Errorf("error setting neptune tags: %s", err) + } + + return nil +} + +func resourceAwsNeptuneParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + d.Partial(true) + + if d.HasChange("parameter") { + o, n := d.GetChange("parameter") + if o == nil { + o = new(schema.Set) + } + if n == nil { + n = new(schema.Set) + } + + os := o.(*schema.Set) + ns := n.(*schema.Set) + + toRemove, err := expandNeptuneParameters(os.Difference(ns).List()) + if err != nil { + return err + } + + log.Printf("[DEBUG] Parameters to remove: %#v", toRemove) + + toAdd, err := expandNeptuneParameters(ns.Difference(os).List()) + if err != nil { + return err + } + + log.Printf("[DEBUG] Parameters to add: %#v", toAdd) + + for len(toRemove) > 0 { + paramsToModify := make([]*neptune.Parameter, 0) + if len(toRemove) <= maxParams { + paramsToModify, toRemove = toRemove[:], nil + } else { + paramsToModify, toRemove = toRemove[:maxParams], toRemove[maxParams:] + } + resetOpts := neptune.ResetDBParameterGroupInput{ + DBParameterGroupName: aws.String(d.Get("name").(string)), + Parameters: paramsToModify, + } + + log.Printf("[DEBUG] Reset Neptune Parameter Group: %s", resetOpts) + err := resource.Retry(30*time.Second, func() *resource.RetryError { + _, err = conn.ResetDBParameterGroup(&resetOpts) + if err != nil { + if isAWSErr(err, "InvalidDBParameterGroupState", " has pending changes") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error resetting Neptune Parameter Group: %s", err) + } + } + + for len(toAdd) > 0 { + paramsToModify := make([]*neptune.Parameter, 0) + if len(toAdd) <= maxParams { + paramsToModify, toAdd = toAdd[:], nil + } else { + paramsToModify, toAdd = toAdd[:maxParams], toAdd[maxParams:] + } + modifyOpts := neptune.ModifyDBParameterGroupInput{ + DBParameterGroupName: aws.String(d.Get("name").(string)), + Parameters: paramsToModify, + } + + log.Printf("[DEBUG] Modify Neptune Parameter Group: %s", modifyOpts) + _, err = conn.ModifyDBParameterGroup(&modifyOpts) + if err != nil { + return fmt.Errorf("Error modifying Neptune Parameter Group: %s", err) + } + } + + d.SetPartial("parameter") + } + + if d.HasChange("tags") { + err := setTagsNeptune(conn, d, d.Get("arn").(string)) + if err != nil { + return fmt.Errorf("error setting Neptune Parameter Group %q tags: %s", d.Id(), err) + } + d.SetPartial("tags") + } + + d.Partial(false) + + return resourceAwsNeptuneParameterGroupRead(d, meta) +} + +func resourceAwsNeptuneParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + return resource.Retry(3*time.Minute, func() *resource.RetryError { + deleteOpts := neptune.DeleteDBParameterGroupInput{ + DBParameterGroupName: aws.String(d.Id()), + } + _, err := conn.DeleteDBParameterGroup(&deleteOpts) + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBParameterGroupNotFoundFault, "") { + return nil + } + if isAWSErr(err, neptune.ErrCodeInvalidDBParameterGroupStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go new file mode 100644 index 000000000..3db16ee10 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go @@ -0,0 +1,221 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsNeptuneSubnetGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsNeptuneSubnetGroupCreate, + Read: resourceAwsNeptuneSubnetGroupRead, + Update: resourceAwsNeptuneSubnetGroupUpdate, + Delete: resourceAwsNeptuneSubnetGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateNeptuneSubnetGroupName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateNeptuneSubnetGroupNamePrefix, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + Default: "Managed by Terraform", + }, + + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsNeptuneSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) + + subnetIdsSet := d.Get("subnet_ids").(*schema.Set) + subnetIds := make([]*string, subnetIdsSet.Len()) + for i, subnetId := range subnetIdsSet.List() { + subnetIds[i] = aws.String(subnetId.(string)) + } + + var groupName string + if v, ok := d.GetOk("name"); ok { + groupName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + groupName = resource.PrefixedUniqueId(v.(string)) + } else { + groupName = resource.UniqueId() + } + + createOpts := neptune.CreateDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(groupName), + DBSubnetGroupDescription: aws.String(d.Get("description").(string)), + SubnetIds: subnetIds, + Tags: tags, + } + + log.Printf("[DEBUG] Create Neptune Subnet Group: %#v", createOpts) + _, err := conn.CreateDBSubnetGroup(&createOpts) + if err != nil { + return fmt.Errorf("Error creating Neptune Subnet Group: %s", err) + } + + d.SetId(aws.StringValue(createOpts.DBSubnetGroupName)) + log.Printf("[INFO] Neptune Subnet Group ID: %s", d.Id()) + return resourceAwsNeptuneSubnetGroupRead(d, meta) +} + +func resourceAwsNeptuneSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + describeOpts := neptune.DescribeDBSubnetGroupsInput{ + DBSubnetGroupName: aws.String(d.Id()), + } + + var subnetGroups []*neptune.DBSubnetGroup + if err := conn.DescribeDBSubnetGroupsPages(&describeOpts, func(resp *neptune.DescribeDBSubnetGroupsOutput, lastPage bool) bool { + for _, v := range resp.DBSubnetGroups { + subnetGroups = append(subnetGroups, v) + } + return !lastPage + }); err != nil { + if isAWSErr(err, neptune.ErrCodeDBSubnetGroupNotFoundFault, "") { + log.Printf("[WARN] Neptune Subnet Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if len(subnetGroups) == 0 { + log.Printf("[WARN] Unable to find Neptune Subnet Group: %#v, removing from state", subnetGroups) + d.SetId("") + return nil + } + + var subnetGroup *neptune.DBSubnetGroup + subnetGroup = subnetGroups[0] + + if subnetGroup.DBSubnetGroupName == nil { + return fmt.Errorf("Unable to find Neptune Subnet Group: %#v", subnetGroups) + } + + d.Set("name", subnetGroup.DBSubnetGroupName) + d.Set("description", subnetGroup.DBSubnetGroupDescription) + + subnets := make([]string, 0, len(subnetGroup.Subnets)) + for _, s := range subnetGroup.Subnets { + subnets = append(subnets, aws.StringValue(s.SubnetIdentifier)) + } + if err := d.Set("subnet_ids", subnets); err != nil { + return fmt.Errorf("error setting subnet_ids: %s", err) + } + + // list tags for resource + // set tags + + //Amazon Neptune shares the format of Amazon RDS ARNs. Neptune ARNs contain rds and not neptune. + //https://docs.aws.amazon.com/neptune/latest/userguide/tagging.ARN.html + d.Set("arn", subnetGroup.DBSubnetGroupArn) + resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ + ResourceName: subnetGroup.DBSubnetGroupArn, + }) + + if err != nil { + log.Printf("[DEBUG] Error retreiving tags for ARN: %s", aws.StringValue(subnetGroup.DBSubnetGroupArn)) + } + + d.Set("tags", tagsToMapNeptune(resp.TagList)) + + return nil +} + +func resourceAwsNeptuneSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + if d.HasChange("subnet_ids") || d.HasChange("description") { + _, n := d.GetChange("subnet_ids") + if n == nil { + n = new(schema.Set) + } + ns := n.(*schema.Set) + + var sIds []*string + for _, s := range ns.List() { + sIds = append(sIds, aws.String(s.(string))) + } + + _, err := conn.ModifyDBSubnetGroup(&neptune.ModifyDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(d.Id()), + DBSubnetGroupDescription: aws.String(d.Get("description").(string)), + SubnetIds: sIds, + }) + + if err != nil { + return err + } + } + + //https://docs.aws.amazon.com/neptune/latest/userguide/tagging.ARN.html + arn := d.Get("arn").(string) + if err := setTagsNeptune(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") + } + + return resourceAwsNeptuneSubnetGroupRead(d, meta) +} + +func resourceAwsNeptuneSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + input := neptune.DeleteDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Neptune Subnet Group: %s", d.Id()) + _, err := conn.DeleteDBSubnetGroup(&input) + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBSubnetGroupNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting Neptune Subnet Group (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go index f74284151..2e1ce235e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go @@ -36,11 +36,12 @@ func resourceAwsNetworkAcl() *schema.Resource { Computed: false, }, "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: false, - Deprecated: "Attribute subnet_id is deprecated on network_acl resources. Use subnet_ids instead", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: false, + ConflictsWith: []string{"subnet_ids"}, + Deprecated: "Attribute subnet_id is deprecated on network_acl resources. Use subnet_ids instead", }, "subnet_ids": { Type: schema.TypeSet, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go index d3aa099fc..6a17cdcea 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go @@ -54,14 +54,16 @@ func resourceAwsNetworkAclRule() *schema.Resource { ForceNew: true, }, "cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"ipv6_cidr_block"}, }, "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"cidr_block"}, }, "from_port": { Type: schema.TypeInt, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go index 29f09aedb..bc0c33b4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go @@ -116,7 +116,6 @@ func resourceAwsNetworkInterfaceSGAttachmentDelete(d *schema.ResourceData, meta return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go index e5183e848..e876b834f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go @@ -859,7 +859,6 @@ func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go new file mode 100644 index 000000000..dcad1d378 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go @@ -0,0 +1,174 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsOrganizationsPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsOrganizationsPolicyCreate, + Read: resourceAwsOrganizationsPolicyRead, + Update: resourceAwsOrganizationsPolicyUpdate, + Delete: resourceAwsOrganizationsPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "content": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + ValidateFunc: validateJsonString, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: organizations.PolicyTypeServiceControlPolicy, + ValidateFunc: validation.StringInSlice([]string{ + organizations.PolicyTypeServiceControlPolicy, + }, false), + }, + }, + } +} + +func resourceAwsOrganizationsPolicyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + // Description is required: + // InvalidParameter: 1 validation error(s) found. + // - missing required field, CreatePolicyInput.Description. + input := &organizations.CreatePolicyInput{ + Content: aws.String(d.Get("content").(string)), + Description: aws.String(d.Get("description").(string)), + Name: aws.String(d.Get("name").(string)), + Type: aws.String(d.Get("type").(string)), + } + + log.Printf("[DEBUG] Creating Organizations Policy: %s", input) + + var err error + var resp *organizations.CreatePolicyOutput + err = resource.Retry(4*time.Minute, func() *resource.RetryError { + resp, err = conn.CreatePolicy(input) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create policy again: %q", err.Error()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + if err != nil { + return fmt.Errorf("error creating Organizations Policy: %s", err) + } + + d.SetId(*resp.Policy.PolicySummary.Id) + + return resourceAwsOrganizationsPolicyRead(d, meta) +} + +func resourceAwsOrganizationsPolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.DescribePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Organizations Policy: %s", input) + resp, err := conn.DescribePolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp.Policy == nil || resp.Policy.PolicySummary == nil { + log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", resp.Policy.PolicySummary.Arn) + d.Set("content", resp.Policy.Content) + d.Set("description", resp.Policy.PolicySummary.Description) + d.Set("name", resp.Policy.PolicySummary.Name) + d.Set("type", resp.Policy.PolicySummary.Type) + return nil +} + +func resourceAwsOrganizationsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.UpdatePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + if d.HasChange("content") { + input.Content = aws.String(d.Get("content").(string)) + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + + if d.HasChange("name") { + input.Name = aws.String(d.Get("name").(string)) + } + + log.Printf("[DEBUG] Updating Organizations Policy: %s", input) + _, err := conn.UpdatePolicy(input) + if err != nil { + return fmt.Errorf("error updating Organizations Policy: %s", err) + } + + return resourceAwsOrganizationsPolicyRead(d, meta) +} + +func resourceAwsOrganizationsPolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.DeletePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deletion Organizations Policy: %s", input) + _, err := conn.DeletePolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + return nil + } + return err + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go new file mode 100644 index 000000000..b51949e80 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy_attachment.go @@ -0,0 +1,154 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsOrganizationsPolicyAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsOrganizationsPolicyAttachmentCreate, + Read: resourceAwsOrganizationsPolicyAttachmentRead, + Delete: resourceAwsOrganizationsPolicyAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "policy_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "target_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsOrganizationsPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + policyID := d.Get("policy_id").(string) + targetID := d.Get("target_id").(string) + + input := &organizations.AttachPolicyInput{ + PolicyId: aws.String(policyID), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Creating Organizations Policy Attachment: %s", input) + + err := resource.Retry(4*time.Minute, func() *resource.RetryError { + _, err := conn.AttachPolicy(input) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create policy attachment again: %q", err.Error()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + if err != nil { + return fmt.Errorf("error creating Organizations Policy Attachment: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", targetID, policyID)) + + return resourceAwsOrganizationsPolicyAttachmentRead(d, meta) +} + +func resourceAwsOrganizationsPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) + if err != nil { + return err + } + + input := &organizations.ListPoliciesForTargetInput{ + Filter: aws.String(organizations.PolicyTypeServiceControlPolicy), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Listing Organizations Policies for Target: %s", input) + var output *organizations.PolicySummary + err = conn.ListPoliciesForTargetPages(input, func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool { + for _, policySummary := range page.Policies { + if aws.StringValue(policySummary.Id) == policyID { + output = policySummary + return true + } + } + return !lastPage + }) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { + log.Printf("[WARN] Target does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + return err + } + + if output == nil { + log.Printf("[WARN] Attachment does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("policy_id", policyID) + d.Set("target_id", targetID) + return nil +} + +func resourceAwsOrganizationsPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) + if err != nil { + return err + } + + input := &organizations.DetachPolicyInput{ + PolicyId: aws.String(policyID), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Detaching Organizations Policy %q from %q", policyID, targetID) + _, err = conn.DetachPolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + return nil + } + if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { + return nil + } + return err + } + return nil +} + +func decodeAwsOrganizationsPolicyAttachmentID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format of TARGETID:POLICYID, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go index e5da78c9e..33e6668f0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go @@ -148,6 +148,5 @@ func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) e return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go index ae7d61dc9..fab8bc91c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go @@ -166,8 +166,6 @@ func resourceAwsProxyProtocolPolicyDelete(d *schema.ResourceData, meta interface resp, err := elbconn.DescribeLoadBalancers(req) if err != nil { if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") return nil } return fmt.Errorf("Error retrieving ELB attributes: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go index 08a9b99ac..18418edfe 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go @@ -43,6 +43,12 @@ func resourceAwsRDSCluster() *schema.Resource { Set: schema.HashString, }, + "backtrack_window": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 259200), + }, + "cluster_identifier": { Type: schema.TypeString, Optional: true, @@ -52,11 +58,12 @@ func resourceAwsRDSCluster() *schema.Resource { ValidateFunc: validateRdsIdentifier, }, "cluster_identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateRdsIdentifierPrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier"}, + ValidateFunc: validateRdsIdentifierPrefix, }, "cluster_members": { @@ -124,6 +131,45 @@ func resourceAwsRDSCluster() *schema.Resource { ForceNew: true, }, + "s3_import": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{ + "snapshot_identifier", + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bucket_prefix": { + Type: schema.TypeString, + Required: false, + Optional: true, + ForceNew: true, + }, + "ingestion_role": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + }, + }, + "final_snapshot_identifier": { Type: schema.TypeString, Optional: true, @@ -256,6 +302,21 @@ func resourceAwsRDSCluster() *schema.Resource { ForceNew: true, }, + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Computed: false, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + "audit", + "error", + "general", + "slowquery", + }, false), + }, + }, + "tags": tagsSchema(), }, } @@ -290,11 +351,21 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBClusterFromSnapshotInput{ DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), + SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), Tags: tags, } + // Need to check value > 0 due to: + // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. + if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { + opts.BacktrackWindow = aws.Int64(int64(v.(int))) + } + + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { opts.AvailabilityZones = expandStringList(attr.List()) } @@ -315,6 +386,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error opts.Port = aws.Int64(int64(attr.(int))) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + // Check if any of the parameters that require a cluster modification after creation are set var clusterUpdate bool if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { @@ -331,7 +406,16 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } log.Printf("[DEBUG] RDS Cluster restore from snapshot configuration: %s", opts) - _, err := conn.RestoreDBClusterFromSnapshot(&opts) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RestoreDBClusterFromSnapshot(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Error creating RDS Cluster: %s", err) } @@ -375,6 +459,12 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error Tags: tags, } + // Need to check value > 0 due to: + // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. + if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { + createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) + } + if attr, ok := d.GetOk("port"); ok { createOpts.Port = aws.Int64(int64(attr.(int))) } @@ -419,33 +509,57 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.SourceRegion = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + log.Printf("[DEBUG] Create RDS Cluster as read replica: %s", createOpts) - resp, err := conn.CreateDBCluster(createOpts) + var resp *rds.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - log.Printf("[ERROR] Error creating RDS Cluster: %s", err) - return err + return fmt.Errorf("error creating RDS cluster: %s", err) } log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) - } else { + } else if v, ok := d.GetOk("s3_import"); ok { if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_password": required field is not set`, d.Get("name").(string)) } - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_username": required field is not set`, d.Get("database_name").(string)) + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_username": required field is not set`, d.Get("name").(string)) } - - createOpts := &rds.CreateDBClusterInput{ + s3_bucket := v.([]interface{})[0].(map[string]interface{}) + createOpts := &rds.RestoreDBClusterFromS3Input{ DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), - MasterUserPassword: aws.String(d.Get("master_password").(string)), MasterUsername: aws.String(d.Get("master_username").(string)), + MasterUserPassword: aws.String(d.Get("master_password").(string)), + S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), + S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), + S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), + SourceEngine: aws.String(s3_bucket["source_engine"].(string)), + SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), Tags: tags, } + // Need to check value > 0 due to: + // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. + if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { + createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) + } + if v := d.Get("database_name"); v.(string) != "" { createOpts.DatabaseName = aws.String(v.(string)) } @@ -494,13 +608,130 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) } - log.Printf("[DEBUG] RDS Cluster create options: %s", createOpts) - resp, err := conn.CreateDBCluster(createOpts) + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + + log.Printf("[DEBUG] RDS Cluster restore options: %s", createOpts) + // Retry for IAM/S3 eventual consistency + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + resp, err := conn.RestoreDBClusterFromS3(createOpts) + if err != nil { + // InvalidParameterValue: Files from the specified Amazon S3 bucket cannot be downloaded. + // Make sure that you have created an AWS Identity and Access Management (IAM) role that lets Amazon RDS access Amazon S3 for you. + if isAWSErr(err, "InvalidParameterValue", "Files from the specified Amazon S3 bucket cannot be downloaded") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidParameterValue", "S3_SNAPSHOT_INGESTION") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidParameterValue", "S3 bucket cannot be found") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) + return nil + }) + if err != nil { log.Printf("[ERROR] Error creating RDS Cluster: %s", err) return err } + } else { + if _, ok := d.GetOk("master_password"); !ok { + return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) + } + + if _, ok := d.GetOk("master_username"); !ok { + return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_username": required field is not set`, d.Get("database_name").(string)) + } + + createOpts := &rds.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + MasterUserPassword: aws.String(d.Get("master_password").(string)), + MasterUsername: aws.String(d.Get("master_username").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + Tags: tags, + } + + // Need to check value > 0 due to: + // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. + if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { + createOpts.BacktrackWindow = aws.Int64(int64(v.(int))) + } + + if v := d.Get("database_name"); v.(string) != "" { + createOpts.DatabaseName = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("port"); ok { + createOpts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) + } + + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + + log.Printf("[DEBUG] RDS Cluster create options: %s", createOpts) + var resp *rds.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating RDS cluster: %s", err) + } + log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) } @@ -588,6 +819,7 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc d.Set("database_name", dbc.DatabaseName) } + d.Set("backtrack_window", int(aws.Int64Value(dbc.BacktrackWindow))) d.Set("cluster_identifier", dbc.DBClusterIdentifier) d.Set("cluster_resource_id", dbc.DbClusterResourceId) d.Set("db_subnet_group_name", dbc.DBSubnetGroup) @@ -607,6 +839,10 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) d.Set("hosted_zone_id", dbc.HostedZoneId) + if err := d.Set("enabled_cloudwatch_logs_exports", flattenStringList(dbc.EnabledCloudwatchLogsExports)); err != nil { + return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) + } + var vpcg []string for _, g := range dbc.VpcSecurityGroups { vpcg = append(vpcg, *g.VpcSecurityGroupId) @@ -656,6 +892,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error DBClusterIdentifier: aws.String(d.Id()), } + if d.HasChange("backtrack_window") { + req.BacktrackWindow = aws.Int64(int64(d.Get("backtrack_window").(int))) + requestUpdate = true + } + if d.HasChange("master_password") { req.MasterUserPassword = aws.String(d.Get("master_password").(string)) requestUpdate = true @@ -696,12 +937,20 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("enabled_cloudwatch_logs_exports") && !d.IsNewResource() { + d.SetPartial("enabled_cloudwatch_logs_exports") + req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) + requestUpdate = true + } + if requestUpdate { err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.ModifyDBCluster(req) if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == rds.ErrCodeInvalidDBClusterStateFault { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "") { return resource.RetryableError(err) } return resource.NonRetryableError(err) @@ -711,6 +960,21 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Failed to modify RDS Cluster (%s): %s", d.Id(), err) } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsRdsClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 10 * time.Second, + } + + log.Printf("[INFO] Waiting for RDS Cluster (%s) to modify", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for RDS Cluster (%s) to modify: %s", d.Id(), err) + } } if d.HasChange("iam_roles") { @@ -894,3 +1158,9 @@ var resourceAwsRdsClusterDeletePendingStates = []string{ "backing-up", "modifying", } + +var resourceAwsRdsClusterUpdatePendingStates = []string{ + "backing-up", + "modifying", + "resetting-master-credentials", +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go index b00acf01c..b13c2b908 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/rds" "github.com/hashicorp/terraform/helper/resource" @@ -31,6 +30,11 @@ func resourceAwsRDSClusterInstance() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "identifier": { Type: schema.TypeString, Optional: true, @@ -268,19 +272,27 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ } log.Printf("[DEBUG] Creating RDS DB Instance opts: %s", createOpts) - resp, err := conn.CreateDBInstance(createOpts) + var resp *rds.CreateDBInstanceOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBInstance(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - return err + return fmt.Errorf("error creating RDS DB Instance: %s", err) } d.SetId(*resp.DBInstance.DBInstanceIdentifier) // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", - "configuring-enhanced-monitoring", "maintenance", - "rebooting", "renaming", "resetting-master-credentials", - "starting", "upgrading"}, + Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutCreate), @@ -351,22 +363,23 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("db_subnet_group_name", db.DBSubnetGroup.DBSubnetGroupName) } - d.Set("publicly_accessible", db.PubliclyAccessible) - d.Set("cluster_identifier", db.DBClusterIdentifier) - d.Set("engine", db.Engine) - d.Set("engine_version", db.EngineVersion) - d.Set("instance_class", db.DBInstanceClass) - d.Set("identifier", db.DBInstanceIdentifier) - d.Set("dbi_resource_id", db.DbiResourceId) - d.Set("storage_encrypted", db.StorageEncrypted) - d.Set("kms_key_id", db.KmsKeyId) + d.Set("arn", db.DBInstanceArn) d.Set("auto_minor_version_upgrade", db.AutoMinorVersionUpgrade) - d.Set("promotion_tier", db.PromotionTier) - d.Set("preferred_backup_window", db.PreferredBackupWindow) - d.Set("preferred_maintenance_window", db.PreferredMaintenanceWindow) d.Set("availability_zone", db.AvailabilityZone) + d.Set("cluster_identifier", db.DBClusterIdentifier) + d.Set("dbi_resource_id", db.DbiResourceId) + d.Set("engine_version", db.EngineVersion) + d.Set("engine", db.Engine) + d.Set("identifier", db.DBInstanceIdentifier) + d.Set("instance_class", db.DBInstanceClass) + d.Set("kms_key_id", db.KmsKeyId) d.Set("performance_insights_enabled", db.PerformanceInsightsEnabled) d.Set("performance_insights_kms_key_id", db.PerformanceInsightsKMSKeyId) + d.Set("preferred_backup_window", db.PreferredBackupWindow) + d.Set("preferred_maintenance_window", db.PreferredMaintenanceWindow) + d.Set("promotion_tier", db.PromotionTier) + d.Set("publicly_accessible", db.PubliclyAccessible) + d.Set("storage_encrypted", db.StorageEncrypted) if db.MonitoringInterval != nil { d.Set("monitoring_interval", db.MonitoringInterval) @@ -380,15 +393,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("db_parameter_group_name", db.DBParameterGroups[0].DBParameterGroupName) } - // Fetch and save tags - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("db:%s", d.Id()), - }.String() - if err := saveTagsRDS(conn, d, arn); err != nil { + if err := saveTagsRDS(conn, d, aws.StringValue(db.DBInstanceArn)); err != nil { log.Printf("[WARN] Failed to save tags for RDS Cluster Instance (%s): %s", *db.DBClusterIdentifier, err) } @@ -465,17 +470,23 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Send DB Instance Modification request: %#v", requestUpdate) if requestUpdate { log.Printf("[DEBUG] DB Instance Modification request: %#v", req) - _, err := conn.ModifyDBInstance(req) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.ModifyDBInstance(req) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Error modifying DB Instance %s: %s", d.Id(), err) } // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", - "configuring-enhanced-monitoring", "maintenance", - "rebooting", "renaming", "resetting-master-credentials", - "starting", "upgrading"}, + Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutUpdate), @@ -491,14 +502,7 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("db:%s", d.Id()), - }.String() - if err := setTagsRDS(conn, d, arn); err != nil { + if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -520,7 +524,7 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ // re-uses db_instance refresh func log.Println("[INFO] Waiting for RDS Cluster Instance to be destroyed") stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying", "deleting"}, + Pending: resourceAwsRdsClusterInstanceDeletePendingStates, Target: []string{}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutDelete), @@ -535,3 +539,23 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ return nil } + +var resourceAwsRdsClusterInstanceCreateUpdatePendingStates = []string{ + "backing-up", + "configuring-enhanced-monitoring", + "configuring-log-exports", + "creating", + "maintenance", + "modifying", + "rebooting", + "renaming", + "resetting-master-credentials", + "starting", + "upgrading", +} + +var resourceAwsRdsClusterInstanceDeletePendingStates = []string{ + "configuring-log-exports", + "modifying", + "deleting", +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go index e2d7aad80..198f8cc32 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go @@ -40,11 +40,12 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource { ValidateFunc: validateDbParamGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbParamGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbParamGroupNamePrefix, }, "family": &schema.Schema{ Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go index 32a8253eb..6cde16cef 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go @@ -193,6 +193,11 @@ func resourceAwsRedshiftCluster() *schema.Resource { Computed: true, }, + "dns_name": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_public_key": { Type: schema.TypeString, Optional: true, @@ -567,6 +572,7 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er if rsc.Endpoint.Port != nil { endpoint = fmt.Sprintf("%s:%d", endpoint, *rsc.Endpoint.Port) } + d.Set("dns_name", rsc.Endpoint.Address) d.Set("port", rsc.Endpoint.Port) d.Set("endpoint", endpoint) } @@ -642,25 +648,17 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) ClusterIdentifier: aws.String(d.Id()), } - if d.HasChange("cluster_type") { + // If the cluster type, node type, or number of nodes changed, then the AWS API expects all three + // items to be sent over + if d.HasChange("cluster_type") || d.HasChange("node_type") || d.HasChange("number_of_nodes") { req.ClusterType = aws.String(d.Get("cluster_type").(string)) - requestUpdate = true - } - - if d.HasChange("node_type") { req.NodeType = aws.String(d.Get("node_type").(string)) - requestUpdate = true - } - - if d.HasChange("number_of_nodes") { if v := d.Get("number_of_nodes").(int); v > 1 { req.ClusterType = aws.String("multi-node") req.NumberOfNodes = aws.Int64(int64(d.Get("number_of_nodes").(int))) } else { req.ClusterType = aws.String("single-node") } - - req.NodeType = aws.String(d.Get("node_type").(string)) requestUpdate = true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go index dfb126529..ac4da3fb0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -98,6 +99,7 @@ func resourceAwsRoute() *schema.Resource { "route_table_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "vpc_peering_connection_id": { @@ -205,7 +207,7 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { } default: - return fmt.Errorf("An invalid target type specified: %s", setTarget) + return fmt.Errorf("A valid target type is missing. Specify one of the following attributes: %s", strings.Join(allowedTargets, ", ")) } log.Printf("[DEBUG] Route create config: %s", createOpts) @@ -425,7 +427,6 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go index b9f507d47..f0f665106 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "regexp" + "strconv" "strings" "time" @@ -20,8 +21,8 @@ import ( "github.com/aws/aws-sdk-go/service/route53" ) -var r53NoRecordsFound = errors.New("No matching Hosted Zone found") -var r53NoHostedZoneFound = errors.New("No matching records found") +var r53NoRecordsFound = errors.New("No matching records found") +var r53NoHostedZoneFound = errors.New("No matching Hosted Zone found") var r53ValidRecordTypes = regexp.MustCompile("^(A|AAAA|CAA|CNAME|MX|NAPTR|NS|PTR|SOA|SPF|SRV|TXT)$") func resourceAwsRoute53Record() *schema.Resource { @@ -374,7 +375,8 @@ func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) er return err } - return resourceAwsRoute53RecordRead(d, meta) + _, err = findRecord(d, meta) + return err } func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) error { @@ -451,7 +453,8 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er return err } - return resourceAwsRoute53RecordRead(d, meta) + _, err = findRecord(d, meta) + return err } func changeRoute53RecordSet(conn *route53.Route53, input *route53.ChangeResourceRecordSetsInput) (interface{}, error) { @@ -630,27 +633,49 @@ func findRecord(d *schema.ResourceData, meta interface{}) (*route53.ResourceReco log.Printf("[DEBUG] Expanded record name: %s", en) d.Set("fqdn", en) + recordName := FQDN(strings.ToLower(en)) + recordType := d.Get("type").(string) + recordSetIdentifier := d.Get("set_identifier") + + // If this isn't a Weighted, Latency, Geo, or Failover resource with + // a SetIdentifier we only need to look at the first record in the response since there can be + // only one + maxItems := "1" + if recordSetIdentifier != "" { + maxItems = "100" + } + lopts := &route53.ListResourceRecordSetsInput{ HostedZoneId: aws.String(cleanZoneID(zone)), - StartRecordName: aws.String(en), - StartRecordType: aws.String(d.Get("type").(string)), + StartRecordName: aws.String(recordName), + StartRecordType: aws.String(recordType), + MaxItems: aws.String(maxItems), } log.Printf("[DEBUG] List resource records sets for zone: %s, opts: %s", zone, lopts) var record *route53.ResourceRecordSet + + // We need to loop over all records starting from the record we are looking for because + // Weighted, Latency, Geo, and Failover resource record sets have a special option + // called SetIdentifier which allows multiple entries with the same name and type but + // a different SetIdentifier + // For all other records we are setting the maxItems to 1 so that we don't return extra + // unneeded records err = conn.ListResourceRecordSetsPages(lopts, func(resp *route53.ListResourceRecordSetsOutput, lastPage bool) bool { for _, recordSet := range resp.ResourceRecordSets { - name := cleanRecordName(*recordSet.Name) - if FQDN(strings.ToLower(name)) != FQDN(strings.ToLower(*lopts.StartRecordName)) { - continue - } - if strings.ToUpper(*recordSet.Type) != strings.ToUpper(*lopts.StartRecordType) { - continue - } - if recordSet.SetIdentifier != nil && *recordSet.SetIdentifier != d.Get("set_identifier") { + responseName := strings.ToLower(cleanRecordName(*recordSet.Name)) + responseType := strings.ToUpper(*recordSet.Type) + + if recordName != responseName { + continue + } + if recordType != responseType { + continue + } + if recordSet.SetIdentifier != nil && *recordSet.SetIdentifier != recordSetIdentifier { continue } @@ -676,8 +701,6 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er if err != nil { switch err { case r53NoHostedZoneFound, r53NoRecordsFound: - log.Printf("[DEBUG] %s for: %s, removing from state file", err, d.Id()) - d.SetId("") return nil default: return err @@ -883,16 +906,17 @@ func FQDN(name string) string { } } -// Route 53 stores the "*" wildcard indicator as ASCII 42 and returns the -// octal equivalent, "\\052". Here we look for that, and convert back to "*" -// as needed. +// Route 53 stores certain characters with the octal equivalent in ASCII format. +// This function converts all of these characters back into the original character +// E.g. "*" is stored as "\\052" and "@" as "\\100" + func cleanRecordName(name string) string { str := name - if strings.HasPrefix(name, "\\052") { - str = strings.Replace(name, "\\052", "*", 1) - log.Printf("[DEBUG] Replacing octal \\052 for * in: %s", name) + s, err := strconv.Unquote(`"` + str + `"`) + if err != nil { + return str } - return str + return s } // Check if the current record name contains the zone suffix. @@ -905,7 +929,7 @@ func expandRecordName(name, zone string) string { if len(name) == 0 { rn = zone } else { - rn = strings.Join([]string{name, zone}, ".") + rn = strings.Join([]string{rn, zone}, ".") } } return rn diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go index be92b325a..a0ad6f5c1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go @@ -89,7 +89,7 @@ func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) erro req := &route53.CreateHostedZoneInput{ Name: aws.String(d.Get("name").(string)), HostedZoneConfig: &route53.HostedZoneConfig{Comment: aws.String(d.Get("comment").(string))}, - CallerReference: aws.String(time.Now().Format(time.RFC3339Nano)), + CallerReference: aws.String(resource.UniqueId()), } if v := d.Get("vpc_id"); v != "" { req.VPC = &route53.VPC{ @@ -277,8 +277,6 @@ func resourceAwsRoute53ZoneDelete(d *schema.ResourceData, meta interface{}) erro _, err := r53.DeleteHostedZone(&route53.DeleteHostedZoneInput{Id: aws.String(d.Id())}) if err != nil { if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - log.Printf("[DEBUG] No matching Route 53 Zone found for: %s, removing from state file", d.Id()) - d.SetId("") return nil } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go index 235c6173f..c935ddb22 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go @@ -13,6 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/hashcode" @@ -41,9 +42,10 @@ func resourceAwsS3Bucket() *schema.Resource { ConflictsWith: []string{"bucket_prefix"}, }, "bucket_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"bucket"}, }, "bucket_domain_name": { @@ -51,6 +53,11 @@ func resourceAwsS3Bucket() *schema.Resource { Computed: true, }, + "bucket_regional_domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "arn": { Type: schema.TypeString, Optional: true, @@ -246,7 +253,7 @@ func resourceAwsS3Bucket() *schema.Resource { "days": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validation.IntAtLeast(1), + ValidateFunc: validation.IntAtLeast(0), }, "expired_object_delete_marker": { Type: schema.TypeBool, @@ -381,6 +388,7 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, ValidateFunc: validation.StringInSlice([]string{ s3.StorageClassStandard, + s3.StorageClassOnezoneIa, s3.StorageClassStandardIa, s3.StorageClassReducedRedundancy, }, false), @@ -581,7 +589,7 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { return err } } - if d.HasChange("acl") { + if d.HasChange("acl") && !d.IsNewResource() { if err := resourceAwsS3BucketAclUpdate(s3conn, d); err != nil { return err } @@ -689,14 +697,18 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - cors := corsResponse.(*s3.GetBucketCorsOutput) if err != nil { // An S3 Bucket might not have CORS configuration set. - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() != "NoSuchCORSConfiguration" { + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() != "NoSuchCORSConfiguration" { + return err + } + log.Printf("[WARN] S3 bucket: %s, no CORS configuration could be found.", d.Id()) + } else { return err } - log.Printf("[WARN] S3 bucket: %s, no CORS configuration could be found.", d.Id()) } + cors := corsResponse.(*s3.GetBucketCorsOutput) log.Printf("[DEBUG] S3 bucket: %s, read CORS: %v", d.Id(), cors) if cors.CORSRules != nil { rules := make([]map[string]interface{}, 0, len(cors.CORSRules)) @@ -717,6 +729,11 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { if err := d.Set("cors_rule", rules); err != nil { return err } + } else { + log.Printf("[DEBUG] S3 bucket: %s, read CORS: %v", d.Id(), cors) + if err := d.Set("cors_rule", make([]map[string]interface{}, 0)); err != nil { + return err + } } // Read the website configuration @@ -891,14 +908,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - lifecycle := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput) if err != nil { if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() != 404 { return err } } - log.Printf("[DEBUG] S3 Bucket: %s, lifecycle: %v", d.Id(), lifecycle) - if len(lifecycle.Rules) > 0 { + if lifecycle, ok := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput); ok && len(lifecycle.Rules) > 0 { + log.Printf("[DEBUG] S3 Bucket: %s, lifecycle: %v", d.Id(), lifecycle) rules := make([]map[string]interface{}, 0, len(lifecycle.Rules)) for _, lifecycleRule := range lifecycle.Rules { @@ -1078,6 +1094,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { return err } + // Add the bucket_regional_domain_name as an attribute + regionalEndpoint, err := BucketRegionalDomainName(d.Get("bucket").(string), region) + if err != nil { + return err + } + d.Set("bucket_regional_domain_name", regionalEndpoint) + // Add the hosted zone ID for this bucket's region as an attribute hostedZoneID, err := HostedZoneIDForRegion(region) if err != nil { @@ -1259,8 +1282,9 @@ func resourceAwsS3BucketCorsUpdate(s3conn *s3.S3, d *schema.ResourceData) error } else { vMap := make([]*string, len(v.([]interface{}))) for i, vv := range v.([]interface{}) { - str := vv.(string) - vMap[i] = aws.String(str) + if str, ok := vv.(string); ok { + vMap[i] = aws.String(str) + } } switch k { case "allowed_headers": @@ -1440,6 +1464,20 @@ func bucketDomainName(bucket string) string { return fmt.Sprintf("%s.s3.amazonaws.com", bucket) } +// https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region +func BucketRegionalDomainName(bucket string, region string) (string, error) { + // Return a default AWS Commercial domain name if no region is provided + // Otherwise EndpointFor() will return BUCKET.s3..amazonaws.com + if region == "" { + return fmt.Sprintf("%s.s3.amazonaws.com", bucket), nil + } + endpoint, err := endpoints.DefaultResolver().EndpointFor(endpoints.S3ServiceID, region) + if err != nil { + return "", err + } + return fmt.Sprintf("%s.%s", bucket, strings.TrimPrefix(endpoint.URL, "https://")), nil +} + func WebsiteEndpoint(bucket string, region string) *S3Website { domain := WebsiteDomainUrl(region) return &S3Website{Endpoint: fmt.Sprintf("%s.%s", bucket, domain), Domain: domain} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go new file mode 100644 index 000000000..87a90f72d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go @@ -0,0 +1,472 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsS3BucketInventory() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsS3BucketInventoryPut, + Read: resourceAwsS3BucketInventoryRead, + Update: resourceAwsS3BucketInventoryPut, + Delete: resourceAwsS3BucketInventoryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateMaxLength(64), + }, + "enabled": { + Type: schema.TypeBool, + Default: true, + Optional: true, + }, + "filter": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "destination": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "format": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryFormatCsv, + s3.InventoryFormatOrc, + }, false), + }, + "bucket_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "account_id": { + Type: schema.TypeString, + Optional: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + "encryption": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "sse_kms": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_s3"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key_id": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + "sse_s3": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_kms"}, + Elem: &schema.Resource{ + // No options currently; just existence of "sse_s3". + Schema: map[string]*schema.Schema{}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "schedule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "frequency": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryFrequencyDaily, + s3.InventoryFrequencyWeekly, + }, false), + }, + }, + }, + }, + // TODO: Is there a sensible default for this? + "included_object_versions": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryIncludedObjectVersionsCurrent, + s3.InventoryIncludedObjectVersionsAll, + }, false), + }, + "optional_fields": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryOptionalFieldSize, + s3.InventoryOptionalFieldLastModifiedDate, + s3.InventoryOptionalFieldStorageClass, + s3.InventoryOptionalFieldEtag, + s3.InventoryOptionalFieldIsMultipartUploaded, + s3.InventoryOptionalFieldReplicationStatus, + s3.InventoryOptionalFieldEncryptionStatus, + }, false), + }, + Set: schema.HashString, + }, + }, + } +} + +func resourceAwsS3BucketInventoryPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + bucket := d.Get("bucket").(string) + name := d.Get("name").(string) + + inventoryConfiguration := &s3.InventoryConfiguration{ + Id: aws.String(name), + IsEnabled: aws.Bool(d.Get("enabled").(bool)), + } + + if v, ok := d.GetOk("included_object_versions"); ok { + inventoryConfiguration.IncludedObjectVersions = aws.String(v.(string)) + } + + if v, ok := d.GetOk("optional_fields"); ok { + inventoryConfiguration.OptionalFields = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("schedule"); ok { + scheduleList := v.([]interface{}) + scheduleMap := scheduleList[0].(map[string]interface{}) + inventoryConfiguration.Schedule = &s3.InventorySchedule{ + Frequency: aws.String(scheduleMap["frequency"].(string)), + } + } + + if v, ok := d.GetOk("filter"); ok { + filterList := v.([]interface{}) + filterMap := filterList[0].(map[string]interface{}) + inventoryConfiguration.Filter = expandS3InventoryFilter(filterMap) + } + + if v, ok := d.GetOk("destination"); ok { + destinationList := v.([]interface{}) + destinationMap := destinationList[0].(map[string]interface{}) + bucketList := destinationMap["bucket"].([]interface{}) + bucketMap := bucketList[0].(map[string]interface{}) + + inventoryConfiguration.Destination = &s3.InventoryDestination{ + S3BucketDestination: expandS3InventoryS3BucketDestination(bucketMap), + } + } + + input := &s3.PutBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + InventoryConfiguration: inventoryConfiguration, + } + + log.Printf("[DEBUG] Putting S3 bucket inventory configuration: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.PutBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error putting S3 bucket inventory configuration: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", bucket, name)) + + return resourceAwsS3BucketInventoryRead(d, meta) +} + +func resourceAwsS3BucketInventoryDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) + if err != nil { + return err + } + + input := &s3.DeleteBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Deleting S3 bucket inventory configuration: %s", input) + _, err = conn.DeleteBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + return nil + } + return fmt.Errorf("Error deleting S3 bucket inventory configuration: %s", err) + } + + return nil +} + +func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) + if err != nil { + return err + } + + d.Set("bucket", bucket) + d.Set("name", name) + + input := &s3.GetBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) + var output *s3.GetBucketInventoryConfigurationOutput + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = conn.GetBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + if d.IsNewResource() { + return resource.RetryableError(err) + } + return nil + } + return resource.NonRetryableError(err) + } + return nil + }) + + if output == nil || output.InventoryConfiguration == nil { + log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) + d.SetId("") + return nil + } + + d.Set("enabled", aws.BoolValue(output.InventoryConfiguration.IsEnabled)) + d.Set("included_object_versions", aws.StringValue(output.InventoryConfiguration.IncludedObjectVersions)) + + if err := d.Set("optional_fields", flattenStringList(output.InventoryConfiguration.OptionalFields)); err != nil { + return fmt.Errorf("error setting optional_fields: %s", err) + } + + if err := d.Set("filter", flattenS3InventoryFilter(output.InventoryConfiguration.Filter)); err != nil { + return fmt.Errorf("error setting filter: %s", err) + } + + if err := d.Set("schedule", flattenS3InventorySchedule(output.InventoryConfiguration.Schedule)); err != nil { + return fmt.Errorf("error setting schedule: %s", err) + } + + if output.InventoryConfiguration.Destination != nil { + // Flag the existence of SSE-S3 encryption because it cannot be marshaled when updating a resource. + // Allowing import would risk disabling encryption inadvertently when applying updates. + if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption != nil { + if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption.SSES3 != nil { + return errors.New("sse_s3 encryption is unsupported") + } + } + + destination := map[string]interface{}{ + "bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination), + } + + if err := d.Set("destination", []map[string]interface{}{destination}); err != nil { + return fmt.Errorf("error setting destination: %s", err) + } + } + + return nil +} + +func expandS3InventoryFilter(m map[string]interface{}) *s3.InventoryFilter { + v, ok := m["prefix"] + if !ok { + return nil + } + return &s3.InventoryFilter{ + Prefix: aws.String(v.(string)), + } +} + +func flattenS3InventoryFilter(filter *s3.InventoryFilter) []map[string]interface{} { + if filter == nil { + return nil + } + + result := make([]map[string]interface{}, 0, 1) + + m := make(map[string]interface{}, 0) + if filter.Prefix != nil { + m["prefix"] = aws.StringValue(filter.Prefix) + } + + result = append(result, m) + + return result +} + +func flattenS3InventorySchedule(schedule *s3.InventorySchedule) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + + m := make(map[string]interface{}, 1) + m["frequency"] = aws.StringValue(schedule.Frequency) + + result = append(result, m) + + return result +} + +func expandS3InventoryS3BucketDestination(m map[string]interface{}) *s3.InventoryS3BucketDestination { + destination := &s3.InventoryS3BucketDestination{ + Format: aws.String(m["format"].(string)), + Bucket: aws.String(m["bucket_arn"].(string)), + } + + if v, ok := m["account_id"]; ok && v.(string) != "" { + destination.AccountId = aws.String(v.(string)) + } + + if v, ok := m["prefix"]; ok && v.(string) != "" { + destination.Prefix = aws.String(v.(string)) + } + + if v, ok := m["encryption"].([]interface{}); ok && len(v) > 0 { + encryptionMap := v[0].(map[string]interface{}) + + encryption := &s3.InventoryEncryption{} + + for k, v := range encryptionMap { + data := v.([]interface{}) + + if len(data) == 0 { + continue + } + + switch k { + case "sse_kms": + m := data[0].(map[string]interface{}) + encryption.SSEKMS = &s3.SSEKMS{ + KeyId: aws.String(m["key_id"].(string)), + } + case "sse_s3": + encryption.SSES3 = &s3.SSES3{} + } + } + + destination.Encryption = encryption + } + + return destination +} + +func flattenS3InventoryS3BucketDestination(destination *s3.InventoryS3BucketDestination) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + + m := map[string]interface{}{ + "format": aws.StringValue(destination.Format), + "bucket_arn": aws.StringValue(destination.Bucket), + } + + if destination.AccountId != nil { + m["account_id"] = aws.StringValue(destination.AccountId) + } + if destination.Prefix != nil { + m["prefix"] = aws.StringValue(destination.Prefix) + } + + if destination.Encryption != nil { + encryption := make(map[string]interface{}, 1) + if destination.Encryption.SSES3 != nil { + encryption["sse_s3"] = []map[string]interface{}{{}} + } else if destination.Encryption.SSEKMS != nil { + encryption["sse_kms"] = []map[string]interface{}{ + { + "key_id": aws.StringValue(destination.Encryption.SSEKMS.KeyId), + }, + } + } + m["encryption"] = []map[string]interface{}{encryption} + } + + result = append(result, m) + + return result +} + +func resourceAwsS3BucketInventoryParseID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("please make sure the ID is in the form BUCKET:NAME (i.e. my-bucket:EntireBucket") + } + bucket := idParts[0] + name := idParts[1] + return bucket, name, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go index 37ed7f137..c67f56b74 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_metric.go @@ -109,14 +109,11 @@ func resourceAwsS3BucketMetricDelete(d *schema.ResourceData, meta interface{}) e _, err = conn.DeleteBucketMetricsConfiguration(input) if err != nil { if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - log.Printf("[WARN] %s S3 bucket metrics configuration not found, removing from state.", d.Id()) - d.SetId("") return nil } return fmt.Errorf("Error deleting S3 metric configuration: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go index f7ba2ac22..4a8b6b14b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_notification.go @@ -346,8 +346,6 @@ func resourceAwsS3BucketNotificationDelete(d *schema.ResourceData, meta interfac return fmt.Errorf("Error deleting S3 notification configuration: %s", err) } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go index f9165eafd..63a3e7d83 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go @@ -106,6 +106,7 @@ func resourceAwsS3BucketObject() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ s3.StorageClassStandard, s3.StorageClassReducedRedundancy, + s3.StorageClassOnezoneIa, s3.StorageClassStandardIa, }, false), }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go new file mode 100644 index 000000000..1ffa093fe --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go @@ -0,0 +1,379 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsSecretsManagerSecret() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecretsManagerSecretCreate, + Read: resourceAwsSecretsManagerSecretRead, + Update: resourceAwsSecretsManagerSecretUpdate, + Delete: resourceAwsSecretsManagerSecretDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "policy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + "recovery_window_in_days": { + Type: schema.TypeInt, + Optional: true, + Default: 30, + ValidateFunc: validation.IntBetween(7, 30), + }, + "rotation_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "rotation_lambda_arn": { + Type: schema.TypeString, + Optional: true, + }, + "rotation_rules": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "automatically_after_days": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.CreateSecretInput{ + Description: aws.String(d.Get("description").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { + input.KmsKeyId = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Secrets Manager Secret: %s", input) + output, err := conn.CreateSecret(input) + if err != nil { + return fmt.Errorf("error creating Secrets Manager Secret: %s", err) + } + + d.SetId(aws.StringValue(output.ARN)) + + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + input := &secretsmanager.PutResourcePolicyInput{ + ResourcePolicy: aws.String(v.(string)), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) + _, err := conn.PutResourcePolicy(input) + if err != nil { + return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } + + if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { + input := &secretsmanager.RotateSecretInput{ + RotationLambdaARN: aws.String(v.(string)), + RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RotateSecret(input) + if err != nil { + // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. + if isAWSErr(err, "AccessDeniedException", "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error enabling Secrets Manager Secret %q rotation: %s", d.Id(), err) + } + } + + if v, ok := d.GetOk("tags"); ok { + input := &secretsmanager.TagResourceInput{ + SecretId: aws.String(d.Id()), + Tags: tagsFromMapSecretsManager(v.(map[string]interface{})), + } + + log.Printf("[DEBUG] Tagging Secrets Manager Secret: %s", input) + _, err := conn.TagResource(input) + if err != nil { + return fmt.Errorf("error tagging Secrets Manager Secret %q: %s", d.Id(), input) + } + } + + return resourceAwsSecretsManagerSecretRead(d, meta) +} + +func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) + output, err := conn.DescribeSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Secrets Manager Secret %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Secrets Manager Secret: %s", err) + } + + d.Set("arn", output.ARN) + d.Set("description", output.Description) + d.Set("kms_key_id", output.KmsKeyId) + d.Set("name", output.Name) + + pIn := &secretsmanager.GetResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) + pOut, err := conn.GetResourcePolicy(pIn) + if err != nil { + return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) + } + + if pOut.ResourcePolicy != nil { + policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) + if err != nil { + return fmt.Errorf("policy contains an invalid JSON: %s", err) + } + d.Set("policy", policy) + } + + d.Set("rotation_enabled", output.RotationEnabled) + + if aws.BoolValue(output.RotationEnabled) { + d.Set("rotation_lambda_arn", output.RotationLambdaARN) + if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { + return fmt.Errorf("error setting rotation_rules: %s", err) + } + } else { + d.Set("rotation_lambda_arn", "") + d.Set("rotation_rules", []interface{}{}) + } + + if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + if d.HasChange("description") || d.HasChange("kms_key_id") { + input := &secretsmanager.UpdateSecretInput{ + Description: aws.String(d.Get("description").(string)), + SecretId: aws.String(d.Id()), + } + + if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { + input.KmsKeyId = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Updating Secrets Manager Secret: %s", input) + _, err := conn.UpdateSecret(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret: %s", err) + } + } + + if d.HasChange("policy") { + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + policy, err := structure.NormalizeJsonString(v.(string)) + if err != nil { + return fmt.Errorf("policy contains an invalid JSON: %s", err) + } + input := &secretsmanager.PutResourcePolicyInput{ + ResourcePolicy: aws.String(policy), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) + _, err = conn.PutResourcePolicy(input) + if err != nil { + return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } else { + input := &secretsmanager.DeleteResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Removing Secrets Manager Secret policy: %s", input) + _, err := conn.DeleteResourcePolicy(input) + if err != nil { + return fmt.Errorf("error removing Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } + } + + if d.HasChange("rotation_lambda_arn") || d.HasChange("rotation_rules") { + if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { + input := &secretsmanager.RotateSecretInput{ + RotationLambdaARN: aws.String(v.(string)), + RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RotateSecret(input) + if err != nil { + // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. + if isAWSErr(err, "AccessDeniedException", "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q rotation: %s", d.Id(), err) + } + } else { + input := &secretsmanager.CancelRotateSecretInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Cancelling Secrets Manager Secret rotation: %s", input) + _, err := conn.CancelRotateSecret(input) + if err != nil { + return fmt.Errorf("error cancelling Secret Manager Secret %q rotation: %s", d.Id(), err) + } + } + } + + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsSecretsManager(tagsFromMapSecretsManager(o), tagsFromMapSecretsManager(n)) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing Secrets Manager Secret %q tags: %#v", d.Id(), remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&secretsmanager.UntagResourceInput{ + SecretId: aws.String(d.Id()), + TagKeys: k, + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating Secrets Manager Secret %q tags: %#v", d.Id(), create) + _, err := conn.TagResource(&secretsmanager.TagResourceInput{ + SecretId: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) + } + } + } + + return resourceAwsSecretsManagerSecretRead(d, meta) +} + +func resourceAwsSecretsManagerSecretDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.DeleteSecretInput{ + RecoveryWindowInDays: aws.Int64(int64(d.Get("recovery_window_in_days").(int))), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Secrets Manager Secret: %s", input) + _, err := conn.DeleteSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Secrets Manager Secret: %s", err) + } + + return nil +} + +func expandSecretsManagerRotationRules(l []interface{}) *secretsmanager.RotationRulesType { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + rules := &secretsmanager.RotationRulesType{ + AutomaticallyAfterDays: aws.Int64(int64(m["automatically_after_days"].(int))), + } + + return rules +} + +func flattenSecretsManagerRotationRules(rules *secretsmanager.RotationRulesType) []interface{} { + if rules == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "automatically_after_days": int(aws.Int64Value(rules.AutomaticallyAfterDays)), + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go new file mode 100644 index 000000000..a65065f03 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go @@ -0,0 +1,205 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSecretsManagerSecretVersion() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecretsManagerSecretVersionCreate, + Read: resourceAwsSecretsManagerSecretVersionRead, + Update: resourceAwsSecretsManagerSecretVersionUpdate, + Delete: resourceAwsSecretsManagerSecretVersionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "secret_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "secret_string": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + }, + "version_id": { + Type: schema.TypeString, + Computed: true, + }, + "version_stages": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsSecretsManagerSecretVersionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + secretID := d.Get("secret_id").(string) + + input := &secretsmanager.PutSecretValueInput{ + SecretId: aws.String(secretID), + SecretString: aws.String(d.Get("secret_string").(string)), + } + + if v, ok := d.GetOk("version_stages"); ok { + input.VersionStages = expandStringList(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Putting Secrets Manager Secret %q value", secretID) + output, err := conn.PutSecretValue(input) + if err != nil { + return fmt.Errorf("error putting Secrets Manager Secret value: %s", err) + } + + d.SetId(fmt.Sprintf("%s|%s", secretID, aws.StringValue(output.VersionId))) + + return resourceAwsSecretsManagerSecretVersionRead(d, meta) +} + +func resourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + VersionId: aws.String(versionID), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) + output, err := conn.GetSecretValue(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) + } + + d.Set("secret_id", secretID) + d.Set("secret_string", output.SecretString) + d.Set("version_id", output.VersionId) + + if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { + return fmt.Errorf("error setting version_stages: %s", err) + } + + return nil +} + +func resourceAwsSecretsManagerSecretVersionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + o, n := d.GetChange("version_stages") + os := o.(*schema.Set) + ns := n.(*schema.Set) + stagesToAdd := ns.Difference(os).List() + stagesToRemove := os.Difference(ns).List() + + for _, stage := range stagesToAdd { + input := &secretsmanager.UpdateSecretVersionStageInput{ + MoveToVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + + for _, stage := range stagesToRemove { + // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. + if stage.(string) == "AWSCURRENT" { + log.Printf("[INFO] Skipping removal of AWSCURRENT staging label for secret %q version %q", secretID, versionID) + continue + } + input := &secretsmanager.UpdateSecretVersionStageInput{ + RemoveFromVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + + return resourceAwsSecretsManagerSecretVersionRead(d, meta) +} + +func resourceAwsSecretsManagerSecretVersionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + if v, ok := d.GetOk("version_stages"); ok { + for _, stage := range v.(*schema.Set).List() { + // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. + if stage.(string) == "AWSCURRENT" { + log.Printf("[WARN] Cannot remove AWSCURRENT staging label, which may leave the secret %q version %q active", secretID, versionID) + continue + } + input := &secretsmanager.UpdateSecretVersionStageInput{ + RemoveFromVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + return nil + } + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + } + + return nil +} + +func decodeSecretsManagerSecretVersionID(id string) (string, string, error) { + idParts := strings.Split(id, "|") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format SecretID|VersionID, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go index 70fe95604..3b5da9805 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go @@ -47,10 +47,11 @@ func resourceAwsSecurityGroup() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(100), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(100), }, "description": { @@ -590,122 +591,83 @@ func resourceAwsSecurityGroupRuleHash(v interface{}) int { func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpPermission, ownerId *string) []map[string]interface{} { ruleMap := make(map[string]map[string]interface{}) for _, perm := range permissions { - var fromPort, toPort int64 - if v := perm.FromPort; v != nil { - fromPort = *v - } - if v := perm.ToPort; v != nil { - toPort = *v - } - - k := fmt.Sprintf("%s-%d-%d", *perm.IpProtocol, fromPort, toPort) - m, ok := ruleMap[k] - if !ok { - m = make(map[string]interface{}) - ruleMap[k] = m - } - - m["from_port"] = fromPort - m["to_port"] = toPort - m["protocol"] = *perm.IpProtocol - - var description string - if len(perm.IpRanges) > 0 { - raw, ok := m["cidr_blocks"] - if !ok { - raw = make([]string, 0, len(perm.IpRanges)) - } - list := raw.([]string) - for _, ip := range perm.IpRanges { - list = append(list, *ip.CidrIp) - desc := aws.StringValue(ip.Description) - if desc != "" { - description = desc - } - } - m["cidr_blocks"] = list + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["cidr_blocks"] + if !ok { + raw = make([]string, 0) + } + list := raw.([]string) + + rule["cidr_blocks"] = append(list, *ip.CidrIp) + } } if len(perm.Ipv6Ranges) > 0 { - raw, ok := m["ipv6_cidr_blocks"] - if !ok { - raw = make([]string, 0, len(perm.Ipv6Ranges)) - } - list := raw.([]string) - for _, ip := range perm.Ipv6Ranges { - list = append(list, *ip.CidrIpv6) - desc := aws.StringValue(ip.Description) - if desc != "" { - description = desc - } - } - m["ipv6_cidr_blocks"] = list + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["ipv6_cidr_blocks"] + if !ok { + raw = make([]string, 0) + } + list := raw.([]string) + + rule["ipv6_cidr_blocks"] = append(list, *ip.CidrIpv6) + } } if len(perm.PrefixListIds) > 0 { - raw, ok := m["prefix_list_ids"] - if !ok { - raw = make([]string, 0, len(perm.PrefixListIds)) - } - list := raw.([]string) - for _, pl := range perm.PrefixListIds { - list = append(list, *pl.PrefixListId) - desc := aws.StringValue(pl.Description) - if desc != "" { - description = desc - } - } - m["prefix_list_ids"] = list + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["prefix_list_ids"] + if !ok { + raw = make([]string, 0) + } + list := raw.([]string) + + rule["prefix_list_ids"] = append(list, *pl.PrefixListId) + } } groups := flattenSecurityGroups(perm.UserIdGroupPairs, ownerId) - for i, g := range groups { - if *g.GroupId == groupId { - groups[i], groups = groups[len(groups)-1], groups[:len(groups)-1] - m["self"] = true - - desc := aws.StringValue(g.Description) - if desc != "" { - description = desc - } - } - } - if len(groups) > 0 { - raw, ok := m["security_groups"] - if !ok { - raw = schema.NewSet(schema.HashString, nil) - } - list := raw.(*schema.Set) - for _, g := range groups { + desc := aws.StringValue(g.Description) + + rule := initSecurityGroupRule(ruleMap, perm, desc) + + if *g.GroupId == groupId { + rule["self"] = true + continue + } + + raw, ok := rule["security_groups"] + if !ok { + raw = schema.NewSet(schema.HashString, nil) + } + list := raw.(*schema.Set) + if g.GroupName != nil { list.Add(*g.GroupName) } else { list.Add(*g.GroupId) } - - desc := aws.StringValue(g.Description) - if desc != "" { - description = desc - } + rule["security_groups"] = list } - - m["security_groups"] = list } - m["description"] = description } + rules := make([]map[string]interface{}, 0, len(ruleMap)) for _, m := range ruleMap { rules = append(rules, m) @@ -727,14 +689,14 @@ func resourceAwsSecurityGroupUpdateRules( n = new(schema.Set) } - os := o.(*schema.Set) - ns := n.(*schema.Set) + os := resourceAwsSecurityGroupExpandRules(o.(*schema.Set)) + ns := resourceAwsSecurityGroupExpandRules(n.(*schema.Set)) - remove, err := expandIPPerms(group, os.Difference(ns).List()) + remove, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, os.Difference(ns).List())) if err != nil { return err } - add, err := expandIPPerms(group, ns.Difference(os).List()) + add, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, ns.Difference(os).List())) if err != nil { return err } @@ -1182,6 +1144,175 @@ func matchRules(rType string, local []interface{}, remote []map[string]interface return saves } +// Duplicate ingress/egress block structure and fill out all +// the required fields +func resourceAwsSecurityGroupCopyRule(src map[string]interface{}, self bool, k string, v interface{}) map[string]interface{} { + var keys_to_copy = []string{"description", "from_port", "to_port", "protocol"} + + dst := make(map[string]interface{}) + for _, key := range keys_to_copy { + if val, ok := src[key]; ok { + dst[key] = val + } + } + if k != "" { + dst[k] = v + } + if _, ok := src["self"]; ok { + dst["self"] = self + } + return dst +} + +// Given a set of SG rules (ingress/egress blocks), this function +// will group the rules by from_port/to_port/protocol/description +// tuples. This is inverse operation of +// resourceAwsSecurityGroupExpandRules() +// +// For more detail, see comments for +// resourceAwsSecurityGroupExpandRules() +func resourceAwsSecurityGroupCollapseRules(ruleset string, rules []interface{}) []interface{} { + + var keys_to_collapse = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} + + collapsed := make(map[string]map[string]interface{}) + + for _, rule := range rules { + r := rule.(map[string]interface{}) + + ruleHash := idCollapseHash(ruleset, r["protocol"].(string), int64(r["to_port"].(int)), int64(r["from_port"].(int)), r["description"].(string)) + + if _, ok := collapsed[ruleHash]; ok { + if v, ok := r["self"]; ok && v.(bool) { + collapsed[ruleHash]["self"] = r["self"] + } + } else { + collapsed[ruleHash] = r + continue + } + + for _, key := range keys_to_collapse { + if _, ok := r[key]; ok { + if _, ok := collapsed[ruleHash][key]; ok { + if key == "security_groups" { + collapsed[ruleHash][key] = collapsed[ruleHash][key].(*schema.Set).Union(r[key].(*schema.Set)) + } else { + collapsed[ruleHash][key] = append(collapsed[ruleHash][key].([]interface{}), r[key].([]interface{})...) + } + } else { + collapsed[ruleHash][key] = r[key] + } + } + } + } + + values := make([]interface{}, 0, len(collapsed)) + for _, val := range collapsed { + values = append(values, val) + } + return values +} + +// resourceAwsSecurityGroupExpandRules works in pair with +// resourceAwsSecurityGroupCollapseRules and is used as a +// workaround for the problem explained in +// https://github.com/terraform-providers/terraform-provider-aws/pull/4726 +// +// This function converts every ingress/egress block that +// contains multiple rules to multiple blocks with only one +// rule. Doing a Difference operation on such a normalized +// set helps to avoid unnecessary removal of unchanged +// rules during the Apply step. +// +// For example, in terraform syntax, the following block: +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ +// "192.168.0.1/32", +// "192.168.0.2/32", +// ] +// } +// +// will be converted to the two blocks below: +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ "192.168.0.1/32" ] +// } +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ "192.168.0.2/32" ] +// } +// +// Then the Difference operation is executed on the new set +// to find which rules got modified, and the resulting set +// is then passed to resourceAwsSecurityGroupCollapseRules +// to convert the "diff" back to a more compact form for +// execution. Such compact form helps reduce the number of +// API calls. +// +func resourceAwsSecurityGroupExpandRules(rules *schema.Set) *schema.Set { + var keys_to_expand = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} + + normalized := schema.NewSet(resourceAwsSecurityGroupRuleHash, nil) + + for _, rawRule := range rules.List() { + rule := rawRule.(map[string]interface{}) + + if v, ok := rule["self"]; ok && v.(bool) { + new_rule := resourceAwsSecurityGroupCopyRule(rule, true, "", nil) + normalized.Add(new_rule) + } + for _, key := range keys_to_expand { + item, exists := rule[key] + if exists { + var list []interface{} + if key == "security_groups" { + list = item.(*schema.Set).List() + } else { + list = item.([]interface{}) + } + for _, v := range list { + var new_rule map[string]interface{} + if key == "security_groups" { + new_v := schema.NewSet(schema.HashString, nil) + new_v.Add(v) + new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) + } else { + new_v := make([]interface{}, 0) + new_v = append(new_v, v) + new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) + } + normalized.Add(new_rule) + } + } + } + } + + return normalized +} + +// Convert type-to_port-from_port-protocol-description tuple +// to a hash to use as a key in Set. +func idCollapseHash(rType, protocol string, toPort, fromPort int64, description string) string { + var buf bytes.Buffer + buf.WriteString(fmt.Sprintf("%s-", rType)) + buf.WriteString(fmt.Sprintf("%d-", toPort)) + buf.WriteString(fmt.Sprintf("%d-", fromPort)) + buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(protocol))) + buf.WriteString(fmt.Sprintf("%s-", description)) + + return fmt.Sprintf("rule-%d", hashcode.String(buf.String())) +} + // Creates a unique hash for the type, ports, and protocol, used as a key in // maps func idHash(rType, protocol string, toPort, fromPort int64, self bool) string { @@ -1339,3 +1470,27 @@ func networkInterfaceAttachedRefreshFunc(conn *ec2.EC2, id string) resource.Stat return eni, hasAttachment, nil } } + +func initSecurityGroupRule(ruleMap map[string]map[string]interface{}, perm *ec2.IpPermission, desc string) map[string]interface{} { + var fromPort, toPort int64 + if v := perm.FromPort; v != nil { + fromPort = *v + } + if v := perm.ToPort; v != nil { + toPort = *v + } + k := fmt.Sprintf("%s-%d-%d-%s", *perm.IpProtocol, fromPort, toPort, desc) + rule, ok := ruleMap[k] + if !ok { + rule = make(map[string]interface{}) + ruleMap[k] = rule + } + rule["protocol"] = *perm.IpProtocol + rule["from_port"] = fromPort + rule["to_port"] = toPort + if desc != "" { + rule["description"] = desc + } + + return rule +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go index 5ab3044c0..77132f4e1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go @@ -354,8 +354,6 @@ func resourceAwsSecurityGroupRuleDelete(d *schema.ResourceData, meta interface{} } } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go index d74458285..da5b0fb3d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go @@ -1,7 +1,6 @@ package aws import ( - "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -47,9 +46,17 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespace() *schema.Resource { func resourceAwsServiceDiscoveryPrivateDnsNamespaceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sdconn - requestId := resource.PrefixedUniqueId(fmt.Sprintf("tf-%s", d.Get("name").(string))) + name := d.Get("name").(string) + // The CreatorRequestId has a limit of 64 bytes + var requestId string + if len(name) > (64 - resource.UniqueIDSuffixLength) { + requestId = resource.PrefixedUniqueId(name[0:(64 - resource.UniqueIDSuffixLength - 1)]) + } else { + requestId = resource.PrefixedUniqueId(name) + } + input := &servicediscovery.CreatePrivateDnsNamespaceInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(name), Vpc: aws.String(d.Get("vpc").(string)), CreatorRequestId: aws.String(requestId), } @@ -127,6 +134,5 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete(d *schema.ResourceData return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go index 33fba76a5..e112dfaf4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go @@ -126,7 +126,6 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceDelete(d *schema.ResourceData, return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go index 38f07bb73..25a8553e5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go @@ -105,6 +105,21 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { }, }, }, + "health_check_custom_config": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "failure_threshold": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + }, + }, + }, "arn": { Type: schema.TypeString, Computed: true, @@ -130,6 +145,11 @@ func resourceAwsServiceDiscoveryServiceCreate(d *schema.ResourceData, meta inter input.HealthCheckConfig = expandServiceDiscoveryHealthCheckConfig(hcconfig[0].(map[string]interface{})) } + healthCustomConfig := d.Get("health_check_custom_config").([]interface{}) + if len(healthCustomConfig) > 0 { + input.HealthCheckCustomConfig = expandServiceDiscoveryHealthCheckCustomConfig(healthCustomConfig[0].(map[string]interface{})) + } + resp, err := conn.CreateService(input) if err != nil { return err @@ -163,6 +183,7 @@ func resourceAwsServiceDiscoveryServiceRead(d *schema.ResourceData, meta interfa d.Set("description", service.Description) d.Set("dns_config", flattenServiceDiscoveryDnsConfig(service.DnsConfig)) d.Set("health_check_config", flattenServiceDiscoveryHealthCheckConfig(service.HealthCheckConfig)) + d.Set("health_check_custom_config", flattenServiceDiscoveryHealthCheckCustomConfig(service.HealthCheckCustomConfig)) return nil } @@ -322,3 +343,33 @@ func flattenServiceDiscoveryHealthCheckConfig(config *servicediscovery.HealthChe return []map[string]interface{}{result} } + +func expandServiceDiscoveryHealthCheckCustomConfig(configured map[string]interface{}) *servicediscovery.HealthCheckCustomConfig { + if len(configured) < 1 { + return nil + } + result := &servicediscovery.HealthCheckCustomConfig{} + + if v, ok := configured["failure_threshold"]; ok && v.(int) != 0 { + result.FailureThreshold = aws.Int64(int64(v.(int))) + } + + return result +} + +func flattenServiceDiscoveryHealthCheckCustomConfig(config *servicediscovery.HealthCheckCustomConfig) []map[string]interface{} { + if config == nil { + return nil + } + result := map[string]interface{}{} + + if config.FailureThreshold != nil { + result["failure_threshold"] = *config.FailureThreshold + } + + if len(result) < 1 { + return nil + } + + return []map[string]interface{}{result} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go new file mode 100644 index 000000000..c7b546723 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_identity_verification.go @@ -0,0 +1,124 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSesDomainIdentityVerification() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSesDomainIdentityVerificationCreate, + Read: resourceAwsSesDomainIdentityVerificationRead, + Delete: resourceAwsSesDomainIdentityVerificationDelete, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + StateFunc: func(v interface{}) string { + return strings.TrimSuffix(v.(string), ".") + }, + }, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(45 * time.Minute), + }, + } +} + +func getAwsSesIdentityVerificationAttributes(conn *ses.SES, domainName string) (*ses.IdentityVerificationAttributes, error) { + input := &ses.GetIdentityVerificationAttributesInput{ + Identities: []*string{ + aws.String(domainName), + }, + } + + response, err := conn.GetIdentityVerificationAttributes(input) + if err != nil { + return nil, fmt.Errorf("Error getting identity verification attributes: %s", err) + } + + return response.VerificationAttributes[domainName], nil +} + +func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + domainName := strings.TrimSuffix(d.Get("domain").(string), ".") + err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) + if err != nil { + return resource.NonRetryableError(fmt.Errorf("Error getting identity verification attributes: %s", err)) + } + + if att == nil { + return resource.NonRetryableError(fmt.Errorf("SES Domain Identity %s not found in AWS", domainName)) + } + + if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { + return resource.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", aws.StringValue(att.VerificationStatus))) + } + + return nil + }) + if err != nil { + return err + } + + log.Printf("[INFO] Domain verification successful for %s", domainName) + d.SetId(domainName) + return resourceAwsSesDomainIdentityVerificationRead(d, meta) +} + +func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Id() + d.Set("domain", domainName) + + att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) + if err != nil { + log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) + return err + } + + if att == nil { + log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { + log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", aws.StringValue(att.VerificationStatus)) + d.SetId("") + return nil + } + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ses", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("identity/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return nil +} + +func resourceAwsSesDomainIdentityVerificationDelete(d *schema.ResourceData, meta interface{}) error { + // No need to do anything, domain identity will be deleted when aws_ses_domain_identity is deleted + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go index ac2f1c53a..00adb0644 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go @@ -91,7 +91,16 @@ func resourceAwsSesNotificationTopicRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error reading SES Identity Notification Topic: %s", err) } - notificationAttributes := response.NotificationAttributes[identity] + d.Set("topic_arn", "") + if response == nil { + return nil + } + + notificationAttributes, notificationAttributesOk := response.NotificationAttributes[identity] + if !notificationAttributesOk { + return nil + } + switch notificationType { case ses.NotificationTypeBounce: d.Set("topic_arn", notificationAttributes.BounceTopic) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go index 912620acd..383ab5b4e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/ses" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSesReceiptRule() *schema.Resource { @@ -225,8 +226,9 @@ func resourceAwsSesReceiptRule() *schema.Resource { }, "position": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(1), }, }, }, @@ -683,9 +685,15 @@ func buildReceiptRule(d *schema.ResourceData, meta interface{}) *ses.ReceiptRule elem := element.(map[string]interface{}) s3Action := &ses.S3Action{ - BucketName: aws.String(elem["bucket_name"].(string)), - KmsKeyArn: aws.String(elem["kms_key_arn"].(string)), - ObjectKeyPrefix: aws.String(elem["object_key_prefix"].(string)), + BucketName: aws.String(elem["bucket_name"].(string)), + } + + if elem["kms_key_arn"] != "" { + s3Action.KmsKeyArn = aws.String(elem["kms_key_arn"].(string)) + } + + if elem["object_key_prefix"] != "" { + s3Action.ObjectKeyPrefix = aws.String(elem["object_key_prefix"].(string)) } if elem["topic_arn"] != "" { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go index 8450342e3..1c467a5d3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_simpledb_domain.go @@ -79,6 +79,5 @@ func resourceAwsSimpleDBDomainDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Delete SimpleDB Domain failed: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go new file mode 100644 index 000000000..6892ec250 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_sms_preferences.go @@ -0,0 +1,166 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sns" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func validateMonthlySpend(v interface{}, k string) (ws []string, errors []error) { + vInt, _ := strconv.Atoi(v.(string)) + if vInt < 0 { + errors = append(errors, fmt.Errorf("Error setting SMS preferences: monthly spend limit value [%d] must be >= 0!", vInt)) + } + return +} + +func validateDeliverySamplingRate(v interface{}, k string) (ws []string, errors []error) { + vInt, _ := strconv.Atoi(v.(string)) + if vInt < 0 || vInt > 100 { + errors = append(errors, fmt.Errorf("Error setting SMS preferences: default percentage of success to sample value [%d] must be between 0 and 100!", vInt)) + } + return +} + +func resourceAwsSnsSmsPreferences() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSnsSmsPreferencesSet, + Read: resourceAwsSnsSmsPreferencesGet, + Update: resourceAwsSnsSmsPreferencesSet, + Delete: resourceAwsSnsSmsPreferencesDelete, + + Schema: map[string]*schema.Schema{ + "monthly_spend_limit": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateMonthlySpend, + }, + + "delivery_status_iam_role_arn": { + Type: schema.TypeString, + Optional: true, + }, + + "delivery_status_success_sampling_rate": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateDeliverySamplingRate, + }, + + "default_sender_id": { + Type: schema.TypeString, + Optional: true, + }, + + "default_sms_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Promotional", "Transactional"}, false), + }, + + "usage_report_s3_bucket": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +const resourceId = "aws_sns_sms_id" + +var smsAttributeMap = map[string]string{ + "monthly_spend_limit": "MonthlySpendLimit", + "delivery_status_iam_role_arn": "DeliveryStatusIAMRole", + "delivery_status_success_sampling_rate": "DeliveryStatusSuccessSamplingRate", + "default_sender_id": "DefaultSenderID", + "default_sms_type": "DefaultSMSType", + "usage_report_s3_bucket": "UsageReportS3Bucket", +} + +var smsAttributeDefaultValues = map[string]string{ + "monthly_spend_limit": "", + "delivery_status_iam_role_arn": "", + "delivery_status_success_sampling_rate": "", + "default_sender_id": "", + "default_sms_type": "", + "usage_report_s3_bucket": "", +} + +func resourceAwsSnsSmsPreferencesSet(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + log.Printf("[DEBUG] SNS Set SMS preferences") + + monthlySpendLimit := d.Get("monthly_spend_limit").(string) + deliveryStatusIamRoleArn := d.Get("delivery_status_iam_role_arn").(string) + deliveryStatusSuccessSamplingRate := d.Get("delivery_status_success_sampling_rate").(string) + defaultSenderId := d.Get("default_sender_id").(string) + defaultSmsType := d.Get("default_sms_type").(string) + usageReportS3Bucket := d.Get("usage_report_s3_bucket").(string) + + // Set preferences + params := &sns.SetSMSAttributesInput{ + Attributes: map[string]*string{ + "MonthlySpendLimit": aws.String(monthlySpendLimit), + "DeliveryStatusIAMRole": aws.String(deliveryStatusIamRoleArn), + "DeliveryStatusSuccessSamplingRate": aws.String(deliveryStatusSuccessSamplingRate), + "DefaultSenderID": aws.String(defaultSenderId), + "DefaultSMSType": aws.String(defaultSmsType), + "UsageReportS3Bucket": aws.String(usageReportS3Bucket), + }, + } + + if _, err := snsconn.SetSMSAttributes(params); err != nil { + return fmt.Errorf("Error setting SMS preferences: %s", err) + } + + d.SetId(resourceId) + return nil +} + +func resourceAwsSnsSmsPreferencesGet(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + // Fetch ALL attributes + attrs, err := snsconn.GetSMSAttributes(&sns.GetSMSAttributesInput{}) + if err != nil { + return err + } + + // Reset with default values first + for tfAttrName, defValue := range smsAttributeDefaultValues { + d.Set(tfAttrName, defValue) + } + + // Apply existing settings + if attrs.Attributes != nil && len(attrs.Attributes) > 0 { + attrmap := attrs.Attributes + for tfAttrName, snsAttrName := range smsAttributeMap { + d.Set(tfAttrName, attrmap[snsAttrName]) + } + } + + return nil +} + +func resourceAwsSnsSmsPreferencesDelete(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + // Reset the attributes to their default value + attrs := map[string]*string{} + for tfAttrName, defValue := range smsAttributeDefaultValues { + attrs[smsAttributeMap[tfAttrName]] = &defValue + } + + params := &sns.SetSMSAttributesInput{Attributes: attrs} + if _, err := snsconn.SetSMSAttributes(params); err != nil { + return fmt.Errorf("Error resetting SMS preferences: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go index 7818c94a6..055202ebf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go @@ -52,9 +52,10 @@ func resourceAwsSnsTopic() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "display_name": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go index a9692f956..d794d09c5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go @@ -25,6 +25,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), }, SchemaVersion: 1, @@ -190,6 +191,11 @@ func resourceAwsSpotFleetRequest() *schema.Resource { ForceNew: true, Optional: true, }, + "iam_instance_profile_arn": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + }, "ami": { Type: schema.TypeString, Required: true, @@ -293,7 +299,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { }, "spot_price": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, "terminate_instances_with_expiration": { @@ -302,14 +308,26 @@ func resourceAwsSpotFleetRequest() *schema.Resource { ForceNew: true, }, "valid_from": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, }, "valid_until": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, + }, + "fleet_type": { Type: schema.TypeString, Optional: true, + Default: ec2.FleetTypeMaintain, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.FleetTypeMaintain, + ec2.FleetTypeRequest, + }, false), }, "spot_request_state": { Type: schema.TypeString, @@ -375,6 +393,12 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ } } + if v, ok := d["iam_instance_profile_arn"]; ok && v.(string) != "" { + opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ + Arn: aws.String(v.(string)), + } + } + if v, ok := d["user_data"]; ok { opts.UserData = aws.String(base64Encode([]byte(v.(string)))) } @@ -581,12 +605,12 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) spotFleetConfig := &ec2.SpotFleetRequestConfigData{ IamFleetRole: aws.String(d.Get("iam_fleet_role").(string)), LaunchSpecifications: launch_specs, - SpotPrice: aws.String(d.Get("spot_price").(string)), TargetCapacity: aws.Int64(int64(d.Get("target_capacity").(int))), ClientToken: aws.String(resource.UniqueId()), TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), + Type: aws.String(d.Get("fleet_type").(string)), } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { @@ -599,23 +623,27 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) spotFleetConfig.AllocationStrategy = aws.String("lowestPrice") } + if v, ok := d.GetOk("spot_price"); ok && v.(string) != "" { + spotFleetConfig.SpotPrice = aws.String(v.(string)) + } + if v, ok := d.GetOk("valid_from"); ok { - valid_from, err := time.Parse(awsAutoscalingScheduleTimeLayout, v.(string)) + valid_from, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotFleetConfig.ValidFrom = &valid_from + spotFleetConfig.ValidFrom = aws.Time(valid_from) } if v, ok := d.GetOk("valid_until"); ok { - valid_until, err := time.Parse(awsAutoscalingScheduleTimeLayout, v.(string)) + valid_until, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotFleetConfig.ValidUntil = &valid_until + spotFleetConfig.ValidUntil = aws.Time(valid_until) } else { valid_until := time.Now().Add(24 * time.Hour) - spotFleetConfig.ValidUntil = &valid_until + spotFleetConfig.ValidUntil = aws.Time(valid_until) } if v, ok := d.GetOk("load_balancers"); ok && v.(*schema.Set).Len() > 0 { @@ -879,16 +907,17 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e if config.ValidFrom != nil { d.Set("valid_from", - aws.TimeValue(config.ValidFrom).Format(awsAutoscalingScheduleTimeLayout)) + aws.TimeValue(config.ValidFrom).Format(time.RFC3339)) } if config.ValidUntil != nil { d.Set("valid_until", - aws.TimeValue(config.ValidUntil).Format(awsAutoscalingScheduleTimeLayout)) + aws.TimeValue(config.ValidUntil).Format(time.RFC3339)) } d.Set("replace_unhealthy_instances", config.ReplaceUnhealthyInstances) d.Set("instance_interruption_behaviour", config.InstanceInterruptionBehavior) + d.Set("fleet_type", config.Type) d.Set("launch_specification", launchSpecsToSet(config.LaunchSpecifications, conn)) return nil @@ -938,6 +967,10 @@ func launchSpecToMap(l *ec2.SpotFleetLaunchSpecification, rootDevName *string) m m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Name) } + if l.IamInstanceProfile != nil && l.IamInstanceProfile.Arn != nil { + m["iam_instance_profile_arn"] = aws.StringValue(l.IamInstanceProfile.Arn) + } + if l.UserData != nil { m["user_data"] = userDataHashSum(aws.StringValue(l.UserData)) } @@ -1118,25 +1151,21 @@ func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) terminateInstances := d.Get("terminate_instances_with_expiration").(bool) log.Printf("[INFO] Cancelling spot fleet request: %s", d.Id()) - resp, err := conn.CancelSpotFleetRequests(&ec2.CancelSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(d.Id())}, + err := deleteSpotFleetRequest(d.Id(), terminateInstances, d.Timeout(schema.TimeoutDelete), conn) + if err != nil { + return fmt.Errorf("error deleting spot request (%s): %s", d.Id(), err) + } + + return nil +} + +func deleteSpotFleetRequest(spotFleetRequestID string, terminateInstances bool, timeout time.Duration, conn *ec2.EC2) error { + _, err := conn.CancelSpotFleetRequests(&ec2.CancelSpotFleetRequestsInput{ + SpotFleetRequestIds: []*string{aws.String(spotFleetRequestID)}, TerminateInstances: aws.Bool(terminateInstances), }) - if err != nil { - return fmt.Errorf("Error cancelling spot request (%s): %s", d.Id(), err) - } - - // check response successfulFleetRequestSet to make sure our request was canceled - var found bool - for _, s := range resp.SuccessfulFleetRequests { - if *s.SpotFleetRequestId == d.Id() { - found = true - } - } - - if !found { - return fmt.Errorf("[ERR] Spot Fleet request (%s) was not found to be successfully canceled, dangling resources may exit", d.Id()) + return err } // Only wait for instance termination if requested @@ -1144,20 +1173,20 @@ func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) return nil } - return resource.Retry(5*time.Minute, func() *resource.RetryError { + return resource.Retry(timeout, func() *resource.RetryError { resp, err := conn.DescribeSpotFleetInstances(&ec2.DescribeSpotFleetInstancesInput{ - SpotFleetRequestId: aws.String(d.Id()), + SpotFleetRequestId: aws.String(spotFleetRequestID), }) if err != nil { return resource.NonRetryableError(err) } if len(resp.ActiveInstances) == 0 { - log.Printf("[DEBUG] Active instance count is 0 for Spot Fleet Request (%s), removing", d.Id()) + log.Printf("[DEBUG] Active instance count is 0 for Spot Fleet Request (%s), removing", spotFleetRequestID) return nil } - log.Printf("[DEBUG] Active instance count in Spot Fleet Request (%s): %d", d.Id(), len(resp.ActiveInstances)) + log.Printf("[DEBUG] Active instance count in Spot Fleet Request (%s): %d", spotFleetRequestID, len(resp.ActiveInstances)) return resource.RetryableError( fmt.Errorf("fleet still has (%d) running instances", len(resp.ActiveInstances))) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go index 1184c53a5..5a0dbeabc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSpotInstanceRequest() *schema.Resource { @@ -43,7 +44,7 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { s["spot_price"] = &schema.Schema{ Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, } s["spot_type"] = &schema.Schema{ @@ -81,8 +82,27 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { s["instance_interruption_behaviour"] = &schema.Schema{ Type: schema.TypeString, Optional: true, - Default: "terminate", + Default: ec2.InstanceInterruptionBehaviorTerminate, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceInterruptionBehaviorTerminate, + ec2.InstanceInterruptionBehaviorStop, + ec2.InstanceInterruptionBehaviorHibernate, + }, false), + } + s["valid_from"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, + Computed: true, + } + s["valid_until"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, + Computed: true, } return s }(), @@ -115,7 +135,6 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface ImageId: instanceOpts.ImageID, InstanceType: instanceOpts.InstanceType, KeyName: instanceOpts.KeyName, - Placement: instanceOpts.SpotPlacement, SecurityGroupIds: instanceOpts.SecurityGroupIDs, SecurityGroups: instanceOpts.SecurityGroups, SubnetId: instanceOpts.SubnetID, @@ -132,6 +151,27 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface spotOpts.LaunchGroup = aws.String(v.(string)) } + if v, ok := d.GetOk("valid_from"); ok { + valid_from, err := time.Parse(time.RFC3339, v.(string)) + if err != nil { + return err + } + spotOpts.ValidFrom = aws.Time(valid_from) + } + + if v, ok := d.GetOk("valid_until"); ok { + valid_until, err := time.Parse(time.RFC3339, v.(string)) + if err != nil { + return err + } + spotOpts.ValidUntil = aws.Time(valid_until) + } + + // Placement GroupName can only be specified when instanceInterruptionBehavior is not set or set to 'terminate' + if v, exists := d.GetOkExists("instance_interruption_behaviour"); v.(string) == ec2.InstanceInterruptionBehaviorTerminate || !exists { + spotOpts.LaunchSpecification.Placement = instanceOpts.SpotPlacement + } + // Make the spot instance request log.Printf("[DEBUG] Requesting spot bid opts: %s", spotOpts) @@ -236,6 +276,8 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("block_duration_minutes", request.BlockDurationMinutes) d.Set("tags", tagsToMap(request.Tags)) d.Set("instance_interruption_behaviour", request.InstanceInterruptionBehavior) + d.Set("valid_from", aws.TimeValue(request.ValidFrom).Format(time.RFC3339)) + d.Set("valid_until", aws.TimeValue(request.ValidUntil).Format(time.RFC3339)) return nil } @@ -309,6 +351,17 @@ func readInstance(d *schema.ResourceData, meta interface{}) error { if err := d.Set("ipv6_addresses", ipv6Addresses); err != nil { log.Printf("[WARN] Error setting ipv6_addresses for AWS Spot Instance (%s): %s", d.Id(), err) } + + if d.Get("get_password_data").(bool) { + passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) + if err != nil { + return err + } + d.Set("password_data", passwordData) + } else { + d.Set("get_password_data", false) + d.Set("password_data", nil) + } } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index 795a0254d..51f02971a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go @@ -56,9 +56,10 @@ func resourceAwsSqsQueue() *schema.Resource { ValidateFunc: validateSQSQueueName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "delay_seconds": { Type: schema.TypeInt, @@ -134,15 +135,20 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { sqsconn := meta.(*AWSClient).sqsconn var name string + + fq := d.Get("fifo_queue").(bool) + if v, ok := d.GetOk("name"); ok { name = v.(string) } else if v, ok := d.GetOk("name_prefix"); ok { name = resource.PrefixedUniqueId(v.(string)) + if fq { + name += ".fifo" + } } else { name = resource.UniqueId() } - fq := d.Get("fifo_queue").(bool) cbd := d.Get("content_based_deduplication").(bool) if fq { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go index 23f7facad..73ea866f1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go @@ -141,6 +141,7 @@ func resourceAwsSsmDocument() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } @@ -181,6 +182,10 @@ func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Not setting permissions for %q", d.Id()) } + if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { + return fmt.Errorf("error setting SSM Document tags: %s", err) + } + return resourceAwsSsmDocumentRead(d, meta) } @@ -225,6 +230,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error Partition: meta.(*AWSClient).partition, Service: "ssm", Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("document/%s", *doc.Name), }.String() if err := d.Set("arn", arn); err != nil { @@ -270,10 +276,26 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error return err } + tagList, err := ssmconn.ListTagsForResource(&ssm.ListTagsForResourceInput{ + ResourceId: aws.String(d.Id()), + ResourceType: aws.String(ssm.ResourceTypeForTaggingDocument), + }) + if err != nil { + return fmt.Errorf("error listing SSM Document tags for %s: %s", d.Id(), err) + } + d.Set("tags", tagsToMapSSM(tagList.TagList)) + return nil } func resourceAwsSsmDocumentUpdate(d *schema.ResourceData, meta interface{}) error { + ssmconn := meta.(*AWSClient).ssmconn + + if d.HasChange("tags") { + if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { + return fmt.Errorf("error setting SSM Document tags: %s", err) + } + } if _, ok := d.GetOk("permissions"); ok { if err := setDocumentPermissions(d, meta); err != nil { @@ -347,8 +369,6 @@ func resourceAwsSsmDocumentDelete(d *schema.ResourceData, meta interface{}) erro return err } - d.SetId("") - return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go index 8f509be04..19f8369d0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go @@ -72,16 +72,18 @@ func resourceAwsSsmParameter() *schema.Resource { func resourceAwsSmmParameterExists(d *schema.ResourceData, meta interface{}) (bool, error) { ssmconn := meta.(*AWSClient).ssmconn - - resp, err := ssmconn.GetParameters(&ssm.GetParametersInput{ - Names: []*string{aws.String(d.Id())}, - WithDecryption: aws.Bool(true), + _, err := ssmconn.GetParameter(&ssm.GetParameterInput{ + Name: aws.String(d.Id()), + WithDecryption: aws.Bool(false), }) - if err != nil { + if isAWSErr(err, ssm.ErrCodeParameterNotFound, "") { + return false, nil + } return false, err } - return len(resp.InvalidParameters) == 0, nil + + return true, nil } func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { @@ -89,48 +91,40 @@ func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Reading SSM Parameter: %s", d.Id()) - resp, err := ssmconn.GetParameters(&ssm.GetParametersInput{ - Names: []*string{aws.String(d.Id())}, + resp, err := ssmconn.GetParameter(&ssm.GetParameterInput{ + Name: aws.String(d.Id()), WithDecryption: aws.Bool(true), }) if err != nil { return fmt.Errorf("error getting SSM parameter: %s", err) } - if len(resp.Parameters) == 0 { - log.Printf("[WARN] SSM Param %q not found, removing from state", d.Id()) - d.SetId("") - return nil - } - param := resp.Parameters[0] + param := resp.Parameter d.Set("name", param.Name) d.Set("type", param.Type) d.Set("value", param.Value) describeParamsInput := &ssm.DescribeParametersInput{ - Filters: []*ssm.ParametersFilter{ - &ssm.ParametersFilter{ + ParameterFilters: []*ssm.ParameterStringFilter{ + &ssm.ParameterStringFilter{ Key: aws.String("Name"), + Option: aws.String("Equals"), Values: []*string{aws.String(d.Get("name").(string))}, }, }, } - detailedParameters := []*ssm.ParameterMetadata{} - err = ssmconn.DescribeParametersPages(describeParamsInput, - func(page *ssm.DescribeParametersOutput, lastPage bool) bool { - detailedParameters = append(detailedParameters, page.Parameters...) - return !lastPage - }) + describeResp, err := ssmconn.DescribeParameters(describeParamsInput) if err != nil { return fmt.Errorf("error describing SSM parameter: %s", err) } - if len(detailedParameters) == 0 { - log.Printf("[WARN] SSM Param %q not found, removing from state", d.Id()) + + if describeResp == nil || len(describeResp.Parameters) == 0 || describeResp.Parameters[0] == nil { + log.Printf("[WARN] SSM Parameter %q not found, removing from state", d.Id()) d.SetId("") return nil } - detail := detailedParameters[0] + detail := describeResp.Parameters[0] d.Set("key_id", detail.KeyId) d.Set("description", detail.Description) d.Set("allowed_pattern", detail.AllowedPattern) @@ -167,7 +161,6 @@ func resourceAwsSsmParameterDelete(d *schema.ResourceData, meta interface{}) err if err != nil { return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go index db7edab03..be14b7509 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go @@ -24,6 +24,7 @@ var ssmPatchOSs = []string{ ssm.OperatingSystemAmazonLinux, ssm.OperatingSystemUbuntu, ssm.OperatingSystemRedhatEnterpriseLinux, + ssm.OperatingSystemCentos, } func resourceAwsSsmPatchBaseline() *schema.Resource { @@ -80,6 +81,12 @@ func resourceAwsSsmPatchBaseline() *schema.Resource { ValidateFunc: validation.StringInSlice(ssmPatchComplianceLevels, false), }, + "enable_non_security": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "patch_filter": { Type: schema.TypeList, Required: true, @@ -327,9 +334,10 @@ func expandAwsSsmPatchRuleGroup(d *schema.ResourceData) *ssm.PatchRuleGroup { } rule := &ssm.PatchRule{ - ApproveAfterDays: aws.Int64(int64(rCfg["approve_after_days"].(int))), - PatchFilterGroup: filterGroup, - ComplianceLevel: aws.String(rCfg["compliance_level"].(string)), + ApproveAfterDays: aws.Int64(int64(rCfg["approve_after_days"].(int))), + PatchFilterGroup: filterGroup, + ComplianceLevel: aws.String(rCfg["compliance_level"].(string)), + EnableNonSecurity: aws.Bool(rCfg["enable_non_security"].(bool)), } rules = append(rules, rule) @@ -351,6 +359,7 @@ func flattenAwsSsmPatchRuleGroup(group *ssm.PatchRuleGroup) []map[string]interfa r := make(map[string]interface{}) r["approve_after_days"] = *rule.ApproveAfterDays r["compliance_level"] = *rule.ComplianceLevel + r["enable_non_security"] = *rule.EnableNonSecurity r["patch_filter"] = flattenAwsSsmPatchFilterGroup(rule.PatchFilterGroup) result = append(result, r) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go new file mode 100644 index 000000000..fca86b9f9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_storagegateway_gateway.go @@ -0,0 +1,286 @@ +package aws + +import ( + "fmt" + "log" + "net" + "net/http" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsStorageGatewayGateway() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsStorageGatewayGatewayCreate, + Read: resourceAwsStorageGatewayGatewayRead, + Update: resourceAwsStorageGatewayGatewayUpdate, + Delete: resourceAwsStorageGatewayGatewayDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "activation_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"gateway_ip_address"}, + }, + "gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_ip_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"activation_key"}, + }, + "gateway_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + "gateway_timezone": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + "gateway_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "STORED", + ValidateFunc: validation.StringInSlice([]string{ + "CACHED", + "FILE_S3", + "STORED", + "VTL", + }, false), + }, + "medium_changer_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "AWS-Gateway-VTL", + "STK-L700", + }, false), + }, + "tape_drive_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "IBM-ULT3580-TD5", + }, false), + }, + }, + } +} + +func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + region := meta.(*AWSClient).region + + activationKey := d.Get("activation_key").(string) + gatewayIpAddress := d.Get("gateway_ip_address").(string) + + // Perform one time fetch of activation key from gateway IP address + if activationKey == "" { + if gatewayIpAddress == "" { + return fmt.Errorf("either activation_key or gateway_ip_address must be provided") + } + + client := &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + Timeout: time.Second * 10, + } + + requestURL := fmt.Sprintf("http://%s/?activationRegion=%s", gatewayIpAddress, region) + log.Printf("[DEBUG] Creating HTTP request: %s", requestURL) + request, err := http.NewRequest("GET", requestURL, nil) + if err != nil { + return fmt.Errorf("error creating HTTP request: %s", err) + } + + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + log.Printf("[DEBUG] Making HTTP request: %s", request.URL.String()) + response, err := client.Do(request) + if err != nil { + if err, ok := err.(net.Error); ok { + errMessage := fmt.Errorf("error making HTTP request: %s", err) + log.Printf("[DEBUG] retryable %s", errMessage) + return resource.RetryableError(errMessage) + } + return resource.NonRetryableError(fmt.Errorf("error making HTTP request: %s", err)) + } + + log.Printf("[DEBUG] Received HTTP response: %#v", response) + if response.StatusCode != 302 { + return resource.NonRetryableError(fmt.Errorf("expected HTTP status code 302, received: %d", response.StatusCode)) + } + + redirectURL, err := response.Location() + if err != nil { + return resource.NonRetryableError(fmt.Errorf("error extracting HTTP Location header: %s", err)) + } + + activationKey = redirectURL.Query().Get("activationKey") + + return nil + }) + if err != nil { + return fmt.Errorf("error retrieving activation key from IP Address (%s): %s", gatewayIpAddress, err) + } + if activationKey == "" { + return fmt.Errorf("empty activationKey received from IP Address: %s", gatewayIpAddress) + } + } + + input := &storagegateway.ActivateGatewayInput{ + ActivationKey: aws.String(activationKey), + GatewayRegion: aws.String(region), + GatewayName: aws.String(d.Get("gateway_name").(string)), + GatewayTimezone: aws.String(d.Get("gateway_timezone").(string)), + GatewayType: aws.String(d.Get("gateway_type").(string)), + } + + if v, ok := d.GetOk("medium_changer_type"); ok { + input.MediumChangerType = aws.String(v.(string)) + } + + if v, ok := d.GetOk("tape_drive_type"); ok { + input.TapeDriveType = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Activating Storage Gateway Gateway: %s", input) + output, err := conn.ActivateGateway(input) + if err != nil { + return fmt.Errorf("error activating Storage Gateway Gateway: %s", err) + } + + d.SetId(aws.StringValue(output.GatewayARN)) + + // Gateway activations can take a few minutes + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + _, err := conn.DescribeGatewayInformation(&storagegateway.DescribeGatewayInformationInput{ + GatewayARN: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, storagegateway.ErrorCodeGatewayNotConnected, "") { + return resource.RetryableError(err) + } + if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + return fmt.Errorf("error waiting for Storage Gateway Gateway activation: %s", err) + } + + return resourceAwsStorageGatewayGatewayRead(d, meta) +} + +func resourceAwsStorageGatewayGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + input := &storagegateway.DescribeGatewayInformationInput{ + GatewayARN: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Storage Gateway Gateway: %s", input) + output, err := conn.DescribeGatewayInformation(input) + if err != nil { + if isAWSErrStorageGatewayGatewayNotFound(err) { + log.Printf("[WARN] Storage Gateway Gateway %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Storage Gateway Gateway: %s", err) + } + + // The Storage Gateway API currently provides no way to read this value + d.Set("activation_key", d.Get("activation_key").(string)) + d.Set("arn", output.GatewayARN) + d.Set("gateway_id", output.GatewayId) + // The Storage Gateway API currently provides no way to read this value + d.Set("gateway_ip_address", d.Get("gateway_ip_address").(string)) + d.Set("gateway_name", output.GatewayName) + d.Set("gateway_timezone", output.GatewayTimezone) + d.Set("gateway_type", output.GatewayType) + // The Storage Gateway API currently provides no way to read this value + d.Set("medium_changer_type", d.Get("medium_changer_type").(string)) + // The Storage Gateway API currently provides no way to read this value + d.Set("tape_drive_type", d.Get("tape_drive_type").(string)) + + return nil +} + +func resourceAwsStorageGatewayGatewayUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + input := &storagegateway.UpdateGatewayInformationInput{ + GatewayARN: aws.String(d.Id()), + GatewayName: aws.String(d.Get("gateway_name").(string)), + GatewayTimezone: aws.String(d.Get("gateway_timezone").(string)), + } + + log.Printf("[DEBUG] Updating Storage Gateway Gateway: %s", input) + _, err := conn.UpdateGatewayInformation(input) + if err != nil { + return fmt.Errorf("error updating Storage Gateway Gateway: %s", err) + } + + return resourceAwsStorageGatewayGatewayRead(d, meta) +} + +func resourceAwsStorageGatewayGatewayDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + input := &storagegateway.DeleteGatewayInput{ + GatewayARN: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Storage Gateway Gateway: %s", input) + _, err := conn.DeleteGateway(input) + if err != nil { + if isAWSErrStorageGatewayGatewayNotFound(err) { + return nil + } + return fmt.Errorf("error deleting Storage Gateway Gateway: %s", err) + } + + return nil +} + +// The API returns multiple responses for a missing gateway +func isAWSErrStorageGatewayGatewayNotFound(err error) bool { + if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway was not found.") { + return true + } + if isAWSErr(err, storagegateway.ErrorCodeGatewayNotFound, "") { + return true + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go new file mode 100644 index 000000000..5e2544966 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_swf_domain.go @@ -0,0 +1,140 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/swf" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSwfDomain() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSwfDomainCreate, + Read: resourceAwsSwfDomainRead, + Delete: resourceAwsSwfDomainDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "workflow_execution_retention_period_in_days": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value, err := strconv.Atoi(v.(string)) + if err != nil || value > 90 || value < 0 { + es = append(es, fmt.Errorf( + "%q must be between 0 and 90 days inclusive", k)) + } + return + }, + }, + }, + } +} + +func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + var name string + + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + + input := &swf.RegisterDomainInput{ + Name: aws.String(name), + WorkflowExecutionRetentionPeriodInDays: aws.String(d.Get("workflow_execution_retention_period_in_days").(string)), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.RegisterDomain(input) + if err != nil { + return err + } + + d.SetId(name) + + return resourceAwsSwfDomainRead(d, meta) +} + +func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + input := &swf.DescribeDomainInput{ + Name: aws.String(d.Id()), + } + + resp, err := conn.DescribeDomain(input) + if err != nil { + if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { + log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading SWF Domain: %s", err) + } + + if resp == nil || resp.Configuration == nil || resp.DomainInfo == nil { + log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resp.DomainInfo.Name) + d.Set("description", resp.DomainInfo.Description) + d.Set("workflow_execution_retention_period_in_days", resp.Configuration.WorkflowExecutionRetentionPeriodInDays) + + return nil +} + +func resourceAwsSwfDomainDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + input := &swf.DeprecateDomainInput{ + Name: aws.String(d.Get("name").(string)), + } + + _, err := conn.DeprecateDomain(input) + if err != nil { + if isAWSErr(err, swf.ErrCodeDomainDeprecatedFault, "") { + return nil + } + if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { + return nil + } + return fmt.Errorf("error deleting SWF Domain: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go index 7049fa61c..d9ea8bb97 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go @@ -213,8 +213,6 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).ec2conn if _, ok := d.GetOk("skip_destroy"); ok { - log.Printf("[INFO] Found skip_destroy to be true, removing attachment %q from state", d.Id()) - d.SetId("") return nil } @@ -250,7 +248,7 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) "Error waiting for Volume (%s) to detach from Instance: %s", vID, iID) } - d.SetId("") + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go index 9fa19f159..73a9defe4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go @@ -6,10 +6,12 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsVpc() *schema.Resource { @@ -21,6 +23,7 @@ func resourceAwsVpc() *schema.Resource { Importer: &schema.ResourceImporter{ State: resourceAwsVpcInstanceImport, }, + CustomizeDiff: resourceAwsVpcCustomizeDiff, SchemaVersion: 1, MigrateState: resourceAwsVpcMigrateState, @@ -34,10 +37,10 @@ func resourceAwsVpc() *schema.Resource { }, "instance_tenancy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Default: ec2.TenancyDefault, + ValidateFunc: validation.StringInSlice([]string{ec2.TenancyDefault, ec2.TenancyDedicated}, false), }, "enable_dns_hostnames": { @@ -105,6 +108,11 @@ func resourceAwsVpc() *schema.Resource { Computed: true, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), }, } @@ -112,15 +120,11 @@ func resourceAwsVpc() *schema.Resource { func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - instance_tenancy := "default" - if v, ok := d.GetOk("instance_tenancy"); ok { - instance_tenancy = v.(string) - } // Create the VPC createOpts := &ec2.CreateVpcInput{ CidrBlock: aws.String(d.Get("cidr_block").(string)), - InstanceTenancy: aws.String(instance_tenancy), + InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), AmazonProvidedIpv6CidrBlock: aws.Bool(d.Get("assign_generated_ipv6_cidr_block").(bool)), } @@ -179,6 +183,16 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("dhcp_options_id", vpc.DhcpOptionsId) d.Set("instance_tenancy", vpc.InstanceTenancy) + // ARN + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("vpc/%s", d.Id()), + }.String() + d.Set("arn", arn) + // Tags d.Set("tags", tagsToMap(vpc.Tags)) @@ -452,6 +466,21 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { d.SetPartial("assign_generated_ipv6_cidr_block") } + if d.HasChange("instance_tenancy") && !d.IsNewResource() { + modifyOpts := &ec2.ModifyVpcTenancyInput{ + VpcId: aws.String(vpcid), + InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), + } + log.Printf( + "[INFO] Modifying instance_tenancy vpc attribute for %s: %#v", + d.Id(), modifyOpts) + if _, err := conn.ModifyVpcTenancy(modifyOpts); err != nil { + return err + } + + d.SetPartial("instance_tenancy") + } + if err := setTags(conn, d); err != nil { return err } else { @@ -492,6 +521,17 @@ func resourceAwsVpcDelete(d *schema.ResourceData, meta interface{}) error { }) } +func resourceAwsVpcCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { + if diff.HasChange("instance_tenancy") { + old, new := diff.GetChange("instance_tenancy") + if old.(string) != ec2.TenancyDedicated || new.(string) != ec2.TenancyDefault { + diff.ForceNew("instance_tenancy") + } + } + + return nil +} + // VPCStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // a VPC. func VPCStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { @@ -650,3 +690,33 @@ func awsVpcDescribeVpcAttribute(attribute string, vpcId string, conn *ec2.EC2) ( return resp, nil } + +// vpcDescribe returns EC2 API information about the specified VPC. +// If the VPC doesn't exist, return nil. +func vpcDescribe(conn *ec2.EC2, vpcId string) (*ec2.Vpc, error) { + resp, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{ + VpcIds: aws.StringSlice([]string{vpcId}), + }) + if err != nil { + if !isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil, err + } + resp = nil + } + + if resp == nil { + return nil, nil + } + + n := len(resp.Vpcs) + switch n { + case 0: + return nil, nil + + case 1: + return resp.Vpcs[0], nil + + default: + return nil, fmt.Errorf("Found %d VPCs for %s, expected 1", n, vpcId) + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go index ec2844cc7..b2334b91a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options.go @@ -147,17 +147,11 @@ func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) err resp, err := conn.DescribeDhcpOptions(req) if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return fmt.Errorf("Error retrieving DHCP Options: %s", err.Error()) - } - - if ec2err.Code() == "InvalidDhcpOptionID.NotFound" { + if isNoSuchDhcpOptionIDErr(err) { log.Printf("[WARN] DHCP Options (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - return fmt.Errorf("Error retrieving DHCP Options: %s", err.Error()) } @@ -212,7 +206,7 @@ func resourceAwsVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) e } switch ec2err.Code() { - case "InvalidDhcpOptionsID.NotFound": + case "InvalidDhcpOptionsID.NotFound", "InvalidDhcpOptionID.NotFound": return nil case "DependencyViolation": // If it is a dependency violation, we want to disassociate @@ -272,7 +266,7 @@ func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.Stat resp, err := conn.DescribeDhcpOptions(DescribeDhcpOpts) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidDhcpOptionsID.NotFound" { + if isNoSuchDhcpOptionIDErr(err) { resp = nil } else { log.Printf("Error on DHCPOptionsStateRefresh: %s", err) @@ -290,3 +284,7 @@ func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.Stat return dos, "created", nil } } + +func isNoSuchDhcpOptionIDErr(err error) bool { + return isAWSErr(err, "InvalidDhcpOptionID.NotFound", "") || isAWSErr(err, "InvalidDhcpOptionsID.NotFound", "") +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go index 7bdcb7a68..0a31db487 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_dhcp_options_association.go @@ -94,6 +94,5 @@ func resourceAwsVpcDhcpOptionsAssociationDelete(d *schema.ResourceData, meta int return err } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go index 2826f4904..96b072f84 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go @@ -122,6 +122,12 @@ func resourceAwsVpcEndpoint() *schema.Resource { Optional: true, }, }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, } } @@ -155,7 +161,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Creating VPC Endpoint: %#v", req) resp, err := conn.CreateVpcEndpoint(req) if err != nil { - return fmt.Errorf("Error creating VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error creating VPC Endpoint: %s", err) } vpce := resp.VpcEndpoint @@ -167,7 +173,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro } } - if err := vpcEndpointWaitUntilAvailable(d, conn); err != nil { + if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -179,7 +185,7 @@ func resourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error vpce, state, err := vpcEndpointStateRefresh(conn, d.Id())() if err != nil && state != "failed" { - return fmt.Errorf("Error reading VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error reading VPC Endpoint: %s", err) } terminalStates := map[string]bool{ @@ -234,10 +240,10 @@ func resourceAwsVpcEndpointUpdate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Updating VPC Endpoint: %#v", req) if _, err := conn.ModifyVpcEndpoint(req); err != nil { - return fmt.Errorf("Error updating VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error updating VPC Endpoint: %s", err) } - if err := vpcEndpointWaitUntilAvailable(d, conn); err != nil { + if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { return err } @@ -255,7 +261,7 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { log.Printf("[DEBUG] VPC Endpoint %s is already gone", d.Id()) } else { - return fmt.Errorf("Error deleting VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error deleting VPC Endpoint: %s", err) } } @@ -263,12 +269,12 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro Pending: []string{"available", "pending", "deleting"}, Target: []string{"deleted"}, Refresh: vpcEndpointStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, + Timeout: d.Timeout(schema.TimeoutDelete), Delay: 5 * time.Second, MinTimeout: 5 * time.Second, } if _, err = stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint %s to delete: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for VPC Endpoint (%s) to delete: %s", d.Id(), err) } return nil @@ -284,7 +290,7 @@ func vpcEndpointAccept(conn *ec2.EC2, vpceId, svcName string) error { describeSvcResp, err := conn.DescribeVpcEndpointServiceConfigurations(describeSvcReq) if err != nil { - return fmt.Errorf("Error reading VPC Endpoint Service: %s", err.Error()) + return fmt.Errorf("Error reading VPC Endpoint Service: %s", err) } if describeSvcResp == nil || len(describeSvcResp.ServiceConfigurations) == 0 { return fmt.Errorf("No matching VPC Endpoint Service found") @@ -298,7 +304,7 @@ func vpcEndpointAccept(conn *ec2.EC2, vpceId, svcName string) error { log.Printf("[DEBUG] Accepting VPC Endpoint connection: %#v", acceptEpReq) _, err = conn.AcceptVpcEndpointConnections(acceptEpReq) if err != nil { - return fmt.Errorf("Error accepting VPC Endpoint connection: %s", err.Error()) + return fmt.Errorf("Error accepting VPC Endpoint connection: %s", err) } return nil @@ -312,33 +318,43 @@ func vpcEndpointStateRefresh(conn *ec2.EC2, vpceId string) resource.StateRefresh }) if err != nil { if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - return false, "deleted", nil + return "", "deleted", nil } return nil, "", err } - vpce := resp.VpcEndpoints[0] - state := aws.StringValue(vpce.State) - // No use in retrying if the endpoint is in a failed state. - if state == "failed" { - return nil, state, errors.New("VPC Endpoint is in a failed state") + n := len(resp.VpcEndpoints) + switch n { + case 0: + return "", "deleted", nil + + case 1: + vpce := resp.VpcEndpoints[0] + state := aws.StringValue(vpce.State) + // No use in retrying if the endpoint is in a failed state. + if state == "failed" { + return nil, state, errors.New("VPC Endpoint is in a failed state") + } + return vpce, state, nil + + default: + return nil, "", fmt.Errorf("Found %d VPC Endpoints for %s, expected 1", n, vpceId) } - return vpce, state, nil } } -func vpcEndpointWaitUntilAvailable(d *schema.ResourceData, conn *ec2.EC2) error { +func vpcEndpointWaitUntilAvailable(conn *ec2.EC2, vpceId string, timeout time.Duration) error { stateConf := &resource.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"available", "pendingAcceptance"}, - Refresh: vpcEndpointStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, + Refresh: vpcEndpointStateRefresh(conn, vpceId), + Timeout: timeout, Delay: 5 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for VPC Endpoint (%s) to become available: %s", vpceId, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go index 1fe3c4a18..0527eb143 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint_subnet_association.go @@ -3,11 +3,13 @@ package aws import ( "fmt" "log" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -32,6 +34,11 @@ func resourceAwsVpcEndpointSubnetAssociation() *schema.Resource { ForceNew: true, }, }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, } } @@ -46,15 +53,34 @@ func resourceAwsVpcEndpointSubnetAssociationCreate(d *schema.ResourceData, meta return err } - _, err = conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddSubnetIds: aws.StringSlice([]string{snId}), - }) + // See https://github.com/terraform-providers/terraform-provider-aws/issues/3382. + // Prevent concurrent subnet association requests and delay between requests. + mk := "vpc_endpoint_subnet_association_" + endpointId + awsMutexKV.Lock(mk) + defer awsMutexKV.Unlock(mk) + + c := &resource.StateChangeConf{ + Delay: 1 * time.Minute, + Timeout: 3 * time.Minute, + Target: []string{"ok"}, + Refresh: func() (interface{}, string, error) { + res, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ + VpcEndpointId: aws.String(endpointId), + AddSubnetIds: aws.StringSlice([]string{snId}), + }) + return res, "ok", err + }, + } + _, err = c.WaitForState() if err != nil { - return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err) } - d.SetId(vpcEndpointIdSubnetIdHash(endpointId, snId)) + d.SetId(vpcEndpointSubnetAssociationId(endpointId, snId)) + + if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutCreate)); err != nil { + return err + } return resourceAwsVpcEndpointSubnetAssociationRead(d, meta) } @@ -105,24 +131,26 @@ func resourceAwsVpcEndpointSubnetAssociationDelete(d *schema.ResourceData, meta if err != nil { ec2err, ok := err.(awserr.Error) if !ok { - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) } switch ec2err.Code() { case "InvalidVpcEndpointId.NotFound": fallthrough - case "InvalidRouteTableId.NotFound": - fallthrough case "InvalidParameter": log.Printf("[DEBUG] Vpc Endpoint/Subnet association is already gone") default: - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) } } + if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutDelete)); err != nil { + return err + } + return nil } -func vpcEndpointIdSubnetIdHash(endpointId, snId string) string { +func vpcEndpointSubnetAssociationId(endpointId, snId string) string { return fmt.Sprintf("a-%s%d", endpointId, hashcode.String(snId)) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go new file mode 100644 index 000000000..03708b2cf --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_ipv4_cidr_block_association.go @@ -0,0 +1,173 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +const ( + VpcCidrBlockStateCodeDeleted = "deleted" +) + +func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsVpcIpv4CidrBlockAssociationCreate, + Read: resourceAwsVpcIpv4CidrBlockAssociationRead, + Delete: resourceAwsVpcIpv4CidrBlockAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "vpc_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "cidr_block": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.CIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask. + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsVpcIpv4CidrBlockAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.AssociateVpcCidrBlockInput{ + VpcId: aws.String(d.Get("vpc_id").(string)), + CidrBlock: aws.String(d.Get("cidr_block").(string)), + } + log.Printf("[DEBUG] Creating VPC IPv4 CIDR block association: %#v", req) + resp, err := conn.AssociateVpcCidrBlock(req) + if err != nil { + return fmt.Errorf("Error creating VPC IPv4 CIDR block association: %s", err) + } + + d.SetId(aws.StringValue(resp.CidrBlockAssociation.AssociationId)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.VpcCidrBlockStateCodeAssociating}, + Target: []string{ec2.VpcCidrBlockStateCodeAssociated}, + Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for IPv4 CIDR block association (%s) to become available: %s", d.Id(), err) + } + + return resourceAwsVpcIpv4CidrBlockAssociationRead(d, meta) +} + +func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeVpcsInput{ + Filters: buildEC2AttributeFilterList( + map[string]string{ + "cidr-block-association.association-id": d.Id(), + }, + ), + } + + log.Printf("[DEBUG] Describing VPCs: %s", input) + output, err := conn.DescribeVpcs(input) + if err != nil { + return fmt.Errorf("error describing VPCs: %s", err) + } + + if output == nil || len(output.Vpcs) == 0 || output.Vpcs[0] == nil { + log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + vpc := output.Vpcs[0] + + var vpcCidrBlockAssociation *ec2.VpcCidrBlockAssociation + for _, cidrBlockAssociation := range vpc.CidrBlockAssociationSet { + if aws.StringValue(cidrBlockAssociation.AssociationId) == d.Id() { + vpcCidrBlockAssociation = cidrBlockAssociation + break + } + } + + if vpcCidrBlockAssociation == nil { + log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("cidr_block", vpcCidrBlockAssociation.CidrBlock) + d.Set("vpc_id", vpc.VpcId) + + return nil +} + +func resourceAwsVpcIpv4CidrBlockAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Deleting VPC IPv4 CIDR block association: %s", d.Id()) + _, err := conn.DisassociateVpcCidrBlock(&ec2.DisassociateVpcCidrBlockInput{ + AssociationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil + } + return fmt.Errorf("Error deleting VPC IPv4 CIDR block association: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.VpcCidrBlockStateCodeDisassociating}, + Target: []string{ec2.VpcCidrBlockStateCodeDisassociated, VpcCidrBlockStateCodeDeleted}, + Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for VPC IPv4 CIDR block association (%s) to be deleted: %s", d.Id(), err.Error()) + } + + return nil +} + +func vpcIpv4CidrBlockAssociationStateRefresh(conn *ec2.EC2, vpcId, assocId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + vpc, err := vpcDescribe(conn, vpcId) + if err != nil { + return nil, "", err + } + + if vpc != nil { + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if aws.StringValue(cidrAssociation.AssociationId) == assocId { + return cidrAssociation, aws.StringValue(cidrAssociation.CidrBlockState.State), nil + } + } + } + + return "", VpcCidrBlockStateCodeDeleted, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go index afea54ed4..18b16d07f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection.go @@ -7,9 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -24,6 +22,12 @@ func resourceAwsVpcPeeringConnection() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + Update: schema.DefaultTimeout(1 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "peer_owner_id": { Type: schema.TypeString, @@ -86,7 +90,7 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error resp, err := conn.CreateVpcPeeringConnection(createOpts) if err != nil { - return errwrap.Wrapf("Error creating VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Error creating VPC Peering Connection: %s", err) } // Get the ID and store it @@ -94,9 +98,9 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error d.SetId(*rt.VpcPeeringConnectionId) log.Printf("[INFO] VPC Peering Connection ID: %s", d.Id()) - vpcAvailableErr := checkVpcPeeringConnectionAvailable(conn, d.Id()) - if vpcAvailableErr != nil { - return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) + err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) + if err != nil { + return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) } return resourceAwsVPCPeeringUpdate(d, meta) @@ -104,40 +108,32 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient) - conn := client.ec2conn - pcRaw, status, err := resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id())() + pcRaw, statusCode, err := vpcPeeringConnectionRefreshState(client.ec2conn, d.Id())() // Allow a failed VPC Peering Connection to fallthrough, // to allow rest of the logic below to do its work. - if err != nil && status != ec2.VpcPeeringConnectionStateReasonCodeFailed { - return err + if err != nil && statusCode != ec2.VpcPeeringConnectionStateReasonCodeFailed { + return fmt.Errorf("Error reading VPC Peering Connection: %s", err) } - if pcRaw == nil { + // The failed status is a status that we can assume just means the + // connection is gone. Destruction isn't allowed, and it eventually + // just "falls off" the console. See GH-2322 + status := map[string]bool{ + ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, + ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, + ec2.VpcPeeringConnectionStateReasonCodeExpired: true, + ec2.VpcPeeringConnectionStateReasonCodeFailed: true, + ec2.VpcPeeringConnectionStateReasonCodeRejected: true, + "": true, // AWS consistency issue, see vpcPeeringConnectionRefreshState + } + if _, ok := status[statusCode]; ok { + log.Printf("[WARN] VPC Peering Connection (%s) has status code %s, removing from state", d.Id(), statusCode) d.SetId("") return nil } pc := pcRaw.(*ec2.VpcPeeringConnection) - - // The failed status is a status that we can assume just means the - // connection is gone. Destruction isn't allowed, and it eventually - // just "falls off" the console. See GH-2322 - if pc.Status != nil { - status := map[string]bool{ - ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, - ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, - ec2.VpcPeeringConnectionStateReasonCodeExpired: true, - ec2.VpcPeeringConnectionStateReasonCodeFailed: true, - ec2.VpcPeeringConnectionStateReasonCodeRejected: true, - } - if _, ok := status[*pc.Status.Code]; ok { - log.Printf("[DEBUG] VPC Peering Connection (%s) in state (%s), removing.", - d.Id(), *pc.Status.Code) - d.SetId("") - return nil - } - } log.Printf("[DEBUG] VPC Peering Connection response: %#v", pc) log.Printf("[DEBUG] Account ID %s, VPC PeerConn Requester %s, Accepter %s", @@ -162,22 +158,22 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { // the details about accepter and/or requester peering // options would not be included in the response. if pc.AccepterVpcInfo.PeeringOptions != nil { - err := d.Set("accepter", flattenPeeringOptions(pc.AccepterVpcInfo.PeeringOptions)) + err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection accepter information: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection accepter information: %s", err) } } if pc.RequesterVpcInfo.PeeringOptions != nil { - err := d.Set("requester", flattenPeeringOptions(pc.RequesterVpcInfo.PeeringOptions)) + err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection requester information: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection requester information: %s", err) } } err = d.Set("tags", tagsToMap(pc.Tags)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection tags: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection tags: %s", err) } return nil @@ -199,29 +195,25 @@ func resourceVPCPeeringConnectionAccept(conn *ec2.EC2, id string) (string, error return *pc.Status.Code, nil } -func resourceVPCPeeringConnectionOptionsModify(d *schema.ResourceData, meta interface{}) error { +func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - modifyOpts := &ec2.ModifyVpcPeeringConnectionOptionsInput{ + req := &ec2.ModifyVpcPeeringConnectionOptionsInput{ VpcPeeringConnectionId: aws.String(d.Id()), } - if v, ok := d.GetOk("accepter"); ok { - if s := v.(*schema.Set); len(s.List()) > 0 { - co := s.List()[0].(map[string]interface{}) - modifyOpts.AccepterPeeringConnectionOptions = expandPeeringOptions(co) - } + v := d.Get("accepter").(*schema.Set).List() + if len(v) > 0 { + req.AccepterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) } - if v, ok := d.GetOk("requester"); ok { - if s := v.(*schema.Set); len(s.List()) > 0 { - co := s.List()[0].(map[string]interface{}) - modifyOpts.RequesterPeeringConnectionOptions = expandPeeringOptions(co) - } + v = d.Get("requester").(*schema.Set).List() + if len(v) > 0 { + req.RequesterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) } - log.Printf("[DEBUG] VPC Peering Connection modify options: %#v", modifyOpts) - if _, err := conn.ModifyVpcPeeringConnectionOptions(modifyOpts); err != nil { + log.Printf("[DEBUG] Modifying VPC Peering Connection options: %#v", req) + if _, err := conn.ModifyVpcPeeringConnectionOptions(req); err != nil { return err } @@ -237,22 +229,24 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error d.SetPartial("tags") } - pcRaw, _, err := resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id())() + pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() if err != nil { - return err + return fmt.Errorf("Error reading VPC Peering Connection: %s", err) } if pcRaw == nil { + log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) d.SetId("") return nil } + pc := pcRaw.(*ec2.VpcPeeringConnection) if _, ok := d.GetOk("auto_accept"); ok { if pc.Status != nil && *pc.Status.Code == ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance { status, err := resourceVPCPeeringConnectionAccept(conn, d.Id()) if err != nil { - return errwrap.Wrapf("Unable to accept VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Unable to accept VPC Peering Connection: %s", err) } log.Printf("[DEBUG] VPC Peering Connection accept status: %s", status) } @@ -266,14 +260,14 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error "or activate VPC Peering Connection manually.", d.Id()) } - if err := resourceVPCPeeringConnectionOptionsModify(d, meta); err != nil { - return errwrap.Wrapf("Error modifying VPC Peering Connection options: {{err}}", err) + if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { + return fmt.Errorf("Error modifying VPC Peering Connection options: %s", err) } } - vpcAvailableErr := checkVpcPeeringConnectionAvailable(conn, d.Id()) - if vpcAvailableErr != nil { - return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) + err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) } return resourceAwsVPCPeeringRead(d, meta) @@ -282,11 +276,11 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - input := &ec2.DeleteVpcPeeringConnectionInput{ + req := &ec2.DeleteVpcPeeringConnectionInput{ VpcPeeringConnectionId: aws.String(d.Id()), } - log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", input) - _, err := conn.DeleteVpcPeeringConnection(input) + log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", req) + _, err := conn.DeleteVpcPeeringConnection(req) if err != nil { if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { return nil @@ -306,8 +300,8 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error ec2.VpcPeeringConnectionStateReasonCodeRejected, ec2.VpcPeeringConnectionStateReasonCodeDeleted, }, - Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id()), - Timeout: 1 * time.Minute, + Refresh: vpcPeeringConnectionRefreshState(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), } if _, err := stateConf.WaitForState(); err != nil { return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to be deleted: %s", d.Id(), err) @@ -316,38 +310,41 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error return nil } -// resourceAwsVPCPeeringConnectionStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a VPCPeeringConnection. -func resourceAwsVPCPeeringConnectionStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { +func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeVpcPeeringConnections(&ec2.DescribeVpcPeeringConnectionsInput{ - VpcPeeringConnectionIds: []*string{aws.String(id)}, + VpcPeeringConnectionIds: aws.StringSlice([]string{id}), }) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpcPeeringConnectionID.NotFound" { - resp = nil - } else { - log.Printf("Error reading VPC Peering Connection details: %s", err) - return nil, "error", err + if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { + return nil, ec2.VpcPeeringConnectionStateReasonCodeDeleted, nil } + + return nil, "", err } - if resp == nil { + if resp == nil || resp.VpcPeeringConnections == nil || + len(resp.VpcPeeringConnections) == 0 || resp.VpcPeeringConnections[0] == nil { // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. + // our peering connection yet. Return an empty state. return nil, "", nil } - pc := resp.VpcPeeringConnections[0] + if pc.Status == nil { + // Sometimes AWS just has consistency issues and doesn't see + // our peering connection yet. Return an empty state. + return nil, "", nil + } + statusCode := aws.StringValue(pc.Status.Code) // A VPC Peering Connection can exist in a failed state due to // incorrect VPC ID, account ID, or overlapping IP address range, // thus we short circuit before the time out would occur. - if pc != nil && *pc.Status.Code == "failed" { - return nil, "failed", errors.New(*pc.Status.Message) + if statusCode == ec2.VpcPeeringConnectionStateReasonCodeFailed { + return nil, statusCode, errors.New(aws.StringValue(pc.Status.Message)) } - return pc, *pc.Status.Code, nil + return pc, statusCode, nil } } @@ -379,44 +376,7 @@ func vpcPeeringConnectionOptionsSchema() *schema.Schema { } } -func flattenPeeringOptions(options *ec2.VpcPeeringConnectionOptionsDescription) (results []map[string]interface{}) { - m := make(map[string]interface{}) - - if options.AllowDnsResolutionFromRemoteVpc != nil { - m["allow_remote_vpc_dns_resolution"] = *options.AllowDnsResolutionFromRemoteVpc - } - - if options.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { - m["allow_classic_link_to_remote_vpc"] = *options.AllowEgressFromLocalClassicLinkToRemoteVpc - } - - if options.AllowEgressFromLocalVpcToRemoteClassicLink != nil { - m["allow_vpc_to_remote_classic_link"] = *options.AllowEgressFromLocalVpcToRemoteClassicLink - } - - results = append(results, m) - return -} - -func expandPeeringOptions(m map[string]interface{}) *ec2.PeeringConnectionOptionsRequest { - r := &ec2.PeeringConnectionOptionsRequest{} - - if v, ok := m["allow_remote_vpc_dns_resolution"]; ok { - r.AllowDnsResolutionFromRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_classic_link_to_remote_vpc"]; ok { - r.AllowEgressFromLocalClassicLinkToRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_vpc_to_remote_classic_link"]; ok { - r.AllowEgressFromLocalVpcToRemoteClassicLink = aws.Bool(v.(bool)) - } - - return r -} - -func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { +func vpcPeeringConnectionWaitUntilAvailable(conn *ec2.EC2, id string, timeout time.Duration) error { // Wait for the vpc peering connection to become available log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", id) stateConf := &resource.StateChangeConf{ @@ -428,13 +388,11 @@ func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, ec2.VpcPeeringConnectionStateReasonCodeActive, }, - Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, id), - Timeout: 1 * time.Minute, + Refresh: vpcPeeringConnectionRefreshState(conn, id), + Timeout: timeout, } if _, err := stateConf.WaitForState(); err != nil { - return errwrap.Wrapf(fmt.Sprintf( - "Error waiting for VPC Peering Connection (%s) to become available: {{err}}", - id), err) + return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to become available: %s", id, err) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go index 854f8fc16..61ed1f179 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_accepter.go @@ -69,6 +69,5 @@ func resourceAwsVPCPeeringAccepterCreate(d *schema.ResourceData, meta interface{ func resourceAwsVPCPeeringAccepterDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Will not delete VPC peering connection. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go new file mode 100644 index 000000000..aca9ca2ec --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_peering_connection_options.go @@ -0,0 +1,84 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsVpcPeeringConnectionOptions() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsVpcPeeringConnectionOptionsCreate, + Read: resourceAwsVpcPeeringConnectionOptionsRead, + Update: resourceAwsVpcPeeringConnectionOptionsUpdate, + Delete: resourceAwsVpcPeeringConnectionOptionsDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "vpc_peering_connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "accepter": vpcPeeringConnectionOptionsSchema(), + "requester": vpcPeeringConnectionOptionsSchema(), + }, + } +} + +func resourceAwsVpcPeeringConnectionOptionsCreate(d *schema.ResourceData, meta interface{}) error { + d.SetId(d.Get("vpc_peering_connection_id").(string)) + return resourceAwsVpcPeeringConnectionOptionsUpdate(d, meta) +} + +func resourceAwsVpcPeeringConnectionOptionsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() + if err != nil { + return fmt.Errorf("Error reading VPC Peering Connection: %s", err.Error()) + } + + if pcRaw == nil { + log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + pc := pcRaw.(*ec2.VpcPeeringConnection) + + d.Set("vpc_peering_connection_id", pc.VpcPeeringConnectionId) + + if pc != nil && pc.AccepterVpcInfo != nil && pc.AccepterVpcInfo.PeeringOptions != nil { + err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) + if err != nil { + return fmt.Errorf("Error setting VPC Peering Connection Options accepter information: %s", err.Error()) + } + } + + if pc != nil && pc.RequesterVpcInfo != nil && pc.RequesterVpcInfo.PeeringOptions != nil { + err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) + if err != nil { + return fmt.Errorf("Error setting VPC Peering Connection Options requester information: %s", err.Error()) + } + } + + return nil +} + +func resourceAwsVpcPeeringConnectionOptionsUpdate(d *schema.ResourceData, meta interface{}) error { + if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { + return fmt.Errorf("Error modifying VPC Peering Connection Options: %s", err.Error()) + } + + return resourceAwsVpcPeeringConnectionOptionsRead(d, meta) +} + +func resourceAwsVpcPeeringConnectionOptionsDelete(d *schema.ResourceData, meta interface{}) error { + // Don't do anything with the underlying VPC peering connection. + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go index 212447841..8f8ea74d0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go @@ -461,7 +461,6 @@ func resourceAwsVpnConnectionDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting VPN connection: %s", err) @@ -568,8 +567,8 @@ func validateVpnConnectionTunnelPreSharedKey(v interface{}, k string) (ws []stri errors = append(errors, fmt.Errorf("%q cannot start with zero character", k)) } - if !regexp.MustCompile(`^[0-9a-zA-Z_]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q can only contain alphanumeric and underscore characters", k)) + if !regexp.MustCompile(`^[0-9a-zA-Z_.]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q can only contain alphanumeric, period and underscore characters", k)) } return diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go index 0f1991fe6..6685a80b5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection_route.go @@ -106,7 +106,6 @@ func resourceAwsVpnConnectionRouteDelete(d *schema.ResourceData, meta interface{ }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") return nil } log.Printf("[ERROR] Error deleting VPN connection route: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go index db0110000..7d3df7dd2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_attachment.go @@ -85,7 +85,7 @@ func resourceAwsVpnGatewayAttachmentRead(d *schema.ResourceData, meta interface{ if err != nil { awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidVPNGatewayID.NotFound" { + if ok && awsErr.Code() == "InvalidVpnGatewayID.NotFound" { log.Printf("[WARN] VPN Gateway %q not found.", vgwId) d.SetId("") return nil @@ -130,15 +130,9 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac awsErr, ok := err.(awserr.Error) if ok { switch awsErr.Code() { - case "InvalidVPNGatewayID.NotFound": - log.Printf("[WARN] VPN Gateway %q not found.", vgwId) - d.SetId("") + case "InvalidVpnGatewayID.NotFound": return nil case "InvalidVpnGatewayAttachment.NotFound": - log.Printf( - "[WARN] VPN Gateway %q attachment to VPC %q not found.", - vgwId, vpcId) - d.SetId("") return nil } } @@ -163,7 +157,6 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac } log.Printf("[DEBUG] VPN Gateway %q detached from VPC %q.", vgwId, vpcId) - d.SetId("") return nil } @@ -183,7 +176,7 @@ func vpnGatewayAttachmentStateRefresh(conn *ec2.EC2, vpcId, vgwId string) resour awsErr, ok := err.(awserr.Error) if ok { switch awsErr.Code() { - case "InvalidVPNGatewayID.NotFound": + case "InvalidVpnGatewayID.NotFound": fallthrough case "InvalidVpnGatewayAttachment.NotFound": return nil, "", nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go index 46e4b2208..771d8a174 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway_route_propagation.go @@ -64,7 +64,6 @@ func resourceAwsVpnGatewayRoutePropagationDisable(d *schema.ResourceData, meta i return fmt.Errorf("error disabling VGW propagation: %s", err) } - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go index 26c6fe74e..e1e2746bf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/schema" @@ -16,6 +17,9 @@ func resourceAwsWafIPSet() *schema.Resource { Read: resourceAwsWafIPSetRead, Update: resourceAwsWafIPSetUpdate, Delete: resourceAwsWafIPSetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ @@ -23,6 +27,10 @@ func resourceAwsWafIPSet() *schema.Resource { Required: true, ForceNew: true, }, + "arn": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, "ip_set_descriptors": &schema.Schema{ Type: schema.TypeSet, Optional: true, @@ -94,6 +102,14 @@ func resourceAwsWafIPSetRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", resp.IPSet.Name) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "waf", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("ipset/%s", d.Id()), + } + d.Set("arn", arn.String()) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go index 92032a702..b688ea44d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go @@ -17,6 +17,9 @@ func resourceAwsWafWebAcl() *schema.Resource { Read: resourceAwsWafWebAclRead, Update: resourceAwsWafWebAclUpdate, Delete: resourceAwsWafWebAclDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ @@ -50,7 +53,20 @@ func resourceAwsWafWebAcl() *schema.Resource { Schema: map[string]*schema.Schema{ "action": &schema.Schema{ Type: schema.TypeSet, - Required: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "override_action": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -72,6 +88,7 @@ func resourceAwsWafWebAcl() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ waf.WafRuleTypeRegular, waf.WafRuleTypeRateBased, + waf.WafRuleTypeGroup, }, false), }, "rule_id": &schema.Schema{ @@ -184,16 +201,33 @@ func updateWebAclResource(d *schema.ResourceData, meta interface{}, ChangeAction rules := d.Get("rules").(*schema.Set) for _, rule := range rules.List() { aclRule := rule.(map[string]interface{}) - action := aclRule["action"].(*schema.Set).List()[0].(map[string]interface{}) - aclRuleUpdate := &waf.WebACLUpdate{ - Action: aws.String(ChangeAction), - ActivatedRule: &waf.ActivatedRule{ - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), - Type: aws.String(aclRule["type"].(string)), - Action: &waf.WafAction{Type: aws.String(action["type"].(string))}, - }, + + var aclRuleUpdate *waf.WebACLUpdate + switch aclRule["type"].(string) { + case waf.WafRuleTypeGroup: + overrideAction := aclRule["override_action"].(*schema.Set).List()[0].(map[string]interface{}) + aclRuleUpdate = &waf.WebACLUpdate{ + Action: aws.String(ChangeAction), + ActivatedRule: &waf.ActivatedRule{ + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + OverrideAction: &waf.WafOverrideAction{Type: aws.String(overrideAction["type"].(string))}, + }, + } + default: + action := aclRule["action"].(*schema.Set).List()[0].(map[string]interface{}) + aclRuleUpdate = &waf.WebACLUpdate{ + Action: aws.String(ChangeAction), + ActivatedRule: &waf.ActivatedRule{ + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + Action: &waf.WafAction{Type: aws.String(action["type"].(string))}, + }, + } } + req.Updates = append(req.Updates, aclRuleUpdate) } return conn.UpdateWebACL(req) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go index 9321367ff..790ee5797 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go @@ -25,6 +25,45 @@ func resourceAwsWafRegionalByteMatchSet() *schema.Resource { ForceNew: true, }, "byte_match_tuple": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + ConflictsWith: []string{"byte_match_tuples"}, + Deprecated: "use `byte_match_tuples` instead", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": { + Type: schema.TypeSet, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "positional_constraint": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "target_string": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "text_transformation": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "byte_match_tuples": &schema.Schema{ Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ @@ -110,7 +149,11 @@ func resourceAwsWafRegionalByteMatchSetRead(d *schema.ResourceData, meta interfa return err } - d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + if _, ok := d.GetOk("byte_match_tuple"); ok { + d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + } else { + d.Set("byte_match_tuples", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + } d.Set("name", resp.ByteMatchSet.Name) return nil @@ -155,6 +198,14 @@ func resourceAwsWafRegionalByteMatchSetUpdate(d *schema.ResourceData, meta inter o, n := d.GetChange("byte_match_tuple") oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) + if err != nil { + return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + } + } else if d.HasChange("byte_match_tuples") { + o, n := d.GetChange("byte_match_tuples") + oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) if err != nil { return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) @@ -169,7 +220,12 @@ func resourceAwsWafRegionalByteMatchSetDelete(d *schema.ResourceData, meta inter log.Printf("[INFO] Deleting ByteMatchSet: %s", d.Get("name").(string)) - oldT := d.Get("byte_match_tuple").(*schema.Set).List() + var oldT []interface{} + if _, ok := d.GetOk("byte_match_tuple"); ok { + oldT = d.Get("byte_match_tuple").(*schema.Set).List() + } else { + oldT = d.Get("byte_match_tuples").(*schema.Set).List() + } if len(oldT) > 0 { var newT []interface{} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go index 8227d6415..a3ff2003c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" @@ -24,6 +25,10 @@ func resourceAwsWafRegionalIPSet() *schema.Resource { Required: true, ForceNew: true, }, + "arn": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, "ip_set_descriptor": &schema.Schema{ Type: schema.TypeSet, Optional: true, @@ -85,6 +90,15 @@ func resourceAwsWafRegionalIPSetRead(d *schema.ResourceData, meta interface{}) e d.Set("ip_set_descriptor", flattenWafIpSetDescriptorWR(resp.IPSet.IPSetDescriptors)) d.Set("name", resp.IPSet.Name) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "waf-regional", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("ipset/%s", d.Id()), + } + d.Set("arn", arn.String()) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go index 10de0664f..46146d0c6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go @@ -45,17 +45,9 @@ func resourceAwsWafRegionalRule() *schema.Resource { ValidateFunc: validation.StringLenBetween(1, 128), }, "type": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - wafregional.PredicateTypeByteMatch, - wafregional.PredicateTypeGeoMatch, - wafregional.PredicateTypeIpmatch, - wafregional.PredicateTypeRegexMatch, - wafregional.PredicateTypeSizeConstraint, - wafregional.PredicateTypeSqlInjectionMatch, - wafregional.PredicateTypeXssMatch, - }, false), + Type: schema.TypeString, + Required: true, + ValidateFunc: validateWafPredicatesType(), }, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go index d466b14d9..3a57eff56 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsWafRegionalWebAcl() *schema.Resource { @@ -48,7 +49,20 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { Schema: map[string]*schema.Schema{ "action": &schema.Schema{ Type: schema.TypeList, - Required: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "override_action": &schema.Schema{ + Type: schema.TypeList, + Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -63,6 +77,16 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { Type: schema.TypeInt, Required: true, }, + "type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Default: waf.WafRuleTypeRegular, + ValidateFunc: validation.StringInSlice([]string{ + waf.WafRuleTypeRegular, + waf.WafRuleTypeRateBased, + waf.WafRuleTypeGroup, + }, false), + }, "rule_id": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -217,24 +241,51 @@ func flattenDefaultActionWR(n *waf.WafAction) []map[string]interface{} { func flattenWafWebAclRules(ts []*waf.ActivatedRule) []interface{} { out := make([]interface{}, len(ts), len(ts)) for i, r := range ts { - actionMap := map[string]interface{}{ - "type": *r.Action.Type, - } m := make(map[string]interface{}) - m["action"] = []interface{}{actionMap} + + switch *r.Type { + case waf.WafRuleTypeGroup: + actionMap := map[string]interface{}{ + "type": *r.OverrideAction.Type, + } + m["override_action"] = []interface{}{actionMap} + default: + actionMap := map[string]interface{}{ + "type": *r.Action.Type, + } + m["action"] = []interface{}{actionMap} + } + m["priority"] = *r.Priority m["rule_id"] = *r.RuleId + m["type"] = *r.Type out[i] = m } return out } func expandWafWebAclUpdate(updateAction string, aclRule map[string]interface{}) *waf.WebACLUpdate { - ruleAction := aclRule["action"].([]interface{})[0].(map[string]interface{}) - rule := &waf.ActivatedRule{ - Action: &waf.WafAction{Type: aws.String(ruleAction["type"].(string))}, - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), + var rule *waf.ActivatedRule + + switch aclRule["type"].(string) { + case waf.WafRuleTypeGroup: + ruleAction := aclRule["override_action"].([]interface{})[0].(map[string]interface{}) + + rule = &waf.ActivatedRule{ + OverrideAction: &waf.WafOverrideAction{Type: aws.String(ruleAction["type"].(string))}, + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + } + default: + ruleAction := aclRule["action"].([]interface{})[0].(map[string]interface{}) + + rule = &waf.ActivatedRule{ + Action: &waf.WafAction{Type: aws.String(ruleAction["type"].(string))}, + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + } } update := &waf.WebACLUpdate{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go index 154971abe..3cc071721 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go @@ -20,6 +20,7 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/dax" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -31,7 +32,9 @@ import ( "github.com/aws/aws-sdk-go/service/iot" "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/lambda" + "github.com/aws/aws-sdk-go/service/macie" "github.com/aws/aws-sdk-go/service/mq" + "github.com/aws/aws-sdk-go/service/neptune" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/route53" @@ -351,6 +354,10 @@ func expandOptionConfiguration(configured []interface{}) ([]*rds.OptionConfigura o.OptionSettings = expandOptionSetting(raw.(*schema.Set).List()) } + if raw, ok := data["version"]; ok && raw.(string) != "" { + o.OptionVersion = aws.String(raw.(string)) + } + option = append(option, o) } @@ -395,6 +402,28 @@ func expandElastiCacheParameters(configured []interface{}) ([]*elasticache.Param return parameters, nil } +// Takes the result of flatmap.Expand for an array of parameters and +// returns Parameter API compatible objects +func expandNeptuneParameters(configured []interface{}) ([]*neptune.Parameter, error) { + parameters := make([]*neptune.Parameter, 0, len(configured)) + + // Loop over our configured parameters and create + // an array of aws-sdk-go compatible objects + for _, pRaw := range configured { + data := pRaw.(map[string]interface{}) + + p := &neptune.Parameter{ + ApplyMethod: aws.String(data["apply_method"].(string)), + ParameterName: aws.String(data["name"].(string)), + ParameterValue: aws.String(data["value"].(string)), + } + + parameters = append(parameters, p) + } + + return parameters, nil +} + // Flattens an access log into something that flatmap.Flatten() can handle func flattenAccessLog(l *elb.AccessLog) []map[string]interface{} { result := make([]map[string]interface{}, 0, 1) @@ -645,6 +674,10 @@ func flattenOptions(list []*rds.Option) []map[string]interface{} { if i.Port != nil { r["port"] = int(*i.Port) } + r["version"] = "" + if i.OptionVersion != nil { + r["version"] = strings.ToLower(*i.OptionVersion) + } if i.VpcSecurityGroupMemberships != nil { vpcs := make([]string, 0, len(i.VpcSecurityGroupMemberships)) for _, vpc := range i.VpcSecurityGroupMemberships { @@ -732,6 +765,21 @@ func flattenElastiCacheParameters(list []*elasticache.Parameter) []map[string]in return result } +// Flattens an array of Parameters into a []map[string]interface{} +func flattenNeptuneParameters(list []*neptune.Parameter) []map[string]interface{} { + result := make([]map[string]interface{}, 0, len(list)) + for _, i := range list { + if i.ParameterValue != nil { + result = append(result, map[string]interface{}{ + "apply_method": aws.StringValue(i.ApplyMethod), + "name": aws.StringValue(i.ParameterName), + "value": aws.StringValue(i.ParameterValue), + }) + } + } + return result +} + // Takes the result of flatmap.Expand for an array of strings // and returns a []*string func expandStringList(configured []interface{}) []*string { @@ -745,6 +793,15 @@ func expandStringList(configured []interface{}) []*string { return vs } +// Expands a map of string to interface to a map of string to *float +func expandFloat64Map(m map[string]interface{}) map[string]*float64 { + float64Map := make(map[string]*float64, len(m)) + for k, v := range m { + float64Map[k] = aws.Float64(v.(float64)) + } + return float64Map +} + // Takes the result of schema.Set of strings and returns a []*string func expandStringSet(configured *schema.Set) []*string { return expandStringList(configured.List()) @@ -807,6 +864,14 @@ func flattenAttachment(a *ec2.NetworkInterfaceAttachment) map[string]interface{} return att } +func flattenEc2AttributeValues(l []*ec2.AttributeValue) []string { + values := make([]string, 0, len(l)) + for _, v := range l { + values = append(values, aws.StringValue(v.Value)) + } + return values +} + func flattenEc2NetworkInterfaceAssociation(a *ec2.NetworkInterfaceAssociation) []interface{} { att := make(map[string]interface{}) if a.AllocationId != nil { @@ -1029,14 +1094,17 @@ func flattenESEBSOptions(o *elasticsearch.EBSOptions) []map[string]interface{} { if o.EBSEnabled != nil { m["ebs_enabled"] = *o.EBSEnabled } - if o.Iops != nil { - m["iops"] = *o.Iops - } - if o.VolumeSize != nil { - m["volume_size"] = *o.VolumeSize - } - if o.VolumeType != nil { - m["volume_type"] = *o.VolumeType + + if aws.BoolValue(o.EBSEnabled) { + if o.Iops != nil { + m["iops"] = *o.Iops + } + if o.VolumeSize != nil { + m["volume_size"] = *o.VolumeSize + } + if o.VolumeType != nil { + m["volume_type"] = *o.VolumeType + } } return []map[string]interface{}{m} @@ -1045,17 +1113,20 @@ func flattenESEBSOptions(o *elasticsearch.EBSOptions) []map[string]interface{} { func expandESEBSOptions(m map[string]interface{}) *elasticsearch.EBSOptions { options := elasticsearch.EBSOptions{} - if v, ok := m["ebs_enabled"]; ok { - options.EBSEnabled = aws.Bool(v.(bool)) - } - if v, ok := m["iops"]; ok && v.(int) > 0 { - options.Iops = aws.Int64(int64(v.(int))) - } - if v, ok := m["volume_size"]; ok && v.(int) > 0 { - options.VolumeSize = aws.Int64(int64(v.(int))) - } - if v, ok := m["volume_type"]; ok && v.(string) != "" { - options.VolumeType = aws.String(v.(string)) + if ebsEnabled, ok := m["ebs_enabled"]; ok { + options.EBSEnabled = aws.Bool(ebsEnabled.(bool)) + + if ebsEnabled.(bool) { + if v, ok := m["iops"]; ok && v.(int) > 0 { + options.Iops = aws.Int64(int64(v.(int))) + } + if v, ok := m["volume_size"]; ok && v.(int) > 0 { + options.VolumeSize = aws.Int64(int64(v.(int))) + } + if v, ok := m["volume_type"]; ok && v.(string) != "" { + options.VolumeType = aws.String(v.(string)) + } + } } return &options @@ -1241,6 +1312,18 @@ func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]in return []map[string]interface{}{settings} } +func flattenLambdaAliasRoutingConfiguration(arc *lambda.AliasRoutingConfiguration) []interface{} { + if arc == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "additional_version_weights": aws.Float64ValueMap(arc.AdditionalVersionWeights), + } + + return []interface{}{m} +} + func flattenDSConnectSettings( customerDnsIps []*string, s *directoryservice.DirectoryConnectSettingsDescription) []map[string]interface{} { @@ -1389,7 +1472,7 @@ func expandApiGatewayRequestResponseModelOperations(d *schema.ResourceData, key oldModelMap := oldModels.(map[string]interface{}) newModelMap := newModels.(map[string]interface{}) - for k, _ := range oldModelMap { + for k := range oldModelMap { operation := apigateway.PatchOperation{ Op: aws.String("remove"), Path: aws.String(fmt.Sprintf("/%s/%s", prefix, strings.Replace(k, "/", "~1", -1))), @@ -1407,7 +1490,7 @@ func expandApiGatewayRequestResponseModelOperations(d *schema.ResourceData, key for nK, nV := range newModelMap { exists := false - for k, _ := range oldModelMap { + for k := range oldModelMap { if k == nK { exists = true } @@ -1441,7 +1524,7 @@ func deprecatedExpandApiGatewayMethodParametersJSONOperations(d *schema.Resource return operations, err } - for k, _ := range oldParametersMap { + for k := range oldParametersMap { operation := apigateway.PatchOperation{ Op: aws.String("remove"), Path: aws.String(fmt.Sprintf("/%s/%s", prefix, k)), @@ -1459,7 +1542,7 @@ func deprecatedExpandApiGatewayMethodParametersJSONOperations(d *schema.Resource for nK, nV := range newParametersMap { exists := false - for k, _ := range oldParametersMap { + for k := range oldParametersMap { if k == nK { exists = true } @@ -1484,7 +1567,7 @@ func expandApiGatewayMethodParametersOperations(d *schema.ResourceData, key stri oldParametersMap := oldParameters.(map[string]interface{}) newParametersMap := newParameters.(map[string]interface{}) - for k, _ := range oldParametersMap { + for k := range oldParametersMap { operation := apigateway.PatchOperation{ Op: aws.String("remove"), Path: aws.String(fmt.Sprintf("/%s/%s", prefix, k)), @@ -1507,7 +1590,7 @@ func expandApiGatewayMethodParametersOperations(d *schema.ResourceData, key stri for nK, nV := range newParametersMap { exists := false - for k, _ := range oldParametersMap { + for k := range oldParametersMap { if k == nK { exists = true } @@ -1900,6 +1983,80 @@ func flattenPolicyAttributes(list []*elb.PolicyAttributeDescription) []interface return attributes } +func expandConfigAccountAggregationSources(configured []interface{}) []*configservice.AccountAggregationSource { + var results []*configservice.AccountAggregationSource + for _, item := range configured { + detail := item.(map[string]interface{}) + source := configservice.AccountAggregationSource{ + AllAwsRegions: aws.Bool(detail["all_regions"].(bool)), + } + + if v, ok := detail["account_ids"]; ok { + accountIDs := v.([]interface{}) + if len(accountIDs) > 0 { + source.AccountIds = expandStringList(accountIDs) + } + } + + if v, ok := detail["regions"]; ok { + regions := v.([]interface{}) + if len(regions) > 0 { + source.AwsRegions = expandStringList(regions) + } + } + + results = append(results, &source) + } + return results +} + +func expandConfigOrganizationAggregationSource(configured map[string]interface{}) *configservice.OrganizationAggregationSource { + source := configservice.OrganizationAggregationSource{ + AllAwsRegions: aws.Bool(configured["all_regions"].(bool)), + RoleArn: aws.String(configured["role_arn"].(string)), + } + + if v, ok := configured["regions"]; ok { + regions := v.([]interface{}) + if len(regions) > 0 { + source.AwsRegions = expandStringList(regions) + } + } + + return &source +} + +func flattenConfigAccountAggregationSources(sources []*configservice.AccountAggregationSource) []interface{} { + var result []interface{} + + if len(sources) == 0 { + return result + } + + source := sources[0] + m := make(map[string]interface{}) + m["account_ids"] = flattenStringList(source.AccountIds) + m["all_regions"] = aws.BoolValue(source.AllAwsRegions) + m["regions"] = flattenStringList(source.AwsRegions) + result = append(result, m) + return result +} + +func flattenConfigOrganizationAggregationSource(source *configservice.OrganizationAggregationSource) []interface{} { + var result []interface{} + + if source == nil { + return result + } + + m := make(map[string]interface{}) + m["all_regions"] = aws.BoolValue(source.AllAwsRegions) + m["regions"] = flattenStringList(source.AwsRegions) + m["role_arn"] = aws.StringValue(source.RoleArn) + result = append(result, m) + return result +} + func flattenConfigRuleSource(source *configservice.Source) []interface{} { var result []interface{} m := make(map[string]interface{}) @@ -2345,6 +2502,10 @@ func expandCognitoUserPoolLambdaConfig(config map[string]interface{}) *cognitoid configs.PreTokenGeneration = aws.String(v.(string)) } + if v, ok := config["user_migration"]; ok && v.(string) != "" { + configs.UserMigration = aws.String(v.(string)) + } + if v, ok := config["verify_auth_challenge_response"]; ok && v.(string) != "" { configs.VerifyAuthChallengeResponse = aws.String(v.(string)) } @@ -2391,6 +2552,10 @@ func flattenCognitoUserPoolLambdaConfig(s *cognitoidentityprovider.LambdaConfigT m["pre_token_generation"] = *s.PreTokenGeneration } + if s.UserMigration != nil { + m["user_migration"] = *s.UserMigration + } + if s.VerifyAuthChallengeResponse != nil { m["verify_auth_challenge_response"] = *s.VerifyAuthChallengeResponse } @@ -2683,6 +2848,42 @@ func flattenCognitoUserPoolPasswordPolicy(s *cognitoidentityprovider.PasswordPol return []map[string]interface{}{} } +func expandCognitoResourceServerScope(inputs []interface{}) []*cognitoidentityprovider.ResourceServerScopeType { + configs := make([]*cognitoidentityprovider.ResourceServerScopeType, len(inputs), len(inputs)) + for i, input := range inputs { + param := input.(map[string]interface{}) + config := &cognitoidentityprovider.ResourceServerScopeType{} + + if v, ok := param["scope_description"]; ok { + config.ScopeDescription = aws.String(v.(string)) + } + + if v, ok := param["scope_name"]; ok { + config.ScopeName = aws.String(v.(string)) + } + + configs[i] = config + } + + return configs +} + +func flattenCognitoResourceServerScope(inputs []*cognitoidentityprovider.ResourceServerScopeType) []map[string]interface{} { + values := make([]map[string]interface{}, 0) + + for _, input := range inputs { + if input == nil { + continue + } + var value = map[string]interface{}{ + "scope_name": aws.StringValue(input.ScopeName), + "scope_description": aws.StringValue(input.ScopeDescription), + } + values = append(values, value) + } + return values +} + func expandCognitoUserPoolSchema(inputs []interface{}) []*cognitoidentityprovider.SchemaAttributeType { configs := make([]*cognitoidentityprovider.SchemaAttributeType, len(inputs), len(inputs)) @@ -3005,8 +3206,22 @@ func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentit } } } - if !configured && cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input) { - continue + if !configured { + if cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input) { + continue + } + // When adding a Cognito Identity Provider, the API will automatically add an "identities" attribute + identitiesAttribute := cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("identities"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{}, + } + if reflect.DeepEqual(*input, identitiesAttribute) { + continue + } } var value = map[string]interface{}{ @@ -3425,13 +3640,15 @@ func flattenMqUsers(users []*mq.User, cfgUsers []interface{}) *schema.Set { out := make([]interface{}, 0) for _, u := range users { + m := map[string]interface{}{ + "username": *u.Username, + } password := "" if p, ok := existingPairs[*u.Username]; ok { password = p } - m := map[string]interface{}{ - "username": *u.Username, - "password": password, + if password != "" { + m["password"] = password } if u.ConsoleAccess != nil { m["console_access"] = *u.ConsoleAccess @@ -3523,6 +3740,36 @@ func flattenMqBrokerInstances(instances []*mq.BrokerInstance) []interface{} { return l } +func flattenResourceLifecycleConfig(rlc *elasticbeanstalk.ApplicationResourceLifecycleConfig) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + + anything_enabled := false + appversion_lifecycle := make(map[string]interface{}) + + if rlc.ServiceRole != nil { + appversion_lifecycle["service_role"] = *rlc.ServiceRole + } + + if vlc := rlc.VersionLifecycleConfig; vlc != nil { + if mar := vlc.MaxAgeRule; mar != nil && *mar.Enabled { + anything_enabled = true + appversion_lifecycle["max_age_in_days"] = *mar.MaxAgeInDays + appversion_lifecycle["delete_source_from_s3"] = *mar.DeleteSourceFromS3 + } + if mcr := vlc.MaxCountRule; mcr != nil && *mcr.Enabled { + anything_enabled = true + appversion_lifecycle["max_count"] = *mcr.MaxCount + appversion_lifecycle["delete_source_from_s3"] = *mcr.DeleteSourceFromS3 + } + } + + if anything_enabled { + result = append(result, appversion_lifecycle) + } + + return result +} + func diffDynamoDbGSI(oldGsi, newGsi []interface{}) (ops []*dynamodb.GlobalSecondaryIndexUpdate, e error) { // Transform slices into maps oldGsis := make(map[string]interface{}) @@ -3648,6 +3895,25 @@ func flattenDynamoDbTtl(ttlDesc *dynamodb.TimeToLiveDescription) []interface{} { return []interface{}{} } +func flattenDynamoDbPitr(pitrDesc *dynamodb.DescribeContinuousBackupsOutput) []interface{} { + m := map[string]interface{}{ + "enabled": false, + } + + if pitrDesc == nil { + return []interface{}{m} + } + + if pitrDesc.ContinuousBackupsDescription != nil { + pitr := pitrDesc.ContinuousBackupsDescription.PointInTimeRecoveryDescription + if pitr != nil { + m["enabled"] = (*pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled) + } + } + + return []interface{}{m} +} + func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error { d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits) d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits) @@ -3938,3 +4204,150 @@ func flattenIotThingTypeProperties(s *iot.ThingTypeProperties) []map[string]inte return []map[string]interface{}{m} } + +func expandLaunchTemplateSpecification(specs []interface{}) (*autoscaling.LaunchTemplateSpecification, error) { + if len(specs) < 1 { + return nil, nil + } + + spec := specs[0].(map[string]interface{}) + + idValue, idOk := spec["id"] + nameValue, nameOk := spec["name"] + + if idValue == "" && nameValue == "" { + return nil, fmt.Errorf("One of `id` or `name` must be set for `launch_template`") + } + + result := &autoscaling.LaunchTemplateSpecification{} + + // DescribeAutoScalingGroups returns both name and id but LaunchTemplateSpecification + // allows only one of them to be set + if idOk && idValue != "" { + result.LaunchTemplateId = aws.String(idValue.(string)) + } else if nameOk && nameValue != "" { + result.LaunchTemplateName = aws.String(nameValue.(string)) + } + + if v, ok := spec["version"]; ok && v != "" { + result.Version = aws.String(v.(string)) + } + + return result, nil +} + +func flattenLaunchTemplateSpecification(lt *autoscaling.LaunchTemplateSpecification) []map[string]interface{} { + attrs := map[string]interface{}{} + result := make([]map[string]interface{}, 0) + + // id and name are always returned by DescribeAutoscalingGroups + attrs["id"] = *lt.LaunchTemplateId + attrs["name"] = *lt.LaunchTemplateName + + // version is returned only if it was previosly set + if lt.Version != nil { + attrs["version"] = *lt.Version + } else { + attrs["version"] = nil + } + + result = append(result, attrs) + + return result +} + +func flattenVpcPeeringConnectionOptions(options *ec2.VpcPeeringConnectionOptionsDescription) []map[string]interface{} { + m := map[string]interface{}{} + + if options.AllowDnsResolutionFromRemoteVpc != nil { + m["allow_remote_vpc_dns_resolution"] = *options.AllowDnsResolutionFromRemoteVpc + } + + if options.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { + m["allow_classic_link_to_remote_vpc"] = *options.AllowEgressFromLocalClassicLinkToRemoteVpc + } + + if options.AllowEgressFromLocalVpcToRemoteClassicLink != nil { + m["allow_vpc_to_remote_classic_link"] = *options.AllowEgressFromLocalVpcToRemoteClassicLink + } + + return []map[string]interface{}{m} +} + +func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringConnectionOptionsRequest { + options := &ec2.PeeringConnectionOptionsRequest{} + + if v, ok := m["allow_remote_vpc_dns_resolution"]; ok { + options.AllowDnsResolutionFromRemoteVpc = aws.Bool(v.(bool)) + } + + if v, ok := m["allow_classic_link_to_remote_vpc"]; ok { + options.AllowEgressFromLocalClassicLinkToRemoteVpc = aws.Bool(v.(bool)) + } + + if v, ok := m["allow_vpc_to_remote_classic_link"]; ok { + options.AllowEgressFromLocalVpcToRemoteClassicLink = aws.Bool(v.(bool)) + } + + return options +} + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} + +func expandMacieClassificationType(d *schema.ResourceData) *macie.ClassificationType { + continuous := macie.S3ContinuousClassificationTypeFull + oneTime := macie.S3OneTimeClassificationTypeNone + if v := d.Get("classification_type").([]interface{}); len(v) > 0 { + m := v[0].(map[string]interface{}) + continuous = m["continuous"].(string) + oneTime = m["one_time"].(string) + } + + return &macie.ClassificationType{ + Continuous: aws.String(continuous), + OneTime: aws.String(oneTime), + } +} + +func expandMacieClassificationTypeUpdate(d *schema.ResourceData) *macie.ClassificationTypeUpdate { + continuous := macie.S3ContinuousClassificationTypeFull + oneTime := macie.S3OneTimeClassificationTypeNone + if v := d.Get("classification_type").([]interface{}); len(v) > 0 { + m := v[0].(map[string]interface{}) + continuous = m["continuous"].(string) + oneTime = m["one_time"].(string) + } + + return &macie.ClassificationTypeUpdate{ + Continuous: aws.String(continuous), + OneTime: aws.String(oneTime), + } +} + +func flattenMacieClassificationType(classificationType *macie.ClassificationType) []map[string]interface{} { + if classificationType == nil { + return []map[string]interface{}{} + } + m := map[string]interface{}{ + "continuous": aws.StringValue(classificationType.Continuous), + "one_time": aws.StringValue(classificationType.OneTime), + } + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go new file mode 100644 index 000000000..3b72390ff --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go @@ -0,0 +1,67 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsACMPCA(oldTags, newTags []*acmpca.Tag) ([]*acmpca.Tag, []*acmpca.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*acmpca.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapACMPCA(create), remove +} + +func tagsFromMapACMPCA(m map[string]interface{}) []*acmpca.Tag { + result := []*acmpca.Tag{} + for k, v := range m { + result = append(result, &acmpca.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + }) + } + + return result +} + +func tagsToMapACMPCA(ts []*acmpca.Tag) map[string]string { + result := map[string]string{} + for _, t := range ts { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredACMPCA(t *acmpca.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go new file mode 100644 index 000000000..3c54716c9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go @@ -0,0 +1,133 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" + "github.com/hashicorp/terraform/helper/schema" +) + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsNeptune(tagsFromMapNeptune(o), tagsFromMapNeptune(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %s", remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.RemoveTagsFromResource(&neptune.RemoveTagsFromResourceInput{ + ResourceName: aws.String(arn), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %s", create) + _, err := conn.AddTagsToResource(&neptune.AddTagsToResourceInput{ + ResourceName: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsNeptune(oldTags, newTags []*neptune.Tag) ([]*neptune.Tag, []*neptune.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*neptune.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapNeptune(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapNeptune(m map[string]interface{}) []*neptune.Tag { + result := make([]*neptune.Tag, 0, len(m)) + for k, v := range m { + t := &neptune.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredNeptune(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapNeptune(ts []*neptune.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredNeptune(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredNeptune(t *neptune.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} + +func saveTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) error { + resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + + if err != nil { + return fmt.Errorf("[DEBUG] Error retreiving tags for ARN: %s", arn) + } + + var dt []*neptune.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList + } + + return d.Set("tags", tagsToMapNeptune(dt)) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go new file mode 100644 index 000000000..559218317 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go @@ -0,0 +1,74 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsSecretsManager(oldTags, newTags []*secretsmanager.Tag) ([]*secretsmanager.Tag, []*secretsmanager.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[*t.Key] = *t.Value + } + + // Build the list of what to remove + var remove []*secretsmanager.Tag + for _, t := range oldTags { + old, ok := create[*t.Key] + if !ok || old != *t.Value { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapSecretsManager(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapSecretsManager(m map[string]interface{}) []*secretsmanager.Tag { + result := make([]*secretsmanager.Tag, 0, len(m)) + for k, v := range m { + t := &secretsmanager.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredSecretsManager(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapSecretsManager(ts []*secretsmanager.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredSecretsManager(t) { + result[*t.Key] = *t.Value + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredSecretsManager(t *secretsmanager.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go new file mode 100644 index 000000000..9168d39e2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_apigateway.go @@ -0,0 +1,44 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func setTagsAPIGatewayStage(conn *apigateway.APIGateway, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsGeneric(o, n) + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + keys := make([]*string, 0, len(remove)) + for k := range remove { + keys = append(keys, aws.String(k)) + } + + _, err := conn.UntagResource(&apigateway.UntagResourceInput{ + ResourceArn: aws.String(arn), + TagKeys: keys, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&apigateway.TagResourceInput{ + ResourceArn: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go index a5622e95d..fe1e5f28a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go @@ -9,6 +9,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) +// Kinesis requires tagging operations be split into 10 tag batches +const kinesisTagBatchLimit = 10 + // setTags is a helper to set the tags for a resource. It expects the // tags field to be named "tags" func setTagsKinesis(conn *kinesis.Kinesis, d *schema.ResourceData) error { @@ -24,34 +27,51 @@ func setTagsKinesis(conn *kinesis.Kinesis, d *schema.ResourceData) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) - for i, t := range remove { - k[i] = t.Key - } - _, err := conn.RemoveTagsFromStream(&kinesis.RemoveTagsFromStreamInput{ - StreamName: aws.String(sn), - TagKeys: k, - }) - if err != nil { - return err + tagKeysBatch := make([]*string, 0, kinesisTagBatchLimit) + tagKeysBatches := make([][]*string, 0, len(remove)/kinesisTagBatchLimit+1) + for _, tag := range remove { + if len(tagKeysBatch) == kinesisTagBatchLimit { + tagKeysBatches = append(tagKeysBatches, tagKeysBatch) + tagKeysBatch = make([]*string, 0, kinesisTagBatchLimit) + } + tagKeysBatch = append(tagKeysBatch, tag.Key) + } + tagKeysBatches = append(tagKeysBatches, tagKeysBatch) + + for _, tagKeys := range tagKeysBatches { + _, err := conn.RemoveTagsFromStream(&kinesis.RemoveTagsFromStreamInput{ + StreamName: aws.String(sn), + TagKeys: tagKeys, + }) + if err != nil { + return err + } } } if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v", create) - t := make(map[string]*string) - for _, tag := range create { - t[*tag.Key] = tag.Value - } - _, err := conn.AddTagsToStream(&kinesis.AddTagsToStreamInput{ - StreamName: aws.String(sn), - Tags: t, - }) - if err != nil { - return err + tagsBatch := make(map[string]*string) + tagsBatches := make([]map[string]*string, 0, len(create)/kinesisTagBatchLimit+1) + for _, tag := range create { + if len(tagsBatch) == kinesisTagBatchLimit { + tagsBatches = append(tagsBatches, tagsBatch) + tagsBatch = make(map[string]*string) + } + tagsBatch[aws.StringValue(tag.Key)] = tag.Value + } + tagsBatches = append(tagsBatches, tagsBatch) + + for _, tags := range tagsBatches { + _, err := conn.AddTagsToStream(&kinesis.AddTagsToStreamInput{ + StreamName: aws.String(sn), + Tags: tags, + }) + if err != nil { + return err + } } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go index 3fcbdb1b4..f26861d34 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go @@ -17,6 +17,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" "github.com/hashicorp/terraform/helper/validation" @@ -52,6 +53,27 @@ func validateRdsIdentifier(v interface{}, k string) (ws []string, errors []error return } +func validateNeptuneIdentifier(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { @@ -69,6 +91,23 @@ func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors [ return } +func validateNeptuneIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + return +} + func validateRdsEngine() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ "aurora", @@ -77,6 +116,12 @@ func validateRdsEngine() schema.SchemaValidateFunc { }, false) } +func validateNeptuneEngine() schema.SchemaValidateFunc { + return validation.StringInSlice([]string{ + "neptune", + }, false) +} + func validateElastiCacheClusterId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if (len(value) < 1) || (len(value) > 20) { @@ -128,23 +173,23 @@ func validateDbParamGroupName(v interface{}, k string) (ws []string, errors []er value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) } if !regexp.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) + "first character of parameter group %q must be a letter", k)) } if regexp.MustCompile(`--`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) + "parameter group %q cannot contain two consecutive hyphens", k)) } if regexp.MustCompile(`-$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) + "parameter group %q cannot end with a hyphen", k)) } if len(value) > 255 { errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) + "parameter group %q cannot be greater than 255 characters", k)) } return } @@ -153,19 +198,19 @@ func validateDbParamGroupNamePrefix(v interface{}, k string) (ws []string, error value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) } if !regexp.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) + "first character of parameter group %q must be a letter", k)) } if regexp.MustCompile(`--`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) + "parameter group %q cannot contain two consecutive hyphens", k)) } if len(value) > 255 { errors = append(errors, fmt.Errorf( - "%q cannot be greater than 226 characters", k)) + "parameter group %q cannot be greater than 226 characters", k)) } return } @@ -368,6 +413,24 @@ func validateLambdaPermissionAction(v interface{}, k string) (ws []string, error return } +func validateLambdaPermissionEventSourceToken(v interface{}, k string) (ws []string, errors []error) { + // https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html + value := v.(string) + + if len(value) > 256 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 256 characters: %q", k, value)) + } + + pattern := `^[a-zA-Z0-9._\-]+$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q doesn't comply with restrictions (%q): %q", + k, pattern, value)) + } + + return +} + func validateAwsAccountId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) @@ -543,6 +606,7 @@ func validateS3BucketLifecycleTimestamp(v interface{}, k string) (ws []string, e func validateS3BucketLifecycleStorageClass() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ + s3.TransitionStorageClassOnezoneIa, s3.TransitionStorageClassStandardIa, s3.TransitionStorageClassGlacier, }, false) @@ -947,6 +1011,23 @@ func validateDbSubnetGroupName(v interface{}, k string) (ws []string, errors []e return } +func validateNeptuneSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 255 characters", k)) + } + if value == "default" { + errors = append(errors, fmt.Errorf( + "%q is not allowed as %q", "Default", k)) + } + return +} + func validateDbSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { @@ -960,6 +1041,20 @@ func validateDbSubnetGroupNamePrefix(v interface{}, k string) (ws []string, erro return } +func validateNeptuneSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) + } + prefixMaxLength := 255 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than %d characters", k, prefixMaxLength)) + } + return +} + func validateDbOptionGroupName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[a-z]`).MatchString(value) { @@ -1385,6 +1480,21 @@ func validateCognitoUserPoolClientURL(v interface{}, k string) (ws []string, es return } +func validateCognitoResourceServerScopeName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) + } + if len(value) > 256 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 256 character", k)) + } + if !regexp.MustCompile(`[\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q must satisfy regular expression pattern: [\\x21\\x23-\\x2E\\x30-\\x5B\\x5D-\\x7E]+", k)) + } + return +} + func validateWafMetricName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9A-Za-z]+$`).MatchString(value) { @@ -1397,12 +1507,13 @@ func validateWafMetricName(v interface{}, k string) (ws []string, errors []error func validateWafPredicatesType() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ - waf.PredicateTypeIpmatch, waf.PredicateTypeByteMatch, - waf.PredicateTypeSqlInjectionMatch, - waf.PredicateTypeSizeConstraint, - waf.PredicateTypeXssMatch, waf.PredicateTypeGeoMatch, + waf.PredicateTypeIpmatch, + waf.PredicateTypeRegexMatch, + waf.PredicateTypeSizeConstraint, + waf.PredicateTypeSqlInjectionMatch, + waf.PredicateTypeXssMatch, }, false) } @@ -1740,3 +1851,77 @@ func validateDynamoDbTableAttributes(d *schema.ResourceDiff) error { return nil } + +func validateLaunchTemplateName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) < 3 { + errors = append(errors, fmt.Errorf("%q cannot be less than 3 characters", k)) + } else if strings.HasSuffix(k, "prefix") && len(value) > 99 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 99 characters, name is limited to 125", k)) + } else if !strings.HasSuffix(k, "prefix") && len(value) > 125 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 125 characters", k)) + } else if !regexp.MustCompile(`^[0-9a-zA-Z()./_\-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q can only alphanumeric characters and ()./_- symbols", k)) + } + return +} + +func validateLaunchTemplateId(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be shorter than 1 character", k)) + } else if len(value) > 255 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 255 characters", k)) + } else if !regexp.MustCompile(`^lt\-[a-z0-9]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must begin with 'lt-' and be comprised of only alphanumeric characters: %v", k, value)) + } + return +} + +func validateNeptuneParamGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 255 characters", k)) + } + return +} + +func validateNeptuneParamGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + prefixMaxLength := 255 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than %d characters", k, prefixMaxLength)) + } + return +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 90de5b930..081d685ba 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -261,812 +261,924 @@ "revisionTime": "2016-01-15T23:47:25Z" }, { - "checksumSHA1": "Fs3DE5rdov9GRx+jUJ7VfG/EBvA=", + "checksumSHA1": "36e2OadMiTAbRp58Y0oBAuxJT2Y=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", + "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", + "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", + "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", + "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", + "checksumSHA1": "eI5TmiOTCFjEUNvWeceFycs9dRU=", + "path": "github.com/aws/aws-sdk-go/aws/csm", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "6DRhqSAN7O45gYfRIpwDeuJE8j8=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", + "checksumSHA1": "uPkjJo+J10vbEukYYXmf0w7Cn4Q=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Sv3a7nAY/z1ZHiQ1eN0SE0rLLtQ=", + "checksumSHA1": "Q1co3y5Y8rRIEjEXEfUZ9SwTmic=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", + "checksumSHA1": "Ia/AZ2fZp7J4lMO6fpkvfLU/HGY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", + "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", + "checksumSHA1": "Dj9WOMBPbboyUJV4GB99PwPcO4g=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", + "path": "github.com/aws/aws-sdk-go/internal/sdkuri", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", + "checksumSHA1": "ZX5QHZb0PrK4UF45um2kaAEiX+8=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", + "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", + "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", + "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "CTsp/h3FbFg9QizH4bH1abLwljg=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", + "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", + "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", + "checksumSHA1": "4dWtH/HkBpS7TnTf21+HOrE1zFc=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "krjKYP+Z5qrFgZkHccphnuPdYd0=", + "checksumSHA1": "4xFqSOZkwDKot6FJQQgKjhJFoQw=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", + "checksumSHA1": "3e/4A/8NqTOSXEtJ6KhYAqqWnuY=", + "path": "github.com/aws/aws-sdk-go/service/acmpca", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "FjnLIflNek7g0j5NKT3qFkNtdY8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", + "checksumSHA1": "K/ynSj/L2OzW+9Zqs2PRe8NzYUc=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "s0TQJfF7ZqeS9IH4hdvX5EQk2l8=", + "checksumSHA1": "owhfVKeKxjXt4P5KO6PSIjnMLIA=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", + "checksumSHA1": "3JN52M5wxJMazxQWXB4epL78LNQ=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", + "checksumSHA1": "O5L1jCrbPe6adyTBIpSnydpToyk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "leWnf/5HCZ3nD79LpJ0EDNQnNrI=", + "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", + "checksumSHA1": "kPYTVg109H4HL8CKEf1yQvwKMw4=", + "path": "github.com/aws/aws-sdk-go/service/budgets", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "GhANcrglYWrhNSR/NzxNe3jClMk=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", + "checksumSHA1": "HmZRIixQ6u+zMz2Qt0iTU42WVZU=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", + "checksumSHA1": "BXG7bjiNrt222s+bZeimLAXODp4=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", + "checksumSHA1": "3q2FBK4CEarGbVeLCuuX+g1E3jk=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", + "checksumSHA1": "o+DFxugR5Cy/Wwlv7GSRRilTW4o=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", + "checksumSHA1": "7lCMA0KirL9isnwLj87LR2cjipU=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", + "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", + "checksumSHA1": "PV8Gt5eOyMFCT/+Y63CUrrY4V5k=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", + "checksumSHA1": "ysSU5yhqWT4+deQUYZiI8/1tJ2c=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "mLFFVXyhKLYgoKSJ17URM/GXdNc=", + "checksumSHA1": "GvjVVg5btXuEFEHqyoe19BZogGw=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "bh5IjjK9tKextJTq+gLV+6zhmL8=", + "checksumSHA1": "vklitYIK0AiOXA0obSTq0c04pc4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", + "checksumSHA1": "rL0O6L1zSJ/UQE0kEWUoCOOFDog=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", + "checksumSHA1": "Zc5M/qyd8bDCYuNRvFnF05gMp5s=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "qrxVu09idcoHIT2HqDJIbV3weUE=", + "checksumSHA1": "o9WTZk66Jlu+0UdO1wmtO3qp8ps=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "2CBd4VCNpKFk/fBIsLEJNG2Shps=", + "checksumSHA1": "/y7nXSnR9OqMoxlIl1hFcCk5kT8=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", + "checksumSHA1": "X1TkBdqZ/RWin1tr/FHWOGAFGsI=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "WMCgYV6S5ZeQo6pjIFTStdmBVcg=", + "checksumSHA1": "eAvb9FYZ6+lM9LhP7TrpNLrNn/Y=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", + "checksumSHA1": "9AU0+8dys0VKkN4NT1N/wwhnLIU=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", + "checksumSHA1": "a02+OXxnVBBBeaZpgs8dXUHj8b0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Ae8sc+KEu6BMw89WRwaq4Ol/87g=", + "checksumSHA1": "iCV19HfLlnGxp/WQXnf1j0WrSNk=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "12jA2n3aIJzdwvOxl+dvtx5S4CI=", + "checksumSHA1": "xSjeyAlY8+CyJ9nwDJ/3maeF9G4=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", + "checksumSHA1": "VD7bAh0n/UgOwRBPe5y38Ow/dHU=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", + "checksumSHA1": "xOm3N99bh70t1mP96ttlgnj/CNc=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", + "checksumSHA1": "tkcjBjsY0K9byl1c0XZupuafZVQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", + "checksumSHA1": "5QdblYPoDtRsQ8aczXOesIKTDpc=", + "path": "github.com/aws/aws-sdk-go/service/eks", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "kvsll2DfqS1hg97xSWMIcMan5as=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "s0INIDkP10AOmJkmTpCHpazIwUw=", + "checksumSHA1": "fx9nf/M9h4DpZY5pEdnh9DeCnsU=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", + "checksumSHA1": "BcT1GzSQ5j/x9A3OsFZWVBLnsxc=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", + "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", + "checksumSHA1": "Gp+QZjtg8PCNVi9X8m2SqtFvMas=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", + "checksumSHA1": "aenp73UfqiJbl1sw3Yx3fGASNjc=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", + "checksumSHA1": "oNOLs79R42Vsj/jYTYtrbyTWxcw=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hUosfOQhleGpv6UWGnbDf/eB5Ts=", + "checksumSHA1": "3hICqVOs1WmluYMZN9fTMbDQSyM=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", + "checksumSHA1": "tNVmAgvnURWLWibVCL7vIDYU7UM=", + "path": "github.com/aws/aws-sdk-go/service/fms", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "J1SHh0J6kX8JBD0+TQCFP+1Kij4=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "N1F3vRsnxAZyfr4v7iK+MagWuGU=", + "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Mc6WHGaAikP+uYx38VtKbl5KEYE=", + "checksumSHA1": "20er3HEJYcoJ1z0UumeaAkfOtpw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "YZJXefe33AjqEWaIm8ufdQc0atE=", + "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", + "checksumSHA1": "ae+jhUirSvN0IXPVU7X7xc+EbFE=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", + "checksumSHA1": "+KOm0n6lqwE3KWV4Kid2CFxmdRk=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "TpvdN/5q0qLBHZhQQlB4cyQOxR4=", + "checksumSHA1": "AIq7YTfZFlbyPUpv7fyjfB9k2sM=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", + "checksumSHA1": "7PMjfoyDLrnS2N09LgR6syWP8Gk=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", + "checksumSHA1": "TqLWVx6OQ+VqSMlzvokkC+IEv/k=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", + "checksumSHA1": "K4OamITKC7PKo1eHrSl0z8Visg0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", + "checksumSHA1": "7rQmR+jAZ4zUIC4upAxyxrbfzNM=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", + "checksumSHA1": "tX/3xEkl13DuKNIO0v3qYseEIvI=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", + "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", + "path": "github.com/aws/aws-sdk-go/service/macie", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "9NU6dJOvKvcgnl/4eUdwy4YD5ss=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", + "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", + "checksumSHA1": "E3i2/WM1kDE7WBOSRnDsZkwmZwI=", + "path": "github.com/aws/aws-sdk-go/service/neptune", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", + "checksumSHA1": "YCd2EU1DPiO0QTRZk6G1fLZAyg0=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "vL235vodhgG61BkUxRD4B7io+zk=", + "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", + "path": "github.com/aws/aws-sdk-go/service/pricing", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "Kv8hkh6CxOCAG73xohmft8z4I3g=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", + "checksumSHA1": "rwMv5M8vL6WvdvupGF5y+xOvFuQ=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", + "checksumSHA1": "KlM6azZ5G09MmPg+lzEizW2qaLA=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", + "checksumSHA1": "DmKatmbYsvm+MoCP01PCdQ6Y6Tk=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", + "checksumSHA1": "vv32189Rin9Nq5GrmwmpLziJsvU=", + "path": "github.com/aws/aws-sdk-go/service/secretsmanager", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "T8dOJ1jjEBdogUE03oRPRJCOY3k=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", + "checksumSHA1": "UhJ0RdPXzdMOUEBWREB5Zi9lgmY=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", + "checksumSHA1": "0vtFXRYnhlCCq8/zPv1O1YWIoSg=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", + "checksumSHA1": "1rJbvLXRsCzWhTihruRq/i0Zawg=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", + "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", + "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", + "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "IHVhprySAcelCzbTU/eumCZNu1I=", + "checksumSHA1": "UfgmCQjT787z6llIfGM9ZHzuydM=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", + "checksumSHA1": "baQQigT2uBO5p8GwjjoYnO0xMDw=", + "path": "github.com/aws/aws-sdk-go/service/storagegateway", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "UhIVLDgQc19wjrPj8pP7Fu2UwWc=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", + "checksumSHA1": "zSqEhiGtEK6ll3f1Rlf2tuDKQA8=", + "path": "github.com/aws/aws-sdk-go/service/swf", + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" + }, + { + "checksumSHA1": "H8Pa7irZ9gpuYGJk3uMK59gxGTs=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", + "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", @@ -2226,20 +2338,20 @@ "revisionTime": "2018-01-15T19:27:20Z" }, { - "checksumSHA1": "il+FbGDKwMfS/1uSj+FEliiFAS4=", + "checksumSHA1": "GwjOkJpLvKznbv5zS2hFbg9fI4g=", "path": "github.com/terraform-providers/terraform-provider-aws", - "revision": "6b76cd7527bb204337dc23a3254b345f3cfe4ef8", - "revisionTime": "2018-04-11T17:49:04Z", - "version": "v1.14.1", - "versionExact": "v1.14.1" + "revision": "73b3cdaead124418307a9229873d96e91865461b", + "revisionTime": "2018-07-26T06:39:15Z", + "version": "v1.29.0", + "versionExact": "v1.29.0" }, { - "checksumSHA1": "lObAHyWim5InTKVxY2MPZiCVvmc=", + "checksumSHA1": "H3BYw+vZ5IQ5HwjamJxeZpsYSXY=", "path": "github.com/terraform-providers/terraform-provider-aws/aws", - "revision": "6b76cd7527bb204337dc23a3254b345f3cfe4ef8", - "revisionTime": "2018-04-11T17:49:04Z", - "version": "v1.14.1", - "versionExact": "v1.14.1" + "revision": "73b3cdaead124418307a9229873d96e91865461b", + "revisionTime": "2018-07-26T06:39:15Z", + "version": "v1.29.0", + "versionExact": "v1.29.0" }, { "checksumSHA1": "7WDq0VsOJmABPUCEvfuerEp7mBg=",