From 99e19095a05407cb863598b4116102ce93f2503c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:50:25 +0000 Subject: [PATCH] Bump github.com/aws/aws-sdk-go from 1.44.327 to 1.45.2 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.327 to 1.45.2. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.327...v1.45.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../aws/corehandlers/awsinternal.go | 4 + .../aws-sdk-go/aws/corehandlers/user_agent.go | 10 + .../aws/aws-sdk-go/aws/defaults/defaults.go | 1 + .../aws/aws-sdk-go/aws/endpoints/defaults.go | 113 +++++ .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/health/api.go | 406 +++++++++++++++++- .../service/health/healthiface/interface.go | 4 + vendor/modules.txt | 2 +- 10 files changed, 539 insertions(+), 9 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go diff --git a/go.mod b/go.mod index f4e4207a..9417f5e9 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Jimdo/aws-health-exporter go 1.20 require ( - github.com/aws/aws-sdk-go v1.44.327 + github.com/aws/aws-sdk-go v1.45.2 github.com/prometheus/client_golang v1.11.1 github.com/prometheus/client_model v0.4.0 github.com/prometheus/common v0.26.0 diff --git a/go.sum b/go.sum index db6b052a..bd812fb1 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= -github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.2 h1:hTong9YUklQKqzrGk3WnKABReb5R8GjbG4Y6dEQfjnk= +github.com/aws/aws-sdk-go v1.45.2/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go new file mode 100644 index 00000000..140242dd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go @@ -0,0 +1,4 @@ +// DO NOT EDIT +package corehandlers + +const isAwsInternal = "" \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go index ab69c7a6..ac842c55 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go @@ -35,3 +35,13 @@ var AddHostExecEnvUserAgentHander = request.NamedHandler{ request.AddToUserAgent(r, execEnvUAKey+"/"+v) }, } + +var AddAwsInternal = request.NamedHandler{ + Name: "core.AddAwsInternal", + Fn: func(r *request.Request) { + if len(isAwsInternal) == 0 { + return + } + request.AddToUserAgent(r, isAwsInternal) + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 23bb639e..e3990328 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -74,6 +74,7 @@ func Handlers() request.Handlers { handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) handlers.Validate.AfterEachFn = request.HandlerListStopOnError handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) + handlers.Build.PushBackNamed(corehandlers.AddAwsInternal) handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander) handlers.Build.AfterEachFn = request.HandlerListStopOnError handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) 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 a515362a..9d24d117 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 @@ -1058,6 +1058,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -2928,6 +2931,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "appmesh.eu-west-3.api.aws", }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "appmesh.il-central-1.api.aws", + }, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -3670,6 +3682,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "il-central-1", + Variant: dualStackVariant, + }: endpoint{ + Hostname: "athena.il-central-1.api.aws", + }, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -4053,6 +4074,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -4334,6 +4358,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -5684,6 +5711,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -6255,6 +6285,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, @@ -6321,6 +6354,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -6373,6 +6409,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, @@ -6439,6 +6478,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -7212,6 +7254,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -7897,6 +7942,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -11014,6 +11062,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -12188,6 +12239,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -12585,6 +12639,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -13483,6 +13540,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -17150,6 +17210,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -17368,6 +17431,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -17425,6 +17491,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -17964,6 +18033,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -18155,6 +18227,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, @@ -18164,6 +18239,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-4", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -18560,6 +18638,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, @@ -18995,6 +19076,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -20500,6 +20584,12 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, + endpointKey{ + Region: "me-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -21199,6 +21289,14 @@ var awsPartition = partition{ Region: "eu-west-3", }, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{ + Hostname: "portal.sso.il-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "il-central-1", + }, + }, endpointKey{ Region: "me-south-1", }: endpoint{ @@ -22525,6 +22623,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-2", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "rekognition-fips.ca-central-1", }: endpoint{ @@ -24629,6 +24730,9 @@ var awsPartition = partition{ Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -26075,6 +26179,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -27688,6 +27795,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, @@ -27933,6 +28043,9 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-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 39522c26..beca3eac 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.44.327" +const SDKVersion = "1.45.2" diff --git a/vendor/github.com/aws/aws-sdk-go/service/health/api.go b/vendor/github.com/aws/aws-sdk-go/service/health/api.go index 8de6db1a..c4daf44a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/health/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/health/api.go @@ -544,6 +544,80 @@ func (c *Health) DescribeEntityAggregatesWithContext(ctx aws.Context, input *Des return out, req.Send() } +const opDescribeEntityAggregatesForOrganization = "DescribeEntityAggregatesForOrganization" + +// DescribeEntityAggregatesForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEntityAggregatesForOrganization 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 DescribeEntityAggregatesForOrganization for more information on using the DescribeEntityAggregatesForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the DescribeEntityAggregatesForOrganizationRequest method. +// req, resp := client.DescribeEntityAggregatesForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregatesForOrganization +func (c *Health) DescribeEntityAggregatesForOrganizationRequest(input *DescribeEntityAggregatesForOrganizationInput) (req *request.Request, output *DescribeEntityAggregatesForOrganizationOutput) { + op := &request.Operation{ + Name: opDescribeEntityAggregatesForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEntityAggregatesForOrganizationInput{} + } + + output = &DescribeEntityAggregatesForOrganizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEntityAggregatesForOrganization API operation for AWS Health APIs and Notifications. +// +// Returns a list of entity aggregates for your Organizations that are affected +// by each of the specified events. +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 Health APIs and Notifications's +// API operation DescribeEntityAggregatesForOrganization for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregatesForOrganization +func (c *Health) DescribeEntityAggregatesForOrganization(input *DescribeEntityAggregatesForOrganizationInput) (*DescribeEntityAggregatesForOrganizationOutput, error) { + req, out := c.DescribeEntityAggregatesForOrganizationRequest(input) + return out, req.Send() +} + +// DescribeEntityAggregatesForOrganizationWithContext is the same as DescribeEntityAggregatesForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEntityAggregatesForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeEntityAggregatesForOrganizationWithContext(ctx aws.Context, input *DescribeEntityAggregatesForOrganizationInput, opts ...request.Option) (*DescribeEntityAggregatesForOrganizationOutput, error) { + req, out := c.DescribeEntityAggregatesForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeEventAggregates = "DescribeEventAggregates" // DescribeEventAggregatesRequest generates a "aws/request.Request" representing the @@ -1639,6 +1713,58 @@ func (c *Health) EnableHealthServiceAccessForOrganizationWithContext(ctx aws.Con return out, req.Send() } +// The number of entities in an account that are impacted by a specific event +// aggregated by the entity status codes. +type AccountEntityAggregate struct { + _ struct{} `type:"structure"` + + // The 12-digit Amazon Web Services account numbers that contains the affected + // entities. + AccountId *string `locationName:"accountId" type:"string"` + + // The number of entities that match the filter criteria for the specified events. + Count *int64 `locationName:"count" type:"integer"` + + // The number of affected entities aggregated by the entity status codes. + Statuses map[string]*int64 `locationName:"statuses" type:"map"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccountEntityAggregate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccountEntityAggregate) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AccountEntityAggregate) SetAccountId(v string) *AccountEntityAggregate { + s.AccountId = &v + return s +} + +// SetCount sets the Count field's value. +func (s *AccountEntityAggregate) SetCount(v int64) *AccountEntityAggregate { + s.Count = &v + return s +} + +// SetStatuses sets the Statuses field's value. +func (s *AccountEntityAggregate) SetStatuses(v map[string]*int64) *AccountEntityAggregate { + s.Statuses = v + return s +} + // Information about an entity that is affected by a Health event. type AffectedEntity struct { _ struct{} `type:"structure"` @@ -2021,10 +2147,14 @@ type DescribeAffectedEntitiesForOrganizationInput struct { // a pagination token value. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + // A JSON set of elements including the awsAccountId, eventArn and a set of + // statusCodes. + OrganizationEntityAccountFilters []*EntityAccountFilter `locationName:"organizationEntityAccountFilters" min:"1" type:"list"` + // A JSON set of elements including the awsAccountId and the eventArn. // - // OrganizationEntityFilters is a required field - OrganizationEntityFilters []*EventAccountFilter `locationName:"organizationEntityFilters" min:"1" type:"list" required:"true"` + // Deprecated: This property is deprecated, use organizationEntityAccountFilters instead. + OrganizationEntityFilters []*EventAccountFilter `locationName:"organizationEntityFilters" min:"1" deprecated:"true" type:"list"` } // String returns the string representation. @@ -2057,12 +2187,22 @@ func (s *DescribeAffectedEntitiesForOrganizationInput) Validate() error { if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } - if s.OrganizationEntityFilters == nil { - invalidParams.Add(request.NewErrParamRequired("OrganizationEntityFilters")) + if s.OrganizationEntityAccountFilters != nil && len(s.OrganizationEntityAccountFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationEntityAccountFilters", 1)) } if s.OrganizationEntityFilters != nil && len(s.OrganizationEntityFilters) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationEntityFilters", 1)) } + if s.OrganizationEntityAccountFilters != nil { + for i, v := range s.OrganizationEntityAccountFilters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationEntityAccountFilters", i), err.(request.ErrInvalidParams)) + } + } + } if s.OrganizationEntityFilters != nil { for i, v := range s.OrganizationEntityFilters { if v == nil { @@ -2098,6 +2238,12 @@ func (s *DescribeAffectedEntitiesForOrganizationInput) SetNextToken(v string) *D return s } +// SetOrganizationEntityAccountFilters sets the OrganizationEntityAccountFilters field's value. +func (s *DescribeAffectedEntitiesForOrganizationInput) SetOrganizationEntityAccountFilters(v []*EntityAccountFilter) *DescribeAffectedEntitiesForOrganizationInput { + s.OrganizationEntityAccountFilters = v + return s +} + // SetOrganizationEntityFilters sets the OrganizationEntityFilters field's value. func (s *DescribeAffectedEntitiesForOrganizationInput) SetOrganizationEntityFilters(v []*EventAccountFilter) *DescribeAffectedEntitiesForOrganizationInput { s.OrganizationEntityFilters = v @@ -2295,6 +2441,101 @@ func (s *DescribeAffectedEntitiesOutput) SetNextToken(v string) *DescribeAffecte return s } +type DescribeEntityAggregatesForOrganizationInput struct { + _ struct{} `type:"structure"` + + // A list of 12-digit Amazon Web Services account numbers that contains the + // affected entities. + AwsAccountIds []*string `locationName:"awsAccountIds" min:"1" type:"list"` + + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", + // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + // + // EventArns is a required field + EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeEntityAggregatesForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeEntityAggregatesForOrganizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEntityAggregatesForOrganizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEntityAggregatesForOrganizationInput"} + if s.AwsAccountIds != nil && len(s.AwsAccountIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsAccountIds", 1)) + } + if s.EventArns == nil { + invalidParams.Add(request.NewErrParamRequired("EventArns")) + } + if s.EventArns != nil && len(s.EventArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsAccountIds sets the AwsAccountIds field's value. +func (s *DescribeEntityAggregatesForOrganizationInput) SetAwsAccountIds(v []*string) *DescribeEntityAggregatesForOrganizationInput { + s.AwsAccountIds = v + return s +} + +// SetEventArns sets the EventArns field's value. +func (s *DescribeEntityAggregatesForOrganizationInput) SetEventArns(v []*string) *DescribeEntityAggregatesForOrganizationInput { + s.EventArns = v + return s +} + +type DescribeEntityAggregatesForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // The list of entity aggregates for each of the specified accounts that are + // affected by each of the specified events. + OrganizationEntityAggregates []*OrganizationEntityAggregate `locationName:"organizationEntityAggregates" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeEntityAggregatesForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeEntityAggregatesForOrganizationOutput) GoString() string { + return s.String() +} + +// SetOrganizationEntityAggregates sets the OrganizationEntityAggregates field's value. +func (s *DescribeEntityAggregatesForOrganizationOutput) SetOrganizationEntityAggregates(v []*OrganizationEntityAggregate) *DescribeEntityAggregatesForOrganizationOutput { + s.OrganizationEntityAggregates = v + return s +} + type DescribeEntityAggregatesInput struct { _ struct{} `type:"structure"` @@ -3261,6 +3502,81 @@ func (s EnableHealthServiceAccessForOrganizationOutput) GoString() string { return s.String() } +// A JSON set of elements including the awsAccountId, eventArn and a set of +// statusCodes. +type EntityAccountFilter struct { + _ struct{} `type:"structure"` + + // The 12-digit Amazon Web Services account numbers that contains the affected + // entities. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` + + // The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // format. + // + // For example, an event ARN might look like the following: + // + // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + // + // EventArn is a required field + EventArn *string `locationName:"eventArn" type:"string" required:"true"` + + // A list of entity status codes. + StatusCodes []*string `locationName:"statusCodes" min:"1" type:"list" enum:"EntityStatusCode"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s EntityAccountFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s EntityAccountFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EntityAccountFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EntityAccountFilter"} + if s.EventArn == nil { + invalidParams.Add(request.NewErrParamRequired("EventArn")) + } + if s.StatusCodes != nil && len(s.StatusCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCodes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *EntityAccountFilter) SetAwsAccountId(v string) *EntityAccountFilter { + s.AwsAccountId = &v + return s +} + +// SetEventArn sets the EventArn field's value. +func (s *EntityAccountFilter) SetEventArn(v string) *EntityAccountFilter { + s.EventArn = &v + return s +} + +// SetStatusCodes sets the StatusCodes field's value. +func (s *EntityAccountFilter) SetStatusCodes(v []*string) *EntityAccountFilter { + s.StatusCodes = v + return s +} + // The number of entities that are affected by one or more events. Returned // by the DescribeEntityAggregates (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEntityAggregates.html) // operation. @@ -3277,6 +3593,9 @@ type EntityAggregate struct { // // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 EventArn *string `locationName:"eventArn" type:"string"` + + // The number of affected entities aggregated by the entity status codes. + Statuses map[string]*int64 `locationName:"statuses" type:"map"` } // String returns the string representation. @@ -3309,6 +3628,12 @@ func (s *EntityAggregate) SetEventArn(v string) *EntityAggregate { return s } +// SetStatuses sets the Statuses field's value. +func (s *EntityAggregate) SetStatuses(v map[string]*int64) *EntityAggregate { + s.Statuses = v + return s +} + // The values to use to filter results from the DescribeAffectedEntities (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntities.html) // operation. type EntityFilter struct { @@ -4297,6 +4622,71 @@ func (s *OrganizationAffectedEntitiesErrorItem) SetEventArn(v string) *Organizat return s } +// The aggregate results of entities affected by the specified event in your +// organization. The results are aggregated by the entity status codes for the +// specified set of accountsIDs. +type OrganizationEntityAggregate struct { + _ struct{} `type:"structure"` + + // A list of entity aggregates for each of the specified accounts in your organization + // that are affected by a specific event. If there are no awsAccountIds provided + // in the request, this field will be empty in the response. + Accounts []*AccountEntityAggregate `locationName:"accounts" type:"list"` + + // The number of entities for the organization that match the filter criteria + // for the specified events. + Count *int64 `locationName:"count" type:"integer"` + + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", + // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + EventArn *string `locationName:"eventArn" type:"string"` + + // The number of affected entities aggregated by the entitiy status codes. + Statuses map[string]*int64 `locationName:"statuses" type:"map"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OrganizationEntityAggregate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OrganizationEntityAggregate) GoString() string { + return s.String() +} + +// SetAccounts sets the Accounts field's value. +func (s *OrganizationEntityAggregate) SetAccounts(v []*AccountEntityAggregate) *OrganizationEntityAggregate { + s.Accounts = v + return s +} + +// SetCount sets the Count field's value. +func (s *OrganizationEntityAggregate) SetCount(v int64) *OrganizationEntityAggregate { + s.Count = &v + return s +} + +// SetEventArn sets the EventArn field's value. +func (s *OrganizationEntityAggregate) SetEventArn(v string) *OrganizationEntityAggregate { + s.EventArn = &v + return s +} + +// SetStatuses sets the Statuses field's value. +func (s *OrganizationEntityAggregate) SetStatuses(v map[string]*int64) *OrganizationEntityAggregate { + s.Statuses = v + return s +} + // Summary information about an event, returned by the DescribeEventsForOrganization // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventsForOrganization.html) // operation. @@ -4849,6 +5239,12 @@ const ( // EntityStatusCodeUnknown is a EntityStatusCode enum value EntityStatusCodeUnknown = "UNKNOWN" + + // EntityStatusCodePending is a EntityStatusCode enum value + EntityStatusCodePending = "PENDING" + + // EntityStatusCodeResolved is a EntityStatusCode enum value + EntityStatusCodeResolved = "RESOLVED" ) // EntityStatusCode_Values returns all elements of the EntityStatusCode enum @@ -4857,6 +5253,8 @@ func EntityStatusCode_Values() []string { EntityStatusCodeImpaired, EntityStatusCodeUnimpaired, EntityStatusCodeUnknown, + EntityStatusCodePending, + EntityStatusCodeResolved, } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/health/healthiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/health/healthiface/interface.go index 91a5fcff..9ad91d87 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/health/healthiface/interface.go +++ b/vendor/github.com/aws/aws-sdk-go/service/health/healthiface/interface.go @@ -85,6 +85,10 @@ type HealthAPI interface { DescribeEntityAggregatesWithContext(aws.Context, *health.DescribeEntityAggregatesInput, ...request.Option) (*health.DescribeEntityAggregatesOutput, error) DescribeEntityAggregatesRequest(*health.DescribeEntityAggregatesInput) (*request.Request, *health.DescribeEntityAggregatesOutput) + DescribeEntityAggregatesForOrganization(*health.DescribeEntityAggregatesForOrganizationInput) (*health.DescribeEntityAggregatesForOrganizationOutput, error) + DescribeEntityAggregatesForOrganizationWithContext(aws.Context, *health.DescribeEntityAggregatesForOrganizationInput, ...request.Option) (*health.DescribeEntityAggregatesForOrganizationOutput, error) + DescribeEntityAggregatesForOrganizationRequest(*health.DescribeEntityAggregatesForOrganizationInput) (*request.Request, *health.DescribeEntityAggregatesForOrganizationOutput) + DescribeEventAggregates(*health.DescribeEventAggregatesInput) (*health.DescribeEventAggregatesOutput, error) DescribeEventAggregatesWithContext(aws.Context, *health.DescribeEventAggregatesInput, ...request.Option) (*health.DescribeEventAggregatesOutput, error) DescribeEventAggregatesRequest(*health.DescribeEventAggregatesInput) (*request.Request, *health.DescribeEventAggregatesOutput) diff --git a/vendor/modules.txt b/vendor/modules.txt index f6d3e8e8..7e27db60 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -5,7 +5,7 @@ github.com/alecthomas/template/parse # github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d ## explicit github.com/alecthomas/units -# github.com/aws/aws-sdk-go v1.44.327 +# github.com/aws/aws-sdk-go v1.45.2 ## explicit; go 1.11 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/auth/bearer