diff --git a/go.mod b/go.mod index 7d8b52f8d66..fa01b06d7b8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-aws go 1.13 require ( - github.com/aws/aws-sdk-go v1.29.12 + github.com/aws/aws-sdk-go v1.29.16 github.com/beevik/etree v1.1.0 github.com/bflad/tfproviderdocs v0.5.0 github.com/bflad/tfproviderlint v0.10.0 diff --git a/go.sum b/go.sum index 0860b003c40..30a4a9730ce 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.29.12 h1:V2Z0/kQZsogK/KqkGkgcbcFh1pH7fhXWY+6aTty2G3k= -github.com/aws/aws-sdk-go v1.29.12/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.29.16 h1:Gbtod7Y4W/Ai7wPtesdvgGVTkFN8JxAaGouRLlcQfQs= +github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 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 f2d233a47f7..aaf521d6ccb 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 @@ -5820,6 +5820,13 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "xray": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, }, } 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 815fd77882c..aaa87302aac 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.29.12" +const SDKVersion = "1.29.16" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go index 1c6994cd30e..63706b6980b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go @@ -179,6 +179,8 @@ func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Requ // If your route matches a request, you can distribute traffic to one or more // target virtual nodes with relative weighting. // +// For more information about routes, see Routes (https://docs.aws.amazon.com//app-mesh/latest/userguide/routes.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. @@ -305,6 +307,8 @@ func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req * // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. // +// For more information about virtual nodes, see Virtual Nodes (https://docs.aws.amazon.com//app-mesh/latest/userguide/virtual_nodes.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. @@ -419,6 +423,8 @@ func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (r // mesh. After you create your virtual router, create and associate routes for // your virtual router that direct incoming requests to different virtual nodes. // +// For more information about virtual routers, see Virtual Routers (https://docs.aws.amazon.com//app-mesh/latest/userguide/virtual_routers.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. @@ -532,6 +538,8 @@ func (c *AppMesh) CreateVirtualServiceRequest(input *CreateVirtualServiceInput) // are routed to the virtual node or virtual router that is specified as the // provider for the virtual service. // +// For more information about virtual services, see Virtual Services (https://docs.aws.amazon.com//app-mesh/latest/userguide/virtual_services.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. @@ -3461,6 +3469,45 @@ func (s *Backend) SetVirtualService(v *VirtualServiceBackend) *Backend { return s } +// An object that represents the default properties for a backend. +type BackendDefaults struct { + _ struct{} `type:"structure"` + + // An object that represents a client policy. + ClientPolicy *ClientPolicy `locationName:"clientPolicy" type:"structure"` +} + +// String returns the string representation +func (s BackendDefaults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BackendDefaults) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BackendDefaults) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BackendDefaults"} + if s.ClientPolicy != nil { + if err := s.ClientPolicy.Validate(); err != nil { + invalidParams.AddNested("ClientPolicy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientPolicy sets the ClientPolicy field's value. +func (s *BackendDefaults) SetClientPolicy(v *ClientPolicy) *BackendDefaults { + s.ClientPolicy = v + return s +} + // The request syntax was malformed. Check your request syntax and try again. type BadRequestException struct { _ struct{} `type:"structure"` @@ -3517,6 +3564,105 @@ func (s BadRequestException) RequestID() string { return s.respMetadata.RequestID } +// An object that represents a client policy. +type ClientPolicy struct { + _ struct{} `type:"structure"` + + // An object that represents a Transport Layer Security (TLS) client policy. + Tls *ClientPolicyTls `locationName:"tls" type:"structure"` +} + +// String returns the string representation +func (s ClientPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClientPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClientPolicy"} + if s.Tls != nil { + if err := s.Tls.Validate(); err != nil { + invalidParams.AddNested("Tls", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTls sets the Tls field's value. +func (s *ClientPolicy) SetTls(v *ClientPolicyTls) *ClientPolicy { + s.Tls = v + return s +} + +// An object that represents a Transport Layer Security (TLS) client policy. +type ClientPolicyTls struct { + _ struct{} `type:"structure"` + + Enforce *bool `locationName:"enforce" type:"boolean"` + + Ports []*int64 `locationName:"ports" type:"list"` + + // An object that represents a Transport Layer Security (TLS) validation context. + // + // Validation is a required field + Validation *TlsValidationContext `locationName:"validation" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ClientPolicyTls) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientPolicyTls) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClientPolicyTls) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClientPolicyTls"} + if s.Validation == nil { + invalidParams.Add(request.NewErrParamRequired("Validation")) + } + if s.Validation != nil { + if err := s.Validation.Validate(); err != nil { + invalidParams.AddNested("Validation", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnforce sets the Enforce field's value. +func (s *ClientPolicyTls) SetEnforce(v bool) *ClientPolicyTls { + s.Enforce = &v + return s +} + +// SetPorts sets the Ports field's value. +func (s *ClientPolicyTls) SetPorts(v []*int64) *ClientPolicyTls { + s.Ports = v + return s +} + +// SetValidation sets the Validation field's value. +func (s *ClientPolicyTls) SetValidation(v *TlsValidationContext) *ClientPolicyTls { + s.Validation = v + return s +} + // The request contains a client token that was used for a previous update resource // call with different specifications. Try the request again with a new client // token. @@ -5265,7 +5411,7 @@ func (s *GrpcRetryPolicy) SetTcpRetryEvents(v []*string) *GrpcRetryPolicy { return s } -// An object that represents a GRPC route type. +// An object that represents a gRPC route type. type GrpcRoute struct { _ struct{} `type:"structure"` @@ -5885,7 +6031,7 @@ func (s *HttpRetryPolicy) SetTcpRetryEvents(v []*string) *HttpRetryPolicy { return s } -// An object that represents an HTTP or HTTP2 route type. +// An object that represents an HTTP or HTTP/2 route type. type HttpRoute struct { _ struct{} `type:"structure"` @@ -6810,6 +6956,10 @@ type Listener struct { // // PortMapping is a required field PortMapping *PortMapping `locationName:"portMapping" type:"structure" required:"true"` + + // An object that represents the Transport Layer Security (TLS) properties for + // a listener. + Tls *ListenerTls `locationName:"tls" type:"structure"` } // String returns the string representation @@ -6838,6 +6988,11 @@ func (s *Listener) Validate() error { invalidParams.AddNested("PortMapping", err.(request.ErrInvalidParams)) } } + if s.Tls != nil { + if err := s.Tls.Validate(); err != nil { + invalidParams.AddNested("Tls", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -6857,6 +7012,218 @@ func (s *Listener) SetPortMapping(v *PortMapping) *Listener { return s } +// SetTls sets the Tls field's value. +func (s *Listener) SetTls(v *ListenerTls) *Listener { + s.Tls = v + return s +} + +// An object that represents the Transport Layer Security (TLS) properties for +// a listener. +type ListenerTls struct { + _ struct{} `type:"structure"` + + // An object that represents a listener's Transport Layer Security (TLS) certificate. + // + // Certificate is a required field + Certificate *ListenerTlsCertificate `locationName:"certificate" type:"structure" required:"true"` + + // Mode is a required field + Mode *string `locationName:"mode" type:"string" required:"true" enum:"ListenerTlsMode"` +} + +// String returns the string representation +func (s ListenerTls) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListenerTls) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListenerTls) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListenerTls"} + if s.Certificate == nil { + invalidParams.Add(request.NewErrParamRequired("Certificate")) + } + if s.Mode == nil { + invalidParams.Add(request.NewErrParamRequired("Mode")) + } + if s.Certificate != nil { + if err := s.Certificate.Validate(); err != nil { + invalidParams.AddNested("Certificate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificate sets the Certificate field's value. +func (s *ListenerTls) SetCertificate(v *ListenerTlsCertificate) *ListenerTls { + s.Certificate = v + return s +} + +// SetMode sets the Mode field's value. +func (s *ListenerTls) SetMode(v string) *ListenerTls { + s.Mode = &v + return s +} + +// An object that represents an AWS Certicate Manager (ACM) certificate. +type ListenerTlsAcmCertificate struct { + _ struct{} `type:"structure"` + + // CertificateArn is a required field + CertificateArn *string `locationName:"certificateArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListenerTlsAcmCertificate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListenerTlsAcmCertificate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListenerTlsAcmCertificate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListenerTlsAcmCertificate"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *ListenerTlsAcmCertificate) SetCertificateArn(v string) *ListenerTlsAcmCertificate { + s.CertificateArn = &v + return s +} + +// An object that represents a listener's Transport Layer Security (TLS) certificate. +type ListenerTlsCertificate struct { + _ struct{} `type:"structure"` + + // An object that represents an AWS Certicate Manager (ACM) certificate. + Acm *ListenerTlsAcmCertificate `locationName:"acm" type:"structure"` + + // An object that represents a local file certificate. The certificate must + // meet specific requirements and you must have proxy authorization enabled. + // For more information, see TLS Encryption (https://docs.aws.amazon.com//app-mesh/latest/userguide/virtual-node-tls.html#virtual-node-tls-prerequisites). + File *ListenerTlsFileCertificate `locationName:"file" type:"structure"` +} + +// String returns the string representation +func (s ListenerTlsCertificate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListenerTlsCertificate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListenerTlsCertificate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListenerTlsCertificate"} + if s.Acm != nil { + if err := s.Acm.Validate(); err != nil { + invalidParams.AddNested("Acm", err.(request.ErrInvalidParams)) + } + } + if s.File != nil { + if err := s.File.Validate(); err != nil { + invalidParams.AddNested("File", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcm sets the Acm field's value. +func (s *ListenerTlsCertificate) SetAcm(v *ListenerTlsAcmCertificate) *ListenerTlsCertificate { + s.Acm = v + return s +} + +// SetFile sets the File field's value. +func (s *ListenerTlsCertificate) SetFile(v *ListenerTlsFileCertificate) *ListenerTlsCertificate { + s.File = v + return s +} + +// An object that represents a local file certificate. The certificate must +// meet specific requirements and you must have proxy authorization enabled. +// For more information, see TLS Encryption (https://docs.aws.amazon.com//app-mesh/latest/userguide/virtual-node-tls.html#virtual-node-tls-prerequisites). +type ListenerTlsFileCertificate struct { + _ struct{} `type:"structure"` + + // CertificateChain is a required field + CertificateChain *string `locationName:"certificateChain" min:"1" type:"string" required:"true"` + + // PrivateKey is a required field + PrivateKey *string `locationName:"privateKey" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListenerTlsFileCertificate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListenerTlsFileCertificate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListenerTlsFileCertificate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListenerTlsFileCertificate"} + if s.CertificateChain == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateChain")) + } + if s.CertificateChain != nil && len(*s.CertificateChain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) + } + if s.PrivateKey == nil { + invalidParams.Add(request.NewErrParamRequired("PrivateKey")) + } + if s.PrivateKey != nil && len(*s.PrivateKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PrivateKey", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *ListenerTlsFileCertificate) SetCertificateChain(v string) *ListenerTlsFileCertificate { + s.CertificateChain = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *ListenerTlsFileCertificate) SetPrivateKey(v string) *ListenerTlsFileCertificate { + s.PrivateKey = &v + return s +} + // An object that represents the logging information for a virtual node. type Logging struct { _ struct{} `type:"structure"` @@ -7455,13 +7822,13 @@ func (s *RouteRef) SetVirtualRouterName(v string) *RouteRef { type RouteSpec struct { _ struct{} `type:"structure"` - // An object that represents a GRPC route type. + // An object that represents a gRPC route type. GrpcRoute *GrpcRoute `locationName:"grpcRoute" type:"structure"` - // An object that represents an HTTP or HTTP2 route type. + // An object that represents an HTTP or HTTP/2 route type. Http2Route *HttpRoute `locationName:"http2Route" type:"structure"` - // An object that represents an HTTP or HTTP2 route type. + // An object that represents an HTTP or HTTP/2 route type. HttpRoute *HttpRoute `locationName:"httpRoute" type:"structure"` Priority *int64 `locationName:"priority" type:"integer"` @@ -7893,6 +8260,189 @@ func (s *TcpRouteAction) SetWeightedTargets(v []*WeightedTarget) *TcpRouteAction return s } +// An object that represents a Transport Layer Security (TLS) validation context. +type TlsValidationContext struct { + _ struct{} `type:"structure"` + + // An object that represents a Transport Layer Security (TLS) validation context + // trust. + // + // Trust is a required field + Trust *TlsValidationContextTrust `locationName:"trust" type:"structure" required:"true"` +} + +// String returns the string representation +func (s TlsValidationContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsValidationContext) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TlsValidationContext) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TlsValidationContext"} + if s.Trust == nil { + invalidParams.Add(request.NewErrParamRequired("Trust")) + } + if s.Trust != nil { + if err := s.Trust.Validate(); err != nil { + invalidParams.AddNested("Trust", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTrust sets the Trust field's value. +func (s *TlsValidationContext) SetTrust(v *TlsValidationContextTrust) *TlsValidationContext { + s.Trust = v + return s +} + +// An object that represents a TLS validation context trust for an AWS Certicate +// Manager (ACM) certificate. +type TlsValidationContextAcmTrust struct { + _ struct{} `type:"structure"` + + // CertificateAuthorityArns is a required field + CertificateAuthorityArns []*string `locationName:"certificateAuthorityArns" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TlsValidationContextAcmTrust) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsValidationContextAcmTrust) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TlsValidationContextAcmTrust) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TlsValidationContextAcmTrust"} + if s.CertificateAuthorityArns == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArns")) + } + if s.CertificateAuthorityArns != nil && len(s.CertificateAuthorityArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArns sets the CertificateAuthorityArns field's value. +func (s *TlsValidationContextAcmTrust) SetCertificateAuthorityArns(v []*string) *TlsValidationContextAcmTrust { + s.CertificateAuthorityArns = v + return s +} + +// An object that represents a Transport Layer Security (TLS) validation context +// trust for a local file. +type TlsValidationContextFileTrust struct { + _ struct{} `type:"structure"` + + // CertificateChain is a required field + CertificateChain *string `locationName:"certificateChain" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TlsValidationContextFileTrust) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsValidationContextFileTrust) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TlsValidationContextFileTrust) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TlsValidationContextFileTrust"} + if s.CertificateChain == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateChain")) + } + if s.CertificateChain != nil && len(*s.CertificateChain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *TlsValidationContextFileTrust) SetCertificateChain(v string) *TlsValidationContextFileTrust { + s.CertificateChain = &v + return s +} + +// An object that represents a Transport Layer Security (TLS) validation context +// trust. +type TlsValidationContextTrust struct { + _ struct{} `type:"structure"` + + // An object that represents a TLS validation context trust for an AWS Certicate + // Manager (ACM) certificate. + Acm *TlsValidationContextAcmTrust `locationName:"acm" type:"structure"` + + // An object that represents a Transport Layer Security (TLS) validation context + // trust for a local file. + File *TlsValidationContextFileTrust `locationName:"file" type:"structure"` +} + +// String returns the string representation +func (s TlsValidationContextTrust) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsValidationContextTrust) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TlsValidationContextTrust) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TlsValidationContextTrust"} + if s.Acm != nil { + if err := s.Acm.Validate(); err != nil { + invalidParams.AddNested("Acm", err.(request.ErrInvalidParams)) + } + } + if s.File != nil { + if err := s.File.Validate(); err != nil { + invalidParams.AddNested("File", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcm sets the Acm field's value. +func (s *TlsValidationContextTrust) SetAcm(v *TlsValidationContextAcmTrust) *TlsValidationContextTrust { + s.Acm = v + return s +} + +// SetFile sets the File field's value. +func (s *TlsValidationContextTrust) SetFile(v *TlsValidationContextFileTrust) *TlsValidationContextTrust { + s.File = v + return s +} + // The maximum request rate permitted by the App Mesh APIs has been exceeded // for your account. For best results, use an increasing or variable sleep interval // between requests. @@ -8748,6 +9298,9 @@ func (s *VirtualNodeServiceProvider) SetVirtualNodeName(v string) *VirtualNodeSe type VirtualNodeSpec struct { _ struct{} `type:"structure"` + // An object that represents the default properties for a backend. + BackendDefaults *BackendDefaults `locationName:"backendDefaults" type:"structure"` + Backends []*Backend `locationName:"backends" type:"list"` Listeners []*Listener `locationName:"listeners" type:"list"` @@ -8773,6 +9326,11 @@ func (s VirtualNodeSpec) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *VirtualNodeSpec) Validate() error { invalidParams := request.ErrInvalidParams{Context: "VirtualNodeSpec"} + if s.BackendDefaults != nil { + if err := s.BackendDefaults.Validate(); err != nil { + invalidParams.AddNested("BackendDefaults", err.(request.ErrInvalidParams)) + } + } if s.Backends != nil { for i, v := range s.Backends { if v == nil { @@ -8810,6 +9368,12 @@ func (s *VirtualNodeSpec) Validate() error { return nil } +// SetBackendDefaults sets the BackendDefaults field's value. +func (s *VirtualNodeSpec) SetBackendDefaults(v *BackendDefaults) *VirtualNodeSpec { + s.BackendDefaults = v + return s +} + // SetBackends sets the Backends field's value. func (s *VirtualNodeSpec) SetBackends(v []*Backend) *VirtualNodeSpec { s.Backends = v @@ -9124,6 +9688,9 @@ func (s *VirtualRouterStatus) SetStatus(v string) *VirtualRouterStatus { type VirtualServiceBackend struct { _ struct{} `type:"structure"` + // An object that represents a client policy. + ClientPolicy *ClientPolicy `locationName:"clientPolicy" type:"structure"` + // VirtualServiceName is a required field VirtualServiceName *string `locationName:"virtualServiceName" type:"string" required:"true"` } @@ -9144,6 +9711,11 @@ func (s *VirtualServiceBackend) Validate() error { if s.VirtualServiceName == nil { invalidParams.Add(request.NewErrParamRequired("VirtualServiceName")) } + if s.ClientPolicy != nil { + if err := s.ClientPolicy.Validate(); err != nil { + invalidParams.AddNested("ClientPolicy", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9151,6 +9723,12 @@ func (s *VirtualServiceBackend) Validate() error { return nil } +// SetClientPolicy sets the ClientPolicy field's value. +func (s *VirtualServiceBackend) SetClientPolicy(v *ClientPolicy) *VirtualServiceBackend { + s.ClientPolicy = v + return s +} + // SetVirtualServiceName sets the VirtualServiceName field's value. func (s *VirtualServiceBackend) SetVirtualServiceName(v string) *VirtualServiceBackend { s.VirtualServiceName = &v @@ -9507,6 +10085,17 @@ const ( HttpSchemeHttps = "https" ) +const ( + // ListenerTlsModeDisabled is a ListenerTlsMode enum value + ListenerTlsModeDisabled = "DISABLED" + + // ListenerTlsModePermissive is a ListenerTlsMode enum value + ListenerTlsModePermissive = "PERMISSIVE" + + // ListenerTlsModeStrict is a ListenerTlsMode enum value + ListenerTlsModeStrict = "STRICT" +) + const ( // MeshStatusCodeActive is a MeshStatusCode enum value MeshStatusCodeActive = "ACTIVE" 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 1b5eb7b332a..dec4cd3834b 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 @@ -58,9 +58,27 @@ func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request // DeleteAlarms API operation for Amazon CloudWatch. // -// Deletes the specified alarms. You can delete up to 50 alarms in one operation. +// Deletes the specified alarms. You can delete up to 100 alarms in one operation. +// However, this total can include no more than one composite alarm. For example, +// you could delete 99 metric alarms and one composite alarms with one operation, +// but you can't delete two composite alarms with one operation. +// // In the event of an error, no alarms are deleted. // +// It is possible to create a loop or cycle of composite alarms, where composite +// alarm A depends on composite alarm B, and composite alarm B also depends +// on composite alarm A. In this scenario, you can't delete any composite alarm +// that is part of the cycle because there is always still a composite alarm +// that depends on that alarm that you want to delete. +// +// To get out of such a situation, you must break the cycle by changing the +// rule of one of the composite alarms in the cycle to remove a dependency that +// creates the cycle. The simplest change to make to break a cycle is to change +// the AlarmRule of one of the alarms to False. +// +// Additionally, the evaluation of composite alarms stops if CloudWatch detects +// a cycle in the evaluation path. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -408,7 +426,7 @@ func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInpu // // Retrieves the history for the specified alarm. You can filter the results // by date range or item type. If an alarm name is not specified, the histories -// for all alarms are returned. +// for either all metric alarms or all composite alarms are returned. // // CloudWatch retains the history of an alarm even if you delete the alarm. // @@ -547,9 +565,8 @@ func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *req // DescribeAlarms API operation for Amazon CloudWatch. // -// Retrieves the specified alarms. If no alarms are specified, all alarms are -// returned. Alarms can be retrieved by using only a prefix for the alarm name, -// the alarm state, or a prefix for any action. +// Retrieves the specified alarms. You can filter the results by specifying +// a a prefix for the alarm name, the alarm state, or a prefix for any 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 @@ -1513,7 +1530,7 @@ func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *reque // GetMetricData API operation for Amazon CloudWatch. // -// You can use the GetMetricData API to retrieve as many as 100 different metrics +// You can use the GetMetricData API to retrieve as many as 500 different metrics // in a single request, with a total of as many as 100,800 data points. You // can also optionally perform math expressions on the values of the returned // statistics, to create new time series that represent new insights into your @@ -2067,14 +2084,17 @@ func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.R // ListMetrics API operation for Amazon CloudWatch. // // List the specified metrics. You can use the returned metrics with GetMetricData -// or GetMetricStatistics to obtain statistical data. +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) +// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) +// to obtain statistical data. // // Up to 500 results are returned for any one call. To retrieve additional results, // use the returned token with subsequent calls. // // After you create a metric, allow up to fifteen minutes before the metric // appears. Statistics about the metric, however, are available sooner using -// GetMetricData or GetMetricStatistics. +// GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) +// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.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 @@ -2341,6 +2361,124 @@ func (c *CloudWatch) PutAnomalyDetectorWithContext(ctx aws.Context, input *PutAn return out, req.Send() } +const opPutCompositeAlarm = "PutCompositeAlarm" + +// PutCompositeAlarmRequest generates a "aws/request.Request" representing the +// client's request for the PutCompositeAlarm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutCompositeAlarm for more information on using the PutCompositeAlarm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutCompositeAlarmRequest method. +// req, resp := client.PutCompositeAlarmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutCompositeAlarm +func (c *CloudWatch) PutCompositeAlarmRequest(input *PutCompositeAlarmInput) (req *request.Request, output *PutCompositeAlarmOutput) { + op := &request.Operation{ + Name: opPutCompositeAlarm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutCompositeAlarmInput{} + } + + output = &PutCompositeAlarmOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutCompositeAlarm API operation for Amazon CloudWatch. +// +// Creates or updates a composite alarm. When you create a composite alarm, +// you specify a rule expression for the alarm that takes into account the alarm +// states of other alarms that you have created. The composite alarm goes into +// ALARM state only if all conditions of the rule are met. +// +// The alarms specified in a composite alarm's rule expression can include metric +// alarms and other composite alarms. +// +// Using composite alarms can reduce alarm noise. You can create multiple metric +// alarms, and also create a composite alarm and set up alerts only for the +// composite alarm. For example, you could create a composite alarm that goes +// into ALARM state only when more than one of the underlying metric alarms +// are in ALARM state. +// +// Currently, the only alarm actions that can be taken by composite alarms are +// notifying SNS topics. +// +// It is possible to create a loop or cycle of composite alarms, where composite +// alarm A depends on composite alarm B, and composite alarm B also depends +// on composite alarm A. In this scenario, you can't delete any composite alarm +// that is part of the cycle because there is always still a composite alarm +// that depends on that alarm that you want to delete. +// +// To get out of such a situation, you must break the cycle by changing the +// rule of one of the composite alarms in the cycle to remove a dependency that +// creates the cycle. The simplest change to make to break a cycle is to change +// the AlarmRule of one of the alarms to False. +// +// Additionally, the evaluation of composite alarms stops if CloudWatch detects +// a cycle in the evaluation path. +// +// When this operation creates an alarm, the alarm state is immediately set +// to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. +// Any actions associated with the new state are then executed. For a composite +// alarm, this initial time after creation is the only time that the alarm can +// be in INSUFFICIENT_DATA state. +// +// When you update an existing alarm, its state is left unchanged, but the update +// completely overwrites the previous configuration of the alarm. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 CloudWatch's +// API operation PutCompositeAlarm for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededFault "LimitExceeded" +// The quota for alarms for this customer has already been reached. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutCompositeAlarm +func (c *CloudWatch) PutCompositeAlarm(input *PutCompositeAlarmInput) (*PutCompositeAlarmOutput, error) { + req, out := c.PutCompositeAlarmRequest(input) + return out, req.Send() +} + +// PutCompositeAlarmWithContext is the same as PutCompositeAlarm with the addition of +// the ability to pass a context and additional request options. +// +// See PutCompositeAlarm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatch) PutCompositeAlarmWithContext(ctx aws.Context, input *PutCompositeAlarmInput, opts ...request.Option) (*PutCompositeAlarmOutput, error) { + req, out := c.PutCompositeAlarmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutDashboard = "PutDashboard" // PutDashboardRequest generates a "aws/request.Request" representing the @@ -2703,7 +2841,8 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // Publishes metric data points to Amazon CloudWatch. CloudWatch associates // the data points with the specified metric. If the specified metric does not // exist, CloudWatch creates the metric. When CloudWatch creates a metric, it -// can take up to fifteen minutes for the metric to appear in calls to ListMetrics. +// can take up to fifteen minutes for the metric to appear in calls to ListMetrics +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html). // // You can publish either individual data points in the Value field, or arrays // of values and the number of times each value occurred during the period by @@ -2727,8 +2866,12 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // in the Amazon CloudWatch User Guide. // // Data points with time stamps from 24 hours ago or longer can take at least -// 48 hours to become available for GetMetricData or GetMetricStatistics from -// the time they are submitted. +// 48 hours to become available for GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) +// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) +// from the time they are submitted. Data points with time stamps between 3 +// and 24 hours ago can take as much as 2 hours to become available for for +// GetMetricData (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) +// or GetMetricStatistics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html). // // CloudWatch needs raw data points to calculate percentile statistics. If you // publish data using a statistic set instead, you can only retrieve percentile @@ -2830,10 +2973,21 @@ func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *reque // state differs from the previous value, the action configured for the appropriate // state is invoked. For example, if your alarm is configured to send an Amazon // SNS message when an alarm is triggered, temporarily changing the alarm state -// to ALARM sends an SNS message. The alarm returns to its actual state (often -// within seconds). Because the alarm state change happens quickly, it is typically -// only visible in the alarm's History tab in the Amazon CloudWatch console -// or through DescribeAlarmHistory. +// to ALARM sends an SNS message. +// +// Metric alarms returns to their actual state quickly, often within seconds. +// Because the metric alarm state change happens quickly, it is typically only +// visible in the alarm's History tab in the Amazon CloudWatch console or through +// DescribeAlarmHistory (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarmHistory.html). +// +// If you use SetAlarmState on a composite alarm, the composite alarm is not +// guaranteed to return to its actual state. It will return to its actual state +// only once any of its children alarms change state. It is also re-evaluated +// if you update its configuration. +// +// If an alarm triggers EC2 Auto Scaling policies or application Auto Scaling +// policies, you must include information in the StateReasonData parameter to +// enable the policy to take the correct 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 @@ -3072,6 +3226,9 @@ type AlarmHistoryItem struct { // The descriptive name for the alarm. AlarmName *string `min:"1" type:"string"` + // The type of alarm, either metric alarm or composite alarm. + AlarmType *string `type:"string" enum:"AlarmType"` + // Data about the alarm, in JSON format. HistoryData *string `min:"1" type:"string"` @@ -3101,6 +3258,12 @@ func (s *AlarmHistoryItem) SetAlarmName(v string) *AlarmHistoryItem { return s } +// SetAlarmType sets the AlarmType field's value. +func (s *AlarmHistoryItem) SetAlarmType(v string) *AlarmHistoryItem { + s.AlarmType = &v + return s +} + // SetHistoryData sets the HistoryData field's value. func (s *AlarmHistoryItem) SetHistoryData(v string) *AlarmHistoryItem { s.HistoryData = &v @@ -3262,6 +3425,143 @@ func (s *AnomalyDetectorConfiguration) SetMetricTimezone(v string) *AnomalyDetec return s } +// The details about a composite alarm. +type CompositeAlarm struct { + _ struct{} `type:"structure"` + + // Indicates whether actions should be executed during any changes to the alarm + // state. + ActionsEnabled *bool `type:"boolean"` + + // The actions to execute when this alarm transitions to the ALARM state from + // any other state. Each action is specified as an Amazon Resource Name (ARN). + AlarmActions []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the alarm. + AlarmArn *string `min:"1" type:"string"` + + // The time stamp of the last update to the alarm configuration. + AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` + + // The description of the alarm. + AlarmDescription *string `type:"string"` + + // The name of the alarm. + AlarmName *string `min:"1" type:"string"` + + // The rule that this alarm uses to evaluate its alarm state. + AlarmRule *string `min:"1" type:"string"` + + // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA + // state from any other state. Each action is specified as an Amazon Resource + // Name (ARN). + InsufficientDataActions []*string `type:"list"` + + // The actions to execute when this alarm transitions to the OK state from any + // other state. Each action is specified as an Amazon Resource Name (ARN). + OKActions []*string `type:"list"` + + // An explanation for the alarm state, in text format. + StateReason *string `type:"string"` + + // An explanation for the alarm state, in JSON format. + StateReasonData *string `type:"string"` + + // The time stamp of the last update to the alarm state. + StateUpdatedTimestamp *time.Time `type:"timestamp"` + + // The state value for the alarm. + StateValue *string `type:"string" enum:"StateValue"` +} + +// String returns the string representation +func (s CompositeAlarm) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompositeAlarm) GoString() string { + return s.String() +} + +// SetActionsEnabled sets the ActionsEnabled field's value. +func (s *CompositeAlarm) SetActionsEnabled(v bool) *CompositeAlarm { + s.ActionsEnabled = &v + return s +} + +// SetAlarmActions sets the AlarmActions field's value. +func (s *CompositeAlarm) SetAlarmActions(v []*string) *CompositeAlarm { + s.AlarmActions = v + return s +} + +// SetAlarmArn sets the AlarmArn field's value. +func (s *CompositeAlarm) SetAlarmArn(v string) *CompositeAlarm { + s.AlarmArn = &v + return s +} + +// SetAlarmConfigurationUpdatedTimestamp sets the AlarmConfigurationUpdatedTimestamp field's value. +func (s *CompositeAlarm) SetAlarmConfigurationUpdatedTimestamp(v time.Time) *CompositeAlarm { + s.AlarmConfigurationUpdatedTimestamp = &v + return s +} + +// SetAlarmDescription sets the AlarmDescription field's value. +func (s *CompositeAlarm) SetAlarmDescription(v string) *CompositeAlarm { + s.AlarmDescription = &v + return s +} + +// SetAlarmName sets the AlarmName field's value. +func (s *CompositeAlarm) SetAlarmName(v string) *CompositeAlarm { + s.AlarmName = &v + return s +} + +// SetAlarmRule sets the AlarmRule field's value. +func (s *CompositeAlarm) SetAlarmRule(v string) *CompositeAlarm { + s.AlarmRule = &v + return s +} + +// SetInsufficientDataActions sets the InsufficientDataActions field's value. +func (s *CompositeAlarm) SetInsufficientDataActions(v []*string) *CompositeAlarm { + s.InsufficientDataActions = v + return s +} + +// SetOKActions sets the OKActions field's value. +func (s *CompositeAlarm) SetOKActions(v []*string) *CompositeAlarm { + s.OKActions = v + return s +} + +// SetStateReason sets the StateReason field's value. +func (s *CompositeAlarm) SetStateReason(v string) *CompositeAlarm { + s.StateReason = &v + return s +} + +// SetStateReasonData sets the StateReasonData field's value. +func (s *CompositeAlarm) SetStateReasonData(v string) *CompositeAlarm { + s.StateReasonData = &v + return s +} + +// SetStateUpdatedTimestamp sets the StateUpdatedTimestamp field's value. +func (s *CompositeAlarm) SetStateUpdatedTimestamp(v time.Time) *CompositeAlarm { + s.StateUpdatedTimestamp = &v + return s +} + +// SetStateValue sets the StateValue field's value. +func (s *CompositeAlarm) SetStateValue(v string) *CompositeAlarm { + s.StateValue = &v + return s +} + // Represents a specific dashboard. type DashboardEntry struct { _ struct{} `type:"structure"` @@ -3649,7 +3949,7 @@ type DeleteInsightRulesInput struct { _ struct{} `type:"structure"` // An array of the rule names to delete. If you need to find out the names of - // your rules, use DescribeInsightRules. + // your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). // // RuleNames is a required field RuleNames []*string `type:"list" required:"true"` @@ -3714,6 +4014,11 @@ type DescribeAlarmHistoryInput struct { // The name of the alarm. AlarmName *string `min:"1" type:"string"` + // Use this parameter to specify whether you want the operation to return metric + // alarms or composite alarms. If you omit this parameter, only metric alarms + // are returned. + AlarmTypes []*string `type:"list"` + // The ending date to retrieve alarm history. EndDate *time.Time `type:"timestamp"` @@ -3727,6 +4032,11 @@ type DescribeAlarmHistoryInput struct { // available. NextToken *string `type:"string"` + // Specified whether to return the newest or oldest alarm history first. Specify + // TimestampDescending to have the newest event history returned first, and + // specify TimestampAscending to have the oldest history returned first. + ScanBy *string `type:"string" enum:"ScanBy"` + // The starting date to retrieve alarm history. StartDate *time.Time `type:"timestamp"` } @@ -3763,6 +4073,12 @@ func (s *DescribeAlarmHistoryInput) SetAlarmName(v string) *DescribeAlarmHistory return s } +// SetAlarmTypes sets the AlarmTypes field's value. +func (s *DescribeAlarmHistoryInput) SetAlarmTypes(v []*string) *DescribeAlarmHistoryInput { + s.AlarmTypes = v + return s +} + // SetEndDate sets the EndDate field's value. func (s *DescribeAlarmHistoryInput) SetEndDate(v time.Time) *DescribeAlarmHistoryInput { s.EndDate = &v @@ -3787,6 +4103,12 @@ func (s *DescribeAlarmHistoryInput) SetNextToken(v string) *DescribeAlarmHistory return s } +// SetScanBy sets the ScanBy field's value. +func (s *DescribeAlarmHistoryInput) SetScanBy(v string) *DescribeAlarmHistoryInput { + s.ScanBy = &v + return s +} + // SetStartDate sets the StartDate field's value. func (s *DescribeAlarmHistoryInput) SetStartDate(v time.Time) *DescribeAlarmHistoryInput { s.StartDate = &v @@ -3970,16 +4292,42 @@ func (s *DescribeAlarmsForMetricOutput) SetMetricAlarms(v []*MetricAlarm) *Descr type DescribeAlarmsInput struct { _ struct{} `type:"structure"` - // The action name prefix. + // Use this parameter to filter the results of the operation to only those alarms + // that use a certain alarm action. For example, you could specify the ARN of + // an SNS topic to find all alarms that send notifications to that topic. ActionPrefix *string `min:"1" type:"string"` - // The alarm name prefix. If this parameter is specified, you cannot specify - // AlarmNames. + // An alarm name prefix. If you specify this parameter, you receive information + // about all alarms that have names that start with this prefix. + // + // If this parameter is specified, you cannot specify AlarmNames. AlarmNamePrefix *string `min:"1" type:"string"` - // The names of the alarms. + // The names of the alarms to retrieve information about. AlarmNames []*string `type:"list"` + // Use this parameter to specify whether you want the operation to return metric + // alarms or composite alarms. If you omit this parameter, only metric alarms + // are returned. + AlarmTypes []*string `type:"list"` + + // If you use this parameter and specify the name of a composite alarm, the + // operation returns information about the "children" alarms of the alarm you + // specify. These are the metric alarms and composite alarms referenced in the + // AlarmRule field of the composite alarm that you specify in ChildrenOfAlarmName. + // Information about the composite alarm that you name in ChildrenOfAlarmName + // is not returned. + // + // If you specify ChildrenOfAlarmName, you cannot specify any other parameters + // in the request except for MaxRecords and NextToken. If you do so, you will + // receive a validation error. + // + // Only the Alarm Name, ARN, StateValue (OK/ALARM/INSUFFICIENT_DATA), and StateUpdatedTimestamp + // information are returned by this operation when you use this parameter. To + // get complete information about these alarms, perform another DescribeAlarms + // operation and specify the parent alarm names in the AlarmNames parameter. + ChildrenOfAlarmName *string `min:"1" type:"string"` + // The maximum number of alarm descriptions to retrieve. MaxRecords *int64 `min:"1" type:"integer"` @@ -3987,7 +4335,24 @@ type DescribeAlarmsInput struct { // available. NextToken *string `type:"string"` - // The state value to be used in matching alarms. + // If you use this parameter and specify the name of a metric or composite alarm, + // the operation returns information about the "parent" alarms of the alarm + // you specify. These are the composite alarms that have AlarmRule parameters + // that reference the alarm named in ParentsOfAlarmName. Information about the + // alarm that you specify in ParentsOfAlarmName is not returned. + // + // If you specify ParentsOfAlarmName, you cannot specify any other parameters + // in the request except for MaxRecords and NextToken. If you do so, you will + // receive a validation error. + // + // Only the Alarm Name and ARN are returned by this operation when you use this + // parameter. To get complete information about these alarms, perform another + // DescribeAlarms operation and specify the parent alarm names in the AlarmNames + // parameter. + ParentsOfAlarmName *string `min:"1" type:"string"` + + // Specify this parameter to receive information only about alarms that are + // currently in the state that you specify. StateValue *string `type:"string" enum:"StateValue"` } @@ -4010,9 +4375,15 @@ func (s *DescribeAlarmsInput) Validate() error { if s.AlarmNamePrefix != nil && len(*s.AlarmNamePrefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("AlarmNamePrefix", 1)) } + if s.ChildrenOfAlarmName != nil && len(*s.ChildrenOfAlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChildrenOfAlarmName", 1)) + } if s.MaxRecords != nil && *s.MaxRecords < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) } + if s.ParentsOfAlarmName != nil && len(*s.ParentsOfAlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ParentsOfAlarmName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4038,6 +4409,18 @@ func (s *DescribeAlarmsInput) SetAlarmNames(v []*string) *DescribeAlarmsInput { return s } +// SetAlarmTypes sets the AlarmTypes field's value. +func (s *DescribeAlarmsInput) SetAlarmTypes(v []*string) *DescribeAlarmsInput { + s.AlarmTypes = v + return s +} + +// SetChildrenOfAlarmName sets the ChildrenOfAlarmName field's value. +func (s *DescribeAlarmsInput) SetChildrenOfAlarmName(v string) *DescribeAlarmsInput { + s.ChildrenOfAlarmName = &v + return s +} + // SetMaxRecords sets the MaxRecords field's value. func (s *DescribeAlarmsInput) SetMaxRecords(v int64) *DescribeAlarmsInput { s.MaxRecords = &v @@ -4050,6 +4433,12 @@ func (s *DescribeAlarmsInput) SetNextToken(v string) *DescribeAlarmsInput { return s } +// SetParentsOfAlarmName sets the ParentsOfAlarmName field's value. +func (s *DescribeAlarmsInput) SetParentsOfAlarmName(v string) *DescribeAlarmsInput { + s.ParentsOfAlarmName = &v + return s +} + // SetStateValue sets the StateValue field's value. func (s *DescribeAlarmsInput) SetStateValue(v string) *DescribeAlarmsInput { s.StateValue = &v @@ -4059,7 +4448,10 @@ func (s *DescribeAlarmsInput) SetStateValue(v string) *DescribeAlarmsInput { type DescribeAlarmsOutput struct { _ struct{} `type:"structure"` - // The information for the specified alarms. + // The information about any composite alarms returned by the operation. + CompositeAlarms []*CompositeAlarm `type:"list"` + + // The information about any metric alarms returned by the operation. MetricAlarms []*MetricAlarm `type:"list"` // The token that marks the start of the next batch of returned results. @@ -4076,6 +4468,12 @@ func (s DescribeAlarmsOutput) GoString() string { return s.String() } +// SetCompositeAlarms sets the CompositeAlarms field's value. +func (s *DescribeAlarmsOutput) SetCompositeAlarms(v []*CompositeAlarm) *DescribeAlarmsOutput { + s.CompositeAlarms = v + return s +} + // SetMetricAlarms sets the MetricAlarms field's value. func (s *DescribeAlarmsOutput) SetMetricAlarms(v []*MetricAlarm) *DescribeAlarmsOutput { s.MetricAlarms = v @@ -4098,7 +4496,7 @@ type DescribeAnomalyDetectorsInput struct { Dimensions []*Dimension `type:"list"` // The maximum number of results to return in one operation. The maximum value - // you can specify is 10. + // that you can specify is 100. // // To retrieve the remaining results, make another call with the returned NextToken // value. @@ -4467,7 +4865,7 @@ type DisableInsightRulesInput struct { _ struct{} `type:"structure"` // An array of the rule names to disable. If you need to find out the names - // of your rules, use DescribeInsightRules. + // of your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). // // RuleNames is a required field RuleNames []*string `type:"list" required:"true"` @@ -4582,7 +4980,7 @@ type EnableInsightRulesInput struct { _ struct{} `type:"structure"` // An array of the rule names to enable. If you need to find out the names of - // your rules, use DescribeInsightRules. + // your rules, use DescribeInsightRules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html). // // RuleNames is a required field RuleNames []*string `type:"list" required:"true"` @@ -4687,7 +5085,7 @@ type GetDashboardOutput struct { // The detailed information about the dashboard, including what widgets are // included and their location on the dashboard. For more information about - // the DashboardBody syntax, see CloudWatch-Dashboard-Body-Structure. + // the DashboardBody syntax, see Dashboard Body Structure and Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html). DashboardBody *string `type:"string"` // The name of the dashboard. @@ -4966,7 +5364,7 @@ type GetMetricDataInput struct { MaxDatapoints *int64 `type:"integer"` // The metric queries to be returned. A single GetMetricData call can include - // as many as 100 MetricDataQuery structures. Each of these structures can specify + // as many as 500 MetricDataQuery structures. Each of these structures can specify // either a metric to retrieve, or a math expression to perform on retrieved // data. // @@ -5400,7 +5798,8 @@ type GetMetricWidgetImageInput struct { // limits, and so on. You can include only one MetricWidget parameter in each // GetMetricWidgetImage call. // - // For more information about the syntax of MetricWidget see CloudWatch-Metric-Widget-Structure. + // For more information about the syntax of MetricWidget see GetMetricWidgetImage: + // Metric Widget Structure and Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Metric-Widget-Structure.html). // // If any metric on the graph could not load all the requested data points, // an orange triangle with an exclamation point appears next to the graph legend. @@ -5571,7 +5970,7 @@ func (s *InsightRule) SetState(v string) *InsightRule { // If the rule contains a single key, then each unique contributor is each unique // value for this key. // -// For more information, see GetInsightRuleReport. +// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html). type InsightRuleContributor struct { _ struct{} `type:"structure"` @@ -5623,7 +6022,8 @@ func (s *InsightRuleContributor) SetKeys(v []*string) *InsightRuleContributor { // One data point related to one contributor. // -// For more information, see GetInsightRuleReport and InsightRuleContributor. +// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html) +// and InsightRuleContributor (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_InsightRuleContributor.html). type InsightRuleContributorDatapoint struct { _ struct{} `type:"structure"` @@ -5663,7 +6063,7 @@ func (s *InsightRuleContributorDatapoint) SetTimestamp(v time.Time) *InsightRule // One data point from the metric time series returned in a Contributor Insights // rule report. // -// For more information, see GetInsightRuleReport. +// For more information, see GetInsightRuleReport (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html). type InsightRuleMetricDatapoint struct { _ struct{} `type:"structure"` @@ -6122,7 +6522,7 @@ func (s *Metric) SetNamespace(v string) *Metric { return s } -// Represents an alarm. +// The details about a metric alarm. type MetricAlarm struct { _ struct{} `type:"structure"` @@ -6404,7 +6804,7 @@ func (s *MetricAlarm) SetUnit(v string) *MetricAlarm { // When used in GetMetricData, it indicates the metric data to return, and whether // this call is just retrieving a batch set of data for one metric, or is performing // a math expression on metric data. A single GetMetricData call can include -// up to 100 MetricDataQuery structures. +// up to 500 MetricDataQuery structures. // // When used in PutMetricAlarm, it enables you to create an alarm based on a // metric math expression. Each MetricDataQuery in the array specifies either @@ -6467,10 +6867,6 @@ type MetricDataQuery struct { // at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, // or any multiple of 60. High-resolution metrics are those metrics stored by // a PutMetricData operation that includes a StorageResolution of 1 second. - // - // If you are performing a GetMetricData operation, use this field only if you - // are specifying an Expression. Do not use this field when you are specifying - // a MetricStat in a GetMetricData operation. Period *int64 `min:"1" type:"integer"` // When used in GetMetricData, this option indicates whether to return the timestamps @@ -7092,6 +7488,209 @@ func (s PutAnomalyDetectorOutput) GoString() string { return s.String() } +type PutCompositeAlarmInput struct { + _ struct{} `type:"structure"` + + // Indicates whether actions should be executed during any changes to the alarm + // state of the composite alarm. The default is TRUE. + ActionsEnabled *bool `type:"boolean"` + + // The actions to execute when this alarm transitions to the ALARM state from + // any other state. Each action is specified as an Amazon Resource Name (ARN). + // + // Valid Values: arn:aws:sns:region:account-id:sns-topic-name + AlarmActions []*string `type:"list"` + + // The description for the composite alarm. + AlarmDescription *string `type:"string"` + + // The name for the composite alarm. This name must be unique within your AWS + // account. + // + // AlarmName is a required field + AlarmName *string `min:"1" type:"string" required:"true"` + + // An expression that specifies which other alarms are to be evaluated to determine + // this composite alarm's state. For each alarm that you reference, you designate + // a function that specifies whether that alarm needs to be in ALARM state, + // OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and + // NOT) to combine multiple functions in a single expression. You can use parenthesis + // to logically group the functions in your expression. + // + // You can use either alarm names or ARNs to reference the other alarms that + // are to be evaluated. + // + // Functions can include the following: + // + // * ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM + // state. + // + // * OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state. + // + // * INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm + // is in INSUFFICIENT_DATA state. + // + // * TRUE always evaluates to TRUE. + // + // * FALSE always evaluates to FALSE. + // + // TRUE and FALSE are useful for testing a complex AlarmRule structure, and + // for testing your alarm actions. + // + // Alarm names specified in AlarmRule can be surrounded with double-quotes ("), + // but do not have to be. + // + // The following are some examples of AlarmRule: + // + // * ALARM(CPUUtilizationTooHigh) AND ALARM(DiskReadOpsTooHigh) specifies + // that the composite alarm goes into ALARM state only if both CPUUtilizationTooHigh + // and DiskReadOpsTooHigh alarms are in ALARM state. + // + // * ALARM(CPUUtilizationTooHigh) AND NOT ALARM(DeploymentInProgress) specifies + // that the alarm goes to ALARM state if CPUUtilizationTooHigh is in ALARM + // state and DeploymentInProgress is not in ALARM state. This example reduces + // alarm noise during a known deployment window. + // + // * (ALARM(CPUUtilizationTooHigh) OR ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) + // goes into ALARM state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is + // in ALARM state, and if NetworkOutTooHigh is in OK state. This provides + // another example of using a composite alarm to prevent noise. This rule + // ensures that you are not notified with an alarm action on high CPU or + // disk usage if a known network problem is also occurring. + // + // The AlarmRule can specify as many as 100 "children" alarms. The AlarmRule + // expression can have as many as 500 elements. Elements are child alarms, TRUE + // or FALSE statements, and parentheses. + // + // AlarmRule is a required field + AlarmRule *string `min:"1" type:"string" required:"true"` + + // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA + // state from any other state. Each action is specified as an Amazon Resource + // Name (ARN). + // + // Valid Values: arn:aws:sns:region:account-id:sns-topic-name + InsufficientDataActions []*string `type:"list"` + + // The actions to execute when this alarm transitions to an OK state from any + // other state. Each action is specified as an Amazon Resource Name (ARN). + // + // Valid Values: arn:aws:sns:region:account-id:sns-topic-name + OKActions []*string `type:"list"` + + // A list of key-value pairs to associate with the composite alarm. You can + // associate as many as 50 tags with an alarm. + // + // Tags can help you organize and categorize your resources. You can also use + // them to scope user permissions, by granting a user permission to access or + // change only resources with certain tag values. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s PutCompositeAlarmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutCompositeAlarmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutCompositeAlarmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutCompositeAlarmInput"} + if s.AlarmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmName")) + } + if s.AlarmName != nil && len(*s.AlarmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmName", 1)) + } + if s.AlarmRule == nil { + invalidParams.Add(request.NewErrParamRequired("AlarmRule")) + } + if s.AlarmRule != nil && len(*s.AlarmRule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlarmRule", 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 +} + +// SetActionsEnabled sets the ActionsEnabled field's value. +func (s *PutCompositeAlarmInput) SetActionsEnabled(v bool) *PutCompositeAlarmInput { + s.ActionsEnabled = &v + return s +} + +// SetAlarmActions sets the AlarmActions field's value. +func (s *PutCompositeAlarmInput) SetAlarmActions(v []*string) *PutCompositeAlarmInput { + s.AlarmActions = v + return s +} + +// SetAlarmDescription sets the AlarmDescription field's value. +func (s *PutCompositeAlarmInput) SetAlarmDescription(v string) *PutCompositeAlarmInput { + s.AlarmDescription = &v + return s +} + +// SetAlarmName sets the AlarmName field's value. +func (s *PutCompositeAlarmInput) SetAlarmName(v string) *PutCompositeAlarmInput { + s.AlarmName = &v + return s +} + +// SetAlarmRule sets the AlarmRule field's value. +func (s *PutCompositeAlarmInput) SetAlarmRule(v string) *PutCompositeAlarmInput { + s.AlarmRule = &v + return s +} + +// SetInsufficientDataActions sets the InsufficientDataActions field's value. +func (s *PutCompositeAlarmInput) SetInsufficientDataActions(v []*string) *PutCompositeAlarmInput { + s.InsufficientDataActions = v + return s +} + +// SetOKActions sets the OKActions field's value. +func (s *PutCompositeAlarmInput) SetOKActions(v []*string) *PutCompositeAlarmInput { + s.OKActions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *PutCompositeAlarmInput) SetTags(v []*Tag) *PutCompositeAlarmInput { + s.Tags = v + return s +} + +type PutCompositeAlarmOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutCompositeAlarmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutCompositeAlarmOutput) GoString() string { + return s.String() +} + type PutDashboardInput struct { _ struct{} `type:"structure"` @@ -7099,7 +7698,8 @@ type PutDashboardInput struct { // widgets to include and their location on the dashboard. This parameter is // required. // - // For more information about the syntax, see CloudWatch-Dashboard-Body-Structure. + // For more information about the syntax, see Dashboard Body Structure and Syntax + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html). // // DashboardBody is a required field DashboardBody *string `type:"string" required:"true"` @@ -7279,7 +7879,7 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot - // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 @@ -7346,7 +7946,7 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot - // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // // Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 @@ -7371,7 +7971,7 @@ type PutMetricAlarmInput struct { // // One item in the Metrics array is the expression that the alarm watches. You // designate this expression by setting ReturnValue to true for this object - // in the array. For more information, see MetricDataQuery. + // in the array. For more information, see MetricDataQuery (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDataQuery.html). // // If you use the Metrics parameter, you cannot include the MetricName, Dimensions, // Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm @@ -7387,7 +7987,7 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot - // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 @@ -7858,6 +8458,10 @@ type SetAlarmStateInput struct { StateReason *string `type:"string" required:"true"` // The reason that this alarm is set to this specific state, in JSON format. + // + // For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto + // Scaling or application Auto Scaling alarm actions, the Auto Scaling policy + // uses the information in this field to take the correct action. StateReasonData *string `type:"string"` // The value of the state. @@ -8225,6 +8829,14 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +const ( + // AlarmTypeCompositeAlarm is a AlarmType enum value + AlarmTypeCompositeAlarm = "CompositeAlarm" + + // AlarmTypeMetricAlarm is a AlarmType enum value + AlarmTypeMetricAlarm = "MetricAlarm" +) + const ( // AnomalyDetectorStateValuePendingTraining is a AnomalyDetectorStateValue enum value AnomalyDetectorStateValuePendingTraining = "PENDING_TRAINING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go index 21e42ac581b..164d306c452 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go @@ -54,3 +54,49 @@ func (c *CloudWatch) WaitUntilAlarmExistsWithContext(ctx aws.Context, input *Des return w.WaitWithContext(ctx) } + +// WaitUntilCompositeAlarmExists uses the CloudWatch API operation +// DescribeAlarms 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 *CloudWatch) WaitUntilCompositeAlarmExists(input *DescribeAlarmsInput) error { + return c.WaitUntilCompositeAlarmExistsWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCompositeAlarmExistsWithContext is an extended version of WaitUntilCompositeAlarmExists. +// 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 *CloudWatch) WaitUntilCompositeAlarmExistsWithContext(ctx aws.Context, input *DescribeAlarmsInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCompositeAlarmExists", + MaxAttempts: 40, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "length(CompositeAlarms[]) > `0`", + Expected: true, + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeAlarmsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeAlarmsRequest(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/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index ace68bec6eb..42c7282c8c1 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 @@ -1258,6 +1258,23 @@ func (c *ConfigService) DeleteRemediationConfigurationRequest(input *DeleteRemed // Remediation action is in progress. You can either cancel execution in AWS // Systems Manager or wait and try again later. // +// * InsufficientPermissionsException +// Indicates one of the following errors: +// +// * For PutConfigRule, the rule cannot be created because the IAM role assigned +// to AWS Config lacks permissions to perform the config:Put* action. +// +// * For PutConfigRule, the AWS Lambda function cannot be invoked. Check +// the function ARN, and check the function's permissions. +// +// * For PutOrganizationConfigRule, organization config rule cannot be created +// because you do not have permissions to call IAM GetRole action or create +// a service linked role. +// +// * For PutConformancePack and PutOrganizationConformancePack, a conformance +// pack cannot be created because you do not have permissions: To call IAM +// GetRole action or create a service linked role. To read Amazon S3 bucket. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteRemediationConfiguration func (c *ConfigService) DeleteRemediationConfiguration(input *DeleteRemediationConfigurationInput) (*DeleteRemediationConfigurationOutput, error) { req, out := c.DeleteRemediationConfigurationRequest(input) @@ -7137,6 +7154,159 @@ func (c *ConfigService) PutRetentionConfigurationWithContext(ctx aws.Context, in return out, req.Send() } +const opSelectAggregateResourceConfig = "SelectAggregateResourceConfig" + +// SelectAggregateResourceConfigRequest generates a "aws/request.Request" representing the +// client's request for the SelectAggregateResourceConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SelectAggregateResourceConfig for more information on using the SelectAggregateResourceConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SelectAggregateResourceConfigRequest method. +// req, resp := client.SelectAggregateResourceConfigRequest(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/SelectAggregateResourceConfig +func (c *ConfigService) SelectAggregateResourceConfigRequest(input *SelectAggregateResourceConfigInput) (req *request.Request, output *SelectAggregateResourceConfigOutput) { + op := &request.Operation{ + Name: opSelectAggregateResourceConfig, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &SelectAggregateResourceConfigInput{} + } + + output = &SelectAggregateResourceConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// SelectAggregateResourceConfig API operation for AWS Config. +// +// Accepts a structured query language (SQL) SELECT command and an aggregator +// to query configuration state of AWS resources across multiple accounts and +// regions, performs the corresponding search, and returns resource configurations +// matching the properties. +// +// For more information about query components, see the Query Components (https://docs.aws.amazon.com/config/latest/developerguide/query-components.html) +// section in the AWS Config 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 AWS Config's +// API operation SelectAggregateResourceConfig for usage and error information. +// +// Returned Error Types: +// * InvalidExpressionException +// The syntax of the query is incorrect. +// +// * NoSuchConfigurationAggregatorException +// You have specified a configuration aggregator that does not exist. +// +// * InvalidLimitException +// The specified limit is outside the allowable range. +// +// * 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/SelectAggregateResourceConfig +func (c *ConfigService) SelectAggregateResourceConfig(input *SelectAggregateResourceConfigInput) (*SelectAggregateResourceConfigOutput, error) { + req, out := c.SelectAggregateResourceConfigRequest(input) + return out, req.Send() +} + +// SelectAggregateResourceConfigWithContext is the same as SelectAggregateResourceConfig with the addition of +// the ability to pass a context and additional request options. +// +// See SelectAggregateResourceConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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) SelectAggregateResourceConfigWithContext(ctx aws.Context, input *SelectAggregateResourceConfigInput, opts ...request.Option) (*SelectAggregateResourceConfigOutput, error) { + req, out := c.SelectAggregateResourceConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SelectAggregateResourceConfigPages iterates over the pages of a SelectAggregateResourceConfig operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SelectAggregateResourceConfig 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 SelectAggregateResourceConfig operation. +// pageNum := 0 +// err := client.SelectAggregateResourceConfigPages(params, +// func(page *configservice.SelectAggregateResourceConfigOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ConfigService) SelectAggregateResourceConfigPages(input *SelectAggregateResourceConfigInput, fn func(*SelectAggregateResourceConfigOutput, bool) bool) error { + return c.SelectAggregateResourceConfigPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SelectAggregateResourceConfigPagesWithContext same as SelectAggregateResourceConfigPages 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 *ConfigService) SelectAggregateResourceConfigPagesWithContext(ctx aws.Context, input *SelectAggregateResourceConfigInput, fn func(*SelectAggregateResourceConfigOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SelectAggregateResourceConfigInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SelectAggregateResourceConfigRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*SelectAggregateResourceConfigOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opSelectResourceConfig = "SelectResourceConfig" // SelectResourceConfigRequest generates a "aws/request.Request" representing the @@ -8962,10 +9132,10 @@ type ConfigRule struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the AWS Config rule. - ConfigRuleArn *string `type:"string"` + ConfigRuleArn *string `min:"1" type:"string"` // The ID of the AWS Config rule. - ConfigRuleId *string `type:"string"` + ConfigRuleId *string `min:"1" type:"string"` // The name that you assign to the AWS Config rule. The name is required if // you are adding a new rule. @@ -9042,6 +9212,12 @@ func (s ConfigRule) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ConfigRule) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ConfigRule"} + if s.ConfigRuleArn != nil && len(*s.ConfigRuleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigRuleArn", 1)) + } + if s.ConfigRuleId != nil && len(*s.ConfigRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigRuleId", 1)) + } if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) } @@ -9279,6 +9455,8 @@ type ConfigRuleEvaluationStatus struct { // against the rule. FirstEvaluationStarted *bool `type:"boolean"` + LastDeactivatedTime *time.Time `type:"timestamp"` + // The error code that AWS Config returned when the rule last failed. LastErrorCode *string `type:"string"` @@ -9342,6 +9520,12 @@ func (s *ConfigRuleEvaluationStatus) SetFirstEvaluationStarted(v bool) *ConfigRu return s } +// SetLastDeactivatedTime sets the LastDeactivatedTime field's value. +func (s *ConfigRuleEvaluationStatus) SetLastDeactivatedTime(v time.Time) *ConfigRuleEvaluationStatus { + s.LastDeactivatedTime = &v + return s +} + // SetLastErrorCode sets the LastErrorCode field's value. func (s *ConfigRuleEvaluationStatus) SetLastErrorCode(v string) *ConfigRuleEvaluationStatus { s.LastErrorCode = &v @@ -21952,6 +22136,133 @@ func (s *Scope) SetTagValue(v string) *Scope { return s } +type SelectAggregateResourceConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // The SQL query SELECT command. + // + // Expression is a required field + Expression *string `min:"1" type:"string" required:"true"` + + // The maximum number of query results returned on each page. + Limit *int64 `type:"integer"` + + MaxResults *int64 `type:"integer"` + + // The nextToken string returned in a previous request that you use to request + // the next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s SelectAggregateResourceConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SelectAggregateResourceConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SelectAggregateResourceConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SelectAggregateResourceConfigInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.Expression != nil && len(*s.Expression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *SelectAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *SelectAggregateResourceConfigInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetExpression sets the Expression field's value. +func (s *SelectAggregateResourceConfigInput) SetExpression(v string) *SelectAggregateResourceConfigInput { + s.Expression = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *SelectAggregateResourceConfigInput) SetLimit(v int64) *SelectAggregateResourceConfigInput { + s.Limit = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *SelectAggregateResourceConfigInput) SetMaxResults(v int64) *SelectAggregateResourceConfigInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SelectAggregateResourceConfigInput) SetNextToken(v string) *SelectAggregateResourceConfigInput { + s.NextToken = &v + return s +} + +type SelectAggregateResourceConfigOutput struct { + _ struct{} `type:"structure"` + + // The nextToken string returned in a previous request that you use to request + // the next page of results in a paginated response. + NextToken *string `type:"string"` + + // Details about the query. + QueryInfo *QueryInfo `type:"structure"` + + // Returns the results for the SQL query. + Results []*string `type:"list"` +} + +// String returns the string representation +func (s SelectAggregateResourceConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SelectAggregateResourceConfigOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *SelectAggregateResourceConfigOutput) SetNextToken(v string) *SelectAggregateResourceConfigOutput { + s.NextToken = &v + return s +} + +// SetQueryInfo sets the QueryInfo field's value. +func (s *SelectAggregateResourceConfigOutput) SetQueryInfo(v *QueryInfo) *SelectAggregateResourceConfigOutput { + s.QueryInfo = v + return s +} + +// SetResults sets the Results field's value. +func (s *SelectAggregateResourceConfigOutput) SetResults(v []*string) *SelectAggregateResourceConfigOutput { + s.Results = v + return s +} + type SelectResourceConfigInput struct { _ struct{} `type:"structure"` @@ -23353,6 +23664,9 @@ const ( // ResourceTypeAwsEc2VpcpeeringConnection is a ResourceType enum value ResourceTypeAwsEc2VpcpeeringConnection = "AWS::EC2::VPCPeeringConnection" + // ResourceTypeAwsElasticsearchDomain is a ResourceType enum value + ResourceTypeAwsElasticsearchDomain = "AWS::Elasticsearch::Domain" + // ResourceTypeAwsIamGroup is a ResourceType enum value ResourceTypeAwsIamGroup = "AWS::IAM::Group" @@ -23374,12 +23688,6 @@ const ( // ResourceTypeAwsRdsDbinstance is a ResourceType enum value ResourceTypeAwsRdsDbinstance = "AWS::RDS::DBInstance" - // ResourceTypeAwsRdsDbparameterGroup is a ResourceType enum value - ResourceTypeAwsRdsDbparameterGroup = "AWS::RDS::DBParameterGroup" - - // ResourceTypeAwsRdsDboptionGroup is a ResourceType enum value - ResourceTypeAwsRdsDboptionGroup = "AWS::RDS::DBOptionGroup" - // ResourceTypeAwsRdsDbsubnetGroup is a ResourceType enum value ResourceTypeAwsRdsDbsubnetGroup = "AWS::RDS::DBSubnetGroup" @@ -23392,9 +23700,6 @@ const ( // ResourceTypeAwsRdsDbcluster is a ResourceType enum value ResourceTypeAwsRdsDbcluster = "AWS::RDS::DBCluster" - // ResourceTypeAwsRdsDbclusterParameterGroup is a ResourceType enum value - ResourceTypeAwsRdsDbclusterParameterGroup = "AWS::RDS::DBClusterParameterGroup" - // ResourceTypeAwsRdsDbclusterSnapshot is a ResourceType enum value ResourceTypeAwsRdsDbclusterSnapshot = "AWS::RDS::DBClusterSnapshot" @@ -23485,9 +23790,6 @@ const ( // ResourceTypeAwsCloudFrontStreamingDistribution is a ResourceType enum value ResourceTypeAwsCloudFrontStreamingDistribution = "AWS::CloudFront::StreamingDistribution" - // ResourceTypeAwsLambdaAlias is a ResourceType enum value - ResourceTypeAwsLambdaAlias = "AWS::Lambda::Alias" - // ResourceTypeAwsLambdaFunction is a ResourceType enum value ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" @@ -23500,8 +23802,20 @@ const ( // ResourceTypeAwsElasticBeanstalkEnvironment is a ResourceType enum value ResourceTypeAwsElasticBeanstalkEnvironment = "AWS::ElasticBeanstalk::Environment" - // ResourceTypeAwsMobileHubProject is a ResourceType enum value - ResourceTypeAwsMobileHubProject = "AWS::MobileHub::Project" + // ResourceTypeAwsWafv2WebAcl is a ResourceType enum value + ResourceTypeAwsWafv2WebAcl = "AWS::WAFv2::WebACL" + + // ResourceTypeAwsWafv2RuleGroup is a ResourceType enum value + ResourceTypeAwsWafv2RuleGroup = "AWS::WAFv2::RuleGroup" + + // ResourceTypeAwsWafv2Ipset is a ResourceType enum value + ResourceTypeAwsWafv2Ipset = "AWS::WAFv2::IPSet" + + // ResourceTypeAwsWafv2RegexPatternSet is a ResourceType enum value + ResourceTypeAwsWafv2RegexPatternSet = "AWS::WAFv2::RegexPatternSet" + + // ResourceTypeAwsWafv2ManagedRuleSet is a ResourceType enum value + ResourceTypeAwsWafv2ManagedRuleSet = "AWS::WAFv2::ManagedRuleSet" // ResourceTypeAwsXrayEncryptionConfig is a ResourceType enum value ResourceTypeAwsXrayEncryptionConfig = "AWS::XRay::EncryptionConfig" @@ -23521,24 +23835,12 @@ const ( // ResourceTypeAwsConfigResourceCompliance is a ResourceType enum value ResourceTypeAwsConfigResourceCompliance = "AWS::Config::ResourceCompliance" - // ResourceTypeAwsLicenseManagerLicenseConfiguration is a ResourceType enum value - ResourceTypeAwsLicenseManagerLicenseConfiguration = "AWS::LicenseManager::LicenseConfiguration" - - // ResourceTypeAwsApiGatewayDomainName is a ResourceType enum value - ResourceTypeAwsApiGatewayDomainName = "AWS::ApiGateway::DomainName" - - // ResourceTypeAwsApiGatewayMethod is a ResourceType enum value - ResourceTypeAwsApiGatewayMethod = "AWS::ApiGateway::Method" - // ResourceTypeAwsApiGatewayStage is a ResourceType enum value ResourceTypeAwsApiGatewayStage = "AWS::ApiGateway::Stage" // ResourceTypeAwsApiGatewayRestApi is a ResourceType enum value ResourceTypeAwsApiGatewayRestApi = "AWS::ApiGateway::RestApi" - // ResourceTypeAwsApiGatewayV2DomainName is a ResourceType enum value - ResourceTypeAwsApiGatewayV2DomainName = "AWS::ApiGatewayV2::DomainName" - // ResourceTypeAwsApiGatewayV2Stage is a ResourceType enum value ResourceTypeAwsApiGatewayV2Stage = "AWS::ApiGatewayV2::Stage" @@ -23556,6 +23858,15 @@ const ( // ResourceTypeAwsServiceCatalogPortfolio is a ResourceType enum value ResourceTypeAwsServiceCatalogPortfolio = "AWS::ServiceCatalog::Portfolio" + + // ResourceTypeAwsSqsQueue is a ResourceType enum value + ResourceTypeAwsSqsQueue = "AWS::SQS::Queue" + + // ResourceTypeAwsKmsKey is a ResourceType enum value + ResourceTypeAwsKmsKey = "AWS::KMS::Key" + + // ResourceTypeAwsQldbLedger is a ResourceType enum value + ResourceTypeAwsQldbLedger = "AWS::QLDB::Ledger" ) const ( 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 dcead3785d3..1eabbf82bc7 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 @@ -13245,6 +13245,12 @@ func (c *EC2) DescribeCoipPoolsRequest(input *DescribeCoipPoolsInput) (req *requ Name: opDescribeCoipPools, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -13289,6 +13295,58 @@ func (c *EC2) DescribeCoipPoolsWithContext(ctx aws.Context, input *DescribeCoipP return out, req.Send() } +// DescribeCoipPoolsPages iterates over the pages of a DescribeCoipPools operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeCoipPools 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 DescribeCoipPools operation. +// pageNum := 0 +// err := client.DescribeCoipPoolsPages(params, +// func(page *ec2.DescribeCoipPoolsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeCoipPoolsPages(input *DescribeCoipPoolsInput, fn func(*DescribeCoipPoolsOutput, bool) bool) error { + return c.DescribeCoipPoolsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeCoipPoolsPagesWithContext same as DescribeCoipPoolsPages 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 *EC2) DescribeCoipPoolsPagesWithContext(ctx aws.Context, input *DescribeCoipPoolsInput, fn func(*DescribeCoipPoolsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeCoipPoolsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCoipPoolsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeCoipPoolsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a "aws/request.Request" representing the @@ -16315,6 +16373,12 @@ func (c *EC2) DescribeInstanceTypeOfferingsRequest(input *DescribeInstanceTypeOf Name: opDescribeInstanceTypeOfferings, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -16360,6 +16424,58 @@ func (c *EC2) DescribeInstanceTypeOfferingsWithContext(ctx aws.Context, input *D return out, req.Send() } +// DescribeInstanceTypeOfferingsPages iterates over the pages of a DescribeInstanceTypeOfferings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeInstanceTypeOfferings 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 DescribeInstanceTypeOfferings operation. +// pageNum := 0 +// err := client.DescribeInstanceTypeOfferingsPages(params, +// func(page *ec2.DescribeInstanceTypeOfferingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeInstanceTypeOfferingsPages(input *DescribeInstanceTypeOfferingsInput, fn func(*DescribeInstanceTypeOfferingsOutput, bool) bool) error { + return c.DescribeInstanceTypeOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeInstanceTypeOfferingsPagesWithContext same as DescribeInstanceTypeOfferingsPages 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 *EC2) DescribeInstanceTypeOfferingsPagesWithContext(ctx aws.Context, input *DescribeInstanceTypeOfferingsInput, fn func(*DescribeInstanceTypeOfferingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeInstanceTypeOfferingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInstanceTypeOfferingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeInstanceTypeOfferingsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeInstanceTypes = "DescribeInstanceTypes" // DescribeInstanceTypesRequest generates a "aws/request.Request" representing the @@ -16391,6 +16507,12 @@ func (c *EC2) DescribeInstanceTypesRequest(input *DescribeInstanceTypesInput) (r Name: opDescribeInstanceTypes, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -16435,6 +16557,58 @@ func (c *EC2) DescribeInstanceTypesWithContext(ctx aws.Context, input *DescribeI return out, req.Send() } +// DescribeInstanceTypesPages iterates over the pages of a DescribeInstanceTypes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeInstanceTypes 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 DescribeInstanceTypes operation. +// pageNum := 0 +// err := client.DescribeInstanceTypesPages(params, +// func(page *ec2.DescribeInstanceTypesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeInstanceTypesPages(input *DescribeInstanceTypesInput, fn func(*DescribeInstanceTypesOutput, bool) bool) error { + return c.DescribeInstanceTypesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeInstanceTypesPagesWithContext same as DescribeInstanceTypesPages 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 *EC2) DescribeInstanceTypesPagesWithContext(ctx aws.Context, input *DescribeInstanceTypesInput, fn func(*DescribeInstanceTypesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeInstanceTypesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInstanceTypesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeInstanceTypesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the @@ -17219,6 +17393,12 @@ func (c *EC2) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsReq Name: opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17263,6 +17443,58 @@ func (c *EC2) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsWit return out, req.Send() } +// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPages iterates over the pages of a DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations 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 DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation. +// pageNum := 0 +// err := client.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPages(params, +// func(page *ec2.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPages(input *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, fn func(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, bool) bool) error { + return c.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPagesWithContext same as DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPages 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 *EC2) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPagesWithContext(ctx aws.Context, input *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, fn func(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeLocalGatewayRouteTableVpcAssociations = "DescribeLocalGatewayRouteTableVpcAssociations" // DescribeLocalGatewayRouteTableVpcAssociationsRequest generates a "aws/request.Request" representing the @@ -17294,6 +17526,12 @@ func (c *EC2) DescribeLocalGatewayRouteTableVpcAssociationsRequest(input *Descri Name: opDescribeLocalGatewayRouteTableVpcAssociations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17338,6 +17576,58 @@ func (c *EC2) DescribeLocalGatewayRouteTableVpcAssociationsWithContext(ctx aws.C return out, req.Send() } +// DescribeLocalGatewayRouteTableVpcAssociationsPages iterates over the pages of a DescribeLocalGatewayRouteTableVpcAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGatewayRouteTableVpcAssociations 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 DescribeLocalGatewayRouteTableVpcAssociations operation. +// pageNum := 0 +// err := client.DescribeLocalGatewayRouteTableVpcAssociationsPages(params, +// func(page *ec2.DescribeLocalGatewayRouteTableVpcAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewayRouteTableVpcAssociationsPages(input *DescribeLocalGatewayRouteTableVpcAssociationsInput, fn func(*DescribeLocalGatewayRouteTableVpcAssociationsOutput, bool) bool) error { + return c.DescribeLocalGatewayRouteTableVpcAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewayRouteTableVpcAssociationsPagesWithContext same as DescribeLocalGatewayRouteTableVpcAssociationsPages 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 *EC2) DescribeLocalGatewayRouteTableVpcAssociationsPagesWithContext(ctx aws.Context, input *DescribeLocalGatewayRouteTableVpcAssociationsInput, fn func(*DescribeLocalGatewayRouteTableVpcAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewayRouteTableVpcAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewayRouteTableVpcAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewayRouteTableVpcAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeLocalGatewayRouteTables = "DescribeLocalGatewayRouteTables" // DescribeLocalGatewayRouteTablesRequest generates a "aws/request.Request" representing the @@ -17369,6 +17659,12 @@ func (c *EC2) DescribeLocalGatewayRouteTablesRequest(input *DescribeLocalGateway Name: opDescribeLocalGatewayRouteTables, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17413,6 +17709,58 @@ func (c *EC2) DescribeLocalGatewayRouteTablesWithContext(ctx aws.Context, input return out, req.Send() } +// DescribeLocalGatewayRouteTablesPages iterates over the pages of a DescribeLocalGatewayRouteTables operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGatewayRouteTables 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 DescribeLocalGatewayRouteTables operation. +// pageNum := 0 +// err := client.DescribeLocalGatewayRouteTablesPages(params, +// func(page *ec2.DescribeLocalGatewayRouteTablesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewayRouteTablesPages(input *DescribeLocalGatewayRouteTablesInput, fn func(*DescribeLocalGatewayRouteTablesOutput, bool) bool) error { + return c.DescribeLocalGatewayRouteTablesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewayRouteTablesPagesWithContext same as DescribeLocalGatewayRouteTablesPages 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 *EC2) DescribeLocalGatewayRouteTablesPagesWithContext(ctx aws.Context, input *DescribeLocalGatewayRouteTablesInput, fn func(*DescribeLocalGatewayRouteTablesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewayRouteTablesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewayRouteTablesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewayRouteTablesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeLocalGatewayVirtualInterfaceGroups = "DescribeLocalGatewayVirtualInterfaceGroups" // DescribeLocalGatewayVirtualInterfaceGroupsRequest generates a "aws/request.Request" representing the @@ -17444,6 +17792,12 @@ func (c *EC2) DescribeLocalGatewayVirtualInterfaceGroupsRequest(input *DescribeL Name: opDescribeLocalGatewayVirtualInterfaceGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17487,6 +17841,58 @@ func (c *EC2) DescribeLocalGatewayVirtualInterfaceGroupsWithContext(ctx aws.Cont return out, req.Send() } +// DescribeLocalGatewayVirtualInterfaceGroupsPages iterates over the pages of a DescribeLocalGatewayVirtualInterfaceGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGatewayVirtualInterfaceGroups 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 DescribeLocalGatewayVirtualInterfaceGroups operation. +// pageNum := 0 +// err := client.DescribeLocalGatewayVirtualInterfaceGroupsPages(params, +// func(page *ec2.DescribeLocalGatewayVirtualInterfaceGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewayVirtualInterfaceGroupsPages(input *DescribeLocalGatewayVirtualInterfaceGroupsInput, fn func(*DescribeLocalGatewayVirtualInterfaceGroupsOutput, bool) bool) error { + return c.DescribeLocalGatewayVirtualInterfaceGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewayVirtualInterfaceGroupsPagesWithContext same as DescribeLocalGatewayVirtualInterfaceGroupsPages 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 *EC2) DescribeLocalGatewayVirtualInterfaceGroupsPagesWithContext(ctx aws.Context, input *DescribeLocalGatewayVirtualInterfaceGroupsInput, fn func(*DescribeLocalGatewayVirtualInterfaceGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewayVirtualInterfaceGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewayVirtualInterfaceGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewayVirtualInterfaceGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeLocalGatewayVirtualInterfaces = "DescribeLocalGatewayVirtualInterfaces" // DescribeLocalGatewayVirtualInterfacesRequest generates a "aws/request.Request" representing the @@ -17518,6 +17924,12 @@ func (c *EC2) DescribeLocalGatewayVirtualInterfacesRequest(input *DescribeLocalG Name: opDescribeLocalGatewayVirtualInterfaces, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17561,6 +17973,58 @@ func (c *EC2) DescribeLocalGatewayVirtualInterfacesWithContext(ctx aws.Context, return out, req.Send() } +// DescribeLocalGatewayVirtualInterfacesPages iterates over the pages of a DescribeLocalGatewayVirtualInterfaces operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGatewayVirtualInterfaces 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 DescribeLocalGatewayVirtualInterfaces operation. +// pageNum := 0 +// err := client.DescribeLocalGatewayVirtualInterfacesPages(params, +// func(page *ec2.DescribeLocalGatewayVirtualInterfacesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewayVirtualInterfacesPages(input *DescribeLocalGatewayVirtualInterfacesInput, fn func(*DescribeLocalGatewayVirtualInterfacesOutput, bool) bool) error { + return c.DescribeLocalGatewayVirtualInterfacesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewayVirtualInterfacesPagesWithContext same as DescribeLocalGatewayVirtualInterfacesPages 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 *EC2) DescribeLocalGatewayVirtualInterfacesPagesWithContext(ctx aws.Context, input *DescribeLocalGatewayVirtualInterfacesInput, fn func(*DescribeLocalGatewayVirtualInterfacesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewayVirtualInterfacesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewayVirtualInterfacesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewayVirtualInterfacesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeLocalGateways = "DescribeLocalGateways" // DescribeLocalGatewaysRequest generates a "aws/request.Request" representing the @@ -17592,6 +18056,12 @@ func (c *EC2) DescribeLocalGatewaysRequest(input *DescribeLocalGatewaysInput) (r Name: opDescribeLocalGateways, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -17636,6 +18106,58 @@ func (c *EC2) DescribeLocalGatewaysWithContext(ctx aws.Context, input *DescribeL return out, req.Send() } +// DescribeLocalGatewaysPages iterates over the pages of a DescribeLocalGateways operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLocalGateways 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 DescribeLocalGateways operation. +// pageNum := 0 +// err := client.DescribeLocalGatewaysPages(params, +// func(page *ec2.DescribeLocalGatewaysOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeLocalGatewaysPages(input *DescribeLocalGatewaysInput, fn func(*DescribeLocalGatewaysOutput, bool) bool) error { + return c.DescribeLocalGatewaysPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeLocalGatewaysPagesWithContext same as DescribeLocalGatewaysPages 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 *EC2) DescribeLocalGatewaysPagesWithContext(ctx aws.Context, input *DescribeLocalGatewaysInput, fn func(*DescribeLocalGatewaysOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLocalGatewaysInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLocalGatewaysRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLocalGatewaysOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeMovingAddresses = "DescribeMovingAddresses" // DescribeMovingAddressesRequest generates a "aws/request.Request" representing the @@ -21905,6 +22427,12 @@ func (c *EC2) DescribeTransitGatewayMulticastDomainsRequest(input *DescribeTrans Name: opDescribeTransitGatewayMulticastDomains, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -21948,6 +22476,58 @@ func (c *EC2) DescribeTransitGatewayMulticastDomainsWithContext(ctx aws.Context, return out, req.Send() } +// DescribeTransitGatewayMulticastDomainsPages iterates over the pages of a DescribeTransitGatewayMulticastDomains operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTransitGatewayMulticastDomains 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 DescribeTransitGatewayMulticastDomains operation. +// pageNum := 0 +// err := client.DescribeTransitGatewayMulticastDomainsPages(params, +// func(page *ec2.DescribeTransitGatewayMulticastDomainsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTransitGatewayMulticastDomainsPages(input *DescribeTransitGatewayMulticastDomainsInput, fn func(*DescribeTransitGatewayMulticastDomainsOutput, bool) bool) error { + return c.DescribeTransitGatewayMulticastDomainsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTransitGatewayMulticastDomainsPagesWithContext same as DescribeTransitGatewayMulticastDomainsPages 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 *EC2) DescribeTransitGatewayMulticastDomainsPagesWithContext(ctx aws.Context, input *DescribeTransitGatewayMulticastDomainsInput, fn func(*DescribeTransitGatewayMulticastDomainsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTransitGatewayMulticastDomainsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTransitGatewayMulticastDomainsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayMulticastDomainsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeTransitGatewayPeeringAttachments = "DescribeTransitGatewayPeeringAttachments" // DescribeTransitGatewayPeeringAttachmentsRequest generates a "aws/request.Request" representing the @@ -21979,6 +22559,12 @@ func (c *EC2) DescribeTransitGatewayPeeringAttachmentsRequest(input *DescribeTra Name: opDescribeTransitGatewayPeeringAttachments, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -22022,6 +22608,58 @@ func (c *EC2) DescribeTransitGatewayPeeringAttachmentsWithContext(ctx aws.Contex return out, req.Send() } +// DescribeTransitGatewayPeeringAttachmentsPages iterates over the pages of a DescribeTransitGatewayPeeringAttachments operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTransitGatewayPeeringAttachments 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 DescribeTransitGatewayPeeringAttachments operation. +// pageNum := 0 +// err := client.DescribeTransitGatewayPeeringAttachmentsPages(params, +// func(page *ec2.DescribeTransitGatewayPeeringAttachmentsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTransitGatewayPeeringAttachmentsPages(input *DescribeTransitGatewayPeeringAttachmentsInput, fn func(*DescribeTransitGatewayPeeringAttachmentsOutput, bool) bool) error { + return c.DescribeTransitGatewayPeeringAttachmentsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTransitGatewayPeeringAttachmentsPagesWithContext same as DescribeTransitGatewayPeeringAttachmentsPages 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 *EC2) DescribeTransitGatewayPeeringAttachmentsPagesWithContext(ctx aws.Context, input *DescribeTransitGatewayPeeringAttachmentsInput, fn func(*DescribeTransitGatewayPeeringAttachmentsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTransitGatewayPeeringAttachmentsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTransitGatewayPeeringAttachmentsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayPeeringAttachmentsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeTransitGatewayRouteTables = "DescribeTransitGatewayRouteTables" // DescribeTransitGatewayRouteTablesRequest generates a "aws/request.Request" representing the @@ -27916,6 +28554,12 @@ func (c *EC2) GetTransitGatewayMulticastDomainAssociationsRequest(input *GetTran Name: opGetTransitGatewayMulticastDomainAssociations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -27960,6 +28604,58 @@ func (c *EC2) GetTransitGatewayMulticastDomainAssociationsWithContext(ctx aws.Co return out, req.Send() } +// GetTransitGatewayMulticastDomainAssociationsPages iterates over the pages of a GetTransitGatewayMulticastDomainAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetTransitGatewayMulticastDomainAssociations 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 GetTransitGatewayMulticastDomainAssociations operation. +// pageNum := 0 +// err := client.GetTransitGatewayMulticastDomainAssociationsPages(params, +// func(page *ec2.GetTransitGatewayMulticastDomainAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) GetTransitGatewayMulticastDomainAssociationsPages(input *GetTransitGatewayMulticastDomainAssociationsInput, fn func(*GetTransitGatewayMulticastDomainAssociationsOutput, bool) bool) error { + return c.GetTransitGatewayMulticastDomainAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetTransitGatewayMulticastDomainAssociationsPagesWithContext same as GetTransitGatewayMulticastDomainAssociationsPages 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 *EC2) GetTransitGatewayMulticastDomainAssociationsPagesWithContext(ctx aws.Context, input *GetTransitGatewayMulticastDomainAssociationsInput, fn func(*GetTransitGatewayMulticastDomainAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetTransitGatewayMulticastDomainAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetTransitGatewayMulticastDomainAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetTransitGatewayMulticastDomainAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opGetTransitGatewayRouteTableAssociations = "GetTransitGatewayRouteTableAssociations" // GetTransitGatewayRouteTableAssociationsRequest generates a "aws/request.Request" representing the @@ -33844,9 +34540,9 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // ensuring that the Spot Instances in your Spot Fleet are in different Spot // pools, you can improve the availability of your fleet. // -// You can specify tags for the Spot Fleet request and instances launched by -// the fleet. You cannot tag other resource types in a Spot Fleet request because -// only the spot-fleet-request and instance resource types are supported. +// You can specify tags for the Spot Fleet and Spot Instances. You cannot tag +// other resource types in a Spot Fleet request because only the spot-fleet-request +// and instance resource types are supported. // // For more information, see Spot Fleet Requests (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) // in the Amazon EC2 User Guide for Linux Instances. @@ -34996,6 +35692,12 @@ func (c *EC2) SearchLocalGatewayRoutesRequest(input *SearchLocalGatewayRoutesInp Name: opSearchLocalGatewayRoutes, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -35039,6 +35741,58 @@ func (c *EC2) SearchLocalGatewayRoutesWithContext(ctx aws.Context, input *Search return out, req.Send() } +// SearchLocalGatewayRoutesPages iterates over the pages of a SearchLocalGatewayRoutes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchLocalGatewayRoutes 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 SearchLocalGatewayRoutes operation. +// pageNum := 0 +// err := client.SearchLocalGatewayRoutesPages(params, +// func(page *ec2.SearchLocalGatewayRoutesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) SearchLocalGatewayRoutesPages(input *SearchLocalGatewayRoutesInput, fn func(*SearchLocalGatewayRoutesOutput, bool) bool) error { + return c.SearchLocalGatewayRoutesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchLocalGatewayRoutesPagesWithContext same as SearchLocalGatewayRoutesPages 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 *EC2) SearchLocalGatewayRoutesPagesWithContext(ctx aws.Context, input *SearchLocalGatewayRoutesInput, fn func(*SearchLocalGatewayRoutesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchLocalGatewayRoutesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchLocalGatewayRoutesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*SearchLocalGatewayRoutesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opSearchTransitGatewayMulticastGroups = "SearchTransitGatewayMulticastGroups" // SearchTransitGatewayMulticastGroupsRequest generates a "aws/request.Request" representing the @@ -35070,6 +35824,12 @@ func (c *EC2) SearchTransitGatewayMulticastGroupsRequest(input *SearchTransitGat Name: opSearchTransitGatewayMulticastGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -35114,6 +35874,58 @@ func (c *EC2) SearchTransitGatewayMulticastGroupsWithContext(ctx aws.Context, in return out, req.Send() } +// SearchTransitGatewayMulticastGroupsPages iterates over the pages of a SearchTransitGatewayMulticastGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchTransitGatewayMulticastGroups 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 SearchTransitGatewayMulticastGroups operation. +// pageNum := 0 +// err := client.SearchTransitGatewayMulticastGroupsPages(params, +// func(page *ec2.SearchTransitGatewayMulticastGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) SearchTransitGatewayMulticastGroupsPages(input *SearchTransitGatewayMulticastGroupsInput, fn func(*SearchTransitGatewayMulticastGroupsOutput, bool) bool) error { + return c.SearchTransitGatewayMulticastGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchTransitGatewayMulticastGroupsPagesWithContext same as SearchTransitGatewayMulticastGroupsPages 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 *EC2) SearchTransitGatewayMulticastGroupsPagesWithContext(ctx aws.Context, input *SearchTransitGatewayMulticastGroupsInput, fn func(*SearchTransitGatewayMulticastGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchTransitGatewayMulticastGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchTransitGatewayMulticastGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*SearchTransitGatewayMulticastGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opSearchTransitGatewayRoutes = "SearchTransitGatewayRoutes" // SearchTransitGatewayRoutesRequest generates a "aws/request.Request" representing the @@ -44653,6 +45465,9 @@ type CreateFlowLogsInput struct { // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` + // The tags to apply to the flow logs. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // The type of traffic to log. You can log traffic that the resource accepts // or rejects, or all traffic. // @@ -44749,6 +45564,12 @@ func (s *CreateFlowLogsInput) SetResourceType(v string) *CreateFlowLogsInput { return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateFlowLogsInput) SetTagSpecifications(v []*TagSpecification) *CreateFlowLogsInput { + s.TagSpecifications = v + return s +} + // SetTrafficType sets the TrafficType field's value. func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput { s.TrafficType = &v @@ -56792,6 +57613,16 @@ type DescribeFlowLogsInput struct { // * resource-id - The ID of the VPC, subnet, or network interface. // // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL). + // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. + // + // * 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 `locationNameList:"Filter" type:"list"` // One or more flow log IDs. @@ -59049,8 +59880,7 @@ type DescribeInstancesInput struct { // * host-id - The ID of the Dedicated Host on which the instance is running, // if applicable. // - // * hypervisor - The hypervisor type of the instance (ovm | xen). The value - // xen is used for both Xen and Nitro hypervisors. + // * hypervisor - The hypervisor type of the instance (ovm | xen). // // * iam-instance-profile.arn - The instance profile associated with the // instance. Specified as an ARN. @@ -72883,6 +73713,9 @@ type FlowLog struct { // The ID of the resource on which the flow log was created. ResourceId *string `locationName:"resourceId" type:"string"` + // The tags for the flow log. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The type of traffic captured for the flow log. TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"` } @@ -72969,6 +73802,12 @@ func (s *FlowLog) SetResourceId(v string) *FlowLog { return s } +// SetTags sets the Tags field's value. +func (s *FlowLog) SetTags(v []*Tag) *FlowLog { + s.Tags = v + return s +} + // SetTrafficType sets the TrafficType field's value. func (s *FlowLog) SetTrafficType(v string) *FlowLog { s.TrafficType = &v @@ -77979,8 +78818,7 @@ type Instance struct { // Indicates whether the instance is enabled for hibernation. HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` - // The hypervisor type of the instance. The value xen is used for both Xen and - // Nitro hypervisors. + // The hypervisor type of the instance. Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` // The IAM instance profile associated with the instance, if applicable. @@ -96336,13 +97174,10 @@ type RunInstancesInput struct { CapacityReservationSpecification *CapacityReservationSpecification `type:"structure"` // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. If you do not specify a client token, a randomly generated token - // is used for the request to ensure idempotency. - // - // For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). // // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + ClientToken *string `locationName:"clientToken" type:"string"` // The CPU options for the instance. For more information, see Optimizing CPU // Options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) @@ -100062,11 +100897,8 @@ type SpotFleetRequestConfigData struct { // The key-value pair for tagging the Spot Fleet request on creation. The value // for ResourceType must be spot-fleet-request, otherwise the Spot Fleet request // fails. To tag instances at launch, specify the tags in the launch template - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) - // (valid only if you use LaunchTemplateConfigs) or in the SpotFleetTagSpecification - // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html) - // (valid only if you use LaunchSpecifications). For information about tagging - // after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). + // For information about tagging after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The number of units to request for the Spot Fleet. You can choose to set @@ -100286,9 +101118,8 @@ func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetReques type SpotFleetTagSpecification struct { _ struct{} `type:"structure"` - // The type of resource. Currently, the only resource type that is supported - // is instance. To tag the Spot Fleet request on creation, use the TagSpecifications - // parameter in SpotFleetRequestConfigData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html). + // The type of resource. Currently, the only resource types that are supported + // are spot-fleet-request and instance. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags. @@ -110103,6 +110934,9 @@ const ( // ResourceTypeVpnGateway is a ResourceType enum value ResourceTypeVpnGateway = "vpn-gateway" + + // ResourceTypeVpcFlowLog is a ResourceType enum value + ResourceTypeVpcFlowLog = "vpc-flow-log" ) const ( 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 2e2c18c04bd..c1903d5141d 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 @@ -3647,7 +3647,7 @@ type AddTagsInput struct { // ResourceArns is a required field ResourceArns []*string `type:"list" required:"true"` - // The tags. Each resource can have a maximum of 10 tags. + // The tags. // // Tags is a required field Tags []*Tag `min:"1" type:"list" required:"true"` @@ -4190,9 +4190,30 @@ type CreateListenerInput struct { // Protocol is a required field Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` - // [HTTPS and TLS listeners] The security policy that defines which ciphers - // and protocols are supported. The default is the current predefined security - // policy. + // [HTTPS and TLS listeners] The security policy that defines which protocols + // and ciphers are supported. The following are the possible values: + // + // * ELBSecurityPolicy-2016-08 + // + // * ELBSecurityPolicy-TLS-1-0-2015-04 + // + // * ELBSecurityPolicy-TLS-1-1-2017-01 + // + // * ELBSecurityPolicy-TLS-1-2-2017-01 + // + // * ELBSecurityPolicy-TLS-1-2-Ext-2018-06 + // + // * ELBSecurityPolicy-FS-2018-06 + // + // * ELBSecurityPolicy-FS-1-1-2019-08 + // + // * ELBSecurityPolicy-FS-1-2-2019-08 + // + // * ELBSecurityPolicy-FS-1-2-Res-2019-08 + // + // For more information, see Security Policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) + // in the Application Load Balancers Guide and Security Policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) + // in the Network Load Balancers Guide. SslPolicy *string `type:"string"` } @@ -5733,7 +5754,7 @@ type DescribeSSLPoliciesOutput struct { // Otherwise, this is null. NextMarker *string `type:"string"` - // Information about the policies. + // Information about the security policies. SslPolicies []*SslPolicy `type:"list"` } @@ -5762,7 +5783,8 @@ func (s *DescribeSSLPoliciesOutput) SetSslPolicies(v []*SslPolicy) *DescribeSSLP type DescribeTagsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Names (ARN) of the resources. + // The Amazon Resource Names (ARN) of the resources. You can specify up to 20 + // resources in a single call. // // ResourceArns is a required field ResourceArns []*string `type:"list" required:"true"` @@ -6356,8 +6378,8 @@ type Listener struct { // The protocol for connections from clients to the load balancer. Protocol *string `type:"string" enum:"ProtocolEnum"` - // [HTTPS or TLS listener] The security policy that defines which ciphers and - // protocols are supported. The default is the current predefined security policy. + // [HTTPS or TLS listener] The security policy that defines which protocols + // and ciphers are supported. SslPolicy *string `type:"string"` } @@ -6622,7 +6644,8 @@ type LoadBalancerAttribute struct { // (true) or routed to targets (false). The default is false. // // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value - // is true or false. The default is true. + // is true or false. The default is true. Elastic Load Balancing requires + // that message header names contain only alphanumeric characters and hyphens. // // The following attributes are supported by only Network Load Balancers: // @@ -6781,8 +6804,29 @@ type ModifyListenerInput struct { Protocol *string `type:"string" enum:"ProtocolEnum"` // [HTTPS and TLS listeners] The security policy that defines which protocols - // and ciphers are supported. For more information, see Security Policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) - // in the Application Load Balancers Guide. + // and ciphers are supported. The following are the possible values: + // + // * ELBSecurityPolicy-2016-08 + // + // * ELBSecurityPolicy-TLS-1-0-2015-04 + // + // * ELBSecurityPolicy-TLS-1-1-2017-01 + // + // * ELBSecurityPolicy-TLS-1-2-2017-01 + // + // * ELBSecurityPolicy-TLS-1-2-Ext-2018-06 + // + // * ELBSecurityPolicy-FS-2018-06 + // + // * ELBSecurityPolicy-FS-1-1-2019-08 + // + // * ELBSecurityPolicy-FS-1-2-2019-08 + // + // * ELBSecurityPolicy-FS-1-2-Res-2019-08 + // + // For more information, see Security Policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) + // in the Application Load Balancers Guide and Security Policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) + // in the Network Load Balancers Guide. SslPolicy *string `type:"string"` } @@ -8760,8 +8804,8 @@ type TargetGroupAttribute struct { // The name of the attribute. // - // The following attribute is supported by both Application Load Balancers and - // Network Load Balancers: + // The following attributes are supported by both Application Load Balancers + // and Network Load Balancers: // // * deregistration_delay.timeout_seconds - The amount of time, in seconds, // for Elastic Load Balancing to wait before changing the state of a deregistering @@ -8769,6 +8813,13 @@ type TargetGroupAttribute struct { // value is 300 seconds. If the target is a Lambda function, this attribute // is not supported. // + // * 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 values are + // lb_cookie for Application Load Balancers or source_ip for Network Load + // Balancers. + // // The following attributes are supported by Application Load Balancers if the // target is not a Lambda function: // @@ -8782,12 +8833,6 @@ type TargetGroupAttribute struct { // its full share of traffic. The range is 30-900 seconds (15 minutes). Slow // start mode is disabled by default. // - // * 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 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 b26e61598a3..b6f7683ddd5 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 @@ -9165,6 +9165,156 @@ func (c *Glue) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, f return p.Err() } +const opListMLTransforms = "ListMLTransforms" + +// ListMLTransformsRequest generates a "aws/request.Request" representing the +// client's request for the ListMLTransforms operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListMLTransforms for more information on using the ListMLTransforms +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListMLTransformsRequest method. +// req, resp := client.ListMLTransformsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ListMLTransforms +func (c *Glue) ListMLTransformsRequest(input *ListMLTransformsInput) (req *request.Request, output *ListMLTransformsOutput) { + op := &request.Operation{ + Name: opListMLTransforms, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListMLTransformsInput{} + } + + output = &ListMLTransformsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMLTransforms API operation for AWS Glue. +// +// Retrieves a sortable, filterable list of existing AWS Glue machine learning +// transforms in this AWS account, or the resources with the specified tag. +// This operation takes the optional Tags field, which you can use as a filter +// of the responses so that tagged resources can be retrieved as a group. If +// you choose to use tag filtering, only resources with the tags are retrieved. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 Glue's +// API operation ListMLTransforms for usage and error information. +// +// Returned Error Types: +// * EntityNotFoundException +// A specified entity does not exist +// +// * InvalidInputException +// The input provided was not valid. +// +// * OperationTimeoutException +// The operation timed out. +// +// * InternalServiceException +// An internal service error occurred. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/ListMLTransforms +func (c *Glue) ListMLTransforms(input *ListMLTransformsInput) (*ListMLTransformsOutput, error) { + req, out := c.ListMLTransformsRequest(input) + return out, req.Send() +} + +// ListMLTransformsWithContext is the same as ListMLTransforms with the addition of +// the ability to pass a context and additional request options. +// +// See ListMLTransforms for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) ListMLTransformsWithContext(ctx aws.Context, input *ListMLTransformsInput, opts ...request.Option) (*ListMLTransformsOutput, error) { + req, out := c.ListMLTransformsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListMLTransformsPages iterates over the pages of a ListMLTransforms operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMLTransforms 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 ListMLTransforms operation. +// pageNum := 0 +// err := client.ListMLTransformsPages(params, +// func(page *glue.ListMLTransformsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Glue) ListMLTransformsPages(input *ListMLTransformsInput, fn func(*ListMLTransformsOutput, bool) bool) error { + return c.ListMLTransformsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMLTransformsPagesWithContext same as ListMLTransformsPages 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 *Glue) ListMLTransformsPagesWithContext(ctx aws.Context, input *ListMLTransformsInput, fn func(*ListMLTransformsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMLTransformsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMLTransformsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListMLTransformsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListTriggers = "ListTriggers" // ListTriggersRequest generates a "aws/request.Request" representing the @@ -17302,6 +17452,12 @@ type CreateMLTransformInput struct { // Role is a required field Role *string `type:"string" required:"true"` + // The tags to use with this machine learning transform. You may use tags to + // limit access to the machine learning transform. For more information about + // tags in AWS Glue, see AWS Tags in AWS Glue (https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) + // in the developer guide. + Tags map[string]*string `type:"map"` + // The timeout of the task run for this transform in minutes. This is the maximum // time that a task run for this transform can consume resources before it is // terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours). @@ -17443,6 +17599,12 @@ func (s *CreateMLTransformInput) SetRole(v string) *CreateMLTransformInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateMLTransformInput) SetTags(v map[string]*string) *CreateMLTransformInput { + s.Tags = v + return s +} + // SetTimeout sets the Timeout field's value. func (s *CreateMLTransformInput) SetTimeout(v int64) *CreateMLTransformInput { s.Timeout = &v @@ -26557,6 +26719,124 @@ func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { return s } +type ListMLTransformsInput struct { + _ struct{} `type:"structure"` + + // A TransformFilterCriteria used to filter the machine learning transforms. + Filter *TransformFilterCriteria `type:"structure"` + + // The maximum size of a list to return. + MaxResults *int64 `min:"1" type:"integer"` + + // A continuation token, if this is a continuation request. + NextToken *string `type:"string"` + + // A TransformSortCriteria used to sort the machine learning transforms. + Sort *TransformSortCriteria `type:"structure"` + + // Specifies to return only these tagged resources. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s ListMLTransformsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMLTransformsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMLTransformsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMLTransformsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + if s.Sort != nil { + if err := s.Sort.Validate(); err != nil { + invalidParams.AddNested("Sort", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *ListMLTransformsInput) SetFilter(v *TransformFilterCriteria) *ListMLTransformsInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListMLTransformsInput) SetMaxResults(v int64) *ListMLTransformsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMLTransformsInput) SetNextToken(v string) *ListMLTransformsInput { + s.NextToken = &v + return s +} + +// SetSort sets the Sort field's value. +func (s *ListMLTransformsInput) SetSort(v *TransformSortCriteria) *ListMLTransformsInput { + s.Sort = v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListMLTransformsInput) SetTags(v map[string]*string) *ListMLTransformsInput { + s.Tags = v + return s +} + +type ListMLTransformsOutput struct { + _ struct{} `type:"structure"` + + // A continuation token, if the returned list does not contain the last metric + // available. + NextToken *string `type:"string"` + + // The identifiers of all the machine learning transforms in the account, or + // the machine learning transforms with the specified tags. + // + // TransformIds is a required field + TransformIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListMLTransformsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMLTransformsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMLTransformsOutput) SetNextToken(v string) *ListMLTransformsOutput { + s.NextToken = &v + return s +} + +// SetTransformIds sets the TransformIds field's value. +func (s *ListMLTransformsOutput) SetTransformIds(v []*string) *ListMLTransformsOutput { + s.TransformIds = v + return s +} + type ListTriggersInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go b/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go index 9d0dffc3e34..e4cfc186fcd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go @@ -5498,6 +5498,161 @@ func (c *QuickSight) RegisterUserWithContext(ctx aws.Context, input *RegisterUse return out, req.Send() } +const opSearchDashboards = "SearchDashboards" + +// SearchDashboardsRequest generates a "aws/request.Request" representing the +// client's request for the SearchDashboards operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SearchDashboards for more information on using the SearchDashboards +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SearchDashboardsRequest method. +// req, resp := client.SearchDashboardsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/SearchDashboards +func (c *QuickSight) SearchDashboardsRequest(input *SearchDashboardsInput) (req *request.Request, output *SearchDashboardsOutput) { + op := &request.Operation{ + Name: opSearchDashboards, + HTTPMethod: "POST", + HTTPPath: "/accounts/{AwsAccountId}/search/dashboards", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &SearchDashboardsInput{} + } + + output = &SearchDashboardsOutput{} + req = c.newRequest(op, input, output) + return +} + +// SearchDashboards API operation for Amazon QuickSight. +// +// Searchs for dashboards that belong to a user. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 QuickSight's +// API operation SearchDashboards for usage and error information. +// +// Returned Error Types: +// * ThrottlingException +// Access is throttled. +// +// * ResourceNotFoundException +// One or more resources can't be found. +// +// * InvalidParameterValueException +// One or more parameters has a value that isn't valid. +// +// * UnsupportedUserEditionException +// This error indicates that you are calling an operation on an Amazon QuickSight +// subscription where the edition doesn't include support for that operation. +// Amazon QuickSight currently has Standard Edition and Enterprise Edition. +// Not every operation and capability is available in every edition. +// +// * InvalidNextTokenException +// The NextToken value isn't valid. +// +// * InternalFailureException +// An internal failure occurred. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/SearchDashboards +func (c *QuickSight) SearchDashboards(input *SearchDashboardsInput) (*SearchDashboardsOutput, error) { + req, out := c.SearchDashboardsRequest(input) + return out, req.Send() +} + +// SearchDashboardsWithContext is the same as SearchDashboards with the addition of +// the ability to pass a context and additional request options. +// +// See SearchDashboards for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *QuickSight) SearchDashboardsWithContext(ctx aws.Context, input *SearchDashboardsInput, opts ...request.Option) (*SearchDashboardsOutput, error) { + req, out := c.SearchDashboardsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SearchDashboardsPages iterates over the pages of a SearchDashboards operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchDashboards 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 SearchDashboards operation. +// pageNum := 0 +// err := client.SearchDashboardsPages(params, +// func(page *quicksight.SearchDashboardsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *QuickSight) SearchDashboardsPages(input *SearchDashboardsInput, fn func(*SearchDashboardsOutput, bool) bool) error { + return c.SearchDashboardsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchDashboardsPagesWithContext same as SearchDashboardsPages 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 *QuickSight) SearchDashboardsPagesWithContext(ctx aws.Context, input *SearchDashboardsInput, fn func(*SearchDashboardsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchDashboardsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchDashboardsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*SearchDashboardsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the @@ -10081,6 +10236,66 @@ func (s *DashboardPublishOptions) SetSheetControlsOption(v *SheetControlsOption) return s } +// A filter that you apply when searching for dashboards. +type DashboardSearchFilter struct { + _ struct{} `type:"structure"` + + // The name of the value that you want to use as a filter. For example, "Name": + // "QUICKSIGHT_USER". + Name *string `type:"string" enum:"DashboardFilterAttribute"` + + // The comparison operator that you want to use as a filter. For example, "Operator": + // "StringEquals". + // + // Operator is a required field + Operator *string `type:"string" required:"true" enum:"FilterOperator"` + + // The value of the named item, in this case QUICKSIGHT_USER, that you want + // to use as a filter. For example, "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1". + Value *string `type:"string"` +} + +// String returns the string representation +func (s DashboardSearchFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DashboardSearchFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DashboardSearchFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DashboardSearchFilter"} + if s.Operator == nil { + invalidParams.Add(request.NewErrParamRequired("Operator")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DashboardSearchFilter) SetName(v string) *DashboardSearchFilter { + s.Name = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *DashboardSearchFilter) SetOperator(v string) *DashboardSearchFilter { + s.Operator = &v + return s +} + +// SetValue sets the Value field's value. +func (s *DashboardSearchFilter) SetValue(v string) *DashboardSearchFilter { + s.Value = &v + return s +} + // Dashboard source entity. type DashboardSourceEntity struct { _ struct{} `type:"structure"` @@ -18926,6 +19141,146 @@ func (s *S3Source) SetUploadSettings(v *UploadSettings) *S3Source { return s } +type SearchDashboardsInput struct { + _ struct{} `type:"structure"` + + // The ID of the AWS account that contains the user whose dashboards you're + // searching for. + // + // AwsAccountId is a required field + AwsAccountId *string `location:"uri" locationName:"AwsAccountId" min:"12" type:"string" required:"true"` + + // The filters to apply to the search. Currently, you can search only by user + // name. For example, "Filters": [ { "Name": "QUICKSIGHT_USER", "Operator": + // "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" + // } ] + // + // Filters is a required field + Filters []*DashboardSearchFilter `type:"list" required:"true"` + + // The maximum number of results to be returned per request. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of results, or null if there are no more results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s SearchDashboardsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchDashboardsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchDashboardsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchDashboardsInput"} + if s.AwsAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AwsAccountId")) + } + if s.AwsAccountId != nil && len(*s.AwsAccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AwsAccountId", 12)) + } + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + 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 +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *SearchDashboardsInput) SetAwsAccountId(v string) *SearchDashboardsInput { + s.AwsAccountId = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *SearchDashboardsInput) SetFilters(v []*DashboardSearchFilter) *SearchDashboardsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *SearchDashboardsInput) SetMaxResults(v int64) *SearchDashboardsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchDashboardsInput) SetNextToken(v string) *SearchDashboardsInput { + s.NextToken = &v + return s +} + +type SearchDashboardsOutput struct { + _ struct{} `type:"structure"` + + // The list of dashboards owned by the user specified in Filters in your request. + DashboardSummaryList []*DashboardSummary `type:"list"` + + // The token for the next set of results, or null if there are no more results. + NextToken *string `type:"string"` + + // The AWS request ID for this operation. + RequestId *string `type:"string"` + + // The HTTP status of the request. + Status *int64 `location:"statusCode" type:"integer"` +} + +// String returns the string representation +func (s SearchDashboardsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchDashboardsOutput) GoString() string { + return s.String() +} + +// SetDashboardSummaryList sets the DashboardSummaryList field's value. +func (s *SearchDashboardsOutput) SetDashboardSummaryList(v []*DashboardSummary) *SearchDashboardsOutput { + s.DashboardSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchDashboardsOutput) SetNextToken(v string) *SearchDashboardsOutput { + s.NextToken = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *SearchDashboardsOutput) SetRequestId(v string) *SearchDashboardsOutput { + s.RequestId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *SearchDashboardsOutput) SetStatus(v int64) *SearchDashboardsOutput { + s.Status = &v + return s +} + // ServiceNow parameters. type ServiceNowParameters struct { _ struct{} `type:"structure"` @@ -23067,6 +23422,11 @@ const ( DashboardErrorTypeColumnReplacementMissing = "COLUMN_REPLACEMENT_MISSING" ) +const ( + // DashboardFilterAttributeQuicksightUser is a DashboardFilterAttribute enum value + DashboardFilterAttributeQuicksightUser = "QUICKSIGHT_USER" +) + const ( // DashboardUIStateExpanded is a DashboardUIState enum value DashboardUIStateExpanded = "EXPANDED" @@ -23217,6 +23577,11 @@ const ( FileFormatJson = "JSON" ) +const ( + // FilterOperatorStringEquals is a FilterOperator enum value + FilterOperatorStringEquals = "StringEquals" +) + const ( // GeoSpatialCountryCodeUs is a GeoSpatialCountryCode enum value GeoSpatialCountryCodeUs = "US" diff --git a/vendor/modules.txt b/vendor/modules.txt index cac62a988ea..6f30ef6adcb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -21,7 +21,7 @@ github.com/apparentlymart/go-cidr/cidr github.com/apparentlymart/go-textseg/textseg # github.com/armon/go-radix v1.0.0 github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.29.12 +# github.com/aws/aws-sdk-go v1.29.16 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/awserr