github.com/aavshr/aws-sdk-go@v1.41.3/service/health/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package health 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const opDescribeAffectedAccountsForOrganization = "DescribeAffectedAccountsForOrganization" 17 18 // DescribeAffectedAccountsForOrganizationRequest generates a "aws/request.Request" representing the 19 // client's request for the DescribeAffectedAccountsForOrganization operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See DescribeAffectedAccountsForOrganization for more information on using the DescribeAffectedAccountsForOrganization 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the DescribeAffectedAccountsForOrganizationRequest method. 34 // req, resp := client.DescribeAffectedAccountsForOrganizationRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedAccountsForOrganization 42 func (c *Health) DescribeAffectedAccountsForOrganizationRequest(input *DescribeAffectedAccountsForOrganizationInput) (req *request.Request, output *DescribeAffectedAccountsForOrganizationOutput) { 43 op := &request.Operation{ 44 Name: opDescribeAffectedAccountsForOrganization, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 Paginator: &request.Paginator{ 48 InputTokens: []string{"nextToken"}, 49 OutputTokens: []string{"nextToken"}, 50 LimitToken: "maxResults", 51 TruncationToken: "", 52 }, 53 } 54 55 if input == nil { 56 input = &DescribeAffectedAccountsForOrganizationInput{} 57 } 58 59 output = &DescribeAffectedAccountsForOrganizationOutput{} 60 req = c.newRequest(op, input, output) 61 return 62 } 63 64 // DescribeAffectedAccountsForOrganization API operation for AWS Health APIs and Notifications. 65 // 66 // Returns a list of accounts in the organization from AWS Organizations that 67 // are affected by the provided event. For more information about the different 68 // types of AWS Health events, see Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html). 69 // 70 // Before you can call this operation, you must first enable AWS Health to work 71 // with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization 72 // (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 73 // operation from your organization's management account. 74 // 75 // This API operation uses pagination. Specify the nextToken parameter in the 76 // next request to return more results. 77 // 78 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 79 // with awserr.Error's Code and Message methods to get detailed information about 80 // the error. 81 // 82 // See the AWS API reference guide for AWS Health APIs and Notifications's 83 // API operation DescribeAffectedAccountsForOrganization for usage and error information. 84 // 85 // Returned Error Types: 86 // * InvalidPaginationToken 87 // The specified pagination token (nextToken) is not valid. 88 // 89 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedAccountsForOrganization 90 func (c *Health) DescribeAffectedAccountsForOrganization(input *DescribeAffectedAccountsForOrganizationInput) (*DescribeAffectedAccountsForOrganizationOutput, error) { 91 req, out := c.DescribeAffectedAccountsForOrganizationRequest(input) 92 return out, req.Send() 93 } 94 95 // DescribeAffectedAccountsForOrganizationWithContext is the same as DescribeAffectedAccountsForOrganization with the addition of 96 // the ability to pass a context and additional request options. 97 // 98 // See DescribeAffectedAccountsForOrganization for details on how to use this API operation. 99 // 100 // The context must be non-nil and will be used for request cancellation. If 101 // the context is nil a panic will occur. In the future the SDK may create 102 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 103 // for more information on using Contexts. 104 func (c *Health) DescribeAffectedAccountsForOrganizationWithContext(ctx aws.Context, input *DescribeAffectedAccountsForOrganizationInput, opts ...request.Option) (*DescribeAffectedAccountsForOrganizationOutput, error) { 105 req, out := c.DescribeAffectedAccountsForOrganizationRequest(input) 106 req.SetContext(ctx) 107 req.ApplyOptions(opts...) 108 return out, req.Send() 109 } 110 111 // DescribeAffectedAccountsForOrganizationPages iterates over the pages of a DescribeAffectedAccountsForOrganization operation, 112 // calling the "fn" function with the response data for each page. To stop 113 // iterating, return false from the fn function. 114 // 115 // See DescribeAffectedAccountsForOrganization method for more information on how to use this operation. 116 // 117 // Note: This operation can generate multiple requests to a service. 118 // 119 // // Example iterating over at most 3 pages of a DescribeAffectedAccountsForOrganization operation. 120 // pageNum := 0 121 // err := client.DescribeAffectedAccountsForOrganizationPages(params, 122 // func(page *health.DescribeAffectedAccountsForOrganizationOutput, lastPage bool) bool { 123 // pageNum++ 124 // fmt.Println(page) 125 // return pageNum <= 3 126 // }) 127 // 128 func (c *Health) DescribeAffectedAccountsForOrganizationPages(input *DescribeAffectedAccountsForOrganizationInput, fn func(*DescribeAffectedAccountsForOrganizationOutput, bool) bool) error { 129 return c.DescribeAffectedAccountsForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) 130 } 131 132 // DescribeAffectedAccountsForOrganizationPagesWithContext same as DescribeAffectedAccountsForOrganizationPages except 133 // it takes a Context and allows setting request options on the pages. 134 // 135 // The context must be non-nil and will be used for request cancellation. If 136 // the context is nil a panic will occur. In the future the SDK may create 137 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 138 // for more information on using Contexts. 139 func (c *Health) DescribeAffectedAccountsForOrganizationPagesWithContext(ctx aws.Context, input *DescribeAffectedAccountsForOrganizationInput, fn func(*DescribeAffectedAccountsForOrganizationOutput, bool) bool, opts ...request.Option) error { 140 p := request.Pagination{ 141 NewRequest: func() (*request.Request, error) { 142 var inCpy *DescribeAffectedAccountsForOrganizationInput 143 if input != nil { 144 tmp := *input 145 inCpy = &tmp 146 } 147 req, _ := c.DescribeAffectedAccountsForOrganizationRequest(inCpy) 148 req.SetContext(ctx) 149 req.ApplyOptions(opts...) 150 return req, nil 151 }, 152 } 153 154 for p.Next() { 155 if !fn(p.Page().(*DescribeAffectedAccountsForOrganizationOutput), !p.HasNextPage()) { 156 break 157 } 158 } 159 160 return p.Err() 161 } 162 163 const opDescribeAffectedEntities = "DescribeAffectedEntities" 164 165 // DescribeAffectedEntitiesRequest generates a "aws/request.Request" representing the 166 // client's request for the DescribeAffectedEntities operation. The "output" return 167 // value will be populated with the request's response once the request completes 168 // successfully. 169 // 170 // Use "Send" method on the returned Request to send the API call to the service. 171 // the "output" return value is not valid until after Send returns without error. 172 // 173 // See DescribeAffectedEntities for more information on using the DescribeAffectedEntities 174 // API call, and error handling. 175 // 176 // This method is useful when you want to inject custom logic or configuration 177 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 178 // 179 // 180 // // Example sending a request using the DescribeAffectedEntitiesRequest method. 181 // req, resp := client.DescribeAffectedEntitiesRequest(params) 182 // 183 // err := req.Send() 184 // if err == nil { // resp is now filled 185 // fmt.Println(resp) 186 // } 187 // 188 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntities 189 func (c *Health) DescribeAffectedEntitiesRequest(input *DescribeAffectedEntitiesInput) (req *request.Request, output *DescribeAffectedEntitiesOutput) { 190 op := &request.Operation{ 191 Name: opDescribeAffectedEntities, 192 HTTPMethod: "POST", 193 HTTPPath: "/", 194 Paginator: &request.Paginator{ 195 InputTokens: []string{"nextToken"}, 196 OutputTokens: []string{"nextToken"}, 197 LimitToken: "maxResults", 198 TruncationToken: "", 199 }, 200 } 201 202 if input == nil { 203 input = &DescribeAffectedEntitiesInput{} 204 } 205 206 output = &DescribeAffectedEntitiesOutput{} 207 req = c.newRequest(op, input, output) 208 return 209 } 210 211 // DescribeAffectedEntities API operation for AWS Health APIs and Notifications. 212 // 213 // Returns a list of entities that have been affected by the specified events, 214 // based on the specified filter criteria. Entities can refer to individual 215 // customer resources, groups of customer resources, or any other construct, 216 // depending on the AWS service. Events that have impact beyond that of the 217 // affected entities, or where the extent of impact is unknown, include at least 218 // one entity indicating this. 219 // 220 // At least one event ARN is required. Results are sorted by the lastUpdatedTime 221 // of the entity, starting with the most recent. 222 // 223 // * This API operation uses pagination. Specify the nextToken parameter 224 // in the next request to return more results. 225 // 226 // * This operation supports resource-level permissions. You can use this 227 // operation to allow or deny access to specific AWS Health events. For more 228 // information, see Resource- and action-based conditions (https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions) 229 // in the AWS Health User Guide. 230 // 231 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 232 // with awserr.Error's Code and Message methods to get detailed information about 233 // the error. 234 // 235 // See the AWS API reference guide for AWS Health APIs and Notifications's 236 // API operation DescribeAffectedEntities for usage and error information. 237 // 238 // Returned Error Types: 239 // * InvalidPaginationToken 240 // The specified pagination token (nextToken) is not valid. 241 // 242 // * UnsupportedLocale 243 // The specified locale is not supported. 244 // 245 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntities 246 func (c *Health) DescribeAffectedEntities(input *DescribeAffectedEntitiesInput) (*DescribeAffectedEntitiesOutput, error) { 247 req, out := c.DescribeAffectedEntitiesRequest(input) 248 return out, req.Send() 249 } 250 251 // DescribeAffectedEntitiesWithContext is the same as DescribeAffectedEntities with the addition of 252 // the ability to pass a context and additional request options. 253 // 254 // See DescribeAffectedEntities for details on how to use this API operation. 255 // 256 // The context must be non-nil and will be used for request cancellation. If 257 // the context is nil a panic will occur. In the future the SDK may create 258 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 259 // for more information on using Contexts. 260 func (c *Health) DescribeAffectedEntitiesWithContext(ctx aws.Context, input *DescribeAffectedEntitiesInput, opts ...request.Option) (*DescribeAffectedEntitiesOutput, error) { 261 req, out := c.DescribeAffectedEntitiesRequest(input) 262 req.SetContext(ctx) 263 req.ApplyOptions(opts...) 264 return out, req.Send() 265 } 266 267 // DescribeAffectedEntitiesPages iterates over the pages of a DescribeAffectedEntities operation, 268 // calling the "fn" function with the response data for each page. To stop 269 // iterating, return false from the fn function. 270 // 271 // See DescribeAffectedEntities method for more information on how to use this operation. 272 // 273 // Note: This operation can generate multiple requests to a service. 274 // 275 // // Example iterating over at most 3 pages of a DescribeAffectedEntities operation. 276 // pageNum := 0 277 // err := client.DescribeAffectedEntitiesPages(params, 278 // func(page *health.DescribeAffectedEntitiesOutput, lastPage bool) bool { 279 // pageNum++ 280 // fmt.Println(page) 281 // return pageNum <= 3 282 // }) 283 // 284 func (c *Health) DescribeAffectedEntitiesPages(input *DescribeAffectedEntitiesInput, fn func(*DescribeAffectedEntitiesOutput, bool) bool) error { 285 return c.DescribeAffectedEntitiesPagesWithContext(aws.BackgroundContext(), input, fn) 286 } 287 288 // DescribeAffectedEntitiesPagesWithContext same as DescribeAffectedEntitiesPages except 289 // it takes a Context and allows setting request options on the pages. 290 // 291 // The context must be non-nil and will be used for request cancellation. If 292 // the context is nil a panic will occur. In the future the SDK may create 293 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 294 // for more information on using Contexts. 295 func (c *Health) DescribeAffectedEntitiesPagesWithContext(ctx aws.Context, input *DescribeAffectedEntitiesInput, fn func(*DescribeAffectedEntitiesOutput, bool) bool, opts ...request.Option) error { 296 p := request.Pagination{ 297 NewRequest: func() (*request.Request, error) { 298 var inCpy *DescribeAffectedEntitiesInput 299 if input != nil { 300 tmp := *input 301 inCpy = &tmp 302 } 303 req, _ := c.DescribeAffectedEntitiesRequest(inCpy) 304 req.SetContext(ctx) 305 req.ApplyOptions(opts...) 306 return req, nil 307 }, 308 } 309 310 for p.Next() { 311 if !fn(p.Page().(*DescribeAffectedEntitiesOutput), !p.HasNextPage()) { 312 break 313 } 314 } 315 316 return p.Err() 317 } 318 319 const opDescribeAffectedEntitiesForOrganization = "DescribeAffectedEntitiesForOrganization" 320 321 // DescribeAffectedEntitiesForOrganizationRequest generates a "aws/request.Request" representing the 322 // client's request for the DescribeAffectedEntitiesForOrganization operation. The "output" return 323 // value will be populated with the request's response once the request completes 324 // successfully. 325 // 326 // Use "Send" method on the returned Request to send the API call to the service. 327 // the "output" return value is not valid until after Send returns without error. 328 // 329 // See DescribeAffectedEntitiesForOrganization for more information on using the DescribeAffectedEntitiesForOrganization 330 // API call, and error handling. 331 // 332 // This method is useful when you want to inject custom logic or configuration 333 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 334 // 335 // 336 // // Example sending a request using the DescribeAffectedEntitiesForOrganizationRequest method. 337 // req, resp := client.DescribeAffectedEntitiesForOrganizationRequest(params) 338 // 339 // err := req.Send() 340 // if err == nil { // resp is now filled 341 // fmt.Println(resp) 342 // } 343 // 344 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesForOrganization 345 func (c *Health) DescribeAffectedEntitiesForOrganizationRequest(input *DescribeAffectedEntitiesForOrganizationInput) (req *request.Request, output *DescribeAffectedEntitiesForOrganizationOutput) { 346 op := &request.Operation{ 347 Name: opDescribeAffectedEntitiesForOrganization, 348 HTTPMethod: "POST", 349 HTTPPath: "/", 350 Paginator: &request.Paginator{ 351 InputTokens: []string{"nextToken"}, 352 OutputTokens: []string{"nextToken"}, 353 LimitToken: "maxResults", 354 TruncationToken: "", 355 }, 356 } 357 358 if input == nil { 359 input = &DescribeAffectedEntitiesForOrganizationInput{} 360 } 361 362 output = &DescribeAffectedEntitiesForOrganizationOutput{} 363 req = c.newRequest(op, input, output) 364 return 365 } 366 367 // DescribeAffectedEntitiesForOrganization API operation for AWS Health APIs and Notifications. 368 // 369 // Returns a list of entities that have been affected by one or more events 370 // for one or more accounts in your organization in AWS Organizations, based 371 // on the filter criteria. Entities can refer to individual customer resources, 372 // groups of customer resources, or any other construct, depending on the AWS 373 // service. 374 // 375 // At least one event Amazon Resource Name (ARN) and account ID are required. 376 // Results are sorted by the lastUpdatedTime of the entity, starting with the 377 // most recent. 378 // 379 // Before you can call this operation, you must first enable AWS Health to work 380 // with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization 381 // (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 382 // operation from your organization's management account. 383 // 384 // * This API operation uses pagination. Specify the nextToken parameter 385 // in the next request to return more results. 386 // 387 // * This operation doesn't support resource-level permissions. You can't 388 // use this operation to allow or deny access to specific AWS Health events. 389 // For more information, see Resource- and action-based conditions (https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions) 390 // in the AWS Health User Guide. 391 // 392 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 393 // with awserr.Error's Code and Message methods to get detailed information about 394 // the error. 395 // 396 // See the AWS API reference guide for AWS Health APIs and Notifications's 397 // API operation DescribeAffectedEntitiesForOrganization for usage and error information. 398 // 399 // Returned Error Types: 400 // * InvalidPaginationToken 401 // The specified pagination token (nextToken) is not valid. 402 // 403 // * UnsupportedLocale 404 // The specified locale is not supported. 405 // 406 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesForOrganization 407 func (c *Health) DescribeAffectedEntitiesForOrganization(input *DescribeAffectedEntitiesForOrganizationInput) (*DescribeAffectedEntitiesForOrganizationOutput, error) { 408 req, out := c.DescribeAffectedEntitiesForOrganizationRequest(input) 409 return out, req.Send() 410 } 411 412 // DescribeAffectedEntitiesForOrganizationWithContext is the same as DescribeAffectedEntitiesForOrganization with the addition of 413 // the ability to pass a context and additional request options. 414 // 415 // See DescribeAffectedEntitiesForOrganization for details on how to use this API operation. 416 // 417 // The context must be non-nil and will be used for request cancellation. If 418 // the context is nil a panic will occur. In the future the SDK may create 419 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 420 // for more information on using Contexts. 421 func (c *Health) DescribeAffectedEntitiesForOrganizationWithContext(ctx aws.Context, input *DescribeAffectedEntitiesForOrganizationInput, opts ...request.Option) (*DescribeAffectedEntitiesForOrganizationOutput, error) { 422 req, out := c.DescribeAffectedEntitiesForOrganizationRequest(input) 423 req.SetContext(ctx) 424 req.ApplyOptions(opts...) 425 return out, req.Send() 426 } 427 428 // DescribeAffectedEntitiesForOrganizationPages iterates over the pages of a DescribeAffectedEntitiesForOrganization operation, 429 // calling the "fn" function with the response data for each page. To stop 430 // iterating, return false from the fn function. 431 // 432 // See DescribeAffectedEntitiesForOrganization method for more information on how to use this operation. 433 // 434 // Note: This operation can generate multiple requests to a service. 435 // 436 // // Example iterating over at most 3 pages of a DescribeAffectedEntitiesForOrganization operation. 437 // pageNum := 0 438 // err := client.DescribeAffectedEntitiesForOrganizationPages(params, 439 // func(page *health.DescribeAffectedEntitiesForOrganizationOutput, lastPage bool) bool { 440 // pageNum++ 441 // fmt.Println(page) 442 // return pageNum <= 3 443 // }) 444 // 445 func (c *Health) DescribeAffectedEntitiesForOrganizationPages(input *DescribeAffectedEntitiesForOrganizationInput, fn func(*DescribeAffectedEntitiesForOrganizationOutput, bool) bool) error { 446 return c.DescribeAffectedEntitiesForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) 447 } 448 449 // DescribeAffectedEntitiesForOrganizationPagesWithContext same as DescribeAffectedEntitiesForOrganizationPages except 450 // it takes a Context and allows setting request options on the pages. 451 // 452 // The context must be non-nil and will be used for request cancellation. If 453 // the context is nil a panic will occur. In the future the SDK may create 454 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 455 // for more information on using Contexts. 456 func (c *Health) DescribeAffectedEntitiesForOrganizationPagesWithContext(ctx aws.Context, input *DescribeAffectedEntitiesForOrganizationInput, fn func(*DescribeAffectedEntitiesForOrganizationOutput, bool) bool, opts ...request.Option) error { 457 p := request.Pagination{ 458 NewRequest: func() (*request.Request, error) { 459 var inCpy *DescribeAffectedEntitiesForOrganizationInput 460 if input != nil { 461 tmp := *input 462 inCpy = &tmp 463 } 464 req, _ := c.DescribeAffectedEntitiesForOrganizationRequest(inCpy) 465 req.SetContext(ctx) 466 req.ApplyOptions(opts...) 467 return req, nil 468 }, 469 } 470 471 for p.Next() { 472 if !fn(p.Page().(*DescribeAffectedEntitiesForOrganizationOutput), !p.HasNextPage()) { 473 break 474 } 475 } 476 477 return p.Err() 478 } 479 480 const opDescribeEntityAggregates = "DescribeEntityAggregates" 481 482 // DescribeEntityAggregatesRequest generates a "aws/request.Request" representing the 483 // client's request for the DescribeEntityAggregates operation. The "output" return 484 // value will be populated with the request's response once the request completes 485 // successfully. 486 // 487 // Use "Send" method on the returned Request to send the API call to the service. 488 // the "output" return value is not valid until after Send returns without error. 489 // 490 // See DescribeEntityAggregates for more information on using the DescribeEntityAggregates 491 // API call, and error handling. 492 // 493 // This method is useful when you want to inject custom logic or configuration 494 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 495 // 496 // 497 // // Example sending a request using the DescribeEntityAggregatesRequest method. 498 // req, resp := client.DescribeEntityAggregatesRequest(params) 499 // 500 // err := req.Send() 501 // if err == nil { // resp is now filled 502 // fmt.Println(resp) 503 // } 504 // 505 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregates 506 func (c *Health) DescribeEntityAggregatesRequest(input *DescribeEntityAggregatesInput) (req *request.Request, output *DescribeEntityAggregatesOutput) { 507 op := &request.Operation{ 508 Name: opDescribeEntityAggregates, 509 HTTPMethod: "POST", 510 HTTPPath: "/", 511 } 512 513 if input == nil { 514 input = &DescribeEntityAggregatesInput{} 515 } 516 517 output = &DescribeEntityAggregatesOutput{} 518 req = c.newRequest(op, input, output) 519 return 520 } 521 522 // DescribeEntityAggregates API operation for AWS Health APIs and Notifications. 523 // 524 // Returns the number of entities that are affected by each of the specified 525 // events. If no events are specified, the counts of all affected entities are 526 // returned. 527 // 528 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 529 // with awserr.Error's Code and Message methods to get detailed information about 530 // the error. 531 // 532 // See the AWS API reference guide for AWS Health APIs and Notifications's 533 // API operation DescribeEntityAggregates for usage and error information. 534 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregates 535 func (c *Health) DescribeEntityAggregates(input *DescribeEntityAggregatesInput) (*DescribeEntityAggregatesOutput, error) { 536 req, out := c.DescribeEntityAggregatesRequest(input) 537 return out, req.Send() 538 } 539 540 // DescribeEntityAggregatesWithContext is the same as DescribeEntityAggregates with the addition of 541 // the ability to pass a context and additional request options. 542 // 543 // See DescribeEntityAggregates for details on how to use this API operation. 544 // 545 // The context must be non-nil and will be used for request cancellation. If 546 // the context is nil a panic will occur. In the future the SDK may create 547 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 548 // for more information on using Contexts. 549 func (c *Health) DescribeEntityAggregatesWithContext(ctx aws.Context, input *DescribeEntityAggregatesInput, opts ...request.Option) (*DescribeEntityAggregatesOutput, error) { 550 req, out := c.DescribeEntityAggregatesRequest(input) 551 req.SetContext(ctx) 552 req.ApplyOptions(opts...) 553 return out, req.Send() 554 } 555 556 const opDescribeEventAggregates = "DescribeEventAggregates" 557 558 // DescribeEventAggregatesRequest generates a "aws/request.Request" representing the 559 // client's request for the DescribeEventAggregates operation. The "output" return 560 // value will be populated with the request's response once the request completes 561 // successfully. 562 // 563 // Use "Send" method on the returned Request to send the API call to the service. 564 // the "output" return value is not valid until after Send returns without error. 565 // 566 // See DescribeEventAggregates for more information on using the DescribeEventAggregates 567 // API call, and error handling. 568 // 569 // This method is useful when you want to inject custom logic or configuration 570 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 571 // 572 // 573 // // Example sending a request using the DescribeEventAggregatesRequest method. 574 // req, resp := client.DescribeEventAggregatesRequest(params) 575 // 576 // err := req.Send() 577 // if err == nil { // resp is now filled 578 // fmt.Println(resp) 579 // } 580 // 581 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregates 582 func (c *Health) DescribeEventAggregatesRequest(input *DescribeEventAggregatesInput) (req *request.Request, output *DescribeEventAggregatesOutput) { 583 op := &request.Operation{ 584 Name: opDescribeEventAggregates, 585 HTTPMethod: "POST", 586 HTTPPath: "/", 587 Paginator: &request.Paginator{ 588 InputTokens: []string{"nextToken"}, 589 OutputTokens: []string{"nextToken"}, 590 LimitToken: "maxResults", 591 TruncationToken: "", 592 }, 593 } 594 595 if input == nil { 596 input = &DescribeEventAggregatesInput{} 597 } 598 599 output = &DescribeEventAggregatesOutput{} 600 req = c.newRequest(op, input, output) 601 return 602 } 603 604 // DescribeEventAggregates API operation for AWS Health APIs and Notifications. 605 // 606 // Returns the number of events of each event type (issue, scheduled change, 607 // and account notification). If no filter is specified, the counts of all events 608 // in each category are returned. 609 // 610 // This API operation uses pagination. Specify the nextToken parameter in the 611 // next request to return more results. 612 // 613 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 614 // with awserr.Error's Code and Message methods to get detailed information about 615 // the error. 616 // 617 // See the AWS API reference guide for AWS Health APIs and Notifications's 618 // API operation DescribeEventAggregates for usage and error information. 619 // 620 // Returned Error Types: 621 // * InvalidPaginationToken 622 // The specified pagination token (nextToken) is not valid. 623 // 624 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregates 625 func (c *Health) DescribeEventAggregates(input *DescribeEventAggregatesInput) (*DescribeEventAggregatesOutput, error) { 626 req, out := c.DescribeEventAggregatesRequest(input) 627 return out, req.Send() 628 } 629 630 // DescribeEventAggregatesWithContext is the same as DescribeEventAggregates with the addition of 631 // the ability to pass a context and additional request options. 632 // 633 // See DescribeEventAggregates for details on how to use this API operation. 634 // 635 // The context must be non-nil and will be used for request cancellation. If 636 // the context is nil a panic will occur. In the future the SDK may create 637 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 638 // for more information on using Contexts. 639 func (c *Health) DescribeEventAggregatesWithContext(ctx aws.Context, input *DescribeEventAggregatesInput, opts ...request.Option) (*DescribeEventAggregatesOutput, error) { 640 req, out := c.DescribeEventAggregatesRequest(input) 641 req.SetContext(ctx) 642 req.ApplyOptions(opts...) 643 return out, req.Send() 644 } 645 646 // DescribeEventAggregatesPages iterates over the pages of a DescribeEventAggregates operation, 647 // calling the "fn" function with the response data for each page. To stop 648 // iterating, return false from the fn function. 649 // 650 // See DescribeEventAggregates method for more information on how to use this operation. 651 // 652 // Note: This operation can generate multiple requests to a service. 653 // 654 // // Example iterating over at most 3 pages of a DescribeEventAggregates operation. 655 // pageNum := 0 656 // err := client.DescribeEventAggregatesPages(params, 657 // func(page *health.DescribeEventAggregatesOutput, lastPage bool) bool { 658 // pageNum++ 659 // fmt.Println(page) 660 // return pageNum <= 3 661 // }) 662 // 663 func (c *Health) DescribeEventAggregatesPages(input *DescribeEventAggregatesInput, fn func(*DescribeEventAggregatesOutput, bool) bool) error { 664 return c.DescribeEventAggregatesPagesWithContext(aws.BackgroundContext(), input, fn) 665 } 666 667 // DescribeEventAggregatesPagesWithContext same as DescribeEventAggregatesPages except 668 // it takes a Context and allows setting request options on the pages. 669 // 670 // The context must be non-nil and will be used for request cancellation. If 671 // the context is nil a panic will occur. In the future the SDK may create 672 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 673 // for more information on using Contexts. 674 func (c *Health) DescribeEventAggregatesPagesWithContext(ctx aws.Context, input *DescribeEventAggregatesInput, fn func(*DescribeEventAggregatesOutput, bool) bool, opts ...request.Option) error { 675 p := request.Pagination{ 676 NewRequest: func() (*request.Request, error) { 677 var inCpy *DescribeEventAggregatesInput 678 if input != nil { 679 tmp := *input 680 inCpy = &tmp 681 } 682 req, _ := c.DescribeEventAggregatesRequest(inCpy) 683 req.SetContext(ctx) 684 req.ApplyOptions(opts...) 685 return req, nil 686 }, 687 } 688 689 for p.Next() { 690 if !fn(p.Page().(*DescribeEventAggregatesOutput), !p.HasNextPage()) { 691 break 692 } 693 } 694 695 return p.Err() 696 } 697 698 const opDescribeEventDetails = "DescribeEventDetails" 699 700 // DescribeEventDetailsRequest generates a "aws/request.Request" representing the 701 // client's request for the DescribeEventDetails operation. The "output" return 702 // value will be populated with the request's response once the request completes 703 // successfully. 704 // 705 // Use "Send" method on the returned Request to send the API call to the service. 706 // the "output" return value is not valid until after Send returns without error. 707 // 708 // See DescribeEventDetails for more information on using the DescribeEventDetails 709 // API call, and error handling. 710 // 711 // This method is useful when you want to inject custom logic or configuration 712 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 713 // 714 // 715 // // Example sending a request using the DescribeEventDetailsRequest method. 716 // req, resp := client.DescribeEventDetailsRequest(params) 717 // 718 // err := req.Send() 719 // if err == nil { // resp is now filled 720 // fmt.Println(resp) 721 // } 722 // 723 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetails 724 func (c *Health) DescribeEventDetailsRequest(input *DescribeEventDetailsInput) (req *request.Request, output *DescribeEventDetailsOutput) { 725 op := &request.Operation{ 726 Name: opDescribeEventDetails, 727 HTTPMethod: "POST", 728 HTTPPath: "/", 729 } 730 731 if input == nil { 732 input = &DescribeEventDetailsInput{} 733 } 734 735 output = &DescribeEventDetailsOutput{} 736 req = c.newRequest(op, input, output) 737 return 738 } 739 740 // DescribeEventDetails API operation for AWS Health APIs and Notifications. 741 // 742 // Returns detailed information about one or more specified events. Information 743 // includes standard event data (AWS Region, service, and so on, as returned 744 // by DescribeEvents (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEvents.html)), 745 // a detailed event description, and possible additional metadata that depends 746 // upon the nature of the event. Affected entities are not included. To retrieve 747 // the entities, use the DescribeAffectedEntities (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntities.html) 748 // operation. 749 // 750 // If a specified event can't be retrieved, an error message is returned for 751 // that event. 752 // 753 // This operation supports resource-level permissions. You can use this operation 754 // to allow or deny access to specific AWS Health events. For more information, 755 // see Resource- and action-based conditions (https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions) 756 // in the AWS Health User Guide. 757 // 758 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 759 // with awserr.Error's Code and Message methods to get detailed information about 760 // the error. 761 // 762 // See the AWS API reference guide for AWS Health APIs and Notifications's 763 // API operation DescribeEventDetails for usage and error information. 764 // 765 // Returned Error Types: 766 // * UnsupportedLocale 767 // The specified locale is not supported. 768 // 769 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetails 770 func (c *Health) DescribeEventDetails(input *DescribeEventDetailsInput) (*DescribeEventDetailsOutput, error) { 771 req, out := c.DescribeEventDetailsRequest(input) 772 return out, req.Send() 773 } 774 775 // DescribeEventDetailsWithContext is the same as DescribeEventDetails with the addition of 776 // the ability to pass a context and additional request options. 777 // 778 // See DescribeEventDetails for details on how to use this API operation. 779 // 780 // The context must be non-nil and will be used for request cancellation. If 781 // the context is nil a panic will occur. In the future the SDK may create 782 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 783 // for more information on using Contexts. 784 func (c *Health) DescribeEventDetailsWithContext(ctx aws.Context, input *DescribeEventDetailsInput, opts ...request.Option) (*DescribeEventDetailsOutput, error) { 785 req, out := c.DescribeEventDetailsRequest(input) 786 req.SetContext(ctx) 787 req.ApplyOptions(opts...) 788 return out, req.Send() 789 } 790 791 const opDescribeEventDetailsForOrganization = "DescribeEventDetailsForOrganization" 792 793 // DescribeEventDetailsForOrganizationRequest generates a "aws/request.Request" representing the 794 // client's request for the DescribeEventDetailsForOrganization operation. The "output" return 795 // value will be populated with the request's response once the request completes 796 // successfully. 797 // 798 // Use "Send" method on the returned Request to send the API call to the service. 799 // the "output" return value is not valid until after Send returns without error. 800 // 801 // See DescribeEventDetailsForOrganization for more information on using the DescribeEventDetailsForOrganization 802 // API call, and error handling. 803 // 804 // This method is useful when you want to inject custom logic or configuration 805 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 806 // 807 // 808 // // Example sending a request using the DescribeEventDetailsForOrganizationRequest method. 809 // req, resp := client.DescribeEventDetailsForOrganizationRequest(params) 810 // 811 // err := req.Send() 812 // if err == nil { // resp is now filled 813 // fmt.Println(resp) 814 // } 815 // 816 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsForOrganization 817 func (c *Health) DescribeEventDetailsForOrganizationRequest(input *DescribeEventDetailsForOrganizationInput) (req *request.Request, output *DescribeEventDetailsForOrganizationOutput) { 818 op := &request.Operation{ 819 Name: opDescribeEventDetailsForOrganization, 820 HTTPMethod: "POST", 821 HTTPPath: "/", 822 } 823 824 if input == nil { 825 input = &DescribeEventDetailsForOrganizationInput{} 826 } 827 828 output = &DescribeEventDetailsForOrganizationOutput{} 829 req = c.newRequest(op, input, output) 830 return 831 } 832 833 // DescribeEventDetailsForOrganization API operation for AWS Health APIs and Notifications. 834 // 835 // Returns detailed information about one or more specified events for one or 836 // more AWS accounts in your organization. This information includes standard 837 // event data (such as the AWS Region and service), an event description, and 838 // (depending on the event) possible metadata. This operation doesn't return 839 // affected entities, such as the resources related to the event. To return 840 // affected entities, use the DescribeAffectedEntitiesForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntitiesForOrganization.html) 841 // operation. 842 // 843 // Before you can call this operation, you must first enable AWS Health to work 844 // with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization 845 // (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 846 // operation from your organization's management account. 847 // 848 // When you call the DescribeEventDetailsForOrganization operation, specify 849 // the organizationEventDetailFilters object in the request. Depending on the 850 // AWS Health event type, note the following differences: 851 // 852 // * To return event details for a public event, you must specify a null 853 // value for the awsAccountId parameter. If you specify an account ID for 854 // a public event, AWS Health returns an error message because public events 855 // aren't specific to an account. 856 // 857 // * To return event details for an event that is specific to an account 858 // in your organization, you must specify the awsAccountId parameter in the 859 // request. If you don't specify an account ID, AWS Health returns an error 860 // message because the event is specific to an account in your organization. 861 // 862 // For more information, see Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html). 863 // 864 // This operation doesn't support resource-level permissions. You can't use 865 // this operation to allow or deny access to specific AWS Health events. For 866 // more information, see Resource- and action-based conditions (https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions) 867 // in the AWS Health User Guide. 868 // 869 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 870 // with awserr.Error's Code and Message methods to get detailed information about 871 // the error. 872 // 873 // See the AWS API reference guide for AWS Health APIs and Notifications's 874 // API operation DescribeEventDetailsForOrganization for usage and error information. 875 // 876 // Returned Error Types: 877 // * UnsupportedLocale 878 // The specified locale is not supported. 879 // 880 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsForOrganization 881 func (c *Health) DescribeEventDetailsForOrganization(input *DescribeEventDetailsForOrganizationInput) (*DescribeEventDetailsForOrganizationOutput, error) { 882 req, out := c.DescribeEventDetailsForOrganizationRequest(input) 883 return out, req.Send() 884 } 885 886 // DescribeEventDetailsForOrganizationWithContext is the same as DescribeEventDetailsForOrganization with the addition of 887 // the ability to pass a context and additional request options. 888 // 889 // See DescribeEventDetailsForOrganization for details on how to use this API operation. 890 // 891 // The context must be non-nil and will be used for request cancellation. If 892 // the context is nil a panic will occur. In the future the SDK may create 893 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 894 // for more information on using Contexts. 895 func (c *Health) DescribeEventDetailsForOrganizationWithContext(ctx aws.Context, input *DescribeEventDetailsForOrganizationInput, opts ...request.Option) (*DescribeEventDetailsForOrganizationOutput, error) { 896 req, out := c.DescribeEventDetailsForOrganizationRequest(input) 897 req.SetContext(ctx) 898 req.ApplyOptions(opts...) 899 return out, req.Send() 900 } 901 902 const opDescribeEventTypes = "DescribeEventTypes" 903 904 // DescribeEventTypesRequest generates a "aws/request.Request" representing the 905 // client's request for the DescribeEventTypes operation. The "output" return 906 // value will be populated with the request's response once the request completes 907 // successfully. 908 // 909 // Use "Send" method on the returned Request to send the API call to the service. 910 // the "output" return value is not valid until after Send returns without error. 911 // 912 // See DescribeEventTypes for more information on using the DescribeEventTypes 913 // API call, and error handling. 914 // 915 // This method is useful when you want to inject custom logic or configuration 916 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 917 // 918 // 919 // // Example sending a request using the DescribeEventTypesRequest method. 920 // req, resp := client.DescribeEventTypesRequest(params) 921 // 922 // err := req.Send() 923 // if err == nil { // resp is now filled 924 // fmt.Println(resp) 925 // } 926 // 927 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes 928 func (c *Health) DescribeEventTypesRequest(input *DescribeEventTypesInput) (req *request.Request, output *DescribeEventTypesOutput) { 929 op := &request.Operation{ 930 Name: opDescribeEventTypes, 931 HTTPMethod: "POST", 932 HTTPPath: "/", 933 Paginator: &request.Paginator{ 934 InputTokens: []string{"nextToken"}, 935 OutputTokens: []string{"nextToken"}, 936 LimitToken: "maxResults", 937 TruncationToken: "", 938 }, 939 } 940 941 if input == nil { 942 input = &DescribeEventTypesInput{} 943 } 944 945 output = &DescribeEventTypesOutput{} 946 req = c.newRequest(op, input, output) 947 return 948 } 949 950 // DescribeEventTypes API operation for AWS Health APIs and Notifications. 951 // 952 // Returns the event types that meet the specified filter criteria. You can 953 // use this API operation to find information about the AWS Health event, such 954 // as the category, AWS service, and event code. The metadata for each event 955 // appears in the EventType (https://docs.aws.amazon.com/health/latest/APIReference/API_EventType.html) 956 // object. 957 // 958 // If you don't specify a filter criteria, the API operation returns all event 959 // types, in no particular order. 960 // 961 // This API operation uses pagination. Specify the nextToken parameter in the 962 // next request to return more results. 963 // 964 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 965 // with awserr.Error's Code and Message methods to get detailed information about 966 // the error. 967 // 968 // See the AWS API reference guide for AWS Health APIs and Notifications's 969 // API operation DescribeEventTypes for usage and error information. 970 // 971 // Returned Error Types: 972 // * InvalidPaginationToken 973 // The specified pagination token (nextToken) is not valid. 974 // 975 // * UnsupportedLocale 976 // The specified locale is not supported. 977 // 978 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes 979 func (c *Health) DescribeEventTypes(input *DescribeEventTypesInput) (*DescribeEventTypesOutput, error) { 980 req, out := c.DescribeEventTypesRequest(input) 981 return out, req.Send() 982 } 983 984 // DescribeEventTypesWithContext is the same as DescribeEventTypes with the addition of 985 // the ability to pass a context and additional request options. 986 // 987 // See DescribeEventTypes for details on how to use this API operation. 988 // 989 // The context must be non-nil and will be used for request cancellation. If 990 // the context is nil a panic will occur. In the future the SDK may create 991 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 992 // for more information on using Contexts. 993 func (c *Health) DescribeEventTypesWithContext(ctx aws.Context, input *DescribeEventTypesInput, opts ...request.Option) (*DescribeEventTypesOutput, error) { 994 req, out := c.DescribeEventTypesRequest(input) 995 req.SetContext(ctx) 996 req.ApplyOptions(opts...) 997 return out, req.Send() 998 } 999 1000 // DescribeEventTypesPages iterates over the pages of a DescribeEventTypes operation, 1001 // calling the "fn" function with the response data for each page. To stop 1002 // iterating, return false from the fn function. 1003 // 1004 // See DescribeEventTypes method for more information on how to use this operation. 1005 // 1006 // Note: This operation can generate multiple requests to a service. 1007 // 1008 // // Example iterating over at most 3 pages of a DescribeEventTypes operation. 1009 // pageNum := 0 1010 // err := client.DescribeEventTypesPages(params, 1011 // func(page *health.DescribeEventTypesOutput, lastPage bool) bool { 1012 // pageNum++ 1013 // fmt.Println(page) 1014 // return pageNum <= 3 1015 // }) 1016 // 1017 func (c *Health) DescribeEventTypesPages(input *DescribeEventTypesInput, fn func(*DescribeEventTypesOutput, bool) bool) error { 1018 return c.DescribeEventTypesPagesWithContext(aws.BackgroundContext(), input, fn) 1019 } 1020 1021 // DescribeEventTypesPagesWithContext same as DescribeEventTypesPages except 1022 // it takes a Context and allows setting request options on the pages. 1023 // 1024 // The context must be non-nil and will be used for request cancellation. If 1025 // the context is nil a panic will occur. In the future the SDK may create 1026 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1027 // for more information on using Contexts. 1028 func (c *Health) DescribeEventTypesPagesWithContext(ctx aws.Context, input *DescribeEventTypesInput, fn func(*DescribeEventTypesOutput, bool) bool, opts ...request.Option) error { 1029 p := request.Pagination{ 1030 NewRequest: func() (*request.Request, error) { 1031 var inCpy *DescribeEventTypesInput 1032 if input != nil { 1033 tmp := *input 1034 inCpy = &tmp 1035 } 1036 req, _ := c.DescribeEventTypesRequest(inCpy) 1037 req.SetContext(ctx) 1038 req.ApplyOptions(opts...) 1039 return req, nil 1040 }, 1041 } 1042 1043 for p.Next() { 1044 if !fn(p.Page().(*DescribeEventTypesOutput), !p.HasNextPage()) { 1045 break 1046 } 1047 } 1048 1049 return p.Err() 1050 } 1051 1052 const opDescribeEvents = "DescribeEvents" 1053 1054 // DescribeEventsRequest generates a "aws/request.Request" representing the 1055 // client's request for the DescribeEvents operation. The "output" return 1056 // value will be populated with the request's response once the request completes 1057 // successfully. 1058 // 1059 // Use "Send" method on the returned Request to send the API call to the service. 1060 // the "output" return value is not valid until after Send returns without error. 1061 // 1062 // See DescribeEvents for more information on using the DescribeEvents 1063 // API call, and error handling. 1064 // 1065 // This method is useful when you want to inject custom logic or configuration 1066 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1067 // 1068 // 1069 // // Example sending a request using the DescribeEventsRequest method. 1070 // req, resp := client.DescribeEventsRequest(params) 1071 // 1072 // err := req.Send() 1073 // if err == nil { // resp is now filled 1074 // fmt.Println(resp) 1075 // } 1076 // 1077 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEvents 1078 func (c *Health) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { 1079 op := &request.Operation{ 1080 Name: opDescribeEvents, 1081 HTTPMethod: "POST", 1082 HTTPPath: "/", 1083 Paginator: &request.Paginator{ 1084 InputTokens: []string{"nextToken"}, 1085 OutputTokens: []string{"nextToken"}, 1086 LimitToken: "maxResults", 1087 TruncationToken: "", 1088 }, 1089 } 1090 1091 if input == nil { 1092 input = &DescribeEventsInput{} 1093 } 1094 1095 output = &DescribeEventsOutput{} 1096 req = c.newRequest(op, input, output) 1097 return 1098 } 1099 1100 // DescribeEvents API operation for AWS Health APIs and Notifications. 1101 // 1102 // Returns information about events that meet the specified filter criteria. 1103 // Events are returned in a summary form and do not include the detailed description, 1104 // any additional metadata that depends on the event type, or any affected resources. 1105 // To retrieve that information, use the DescribeEventDetails (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html) 1106 // and DescribeAffectedEntities (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntities.html) 1107 // operations. 1108 // 1109 // If no filter criteria are specified, all events are returned. Results are 1110 // sorted by lastModifiedTime, starting with the most recent event. 1111 // 1112 // * When you call the DescribeEvents operation and specify an entity for 1113 // the entityValues parameter, AWS Health might return public events that 1114 // aren't specific to that resource. For example, if you call DescribeEvents 1115 // and specify an ID for an Amazon Elastic Compute Cloud (Amazon EC2) instance, 1116 // AWS Health might return events that aren't specific to that resource or 1117 // service. To get events that are specific to a service, use the services 1118 // parameter in the filter object. For more information, see Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html). 1119 // 1120 // * This API operation uses pagination. Specify the nextToken parameter 1121 // in the next request to return more results. 1122 // 1123 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1124 // with awserr.Error's Code and Message methods to get detailed information about 1125 // the error. 1126 // 1127 // See the AWS API reference guide for AWS Health APIs and Notifications's 1128 // API operation DescribeEvents for usage and error information. 1129 // 1130 // Returned Error Types: 1131 // * InvalidPaginationToken 1132 // The specified pagination token (nextToken) is not valid. 1133 // 1134 // * UnsupportedLocale 1135 // The specified locale is not supported. 1136 // 1137 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEvents 1138 func (c *Health) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { 1139 req, out := c.DescribeEventsRequest(input) 1140 return out, req.Send() 1141 } 1142 1143 // DescribeEventsWithContext is the same as DescribeEvents with the addition of 1144 // the ability to pass a context and additional request options. 1145 // 1146 // See DescribeEvents for details on how to use this API operation. 1147 // 1148 // The context must be non-nil and will be used for request cancellation. If 1149 // the context is nil a panic will occur. In the future the SDK may create 1150 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1151 // for more information on using Contexts. 1152 func (c *Health) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { 1153 req, out := c.DescribeEventsRequest(input) 1154 req.SetContext(ctx) 1155 req.ApplyOptions(opts...) 1156 return out, req.Send() 1157 } 1158 1159 // DescribeEventsPages iterates over the pages of a DescribeEvents operation, 1160 // calling the "fn" function with the response data for each page. To stop 1161 // iterating, return false from the fn function. 1162 // 1163 // See DescribeEvents method for more information on how to use this operation. 1164 // 1165 // Note: This operation can generate multiple requests to a service. 1166 // 1167 // // Example iterating over at most 3 pages of a DescribeEvents operation. 1168 // pageNum := 0 1169 // err := client.DescribeEventsPages(params, 1170 // func(page *health.DescribeEventsOutput, lastPage bool) bool { 1171 // pageNum++ 1172 // fmt.Println(page) 1173 // return pageNum <= 3 1174 // }) 1175 // 1176 func (c *Health) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { 1177 return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) 1178 } 1179 1180 // DescribeEventsPagesWithContext same as DescribeEventsPages except 1181 // it takes a Context and allows setting request options on the pages. 1182 // 1183 // The context must be non-nil and will be used for request cancellation. If 1184 // the context is nil a panic will occur. In the future the SDK may create 1185 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1186 // for more information on using Contexts. 1187 func (c *Health) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { 1188 p := request.Pagination{ 1189 NewRequest: func() (*request.Request, error) { 1190 var inCpy *DescribeEventsInput 1191 if input != nil { 1192 tmp := *input 1193 inCpy = &tmp 1194 } 1195 req, _ := c.DescribeEventsRequest(inCpy) 1196 req.SetContext(ctx) 1197 req.ApplyOptions(opts...) 1198 return req, nil 1199 }, 1200 } 1201 1202 for p.Next() { 1203 if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { 1204 break 1205 } 1206 } 1207 1208 return p.Err() 1209 } 1210 1211 const opDescribeEventsForOrganization = "DescribeEventsForOrganization" 1212 1213 // DescribeEventsForOrganizationRequest generates a "aws/request.Request" representing the 1214 // client's request for the DescribeEventsForOrganization operation. The "output" return 1215 // value will be populated with the request's response once the request completes 1216 // successfully. 1217 // 1218 // Use "Send" method on the returned Request to send the API call to the service. 1219 // the "output" return value is not valid until after Send returns without error. 1220 // 1221 // See DescribeEventsForOrganization for more information on using the DescribeEventsForOrganization 1222 // API call, and error handling. 1223 // 1224 // This method is useful when you want to inject custom logic or configuration 1225 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1226 // 1227 // 1228 // // Example sending a request using the DescribeEventsForOrganizationRequest method. 1229 // req, resp := client.DescribeEventsForOrganizationRequest(params) 1230 // 1231 // err := req.Send() 1232 // if err == nil { // resp is now filled 1233 // fmt.Println(resp) 1234 // } 1235 // 1236 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsForOrganization 1237 func (c *Health) DescribeEventsForOrganizationRequest(input *DescribeEventsForOrganizationInput) (req *request.Request, output *DescribeEventsForOrganizationOutput) { 1238 op := &request.Operation{ 1239 Name: opDescribeEventsForOrganization, 1240 HTTPMethod: "POST", 1241 HTTPPath: "/", 1242 Paginator: &request.Paginator{ 1243 InputTokens: []string{"nextToken"}, 1244 OutputTokens: []string{"nextToken"}, 1245 LimitToken: "maxResults", 1246 TruncationToken: "", 1247 }, 1248 } 1249 1250 if input == nil { 1251 input = &DescribeEventsForOrganizationInput{} 1252 } 1253 1254 output = &DescribeEventsForOrganizationOutput{} 1255 req = c.newRequest(op, input, output) 1256 return 1257 } 1258 1259 // DescribeEventsForOrganization API operation for AWS Health APIs and Notifications. 1260 // 1261 // Returns information about events across your organization in AWS Organizations. 1262 // You can use thefilters parameter to specify the events that you want to return. 1263 // Events are returned in a summary form and don't include the affected accounts, 1264 // detailed description, any additional metadata that depends on the event type, 1265 // or any affected resources. To retrieve that information, use the following 1266 // operations: 1267 // 1268 // * DescribeAffectedAccountsForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedAccountsForOrganization.html) 1269 // 1270 // * DescribeEventDetailsForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html) 1271 // 1272 // * DescribeAffectedEntitiesForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntitiesForOrganization.html) 1273 // 1274 // If you don't specify a filter, the DescribeEventsForOrganizations returns 1275 // all events across your organization. Results are sorted by lastModifiedTime, 1276 // starting with the most recent event. 1277 // 1278 // For more information about the different types of AWS Health events, see 1279 // Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html). 1280 // 1281 // Before you can call this operation, you must first enable AWS Health to work 1282 // with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization 1283 // (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 1284 // operation from your organization's management account. 1285 // 1286 // This API operation uses pagination. Specify the nextToken parameter in the 1287 // next request to return more results. 1288 // 1289 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1290 // with awserr.Error's Code and Message methods to get detailed information about 1291 // the error. 1292 // 1293 // See the AWS API reference guide for AWS Health APIs and Notifications's 1294 // API operation DescribeEventsForOrganization for usage and error information. 1295 // 1296 // Returned Error Types: 1297 // * InvalidPaginationToken 1298 // The specified pagination token (nextToken) is not valid. 1299 // 1300 // * UnsupportedLocale 1301 // The specified locale is not supported. 1302 // 1303 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsForOrganization 1304 func (c *Health) DescribeEventsForOrganization(input *DescribeEventsForOrganizationInput) (*DescribeEventsForOrganizationOutput, error) { 1305 req, out := c.DescribeEventsForOrganizationRequest(input) 1306 return out, req.Send() 1307 } 1308 1309 // DescribeEventsForOrganizationWithContext is the same as DescribeEventsForOrganization with the addition of 1310 // the ability to pass a context and additional request options. 1311 // 1312 // See DescribeEventsForOrganization for details on how to use this API operation. 1313 // 1314 // The context must be non-nil and will be used for request cancellation. If 1315 // the context is nil a panic will occur. In the future the SDK may create 1316 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1317 // for more information on using Contexts. 1318 func (c *Health) DescribeEventsForOrganizationWithContext(ctx aws.Context, input *DescribeEventsForOrganizationInput, opts ...request.Option) (*DescribeEventsForOrganizationOutput, error) { 1319 req, out := c.DescribeEventsForOrganizationRequest(input) 1320 req.SetContext(ctx) 1321 req.ApplyOptions(opts...) 1322 return out, req.Send() 1323 } 1324 1325 // DescribeEventsForOrganizationPages iterates over the pages of a DescribeEventsForOrganization operation, 1326 // calling the "fn" function with the response data for each page. To stop 1327 // iterating, return false from the fn function. 1328 // 1329 // See DescribeEventsForOrganization method for more information on how to use this operation. 1330 // 1331 // Note: This operation can generate multiple requests to a service. 1332 // 1333 // // Example iterating over at most 3 pages of a DescribeEventsForOrganization operation. 1334 // pageNum := 0 1335 // err := client.DescribeEventsForOrganizationPages(params, 1336 // func(page *health.DescribeEventsForOrganizationOutput, lastPage bool) bool { 1337 // pageNum++ 1338 // fmt.Println(page) 1339 // return pageNum <= 3 1340 // }) 1341 // 1342 func (c *Health) DescribeEventsForOrganizationPages(input *DescribeEventsForOrganizationInput, fn func(*DescribeEventsForOrganizationOutput, bool) bool) error { 1343 return c.DescribeEventsForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) 1344 } 1345 1346 // DescribeEventsForOrganizationPagesWithContext same as DescribeEventsForOrganizationPages except 1347 // it takes a Context and allows setting request options on the pages. 1348 // 1349 // The context must be non-nil and will be used for request cancellation. If 1350 // the context is nil a panic will occur. In the future the SDK may create 1351 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1352 // for more information on using Contexts. 1353 func (c *Health) DescribeEventsForOrganizationPagesWithContext(ctx aws.Context, input *DescribeEventsForOrganizationInput, fn func(*DescribeEventsForOrganizationOutput, bool) bool, opts ...request.Option) error { 1354 p := request.Pagination{ 1355 NewRequest: func() (*request.Request, error) { 1356 var inCpy *DescribeEventsForOrganizationInput 1357 if input != nil { 1358 tmp := *input 1359 inCpy = &tmp 1360 } 1361 req, _ := c.DescribeEventsForOrganizationRequest(inCpy) 1362 req.SetContext(ctx) 1363 req.ApplyOptions(opts...) 1364 return req, nil 1365 }, 1366 } 1367 1368 for p.Next() { 1369 if !fn(p.Page().(*DescribeEventsForOrganizationOutput), !p.HasNextPage()) { 1370 break 1371 } 1372 } 1373 1374 return p.Err() 1375 } 1376 1377 const opDescribeHealthServiceStatusForOrganization = "DescribeHealthServiceStatusForOrganization" 1378 1379 // DescribeHealthServiceStatusForOrganizationRequest generates a "aws/request.Request" representing the 1380 // client's request for the DescribeHealthServiceStatusForOrganization operation. The "output" return 1381 // value will be populated with the request's response once the request completes 1382 // successfully. 1383 // 1384 // Use "Send" method on the returned Request to send the API call to the service. 1385 // the "output" return value is not valid until after Send returns without error. 1386 // 1387 // See DescribeHealthServiceStatusForOrganization for more information on using the DescribeHealthServiceStatusForOrganization 1388 // API call, and error handling. 1389 // 1390 // This method is useful when you want to inject custom logic or configuration 1391 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1392 // 1393 // 1394 // // Example sending a request using the DescribeHealthServiceStatusForOrganizationRequest method. 1395 // req, resp := client.DescribeHealthServiceStatusForOrganizationRequest(params) 1396 // 1397 // err := req.Send() 1398 // if err == nil { // resp is now filled 1399 // fmt.Println(resp) 1400 // } 1401 // 1402 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeHealthServiceStatusForOrganization 1403 func (c *Health) DescribeHealthServiceStatusForOrganizationRequest(input *DescribeHealthServiceStatusForOrganizationInput) (req *request.Request, output *DescribeHealthServiceStatusForOrganizationOutput) { 1404 op := &request.Operation{ 1405 Name: opDescribeHealthServiceStatusForOrganization, 1406 HTTPMethod: "POST", 1407 HTTPPath: "/", 1408 } 1409 1410 if input == nil { 1411 input = &DescribeHealthServiceStatusForOrganizationInput{} 1412 } 1413 1414 output = &DescribeHealthServiceStatusForOrganizationOutput{} 1415 req = c.newRequest(op, input, output) 1416 return 1417 } 1418 1419 // DescribeHealthServiceStatusForOrganization API operation for AWS Health APIs and Notifications. 1420 // 1421 // This operation provides status information on enabling or disabling AWS Health 1422 // to work with your organization. To call this operation, you must sign in 1423 // as an IAM user, assume an IAM role, or sign in as the root user (not recommended) 1424 // in the organization's management account. 1425 // 1426 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1427 // with awserr.Error's Code and Message methods to get detailed information about 1428 // the error. 1429 // 1430 // See the AWS API reference guide for AWS Health APIs and Notifications's 1431 // API operation DescribeHealthServiceStatusForOrganization for usage and error information. 1432 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeHealthServiceStatusForOrganization 1433 func (c *Health) DescribeHealthServiceStatusForOrganization(input *DescribeHealthServiceStatusForOrganizationInput) (*DescribeHealthServiceStatusForOrganizationOutput, error) { 1434 req, out := c.DescribeHealthServiceStatusForOrganizationRequest(input) 1435 return out, req.Send() 1436 } 1437 1438 // DescribeHealthServiceStatusForOrganizationWithContext is the same as DescribeHealthServiceStatusForOrganization with the addition of 1439 // the ability to pass a context and additional request options. 1440 // 1441 // See DescribeHealthServiceStatusForOrganization for details on how to use this API operation. 1442 // 1443 // The context must be non-nil and will be used for request cancellation. If 1444 // the context is nil a panic will occur. In the future the SDK may create 1445 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1446 // for more information on using Contexts. 1447 func (c *Health) DescribeHealthServiceStatusForOrganizationWithContext(ctx aws.Context, input *DescribeHealthServiceStatusForOrganizationInput, opts ...request.Option) (*DescribeHealthServiceStatusForOrganizationOutput, error) { 1448 req, out := c.DescribeHealthServiceStatusForOrganizationRequest(input) 1449 req.SetContext(ctx) 1450 req.ApplyOptions(opts...) 1451 return out, req.Send() 1452 } 1453 1454 const opDisableHealthServiceAccessForOrganization = "DisableHealthServiceAccessForOrganization" 1455 1456 // DisableHealthServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the 1457 // client's request for the DisableHealthServiceAccessForOrganization operation. The "output" return 1458 // value will be populated with the request's response once the request completes 1459 // successfully. 1460 // 1461 // Use "Send" method on the returned Request to send the API call to the service. 1462 // the "output" return value is not valid until after Send returns without error. 1463 // 1464 // See DisableHealthServiceAccessForOrganization for more information on using the DisableHealthServiceAccessForOrganization 1465 // API call, and error handling. 1466 // 1467 // This method is useful when you want to inject custom logic or configuration 1468 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1469 // 1470 // 1471 // // Example sending a request using the DisableHealthServiceAccessForOrganizationRequest method. 1472 // req, resp := client.DisableHealthServiceAccessForOrganizationRequest(params) 1473 // 1474 // err := req.Send() 1475 // if err == nil { // resp is now filled 1476 // fmt.Println(resp) 1477 // } 1478 // 1479 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DisableHealthServiceAccessForOrganization 1480 func (c *Health) DisableHealthServiceAccessForOrganizationRequest(input *DisableHealthServiceAccessForOrganizationInput) (req *request.Request, output *DisableHealthServiceAccessForOrganizationOutput) { 1481 op := &request.Operation{ 1482 Name: opDisableHealthServiceAccessForOrganization, 1483 HTTPMethod: "POST", 1484 HTTPPath: "/", 1485 } 1486 1487 if input == nil { 1488 input = &DisableHealthServiceAccessForOrganizationInput{} 1489 } 1490 1491 output = &DisableHealthServiceAccessForOrganizationOutput{} 1492 req = c.newRequest(op, input, output) 1493 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1494 return 1495 } 1496 1497 // DisableHealthServiceAccessForOrganization API operation for AWS Health APIs and Notifications. 1498 // 1499 // Disables AWS Health from working with AWS Organizations. To call this operation, 1500 // you must sign in as an AWS Identity and Access Management (IAM) user, assume 1501 // an IAM role, or sign in as the root user (not recommended) in the organization's 1502 // management account. For more information, see Aggregating AWS Health events 1503 // (https://docs.aws.amazon.com/health/latest/ug/aggregate-events.html) in the 1504 // AWS Health User Guide. 1505 // 1506 // This operation doesn't remove the service-linked role from the management 1507 // account in your organization. You must use the IAM console, API, or AWS Command 1508 // Line Interface (AWS CLI) to remove the service-linked role. For more information, 1509 // see Deleting a Service-Linked Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) 1510 // in the IAM User Guide. 1511 // 1512 // You can also disable the organizational feature by using the Organizations 1513 // DisableAWSServiceAccess (https://docs.aws.amazon.com/organizations/latest/APIReference/API_DisableAWSServiceAccess.html) 1514 // API operation. After you call this operation, AWS Health stops aggregating 1515 // events for all other AWS accounts in your organization. If you call the AWS 1516 // Health API operations for organizational view, AWS Health returns an error. 1517 // AWS Health continues to aggregate health events for your AWS account. 1518 // 1519 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1520 // with awserr.Error's Code and Message methods to get detailed information about 1521 // the error. 1522 // 1523 // See the AWS API reference guide for AWS Health APIs and Notifications's 1524 // API operation DisableHealthServiceAccessForOrganization for usage and error information. 1525 // 1526 // Returned Error Types: 1527 // * ConcurrentModificationException 1528 // EnableHealthServiceAccessForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 1529 // is already in progress. Wait for the action to complete before trying again. 1530 // To get the current status, use the DescribeHealthServiceStatusForOrganization 1531 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html) 1532 // operation. 1533 // 1534 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DisableHealthServiceAccessForOrganization 1535 func (c *Health) DisableHealthServiceAccessForOrganization(input *DisableHealthServiceAccessForOrganizationInput) (*DisableHealthServiceAccessForOrganizationOutput, error) { 1536 req, out := c.DisableHealthServiceAccessForOrganizationRequest(input) 1537 return out, req.Send() 1538 } 1539 1540 // DisableHealthServiceAccessForOrganizationWithContext is the same as DisableHealthServiceAccessForOrganization with the addition of 1541 // the ability to pass a context and additional request options. 1542 // 1543 // See DisableHealthServiceAccessForOrganization for details on how to use this API operation. 1544 // 1545 // The context must be non-nil and will be used for request cancellation. If 1546 // the context is nil a panic will occur. In the future the SDK may create 1547 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1548 // for more information on using Contexts. 1549 func (c *Health) DisableHealthServiceAccessForOrganizationWithContext(ctx aws.Context, input *DisableHealthServiceAccessForOrganizationInput, opts ...request.Option) (*DisableHealthServiceAccessForOrganizationOutput, error) { 1550 req, out := c.DisableHealthServiceAccessForOrganizationRequest(input) 1551 req.SetContext(ctx) 1552 req.ApplyOptions(opts...) 1553 return out, req.Send() 1554 } 1555 1556 const opEnableHealthServiceAccessForOrganization = "EnableHealthServiceAccessForOrganization" 1557 1558 // EnableHealthServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the 1559 // client's request for the EnableHealthServiceAccessForOrganization operation. The "output" return 1560 // value will be populated with the request's response once the request completes 1561 // successfully. 1562 // 1563 // Use "Send" method on the returned Request to send the API call to the service. 1564 // the "output" return value is not valid until after Send returns without error. 1565 // 1566 // See EnableHealthServiceAccessForOrganization for more information on using the EnableHealthServiceAccessForOrganization 1567 // API call, and error handling. 1568 // 1569 // This method is useful when you want to inject custom logic or configuration 1570 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1571 // 1572 // 1573 // // Example sending a request using the EnableHealthServiceAccessForOrganizationRequest method. 1574 // req, resp := client.EnableHealthServiceAccessForOrganizationRequest(params) 1575 // 1576 // err := req.Send() 1577 // if err == nil { // resp is now filled 1578 // fmt.Println(resp) 1579 // } 1580 // 1581 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EnableHealthServiceAccessForOrganization 1582 func (c *Health) EnableHealthServiceAccessForOrganizationRequest(input *EnableHealthServiceAccessForOrganizationInput) (req *request.Request, output *EnableHealthServiceAccessForOrganizationOutput) { 1583 op := &request.Operation{ 1584 Name: opEnableHealthServiceAccessForOrganization, 1585 HTTPMethod: "POST", 1586 HTTPPath: "/", 1587 } 1588 1589 if input == nil { 1590 input = &EnableHealthServiceAccessForOrganizationInput{} 1591 } 1592 1593 output = &EnableHealthServiceAccessForOrganizationOutput{} 1594 req = c.newRequest(op, input, output) 1595 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1596 return 1597 } 1598 1599 // EnableHealthServiceAccessForOrganization API operation for AWS Health APIs and Notifications. 1600 // 1601 // Enables AWS Health to work with AWS Organizations. You can use the organizational 1602 // view feature to aggregate events from all AWS accounts in your organization 1603 // in a centralized location. 1604 // 1605 // This operation also creates a service-linked role for the management account 1606 // in the organization. 1607 // 1608 // To call this operation, you must meet the following requirements: 1609 // 1610 // * You must have a Business or Enterprise Support plan from AWS Support 1611 // (http://aws.amazon.com/premiumsupport/) to use the AWS Health API. If 1612 // you call the AWS Health API from an AWS account that doesn't have a Business 1613 // or Enterprise Support plan, you receive a SubscriptionRequiredException 1614 // error. 1615 // 1616 // * You must have permission to call this operation from the organization's 1617 // management account. For example IAM policies, see AWS Health identity-based 1618 // policy examples (https://docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html). 1619 // 1620 // If you don't have the required support plan, you can instead use the AWS 1621 // Health console to enable the organizational view feature. For more information, 1622 // see Aggregating AWS Health events (https://docs.aws.amazon.com/health/latest/ug/aggregate-events.html) 1623 // in the AWS Health User Guide. 1624 // 1625 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1626 // with awserr.Error's Code and Message methods to get detailed information about 1627 // the error. 1628 // 1629 // See the AWS API reference guide for AWS Health APIs and Notifications's 1630 // API operation EnableHealthServiceAccessForOrganization for usage and error information. 1631 // 1632 // Returned Error Types: 1633 // * ConcurrentModificationException 1634 // EnableHealthServiceAccessForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 1635 // is already in progress. Wait for the action to complete before trying again. 1636 // To get the current status, use the DescribeHealthServiceStatusForOrganization 1637 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html) 1638 // operation. 1639 // 1640 // See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EnableHealthServiceAccessForOrganization 1641 func (c *Health) EnableHealthServiceAccessForOrganization(input *EnableHealthServiceAccessForOrganizationInput) (*EnableHealthServiceAccessForOrganizationOutput, error) { 1642 req, out := c.EnableHealthServiceAccessForOrganizationRequest(input) 1643 return out, req.Send() 1644 } 1645 1646 // EnableHealthServiceAccessForOrganizationWithContext is the same as EnableHealthServiceAccessForOrganization with the addition of 1647 // the ability to pass a context and additional request options. 1648 // 1649 // See EnableHealthServiceAccessForOrganization for details on how to use this API operation. 1650 // 1651 // The context must be non-nil and will be used for request cancellation. If 1652 // the context is nil a panic will occur. In the future the SDK may create 1653 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1654 // for more information on using Contexts. 1655 func (c *Health) EnableHealthServiceAccessForOrganizationWithContext(ctx aws.Context, input *EnableHealthServiceAccessForOrganizationInput, opts ...request.Option) (*EnableHealthServiceAccessForOrganizationOutput, error) { 1656 req, out := c.EnableHealthServiceAccessForOrganizationRequest(input) 1657 req.SetContext(ctx) 1658 req.ApplyOptions(opts...) 1659 return out, req.Send() 1660 } 1661 1662 // Information about an entity that is affected by a Health event. 1663 type AffectedEntity struct { 1664 _ struct{} `type:"structure"` 1665 1666 // The 12-digit AWS account number that contains the affected entity. 1667 AwsAccountId *string `locationName:"awsAccountId" type:"string"` 1668 1669 // The unique identifier for the entity. Format: arn:aws:health:entity-region:aws-account:entity/entity-id 1670 // . Example: arn:aws:health:us-east-1:111222333444:entity/AVh5GGT7ul1arKr1sE1K 1671 EntityArn *string `locationName:"entityArn" type:"string"` 1672 1673 // The URL of the affected entity. 1674 EntityUrl *string `locationName:"entityUrl" type:"string"` 1675 1676 // The ID of the affected entity. 1677 EntityValue *string `locationName:"entityValue" type:"string"` 1678 1679 // 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 1680 // format. 1681 // 1682 // For example, an event ARN might look like the following: 1683 // 1684 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 1685 EventArn *string `locationName:"eventArn" type:"string"` 1686 1687 // The most recent time that the entity was updated. 1688 LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` 1689 1690 // The most recent status of the entity affected by the event. The possible 1691 // values are IMPAIRED, UNIMPAIRED, and UNKNOWN. 1692 StatusCode *string `locationName:"statusCode" type:"string" enum:"EntityStatusCode"` 1693 1694 // A map of entity tags attached to the affected entity. 1695 // 1696 // Currently, the tags property isn't supported. 1697 Tags map[string]*string `locationName:"tags" type:"map"` 1698 } 1699 1700 // String returns the string representation. 1701 // 1702 // API parameter values that are decorated as "sensitive" in the API will not 1703 // be included in the string output. The member name will be present, but the 1704 // value will be replaced with "sensitive". 1705 func (s AffectedEntity) String() string { 1706 return awsutil.Prettify(s) 1707 } 1708 1709 // GoString returns the string representation. 1710 // 1711 // API parameter values that are decorated as "sensitive" in the API will not 1712 // be included in the string output. The member name will be present, but the 1713 // value will be replaced with "sensitive". 1714 func (s AffectedEntity) GoString() string { 1715 return s.String() 1716 } 1717 1718 // SetAwsAccountId sets the AwsAccountId field's value. 1719 func (s *AffectedEntity) SetAwsAccountId(v string) *AffectedEntity { 1720 s.AwsAccountId = &v 1721 return s 1722 } 1723 1724 // SetEntityArn sets the EntityArn field's value. 1725 func (s *AffectedEntity) SetEntityArn(v string) *AffectedEntity { 1726 s.EntityArn = &v 1727 return s 1728 } 1729 1730 // SetEntityUrl sets the EntityUrl field's value. 1731 func (s *AffectedEntity) SetEntityUrl(v string) *AffectedEntity { 1732 s.EntityUrl = &v 1733 return s 1734 } 1735 1736 // SetEntityValue sets the EntityValue field's value. 1737 func (s *AffectedEntity) SetEntityValue(v string) *AffectedEntity { 1738 s.EntityValue = &v 1739 return s 1740 } 1741 1742 // SetEventArn sets the EventArn field's value. 1743 func (s *AffectedEntity) SetEventArn(v string) *AffectedEntity { 1744 s.EventArn = &v 1745 return s 1746 } 1747 1748 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 1749 func (s *AffectedEntity) SetLastUpdatedTime(v time.Time) *AffectedEntity { 1750 s.LastUpdatedTime = &v 1751 return s 1752 } 1753 1754 // SetStatusCode sets the StatusCode field's value. 1755 func (s *AffectedEntity) SetStatusCode(v string) *AffectedEntity { 1756 s.StatusCode = &v 1757 return s 1758 } 1759 1760 // SetTags sets the Tags field's value. 1761 func (s *AffectedEntity) SetTags(v map[string]*string) *AffectedEntity { 1762 s.Tags = v 1763 return s 1764 } 1765 1766 // EnableHealthServiceAccessForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) 1767 // is already in progress. Wait for the action to complete before trying again. 1768 // To get the current status, use the DescribeHealthServiceStatusForOrganization 1769 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html) 1770 // operation. 1771 type ConcurrentModificationException struct { 1772 _ struct{} `type:"structure"` 1773 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1774 1775 Message_ *string `locationName:"message" type:"string"` 1776 } 1777 1778 // String returns the string representation. 1779 // 1780 // API parameter values that are decorated as "sensitive" in the API will not 1781 // be included in the string output. The member name will be present, but the 1782 // value will be replaced with "sensitive". 1783 func (s ConcurrentModificationException) String() string { 1784 return awsutil.Prettify(s) 1785 } 1786 1787 // GoString returns the string representation. 1788 // 1789 // API parameter values that are decorated as "sensitive" in the API will not 1790 // be included in the string output. The member name will be present, but the 1791 // value will be replaced with "sensitive". 1792 func (s ConcurrentModificationException) GoString() string { 1793 return s.String() 1794 } 1795 1796 func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1797 return &ConcurrentModificationException{ 1798 RespMetadata: v, 1799 } 1800 } 1801 1802 // Code returns the exception type name. 1803 func (s *ConcurrentModificationException) Code() string { 1804 return "ConcurrentModificationException" 1805 } 1806 1807 // Message returns the exception's message. 1808 func (s *ConcurrentModificationException) Message() string { 1809 if s.Message_ != nil { 1810 return *s.Message_ 1811 } 1812 return "" 1813 } 1814 1815 // OrigErr always returns nil, satisfies awserr.Error interface. 1816 func (s *ConcurrentModificationException) OrigErr() error { 1817 return nil 1818 } 1819 1820 func (s *ConcurrentModificationException) Error() string { 1821 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1822 } 1823 1824 // Status code returns the HTTP status code for the request's response error. 1825 func (s *ConcurrentModificationException) StatusCode() int { 1826 return s.RespMetadata.StatusCode 1827 } 1828 1829 // RequestID returns the service's response RequestID for request. 1830 func (s *ConcurrentModificationException) RequestID() string { 1831 return s.RespMetadata.RequestID 1832 } 1833 1834 // A range of dates and times that is used by the EventFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EventFilter.html) 1835 // and EntityFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EntityFilter.html) 1836 // objects. If from is set and to is set: match items where the timestamp (startTime, 1837 // endTime, or lastUpdatedTime) is between from and to inclusive. If from is 1838 // set and to is not set: match items where the timestamp value is equal to 1839 // or after from. If from is not set and to is set: match items where the timestamp 1840 // value is equal to or before to. 1841 type DateTimeRange struct { 1842 _ struct{} `type:"structure"` 1843 1844 // The starting date and time of a time range. 1845 From *time.Time `locationName:"from" type:"timestamp"` 1846 1847 // The ending date and time of a time range. 1848 To *time.Time `locationName:"to" type:"timestamp"` 1849 } 1850 1851 // String returns the string representation. 1852 // 1853 // API parameter values that are decorated as "sensitive" in the API will not 1854 // be included in the string output. The member name will be present, but the 1855 // value will be replaced with "sensitive". 1856 func (s DateTimeRange) String() string { 1857 return awsutil.Prettify(s) 1858 } 1859 1860 // GoString returns the string representation. 1861 // 1862 // API parameter values that are decorated as "sensitive" in the API will not 1863 // be included in the string output. The member name will be present, but the 1864 // value will be replaced with "sensitive". 1865 func (s DateTimeRange) GoString() string { 1866 return s.String() 1867 } 1868 1869 // SetFrom sets the From field's value. 1870 func (s *DateTimeRange) SetFrom(v time.Time) *DateTimeRange { 1871 s.From = &v 1872 return s 1873 } 1874 1875 // SetTo sets the To field's value. 1876 func (s *DateTimeRange) SetTo(v time.Time) *DateTimeRange { 1877 s.To = &v 1878 return s 1879 } 1880 1881 type DescribeAffectedAccountsForOrganizationInput struct { 1882 _ struct{} `type:"structure"` 1883 1884 // 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 1885 // format. 1886 // 1887 // For example, an event ARN might look like the following: 1888 // 1889 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 1890 // 1891 // EventArn is a required field 1892 EventArn *string `locationName:"eventArn" type:"string" required:"true"` 1893 1894 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 1895 MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` 1896 1897 // If the results of a search are large, only a portion of the results are returned, 1898 // and a nextToken pagination token is returned in the response. To retrieve 1899 // the next batch of results, reissue the search request and include the returned 1900 // token. When all results have been returned, the response does not contain 1901 // a pagination token value. 1902 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 1903 } 1904 1905 // String returns the string representation. 1906 // 1907 // API parameter values that are decorated as "sensitive" in the API will not 1908 // be included in the string output. The member name will be present, but the 1909 // value will be replaced with "sensitive". 1910 func (s DescribeAffectedAccountsForOrganizationInput) String() string { 1911 return awsutil.Prettify(s) 1912 } 1913 1914 // GoString returns the string representation. 1915 // 1916 // API parameter values that are decorated as "sensitive" in the API will not 1917 // be included in the string output. The member name will be present, but the 1918 // value will be replaced with "sensitive". 1919 func (s DescribeAffectedAccountsForOrganizationInput) GoString() string { 1920 return s.String() 1921 } 1922 1923 // Validate inspects the fields of the type to determine if they are valid. 1924 func (s *DescribeAffectedAccountsForOrganizationInput) Validate() error { 1925 invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedAccountsForOrganizationInput"} 1926 if s.EventArn == nil { 1927 invalidParams.Add(request.NewErrParamRequired("EventArn")) 1928 } 1929 if s.MaxResults != nil && *s.MaxResults < 10 { 1930 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) 1931 } 1932 if s.NextToken != nil && len(*s.NextToken) < 4 { 1933 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 1934 } 1935 1936 if invalidParams.Len() > 0 { 1937 return invalidParams 1938 } 1939 return nil 1940 } 1941 1942 // SetEventArn sets the EventArn field's value. 1943 func (s *DescribeAffectedAccountsForOrganizationInput) SetEventArn(v string) *DescribeAffectedAccountsForOrganizationInput { 1944 s.EventArn = &v 1945 return s 1946 } 1947 1948 // SetMaxResults sets the MaxResults field's value. 1949 func (s *DescribeAffectedAccountsForOrganizationInput) SetMaxResults(v int64) *DescribeAffectedAccountsForOrganizationInput { 1950 s.MaxResults = &v 1951 return s 1952 } 1953 1954 // SetNextToken sets the NextToken field's value. 1955 func (s *DescribeAffectedAccountsForOrganizationInput) SetNextToken(v string) *DescribeAffectedAccountsForOrganizationInput { 1956 s.NextToken = &v 1957 return s 1958 } 1959 1960 type DescribeAffectedAccountsForOrganizationOutput struct { 1961 _ struct{} `type:"structure"` 1962 1963 // A JSON set of elements of the affected accounts. 1964 AffectedAccounts []*string `locationName:"affectedAccounts" type:"list"` 1965 1966 // This parameter specifies if the AWS Health event is a public AWS service 1967 // event or an account-specific event. 1968 // 1969 // * If the eventScopeCode value is PUBLIC, then the affectedAccounts value 1970 // is always empty. 1971 // 1972 // * If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts 1973 // value lists the affected AWS accounts in your organization. For example, 1974 // if an event affects a service such as Amazon Elastic Compute Cloud and 1975 // you have AWS accounts that use that service, those account IDs appear 1976 // in the response. 1977 // 1978 // * If the eventScopeCode value is NONE, then the eventArn that you specified 1979 // in the request is invalid or doesn't exist. 1980 EventScopeCode *string `locationName:"eventScopeCode" type:"string" enum:"EventScopeCode"` 1981 1982 // If the results of a search are large, only a portion of the results are returned, 1983 // and a nextToken pagination token is returned in the response. To retrieve 1984 // the next batch of results, reissue the search request and include the returned 1985 // token. When all results have been returned, the response does not contain 1986 // a pagination token value. 1987 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 1988 } 1989 1990 // String returns the string representation. 1991 // 1992 // API parameter values that are decorated as "sensitive" in the API will not 1993 // be included in the string output. The member name will be present, but the 1994 // value will be replaced with "sensitive". 1995 func (s DescribeAffectedAccountsForOrganizationOutput) String() string { 1996 return awsutil.Prettify(s) 1997 } 1998 1999 // GoString returns the string representation. 2000 // 2001 // API parameter values that are decorated as "sensitive" in the API will not 2002 // be included in the string output. The member name will be present, but the 2003 // value will be replaced with "sensitive". 2004 func (s DescribeAffectedAccountsForOrganizationOutput) GoString() string { 2005 return s.String() 2006 } 2007 2008 // SetAffectedAccounts sets the AffectedAccounts field's value. 2009 func (s *DescribeAffectedAccountsForOrganizationOutput) SetAffectedAccounts(v []*string) *DescribeAffectedAccountsForOrganizationOutput { 2010 s.AffectedAccounts = v 2011 return s 2012 } 2013 2014 // SetEventScopeCode sets the EventScopeCode field's value. 2015 func (s *DescribeAffectedAccountsForOrganizationOutput) SetEventScopeCode(v string) *DescribeAffectedAccountsForOrganizationOutput { 2016 s.EventScopeCode = &v 2017 return s 2018 } 2019 2020 // SetNextToken sets the NextToken field's value. 2021 func (s *DescribeAffectedAccountsForOrganizationOutput) SetNextToken(v string) *DescribeAffectedAccountsForOrganizationOutput { 2022 s.NextToken = &v 2023 return s 2024 } 2025 2026 type DescribeAffectedEntitiesForOrganizationInput struct { 2027 _ struct{} `type:"structure"` 2028 2029 // The locale (language) to return information in. English (en) is the default 2030 // and the only supported value at this time. 2031 Locale *string `locationName:"locale" min:"2" type:"string"` 2032 2033 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 2034 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 2035 2036 // If the results of a search are large, only a portion of the results are returned, 2037 // and a nextToken pagination token is returned in the response. To retrieve 2038 // the next batch of results, reissue the search request and include the returned 2039 // token. When all results have been returned, the response does not contain 2040 // a pagination token value. 2041 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2042 2043 // A JSON set of elements including the awsAccountId and the eventArn. 2044 // 2045 // OrganizationEntityFilters is a required field 2046 OrganizationEntityFilters []*EventAccountFilter `locationName:"organizationEntityFilters" min:"1" type:"list" required:"true"` 2047 } 2048 2049 // String returns the string representation. 2050 // 2051 // API parameter values that are decorated as "sensitive" in the API will not 2052 // be included in the string output. The member name will be present, but the 2053 // value will be replaced with "sensitive". 2054 func (s DescribeAffectedEntitiesForOrganizationInput) String() string { 2055 return awsutil.Prettify(s) 2056 } 2057 2058 // GoString returns the string representation. 2059 // 2060 // API parameter values that are decorated as "sensitive" in the API will not 2061 // be included in the string output. The member name will be present, but the 2062 // value will be replaced with "sensitive". 2063 func (s DescribeAffectedEntitiesForOrganizationInput) GoString() string { 2064 return s.String() 2065 } 2066 2067 // Validate inspects the fields of the type to determine if they are valid. 2068 func (s *DescribeAffectedEntitiesForOrganizationInput) Validate() error { 2069 invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedEntitiesForOrganizationInput"} 2070 if s.Locale != nil && len(*s.Locale) < 2 { 2071 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2072 } 2073 if s.MaxResults != nil && *s.MaxResults < 1 { 2074 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2075 } 2076 if s.NextToken != nil && len(*s.NextToken) < 4 { 2077 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2078 } 2079 if s.OrganizationEntityFilters == nil { 2080 invalidParams.Add(request.NewErrParamRequired("OrganizationEntityFilters")) 2081 } 2082 if s.OrganizationEntityFilters != nil && len(s.OrganizationEntityFilters) < 1 { 2083 invalidParams.Add(request.NewErrParamMinLen("OrganizationEntityFilters", 1)) 2084 } 2085 if s.OrganizationEntityFilters != nil { 2086 for i, v := range s.OrganizationEntityFilters { 2087 if v == nil { 2088 continue 2089 } 2090 if err := v.Validate(); err != nil { 2091 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationEntityFilters", i), err.(request.ErrInvalidParams)) 2092 } 2093 } 2094 } 2095 2096 if invalidParams.Len() > 0 { 2097 return invalidParams 2098 } 2099 return nil 2100 } 2101 2102 // SetLocale sets the Locale field's value. 2103 func (s *DescribeAffectedEntitiesForOrganizationInput) SetLocale(v string) *DescribeAffectedEntitiesForOrganizationInput { 2104 s.Locale = &v 2105 return s 2106 } 2107 2108 // SetMaxResults sets the MaxResults field's value. 2109 func (s *DescribeAffectedEntitiesForOrganizationInput) SetMaxResults(v int64) *DescribeAffectedEntitiesForOrganizationInput { 2110 s.MaxResults = &v 2111 return s 2112 } 2113 2114 // SetNextToken sets the NextToken field's value. 2115 func (s *DescribeAffectedEntitiesForOrganizationInput) SetNextToken(v string) *DescribeAffectedEntitiesForOrganizationInput { 2116 s.NextToken = &v 2117 return s 2118 } 2119 2120 // SetOrganizationEntityFilters sets the OrganizationEntityFilters field's value. 2121 func (s *DescribeAffectedEntitiesForOrganizationInput) SetOrganizationEntityFilters(v []*EventAccountFilter) *DescribeAffectedEntitiesForOrganizationInput { 2122 s.OrganizationEntityFilters = v 2123 return s 2124 } 2125 2126 type DescribeAffectedEntitiesForOrganizationOutput struct { 2127 _ struct{} `type:"structure"` 2128 2129 // A JSON set of elements including the awsAccountId and its entityArn, entityValue 2130 // and its entityArn, lastUpdatedTime, and statusCode. 2131 Entities []*AffectedEntity `locationName:"entities" type:"list"` 2132 2133 // A JSON set of elements of the failed response, including the awsAccountId, 2134 // errorMessage, errorName, and eventArn. 2135 FailedSet []*OrganizationAffectedEntitiesErrorItem `locationName:"failedSet" type:"list"` 2136 2137 // If the results of a search are large, only a portion of the results are returned, 2138 // and a nextToken pagination token is returned in the response. To retrieve 2139 // the next batch of results, reissue the search request and include the returned 2140 // token. When all results have been returned, the response does not contain 2141 // a pagination token value. 2142 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2143 } 2144 2145 // String returns the string representation. 2146 // 2147 // API parameter values that are decorated as "sensitive" in the API will not 2148 // be included in the string output. The member name will be present, but the 2149 // value will be replaced with "sensitive". 2150 func (s DescribeAffectedEntitiesForOrganizationOutput) String() string { 2151 return awsutil.Prettify(s) 2152 } 2153 2154 // GoString returns the string representation. 2155 // 2156 // API parameter values that are decorated as "sensitive" in the API will not 2157 // be included in the string output. The member name will be present, but the 2158 // value will be replaced with "sensitive". 2159 func (s DescribeAffectedEntitiesForOrganizationOutput) GoString() string { 2160 return s.String() 2161 } 2162 2163 // SetEntities sets the Entities field's value. 2164 func (s *DescribeAffectedEntitiesForOrganizationOutput) SetEntities(v []*AffectedEntity) *DescribeAffectedEntitiesForOrganizationOutput { 2165 s.Entities = v 2166 return s 2167 } 2168 2169 // SetFailedSet sets the FailedSet field's value. 2170 func (s *DescribeAffectedEntitiesForOrganizationOutput) SetFailedSet(v []*OrganizationAffectedEntitiesErrorItem) *DescribeAffectedEntitiesForOrganizationOutput { 2171 s.FailedSet = v 2172 return s 2173 } 2174 2175 // SetNextToken sets the NextToken field's value. 2176 func (s *DescribeAffectedEntitiesForOrganizationOutput) SetNextToken(v string) *DescribeAffectedEntitiesForOrganizationOutput { 2177 s.NextToken = &v 2178 return s 2179 } 2180 2181 type DescribeAffectedEntitiesInput struct { 2182 _ struct{} `type:"structure"` 2183 2184 // Values to narrow the results returned. At least one event ARN is required. 2185 // 2186 // Filter is a required field 2187 Filter *EntityFilter `locationName:"filter" type:"structure" required:"true"` 2188 2189 // The locale (language) to return information in. English (en) is the default 2190 // and the only supported value at this time. 2191 Locale *string `locationName:"locale" min:"2" type:"string"` 2192 2193 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 2194 MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` 2195 2196 // If the results of a search are large, only a portion of the results are returned, 2197 // and a nextToken pagination token is returned in the response. To retrieve 2198 // the next batch of results, reissue the search request and include the returned 2199 // token. When all results have been returned, the response does not contain 2200 // a pagination token value. 2201 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2202 } 2203 2204 // String returns the string representation. 2205 // 2206 // API parameter values that are decorated as "sensitive" in the API will not 2207 // be included in the string output. The member name will be present, but the 2208 // value will be replaced with "sensitive". 2209 func (s DescribeAffectedEntitiesInput) String() string { 2210 return awsutil.Prettify(s) 2211 } 2212 2213 // GoString returns the string representation. 2214 // 2215 // API parameter values that are decorated as "sensitive" in the API will not 2216 // be included in the string output. The member name will be present, but the 2217 // value will be replaced with "sensitive". 2218 func (s DescribeAffectedEntitiesInput) GoString() string { 2219 return s.String() 2220 } 2221 2222 // Validate inspects the fields of the type to determine if they are valid. 2223 func (s *DescribeAffectedEntitiesInput) Validate() error { 2224 invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedEntitiesInput"} 2225 if s.Filter == nil { 2226 invalidParams.Add(request.NewErrParamRequired("Filter")) 2227 } 2228 if s.Locale != nil && len(*s.Locale) < 2 { 2229 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2230 } 2231 if s.MaxResults != nil && *s.MaxResults < 10 { 2232 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) 2233 } 2234 if s.NextToken != nil && len(*s.NextToken) < 4 { 2235 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2236 } 2237 if s.Filter != nil { 2238 if err := s.Filter.Validate(); err != nil { 2239 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 2240 } 2241 } 2242 2243 if invalidParams.Len() > 0 { 2244 return invalidParams 2245 } 2246 return nil 2247 } 2248 2249 // SetFilter sets the Filter field's value. 2250 func (s *DescribeAffectedEntitiesInput) SetFilter(v *EntityFilter) *DescribeAffectedEntitiesInput { 2251 s.Filter = v 2252 return s 2253 } 2254 2255 // SetLocale sets the Locale field's value. 2256 func (s *DescribeAffectedEntitiesInput) SetLocale(v string) *DescribeAffectedEntitiesInput { 2257 s.Locale = &v 2258 return s 2259 } 2260 2261 // SetMaxResults sets the MaxResults field's value. 2262 func (s *DescribeAffectedEntitiesInput) SetMaxResults(v int64) *DescribeAffectedEntitiesInput { 2263 s.MaxResults = &v 2264 return s 2265 } 2266 2267 // SetNextToken sets the NextToken field's value. 2268 func (s *DescribeAffectedEntitiesInput) SetNextToken(v string) *DescribeAffectedEntitiesInput { 2269 s.NextToken = &v 2270 return s 2271 } 2272 2273 type DescribeAffectedEntitiesOutput struct { 2274 _ struct{} `type:"structure"` 2275 2276 // The entities that match the filter criteria. 2277 Entities []*AffectedEntity `locationName:"entities" type:"list"` 2278 2279 // If the results of a search are large, only a portion of the results are returned, 2280 // and a nextToken pagination token is returned in the response. To retrieve 2281 // the next batch of results, reissue the search request and include the returned 2282 // token. When all results have been returned, the response does not contain 2283 // a pagination token value. 2284 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2285 } 2286 2287 // String returns the string representation. 2288 // 2289 // API parameter values that are decorated as "sensitive" in the API will not 2290 // be included in the string output. The member name will be present, but the 2291 // value will be replaced with "sensitive". 2292 func (s DescribeAffectedEntitiesOutput) String() string { 2293 return awsutil.Prettify(s) 2294 } 2295 2296 // GoString returns the string representation. 2297 // 2298 // API parameter values that are decorated as "sensitive" in the API will not 2299 // be included in the string output. The member name will be present, but the 2300 // value will be replaced with "sensitive". 2301 func (s DescribeAffectedEntitiesOutput) GoString() string { 2302 return s.String() 2303 } 2304 2305 // SetEntities sets the Entities field's value. 2306 func (s *DescribeAffectedEntitiesOutput) SetEntities(v []*AffectedEntity) *DescribeAffectedEntitiesOutput { 2307 s.Entities = v 2308 return s 2309 } 2310 2311 // SetNextToken sets the NextToken field's value. 2312 func (s *DescribeAffectedEntitiesOutput) SetNextToken(v string) *DescribeAffectedEntitiesOutput { 2313 s.NextToken = &v 2314 return s 2315 } 2316 2317 type DescribeEntityAggregatesInput struct { 2318 _ struct{} `type:"structure"` 2319 2320 // 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", 2321 // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" 2322 EventArns []*string `locationName:"eventArns" min:"1" type:"list"` 2323 } 2324 2325 // String returns the string representation. 2326 // 2327 // API parameter values that are decorated as "sensitive" in the API will not 2328 // be included in the string output. The member name will be present, but the 2329 // value will be replaced with "sensitive". 2330 func (s DescribeEntityAggregatesInput) String() string { 2331 return awsutil.Prettify(s) 2332 } 2333 2334 // GoString returns the string representation. 2335 // 2336 // API parameter values that are decorated as "sensitive" in the API will not 2337 // be included in the string output. The member name will be present, but the 2338 // value will be replaced with "sensitive". 2339 func (s DescribeEntityAggregatesInput) GoString() string { 2340 return s.String() 2341 } 2342 2343 // Validate inspects the fields of the type to determine if they are valid. 2344 func (s *DescribeEntityAggregatesInput) Validate() error { 2345 invalidParams := request.ErrInvalidParams{Context: "DescribeEntityAggregatesInput"} 2346 if s.EventArns != nil && len(s.EventArns) < 1 { 2347 invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) 2348 } 2349 2350 if invalidParams.Len() > 0 { 2351 return invalidParams 2352 } 2353 return nil 2354 } 2355 2356 // SetEventArns sets the EventArns field's value. 2357 func (s *DescribeEntityAggregatesInput) SetEventArns(v []*string) *DescribeEntityAggregatesInput { 2358 s.EventArns = v 2359 return s 2360 } 2361 2362 type DescribeEntityAggregatesOutput struct { 2363 _ struct{} `type:"structure"` 2364 2365 // The number of entities that are affected by each of the specified events. 2366 EntityAggregates []*EntityAggregate `locationName:"entityAggregates" type:"list"` 2367 } 2368 2369 // String returns the string representation. 2370 // 2371 // API parameter values that are decorated as "sensitive" in the API will not 2372 // be included in the string output. The member name will be present, but the 2373 // value will be replaced with "sensitive". 2374 func (s DescribeEntityAggregatesOutput) String() string { 2375 return awsutil.Prettify(s) 2376 } 2377 2378 // GoString returns the string representation. 2379 // 2380 // API parameter values that are decorated as "sensitive" in the API will not 2381 // be included in the string output. The member name will be present, but the 2382 // value will be replaced with "sensitive". 2383 func (s DescribeEntityAggregatesOutput) GoString() string { 2384 return s.String() 2385 } 2386 2387 // SetEntityAggregates sets the EntityAggregates field's value. 2388 func (s *DescribeEntityAggregatesOutput) SetEntityAggregates(v []*EntityAggregate) *DescribeEntityAggregatesOutput { 2389 s.EntityAggregates = v 2390 return s 2391 } 2392 2393 type DescribeEventAggregatesInput struct { 2394 _ struct{} `type:"structure"` 2395 2396 // The only currently supported value is eventTypeCategory. 2397 // 2398 // AggregateField is a required field 2399 AggregateField *string `locationName:"aggregateField" type:"string" required:"true" enum:"EventAggregateField"` 2400 2401 // Values to narrow the results returned. 2402 Filter *EventFilter `locationName:"filter" type:"structure"` 2403 2404 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 2405 MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` 2406 2407 // If the results of a search are large, only a portion of the results are returned, 2408 // and a nextToken pagination token is returned in the response. To retrieve 2409 // the next batch of results, reissue the search request and include the returned 2410 // token. When all results have been returned, the response does not contain 2411 // a pagination token value. 2412 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2413 } 2414 2415 // String returns the string representation. 2416 // 2417 // API parameter values that are decorated as "sensitive" in the API will not 2418 // be included in the string output. The member name will be present, but the 2419 // value will be replaced with "sensitive". 2420 func (s DescribeEventAggregatesInput) String() string { 2421 return awsutil.Prettify(s) 2422 } 2423 2424 // GoString returns the string representation. 2425 // 2426 // API parameter values that are decorated as "sensitive" in the API will not 2427 // be included in the string output. The member name will be present, but the 2428 // value will be replaced with "sensitive". 2429 func (s DescribeEventAggregatesInput) GoString() string { 2430 return s.String() 2431 } 2432 2433 // Validate inspects the fields of the type to determine if they are valid. 2434 func (s *DescribeEventAggregatesInput) Validate() error { 2435 invalidParams := request.ErrInvalidParams{Context: "DescribeEventAggregatesInput"} 2436 if s.AggregateField == nil { 2437 invalidParams.Add(request.NewErrParamRequired("AggregateField")) 2438 } 2439 if s.MaxResults != nil && *s.MaxResults < 10 { 2440 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) 2441 } 2442 if s.NextToken != nil && len(*s.NextToken) < 4 { 2443 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2444 } 2445 if s.Filter != nil { 2446 if err := s.Filter.Validate(); err != nil { 2447 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 2448 } 2449 } 2450 2451 if invalidParams.Len() > 0 { 2452 return invalidParams 2453 } 2454 return nil 2455 } 2456 2457 // SetAggregateField sets the AggregateField field's value. 2458 func (s *DescribeEventAggregatesInput) SetAggregateField(v string) *DescribeEventAggregatesInput { 2459 s.AggregateField = &v 2460 return s 2461 } 2462 2463 // SetFilter sets the Filter field's value. 2464 func (s *DescribeEventAggregatesInput) SetFilter(v *EventFilter) *DescribeEventAggregatesInput { 2465 s.Filter = v 2466 return s 2467 } 2468 2469 // SetMaxResults sets the MaxResults field's value. 2470 func (s *DescribeEventAggregatesInput) SetMaxResults(v int64) *DescribeEventAggregatesInput { 2471 s.MaxResults = &v 2472 return s 2473 } 2474 2475 // SetNextToken sets the NextToken field's value. 2476 func (s *DescribeEventAggregatesInput) SetNextToken(v string) *DescribeEventAggregatesInput { 2477 s.NextToken = &v 2478 return s 2479 } 2480 2481 type DescribeEventAggregatesOutput struct { 2482 _ struct{} `type:"structure"` 2483 2484 // The number of events in each category that meet the optional filter criteria. 2485 EventAggregates []*EventAggregate `locationName:"eventAggregates" type:"list"` 2486 2487 // If the results of a search are large, only a portion of the results are returned, 2488 // and a nextToken pagination token is returned in the response. To retrieve 2489 // the next batch of results, reissue the search request and include the returned 2490 // token. When all results have been returned, the response does not contain 2491 // a pagination token value. 2492 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2493 } 2494 2495 // String returns the string representation. 2496 // 2497 // API parameter values that are decorated as "sensitive" in the API will not 2498 // be included in the string output. The member name will be present, but the 2499 // value will be replaced with "sensitive". 2500 func (s DescribeEventAggregatesOutput) String() string { 2501 return awsutil.Prettify(s) 2502 } 2503 2504 // GoString returns the string representation. 2505 // 2506 // API parameter values that are decorated as "sensitive" in the API will not 2507 // be included in the string output. The member name will be present, but the 2508 // value will be replaced with "sensitive". 2509 func (s DescribeEventAggregatesOutput) GoString() string { 2510 return s.String() 2511 } 2512 2513 // SetEventAggregates sets the EventAggregates field's value. 2514 func (s *DescribeEventAggregatesOutput) SetEventAggregates(v []*EventAggregate) *DescribeEventAggregatesOutput { 2515 s.EventAggregates = v 2516 return s 2517 } 2518 2519 // SetNextToken sets the NextToken field's value. 2520 func (s *DescribeEventAggregatesOutput) SetNextToken(v string) *DescribeEventAggregatesOutput { 2521 s.NextToken = &v 2522 return s 2523 } 2524 2525 type DescribeEventDetailsForOrganizationInput struct { 2526 _ struct{} `type:"structure"` 2527 2528 // The locale (language) to return information in. English (en) is the default 2529 // and the only supported value at this time. 2530 Locale *string `locationName:"locale" min:"2" type:"string"` 2531 2532 // A set of JSON elements that includes the awsAccountId and the eventArn. 2533 // 2534 // OrganizationEventDetailFilters is a required field 2535 OrganizationEventDetailFilters []*EventAccountFilter `locationName:"organizationEventDetailFilters" min:"1" type:"list" required:"true"` 2536 } 2537 2538 // String returns the string representation. 2539 // 2540 // API parameter values that are decorated as "sensitive" in the API will not 2541 // be included in the string output. The member name will be present, but the 2542 // value will be replaced with "sensitive". 2543 func (s DescribeEventDetailsForOrganizationInput) String() string { 2544 return awsutil.Prettify(s) 2545 } 2546 2547 // GoString returns the string representation. 2548 // 2549 // API parameter values that are decorated as "sensitive" in the API will not 2550 // be included in the string output. The member name will be present, but the 2551 // value will be replaced with "sensitive". 2552 func (s DescribeEventDetailsForOrganizationInput) GoString() string { 2553 return s.String() 2554 } 2555 2556 // Validate inspects the fields of the type to determine if they are valid. 2557 func (s *DescribeEventDetailsForOrganizationInput) Validate() error { 2558 invalidParams := request.ErrInvalidParams{Context: "DescribeEventDetailsForOrganizationInput"} 2559 if s.Locale != nil && len(*s.Locale) < 2 { 2560 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2561 } 2562 if s.OrganizationEventDetailFilters == nil { 2563 invalidParams.Add(request.NewErrParamRequired("OrganizationEventDetailFilters")) 2564 } 2565 if s.OrganizationEventDetailFilters != nil && len(s.OrganizationEventDetailFilters) < 1 { 2566 invalidParams.Add(request.NewErrParamMinLen("OrganizationEventDetailFilters", 1)) 2567 } 2568 if s.OrganizationEventDetailFilters != nil { 2569 for i, v := range s.OrganizationEventDetailFilters { 2570 if v == nil { 2571 continue 2572 } 2573 if err := v.Validate(); err != nil { 2574 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationEventDetailFilters", i), err.(request.ErrInvalidParams)) 2575 } 2576 } 2577 } 2578 2579 if invalidParams.Len() > 0 { 2580 return invalidParams 2581 } 2582 return nil 2583 } 2584 2585 // SetLocale sets the Locale field's value. 2586 func (s *DescribeEventDetailsForOrganizationInput) SetLocale(v string) *DescribeEventDetailsForOrganizationInput { 2587 s.Locale = &v 2588 return s 2589 } 2590 2591 // SetOrganizationEventDetailFilters sets the OrganizationEventDetailFilters field's value. 2592 func (s *DescribeEventDetailsForOrganizationInput) SetOrganizationEventDetailFilters(v []*EventAccountFilter) *DescribeEventDetailsForOrganizationInput { 2593 s.OrganizationEventDetailFilters = v 2594 return s 2595 } 2596 2597 type DescribeEventDetailsForOrganizationOutput struct { 2598 _ struct{} `type:"structure"` 2599 2600 // Error messages for any events that could not be retrieved. 2601 FailedSet []*OrganizationEventDetailsErrorItem `locationName:"failedSet" type:"list"` 2602 2603 // Information about the events that could be retrieved. 2604 SuccessfulSet []*OrganizationEventDetails `locationName:"successfulSet" type:"list"` 2605 } 2606 2607 // String returns the string representation. 2608 // 2609 // API parameter values that are decorated as "sensitive" in the API will not 2610 // be included in the string output. The member name will be present, but the 2611 // value will be replaced with "sensitive". 2612 func (s DescribeEventDetailsForOrganizationOutput) String() string { 2613 return awsutil.Prettify(s) 2614 } 2615 2616 // GoString returns the string representation. 2617 // 2618 // API parameter values that are decorated as "sensitive" in the API will not 2619 // be included in the string output. The member name will be present, but the 2620 // value will be replaced with "sensitive". 2621 func (s DescribeEventDetailsForOrganizationOutput) GoString() string { 2622 return s.String() 2623 } 2624 2625 // SetFailedSet sets the FailedSet field's value. 2626 func (s *DescribeEventDetailsForOrganizationOutput) SetFailedSet(v []*OrganizationEventDetailsErrorItem) *DescribeEventDetailsForOrganizationOutput { 2627 s.FailedSet = v 2628 return s 2629 } 2630 2631 // SetSuccessfulSet sets the SuccessfulSet field's value. 2632 func (s *DescribeEventDetailsForOrganizationOutput) SetSuccessfulSet(v []*OrganizationEventDetails) *DescribeEventDetailsForOrganizationOutput { 2633 s.SuccessfulSet = v 2634 return s 2635 } 2636 2637 type DescribeEventDetailsInput struct { 2638 _ struct{} `type:"structure"` 2639 2640 // 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", 2641 // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" 2642 // 2643 // EventArns is a required field 2644 EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` 2645 2646 // The locale (language) to return information in. English (en) is the default 2647 // and the only supported value at this time. 2648 Locale *string `locationName:"locale" min:"2" type:"string"` 2649 } 2650 2651 // String returns the string representation. 2652 // 2653 // API parameter values that are decorated as "sensitive" in the API will not 2654 // be included in the string output. The member name will be present, but the 2655 // value will be replaced with "sensitive". 2656 func (s DescribeEventDetailsInput) String() string { 2657 return awsutil.Prettify(s) 2658 } 2659 2660 // GoString returns the string representation. 2661 // 2662 // API parameter values that are decorated as "sensitive" in the API will not 2663 // be included in the string output. The member name will be present, but the 2664 // value will be replaced with "sensitive". 2665 func (s DescribeEventDetailsInput) GoString() string { 2666 return s.String() 2667 } 2668 2669 // Validate inspects the fields of the type to determine if they are valid. 2670 func (s *DescribeEventDetailsInput) Validate() error { 2671 invalidParams := request.ErrInvalidParams{Context: "DescribeEventDetailsInput"} 2672 if s.EventArns == nil { 2673 invalidParams.Add(request.NewErrParamRequired("EventArns")) 2674 } 2675 if s.EventArns != nil && len(s.EventArns) < 1 { 2676 invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) 2677 } 2678 if s.Locale != nil && len(*s.Locale) < 2 { 2679 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2680 } 2681 2682 if invalidParams.Len() > 0 { 2683 return invalidParams 2684 } 2685 return nil 2686 } 2687 2688 // SetEventArns sets the EventArns field's value. 2689 func (s *DescribeEventDetailsInput) SetEventArns(v []*string) *DescribeEventDetailsInput { 2690 s.EventArns = v 2691 return s 2692 } 2693 2694 // SetLocale sets the Locale field's value. 2695 func (s *DescribeEventDetailsInput) SetLocale(v string) *DescribeEventDetailsInput { 2696 s.Locale = &v 2697 return s 2698 } 2699 2700 type DescribeEventDetailsOutput struct { 2701 _ struct{} `type:"structure"` 2702 2703 // Error messages for any events that could not be retrieved. 2704 FailedSet []*EventDetailsErrorItem `locationName:"failedSet" type:"list"` 2705 2706 // Information about the events that could be retrieved. 2707 SuccessfulSet []*EventDetails `locationName:"successfulSet" type:"list"` 2708 } 2709 2710 // String returns the string representation. 2711 // 2712 // API parameter values that are decorated as "sensitive" in the API will not 2713 // be included in the string output. The member name will be present, but the 2714 // value will be replaced with "sensitive". 2715 func (s DescribeEventDetailsOutput) String() string { 2716 return awsutil.Prettify(s) 2717 } 2718 2719 // GoString returns the string representation. 2720 // 2721 // API parameter values that are decorated as "sensitive" in the API will not 2722 // be included in the string output. The member name will be present, but the 2723 // value will be replaced with "sensitive". 2724 func (s DescribeEventDetailsOutput) GoString() string { 2725 return s.String() 2726 } 2727 2728 // SetFailedSet sets the FailedSet field's value. 2729 func (s *DescribeEventDetailsOutput) SetFailedSet(v []*EventDetailsErrorItem) *DescribeEventDetailsOutput { 2730 s.FailedSet = v 2731 return s 2732 } 2733 2734 // SetSuccessfulSet sets the SuccessfulSet field's value. 2735 func (s *DescribeEventDetailsOutput) SetSuccessfulSet(v []*EventDetails) *DescribeEventDetailsOutput { 2736 s.SuccessfulSet = v 2737 return s 2738 } 2739 2740 type DescribeEventTypesInput struct { 2741 _ struct{} `type:"structure"` 2742 2743 // Values to narrow the results returned. 2744 Filter *EventTypeFilter `locationName:"filter" type:"structure"` 2745 2746 // The locale (language) to return information in. English (en) is the default 2747 // and the only supported value at this time. 2748 Locale *string `locationName:"locale" min:"2" type:"string"` 2749 2750 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 2751 MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` 2752 2753 // If the results of a search are large, only a portion of the results are returned, 2754 // and a nextToken pagination token is returned in the response. To retrieve 2755 // the next batch of results, reissue the search request and include the returned 2756 // token. When all results have been returned, the response does not contain 2757 // a pagination token value. 2758 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2759 } 2760 2761 // String returns the string representation. 2762 // 2763 // API parameter values that are decorated as "sensitive" in the API will not 2764 // be included in the string output. The member name will be present, but the 2765 // value will be replaced with "sensitive". 2766 func (s DescribeEventTypesInput) String() string { 2767 return awsutil.Prettify(s) 2768 } 2769 2770 // GoString returns the string representation. 2771 // 2772 // API parameter values that are decorated as "sensitive" in the API will not 2773 // be included in the string output. The member name will be present, but the 2774 // value will be replaced with "sensitive". 2775 func (s DescribeEventTypesInput) GoString() string { 2776 return s.String() 2777 } 2778 2779 // Validate inspects the fields of the type to determine if they are valid. 2780 func (s *DescribeEventTypesInput) Validate() error { 2781 invalidParams := request.ErrInvalidParams{Context: "DescribeEventTypesInput"} 2782 if s.Locale != nil && len(*s.Locale) < 2 { 2783 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2784 } 2785 if s.MaxResults != nil && *s.MaxResults < 10 { 2786 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) 2787 } 2788 if s.NextToken != nil && len(*s.NextToken) < 4 { 2789 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2790 } 2791 if s.Filter != nil { 2792 if err := s.Filter.Validate(); err != nil { 2793 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 2794 } 2795 } 2796 2797 if invalidParams.Len() > 0 { 2798 return invalidParams 2799 } 2800 return nil 2801 } 2802 2803 // SetFilter sets the Filter field's value. 2804 func (s *DescribeEventTypesInput) SetFilter(v *EventTypeFilter) *DescribeEventTypesInput { 2805 s.Filter = v 2806 return s 2807 } 2808 2809 // SetLocale sets the Locale field's value. 2810 func (s *DescribeEventTypesInput) SetLocale(v string) *DescribeEventTypesInput { 2811 s.Locale = &v 2812 return s 2813 } 2814 2815 // SetMaxResults sets the MaxResults field's value. 2816 func (s *DescribeEventTypesInput) SetMaxResults(v int64) *DescribeEventTypesInput { 2817 s.MaxResults = &v 2818 return s 2819 } 2820 2821 // SetNextToken sets the NextToken field's value. 2822 func (s *DescribeEventTypesInput) SetNextToken(v string) *DescribeEventTypesInput { 2823 s.NextToken = &v 2824 return s 2825 } 2826 2827 type DescribeEventTypesOutput struct { 2828 _ struct{} `type:"structure"` 2829 2830 // A list of event types that match the filter criteria. Event types have a 2831 // category (issue, accountNotification, or scheduledChange), a service (for 2832 // example, EC2, RDS, DATAPIPELINE, BILLING), and a code (in the format AWS_SERVICE_DESCRIPTION 2833 // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). 2834 EventTypes []*EventType `locationName:"eventTypes" type:"list"` 2835 2836 // If the results of a search are large, only a portion of the results are returned, 2837 // and a nextToken pagination token is returned in the response. To retrieve 2838 // the next batch of results, reissue the search request and include the returned 2839 // token. When all results have been returned, the response does not contain 2840 // a pagination token value. 2841 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2842 } 2843 2844 // String returns the string representation. 2845 // 2846 // API parameter values that are decorated as "sensitive" in the API will not 2847 // be included in the string output. The member name will be present, but the 2848 // value will be replaced with "sensitive". 2849 func (s DescribeEventTypesOutput) String() string { 2850 return awsutil.Prettify(s) 2851 } 2852 2853 // GoString returns the string representation. 2854 // 2855 // API parameter values that are decorated as "sensitive" in the API will not 2856 // be included in the string output. The member name will be present, but the 2857 // value will be replaced with "sensitive". 2858 func (s DescribeEventTypesOutput) GoString() string { 2859 return s.String() 2860 } 2861 2862 // SetEventTypes sets the EventTypes field's value. 2863 func (s *DescribeEventTypesOutput) SetEventTypes(v []*EventType) *DescribeEventTypesOutput { 2864 s.EventTypes = v 2865 return s 2866 } 2867 2868 // SetNextToken sets the NextToken field's value. 2869 func (s *DescribeEventTypesOutput) SetNextToken(v string) *DescribeEventTypesOutput { 2870 s.NextToken = &v 2871 return s 2872 } 2873 2874 type DescribeEventsForOrganizationInput struct { 2875 _ struct{} `type:"structure"` 2876 2877 // Values to narrow the results returned. 2878 Filter *OrganizationEventFilter `locationName:"filter" type:"structure"` 2879 2880 // The locale (language) to return information in. English (en) is the default 2881 // and the only supported value at this time. 2882 Locale *string `locationName:"locale" min:"2" type:"string"` 2883 2884 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 2885 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 2886 2887 // If the results of a search are large, only a portion of the results are returned, 2888 // and a nextToken pagination token is returned in the response. To retrieve 2889 // the next batch of results, reissue the search request and include the returned 2890 // token. When all results have been returned, the response does not contain 2891 // a pagination token value. 2892 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2893 } 2894 2895 // String returns the string representation. 2896 // 2897 // API parameter values that are decorated as "sensitive" in the API will not 2898 // be included in the string output. The member name will be present, but the 2899 // value will be replaced with "sensitive". 2900 func (s DescribeEventsForOrganizationInput) String() string { 2901 return awsutil.Prettify(s) 2902 } 2903 2904 // GoString returns the string representation. 2905 // 2906 // API parameter values that are decorated as "sensitive" in the API will not 2907 // be included in the string output. The member name will be present, but the 2908 // value will be replaced with "sensitive". 2909 func (s DescribeEventsForOrganizationInput) GoString() string { 2910 return s.String() 2911 } 2912 2913 // Validate inspects the fields of the type to determine if they are valid. 2914 func (s *DescribeEventsForOrganizationInput) Validate() error { 2915 invalidParams := request.ErrInvalidParams{Context: "DescribeEventsForOrganizationInput"} 2916 if s.Locale != nil && len(*s.Locale) < 2 { 2917 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 2918 } 2919 if s.MaxResults != nil && *s.MaxResults < 1 { 2920 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2921 } 2922 if s.NextToken != nil && len(*s.NextToken) < 4 { 2923 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2924 } 2925 if s.Filter != nil { 2926 if err := s.Filter.Validate(); err != nil { 2927 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 2928 } 2929 } 2930 2931 if invalidParams.Len() > 0 { 2932 return invalidParams 2933 } 2934 return nil 2935 } 2936 2937 // SetFilter sets the Filter field's value. 2938 func (s *DescribeEventsForOrganizationInput) SetFilter(v *OrganizationEventFilter) *DescribeEventsForOrganizationInput { 2939 s.Filter = v 2940 return s 2941 } 2942 2943 // SetLocale sets the Locale field's value. 2944 func (s *DescribeEventsForOrganizationInput) SetLocale(v string) *DescribeEventsForOrganizationInput { 2945 s.Locale = &v 2946 return s 2947 } 2948 2949 // SetMaxResults sets the MaxResults field's value. 2950 func (s *DescribeEventsForOrganizationInput) SetMaxResults(v int64) *DescribeEventsForOrganizationInput { 2951 s.MaxResults = &v 2952 return s 2953 } 2954 2955 // SetNextToken sets the NextToken field's value. 2956 func (s *DescribeEventsForOrganizationInput) SetNextToken(v string) *DescribeEventsForOrganizationInput { 2957 s.NextToken = &v 2958 return s 2959 } 2960 2961 type DescribeEventsForOrganizationOutput struct { 2962 _ struct{} `type:"structure"` 2963 2964 // The events that match the specified filter criteria. 2965 Events []*OrganizationEvent `locationName:"events" type:"list"` 2966 2967 // If the results of a search are large, only a portion of the results are returned, 2968 // and a nextToken pagination token is returned in the response. To retrieve 2969 // the next batch of results, reissue the search request and include the returned 2970 // token. When all results have been returned, the response does not contain 2971 // a pagination token value. 2972 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 2973 } 2974 2975 // String returns the string representation. 2976 // 2977 // API parameter values that are decorated as "sensitive" in the API will not 2978 // be included in the string output. The member name will be present, but the 2979 // value will be replaced with "sensitive". 2980 func (s DescribeEventsForOrganizationOutput) String() string { 2981 return awsutil.Prettify(s) 2982 } 2983 2984 // GoString returns the string representation. 2985 // 2986 // API parameter values that are decorated as "sensitive" in the API will not 2987 // be included in the string output. The member name will be present, but the 2988 // value will be replaced with "sensitive". 2989 func (s DescribeEventsForOrganizationOutput) GoString() string { 2990 return s.String() 2991 } 2992 2993 // SetEvents sets the Events field's value. 2994 func (s *DescribeEventsForOrganizationOutput) SetEvents(v []*OrganizationEvent) *DescribeEventsForOrganizationOutput { 2995 s.Events = v 2996 return s 2997 } 2998 2999 // SetNextToken sets the NextToken field's value. 3000 func (s *DescribeEventsForOrganizationOutput) SetNextToken(v string) *DescribeEventsForOrganizationOutput { 3001 s.NextToken = &v 3002 return s 3003 } 3004 3005 type DescribeEventsInput struct { 3006 _ struct{} `type:"structure"` 3007 3008 // Values to narrow the results returned. 3009 Filter *EventFilter `locationName:"filter" type:"structure"` 3010 3011 // The locale (language) to return information in. English (en) is the default 3012 // and the only supported value at this time. 3013 Locale *string `locationName:"locale" min:"2" type:"string"` 3014 3015 // The maximum number of items to return in one batch, between 10 and 100, inclusive. 3016 MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` 3017 3018 // If the results of a search are large, only a portion of the results are returned, 3019 // and a nextToken pagination token is returned in the response. To retrieve 3020 // the next batch of results, reissue the search request and include the returned 3021 // token. When all results have been returned, the response does not contain 3022 // a pagination token value. 3023 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 3024 } 3025 3026 // String returns the string representation. 3027 // 3028 // API parameter values that are decorated as "sensitive" in the API will not 3029 // be included in the string output. The member name will be present, but the 3030 // value will be replaced with "sensitive". 3031 func (s DescribeEventsInput) String() string { 3032 return awsutil.Prettify(s) 3033 } 3034 3035 // GoString returns the string representation. 3036 // 3037 // API parameter values that are decorated as "sensitive" in the API will not 3038 // be included in the string output. The member name will be present, but the 3039 // value will be replaced with "sensitive". 3040 func (s DescribeEventsInput) GoString() string { 3041 return s.String() 3042 } 3043 3044 // Validate inspects the fields of the type to determine if they are valid. 3045 func (s *DescribeEventsInput) Validate() error { 3046 invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} 3047 if s.Locale != nil && len(*s.Locale) < 2 { 3048 invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) 3049 } 3050 if s.MaxResults != nil && *s.MaxResults < 10 { 3051 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) 3052 } 3053 if s.NextToken != nil && len(*s.NextToken) < 4 { 3054 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 3055 } 3056 if s.Filter != nil { 3057 if err := s.Filter.Validate(); err != nil { 3058 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3059 } 3060 } 3061 3062 if invalidParams.Len() > 0 { 3063 return invalidParams 3064 } 3065 return nil 3066 } 3067 3068 // SetFilter sets the Filter field's value. 3069 func (s *DescribeEventsInput) SetFilter(v *EventFilter) *DescribeEventsInput { 3070 s.Filter = v 3071 return s 3072 } 3073 3074 // SetLocale sets the Locale field's value. 3075 func (s *DescribeEventsInput) SetLocale(v string) *DescribeEventsInput { 3076 s.Locale = &v 3077 return s 3078 } 3079 3080 // SetMaxResults sets the MaxResults field's value. 3081 func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { 3082 s.MaxResults = &v 3083 return s 3084 } 3085 3086 // SetNextToken sets the NextToken field's value. 3087 func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { 3088 s.NextToken = &v 3089 return s 3090 } 3091 3092 type DescribeEventsOutput struct { 3093 _ struct{} `type:"structure"` 3094 3095 // The events that match the specified filter criteria. 3096 Events []*Event `locationName:"events" type:"list"` 3097 3098 // If the results of a search are large, only a portion of the results are returned, 3099 // and a nextToken pagination token is returned in the response. To retrieve 3100 // the next batch of results, reissue the search request and include the returned 3101 // token. When all results have been returned, the response does not contain 3102 // a pagination token value. 3103 NextToken *string `locationName:"nextToken" min:"4" type:"string"` 3104 } 3105 3106 // String returns the string representation. 3107 // 3108 // API parameter values that are decorated as "sensitive" in the API will not 3109 // be included in the string output. The member name will be present, but the 3110 // value will be replaced with "sensitive". 3111 func (s DescribeEventsOutput) String() string { 3112 return awsutil.Prettify(s) 3113 } 3114 3115 // GoString returns the string representation. 3116 // 3117 // API parameter values that are decorated as "sensitive" in the API will not 3118 // be included in the string output. The member name will be present, but the 3119 // value will be replaced with "sensitive". 3120 func (s DescribeEventsOutput) GoString() string { 3121 return s.String() 3122 } 3123 3124 // SetEvents sets the Events field's value. 3125 func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { 3126 s.Events = v 3127 return s 3128 } 3129 3130 // SetNextToken sets the NextToken field's value. 3131 func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { 3132 s.NextToken = &v 3133 return s 3134 } 3135 3136 type DescribeHealthServiceStatusForOrganizationInput struct { 3137 _ struct{} `type:"structure"` 3138 } 3139 3140 // String returns the string representation. 3141 // 3142 // API parameter values that are decorated as "sensitive" in the API will not 3143 // be included in the string output. The member name will be present, but the 3144 // value will be replaced with "sensitive". 3145 func (s DescribeHealthServiceStatusForOrganizationInput) String() string { 3146 return awsutil.Prettify(s) 3147 } 3148 3149 // GoString returns the string representation. 3150 // 3151 // API parameter values that are decorated as "sensitive" in the API will not 3152 // be included in the string output. The member name will be present, but the 3153 // value will be replaced with "sensitive". 3154 func (s DescribeHealthServiceStatusForOrganizationInput) GoString() string { 3155 return s.String() 3156 } 3157 3158 type DescribeHealthServiceStatusForOrganizationOutput struct { 3159 _ struct{} `type:"structure"` 3160 3161 // Information about the status of enabling or disabling AWS Health Organizational 3162 // View in your organization. 3163 // 3164 // Valid values are ENABLED | DISABLED | PENDING. 3165 HealthServiceAccessStatusForOrganization *string `locationName:"healthServiceAccessStatusForOrganization" type:"string"` 3166 } 3167 3168 // String returns the string representation. 3169 // 3170 // API parameter values that are decorated as "sensitive" in the API will not 3171 // be included in the string output. The member name will be present, but the 3172 // value will be replaced with "sensitive". 3173 func (s DescribeHealthServiceStatusForOrganizationOutput) String() string { 3174 return awsutil.Prettify(s) 3175 } 3176 3177 // GoString returns the string representation. 3178 // 3179 // API parameter values that are decorated as "sensitive" in the API will not 3180 // be included in the string output. The member name will be present, but the 3181 // value will be replaced with "sensitive". 3182 func (s DescribeHealthServiceStatusForOrganizationOutput) GoString() string { 3183 return s.String() 3184 } 3185 3186 // SetHealthServiceAccessStatusForOrganization sets the HealthServiceAccessStatusForOrganization field's value. 3187 func (s *DescribeHealthServiceStatusForOrganizationOutput) SetHealthServiceAccessStatusForOrganization(v string) *DescribeHealthServiceStatusForOrganizationOutput { 3188 s.HealthServiceAccessStatusForOrganization = &v 3189 return s 3190 } 3191 3192 type DisableHealthServiceAccessForOrganizationInput struct { 3193 _ struct{} `type:"structure"` 3194 } 3195 3196 // String returns the string representation. 3197 // 3198 // API parameter values that are decorated as "sensitive" in the API will not 3199 // be included in the string output. The member name will be present, but the 3200 // value will be replaced with "sensitive". 3201 func (s DisableHealthServiceAccessForOrganizationInput) String() string { 3202 return awsutil.Prettify(s) 3203 } 3204 3205 // GoString returns the string representation. 3206 // 3207 // API parameter values that are decorated as "sensitive" in the API will not 3208 // be included in the string output. The member name will be present, but the 3209 // value will be replaced with "sensitive". 3210 func (s DisableHealthServiceAccessForOrganizationInput) GoString() string { 3211 return s.String() 3212 } 3213 3214 type DisableHealthServiceAccessForOrganizationOutput struct { 3215 _ struct{} `type:"structure"` 3216 } 3217 3218 // String returns the string representation. 3219 // 3220 // API parameter values that are decorated as "sensitive" in the API will not 3221 // be included in the string output. The member name will be present, but the 3222 // value will be replaced with "sensitive". 3223 func (s DisableHealthServiceAccessForOrganizationOutput) String() string { 3224 return awsutil.Prettify(s) 3225 } 3226 3227 // GoString returns the string representation. 3228 // 3229 // API parameter values that are decorated as "sensitive" in the API will not 3230 // be included in the string output. The member name will be present, but the 3231 // value will be replaced with "sensitive". 3232 func (s DisableHealthServiceAccessForOrganizationOutput) GoString() string { 3233 return s.String() 3234 } 3235 3236 type EnableHealthServiceAccessForOrganizationInput struct { 3237 _ struct{} `type:"structure"` 3238 } 3239 3240 // String returns the string representation. 3241 // 3242 // API parameter values that are decorated as "sensitive" in the API will not 3243 // be included in the string output. The member name will be present, but the 3244 // value will be replaced with "sensitive". 3245 func (s EnableHealthServiceAccessForOrganizationInput) String() string { 3246 return awsutil.Prettify(s) 3247 } 3248 3249 // GoString returns the string representation. 3250 // 3251 // API parameter values that are decorated as "sensitive" in the API will not 3252 // be included in the string output. The member name will be present, but the 3253 // value will be replaced with "sensitive". 3254 func (s EnableHealthServiceAccessForOrganizationInput) GoString() string { 3255 return s.String() 3256 } 3257 3258 type EnableHealthServiceAccessForOrganizationOutput struct { 3259 _ struct{} `type:"structure"` 3260 } 3261 3262 // String returns the string representation. 3263 // 3264 // API parameter values that are decorated as "sensitive" in the API will not 3265 // be included in the string output. The member name will be present, but the 3266 // value will be replaced with "sensitive". 3267 func (s EnableHealthServiceAccessForOrganizationOutput) String() string { 3268 return awsutil.Prettify(s) 3269 } 3270 3271 // GoString returns the string representation. 3272 // 3273 // API parameter values that are decorated as "sensitive" in the API will not 3274 // be included in the string output. The member name will be present, but the 3275 // value will be replaced with "sensitive". 3276 func (s EnableHealthServiceAccessForOrganizationOutput) GoString() string { 3277 return s.String() 3278 } 3279 3280 // The number of entities that are affected by one or more events. Returned 3281 // by the DescribeEntityAggregates (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEntityAggregates.html) 3282 // operation. 3283 type EntityAggregate struct { 3284 _ struct{} `type:"structure"` 3285 3286 // The number of entities that match the criteria for the specified events. 3287 Count *int64 `locationName:"count" type:"integer"` 3288 3289 // 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 3290 // format. 3291 // 3292 // For example, an event ARN might look like the following: 3293 // 3294 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 3295 EventArn *string `locationName:"eventArn" type:"string"` 3296 } 3297 3298 // String returns the string representation. 3299 // 3300 // API parameter values that are decorated as "sensitive" in the API will not 3301 // be included in the string output. The member name will be present, but the 3302 // value will be replaced with "sensitive". 3303 func (s EntityAggregate) String() string { 3304 return awsutil.Prettify(s) 3305 } 3306 3307 // GoString returns the string representation. 3308 // 3309 // API parameter values that are decorated as "sensitive" in the API will not 3310 // be included in the string output. The member name will be present, but the 3311 // value will be replaced with "sensitive". 3312 func (s EntityAggregate) GoString() string { 3313 return s.String() 3314 } 3315 3316 // SetCount sets the Count field's value. 3317 func (s *EntityAggregate) SetCount(v int64) *EntityAggregate { 3318 s.Count = &v 3319 return s 3320 } 3321 3322 // SetEventArn sets the EventArn field's value. 3323 func (s *EntityAggregate) SetEventArn(v string) *EntityAggregate { 3324 s.EventArn = &v 3325 return s 3326 } 3327 3328 // The values to use to filter results from the EntityFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EntityFilter.html) 3329 // operation. 3330 type EntityFilter struct { 3331 _ struct{} `type:"structure"` 3332 3333 // A list of entity ARNs (unique identifiers). 3334 EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` 3335 3336 // A list of IDs for affected entities. 3337 EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` 3338 3339 // 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", 3340 // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" 3341 // 3342 // EventArns is a required field 3343 EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` 3344 3345 // A list of the most recent dates and times that the entity was updated. 3346 LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` 3347 3348 // A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN). 3349 StatusCodes []*string `locationName:"statusCodes" min:"1" type:"list"` 3350 3351 // A map of entity tags attached to the affected entity. 3352 // 3353 // Currently, the tags property isn't supported. 3354 Tags []map[string]*string `locationName:"tags" type:"list"` 3355 } 3356 3357 // String returns the string representation. 3358 // 3359 // API parameter values that are decorated as "sensitive" in the API will not 3360 // be included in the string output. The member name will be present, but the 3361 // value will be replaced with "sensitive". 3362 func (s EntityFilter) String() string { 3363 return awsutil.Prettify(s) 3364 } 3365 3366 // GoString returns the string representation. 3367 // 3368 // API parameter values that are decorated as "sensitive" in the API will not 3369 // be included in the string output. The member name will be present, but the 3370 // value will be replaced with "sensitive". 3371 func (s EntityFilter) GoString() string { 3372 return s.String() 3373 } 3374 3375 // Validate inspects the fields of the type to determine if they are valid. 3376 func (s *EntityFilter) Validate() error { 3377 invalidParams := request.ErrInvalidParams{Context: "EntityFilter"} 3378 if s.EntityArns != nil && len(s.EntityArns) < 1 { 3379 invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) 3380 } 3381 if s.EntityValues != nil && len(s.EntityValues) < 1 { 3382 invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) 3383 } 3384 if s.EventArns == nil { 3385 invalidParams.Add(request.NewErrParamRequired("EventArns")) 3386 } 3387 if s.EventArns != nil && len(s.EventArns) < 1 { 3388 invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) 3389 } 3390 if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { 3391 invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) 3392 } 3393 if s.StatusCodes != nil && len(s.StatusCodes) < 1 { 3394 invalidParams.Add(request.NewErrParamMinLen("StatusCodes", 1)) 3395 } 3396 3397 if invalidParams.Len() > 0 { 3398 return invalidParams 3399 } 3400 return nil 3401 } 3402 3403 // SetEntityArns sets the EntityArns field's value. 3404 func (s *EntityFilter) SetEntityArns(v []*string) *EntityFilter { 3405 s.EntityArns = v 3406 return s 3407 } 3408 3409 // SetEntityValues sets the EntityValues field's value. 3410 func (s *EntityFilter) SetEntityValues(v []*string) *EntityFilter { 3411 s.EntityValues = v 3412 return s 3413 } 3414 3415 // SetEventArns sets the EventArns field's value. 3416 func (s *EntityFilter) SetEventArns(v []*string) *EntityFilter { 3417 s.EventArns = v 3418 return s 3419 } 3420 3421 // SetLastUpdatedTimes sets the LastUpdatedTimes field's value. 3422 func (s *EntityFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EntityFilter { 3423 s.LastUpdatedTimes = v 3424 return s 3425 } 3426 3427 // SetStatusCodes sets the StatusCodes field's value. 3428 func (s *EntityFilter) SetStatusCodes(v []*string) *EntityFilter { 3429 s.StatusCodes = v 3430 return s 3431 } 3432 3433 // SetTags sets the Tags field's value. 3434 func (s *EntityFilter) SetTags(v []map[string]*string) *EntityFilter { 3435 s.Tags = v 3436 return s 3437 } 3438 3439 // Summary information about an AWS Health event. 3440 // 3441 // AWS Health events can be public or account-specific: 3442 // 3443 // * Public events might be service events that are not specific to an AWS 3444 // account. For example, if there is an issue with an AWS Region, AWS Health 3445 // provides information about the event, even if you don't use services or 3446 // resources in that Region. 3447 // 3448 // * Account-specific events are specific to either your AWS account or an 3449 // account in your organization. For example, if there's an issue with Amazon 3450 // Elastic Compute Cloud in a Region that you use, AWS Health provides information 3451 // about the event and the affected resources in the account. 3452 // 3453 // You can determine if an event is public or account-specific by using the 3454 // eventScopeCode parameter. For more information, see eventScopeCode (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html#AWSHealth-Type-Event-eventScopeCode). 3455 type Event struct { 3456 _ struct{} `type:"structure"` 3457 3458 // 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 3459 // format. 3460 // 3461 // For example, an event ARN might look like the following: 3462 // 3463 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 3464 Arn *string `locationName:"arn" type:"string"` 3465 3466 // The AWS Availability Zone of the event. For example, us-east-1a. 3467 AvailabilityZone *string `locationName:"availabilityZone" min:"6" type:"string"` 3468 3469 // The date and time that the event ended. 3470 EndTime *time.Time `locationName:"endTime" type:"timestamp"` 3471 3472 // This parameter specifies if the AWS Health event is a public AWS service 3473 // event or an account-specific event. 3474 // 3475 // * If the eventScopeCode value is PUBLIC, then the affectedAccounts value 3476 // is always empty. 3477 // 3478 // * If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts 3479 // value lists the affected AWS accounts in your organization. For example, 3480 // if an event affects a service such as Amazon Elastic Compute Cloud and 3481 // you have AWS accounts that use that service, those account IDs appear 3482 // in the response. 3483 // 3484 // * If the eventScopeCode value is NONE, then the eventArn that you specified 3485 // in the request is invalid or doesn't exist. 3486 EventScopeCode *string `locationName:"eventScopeCode" type:"string" enum:"EventScopeCode"` 3487 3488 // The category of the event. Possible values are issue, scheduledChange, and 3489 // accountNotification. 3490 EventTypeCategory *string `locationName:"eventTypeCategory" min:"3" type:"string" enum:"EventTypeCategory"` 3491 3492 // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION 3493 // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. 3494 EventTypeCode *string `locationName:"eventTypeCode" min:"3" type:"string"` 3495 3496 // The most recent date and time that the event was updated. 3497 LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` 3498 3499 // The AWS Region name of the event. 3500 Region *string `locationName:"region" min:"2" type:"string"` 3501 3502 // The AWS service that is affected by the event. For example, EC2, RDS. 3503 Service *string `locationName:"service" min:"2" type:"string"` 3504 3505 // The date and time that the event began. 3506 StartTime *time.Time `locationName:"startTime" type:"timestamp"` 3507 3508 // The most recent status of the event. Possible values are open, closed, and 3509 // upcoming. 3510 StatusCode *string `locationName:"statusCode" type:"string" enum:"EventStatusCode"` 3511 } 3512 3513 // String returns the string representation. 3514 // 3515 // API parameter values that are decorated as "sensitive" in the API will not 3516 // be included in the string output. The member name will be present, but the 3517 // value will be replaced with "sensitive". 3518 func (s Event) String() string { 3519 return awsutil.Prettify(s) 3520 } 3521 3522 // GoString returns the string representation. 3523 // 3524 // API parameter values that are decorated as "sensitive" in the API will not 3525 // be included in the string output. The member name will be present, but the 3526 // value will be replaced with "sensitive". 3527 func (s Event) GoString() string { 3528 return s.String() 3529 } 3530 3531 // SetArn sets the Arn field's value. 3532 func (s *Event) SetArn(v string) *Event { 3533 s.Arn = &v 3534 return s 3535 } 3536 3537 // SetAvailabilityZone sets the AvailabilityZone field's value. 3538 func (s *Event) SetAvailabilityZone(v string) *Event { 3539 s.AvailabilityZone = &v 3540 return s 3541 } 3542 3543 // SetEndTime sets the EndTime field's value. 3544 func (s *Event) SetEndTime(v time.Time) *Event { 3545 s.EndTime = &v 3546 return s 3547 } 3548 3549 // SetEventScopeCode sets the EventScopeCode field's value. 3550 func (s *Event) SetEventScopeCode(v string) *Event { 3551 s.EventScopeCode = &v 3552 return s 3553 } 3554 3555 // SetEventTypeCategory sets the EventTypeCategory field's value. 3556 func (s *Event) SetEventTypeCategory(v string) *Event { 3557 s.EventTypeCategory = &v 3558 return s 3559 } 3560 3561 // SetEventTypeCode sets the EventTypeCode field's value. 3562 func (s *Event) SetEventTypeCode(v string) *Event { 3563 s.EventTypeCode = &v 3564 return s 3565 } 3566 3567 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 3568 func (s *Event) SetLastUpdatedTime(v time.Time) *Event { 3569 s.LastUpdatedTime = &v 3570 return s 3571 } 3572 3573 // SetRegion sets the Region field's value. 3574 func (s *Event) SetRegion(v string) *Event { 3575 s.Region = &v 3576 return s 3577 } 3578 3579 // SetService sets the Service field's value. 3580 func (s *Event) SetService(v string) *Event { 3581 s.Service = &v 3582 return s 3583 } 3584 3585 // SetStartTime sets the StartTime field's value. 3586 func (s *Event) SetStartTime(v time.Time) *Event { 3587 s.StartTime = &v 3588 return s 3589 } 3590 3591 // SetStatusCode sets the StatusCode field's value. 3592 func (s *Event) SetStatusCode(v string) *Event { 3593 s.StatusCode = &v 3594 return s 3595 } 3596 3597 // The values used to filter results from the DescribeEventDetailsForOrganization 3598 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html) 3599 // and DescribeAffectedEntitiesForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntitiesForOrganization.html) 3600 // operations. 3601 type EventAccountFilter struct { 3602 _ struct{} `type:"structure"` 3603 3604 // The 12-digit AWS account numbers that contains the affected entities. 3605 AwsAccountId *string `locationName:"awsAccountId" type:"string"` 3606 3607 // 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 3608 // format. 3609 // 3610 // For example, an event ARN might look like the following: 3611 // 3612 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 3613 // 3614 // EventArn is a required field 3615 EventArn *string `locationName:"eventArn" type:"string" required:"true"` 3616 } 3617 3618 // String returns the string representation. 3619 // 3620 // API parameter values that are decorated as "sensitive" in the API will not 3621 // be included in the string output. The member name will be present, but the 3622 // value will be replaced with "sensitive". 3623 func (s EventAccountFilter) String() string { 3624 return awsutil.Prettify(s) 3625 } 3626 3627 // GoString returns the string representation. 3628 // 3629 // API parameter values that are decorated as "sensitive" in the API will not 3630 // be included in the string output. The member name will be present, but the 3631 // value will be replaced with "sensitive". 3632 func (s EventAccountFilter) GoString() string { 3633 return s.String() 3634 } 3635 3636 // Validate inspects the fields of the type to determine if they are valid. 3637 func (s *EventAccountFilter) Validate() error { 3638 invalidParams := request.ErrInvalidParams{Context: "EventAccountFilter"} 3639 if s.EventArn == nil { 3640 invalidParams.Add(request.NewErrParamRequired("EventArn")) 3641 } 3642 3643 if invalidParams.Len() > 0 { 3644 return invalidParams 3645 } 3646 return nil 3647 } 3648 3649 // SetAwsAccountId sets the AwsAccountId field's value. 3650 func (s *EventAccountFilter) SetAwsAccountId(v string) *EventAccountFilter { 3651 s.AwsAccountId = &v 3652 return s 3653 } 3654 3655 // SetEventArn sets the EventArn field's value. 3656 func (s *EventAccountFilter) SetEventArn(v string) *EventAccountFilter { 3657 s.EventArn = &v 3658 return s 3659 } 3660 3661 // The number of events of each issue type. Returned by the DescribeEventAggregates 3662 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventAggregates.html) 3663 // operation. 3664 type EventAggregate struct { 3665 _ struct{} `type:"structure"` 3666 3667 // The issue type for the associated count. 3668 AggregateValue *string `locationName:"aggregateValue" type:"string"` 3669 3670 // The number of events of the associated issue type. 3671 Count *int64 `locationName:"count" type:"integer"` 3672 } 3673 3674 // String returns the string representation. 3675 // 3676 // API parameter values that are decorated as "sensitive" in the API will not 3677 // be included in the string output. The member name will be present, but the 3678 // value will be replaced with "sensitive". 3679 func (s EventAggregate) String() string { 3680 return awsutil.Prettify(s) 3681 } 3682 3683 // GoString returns the string representation. 3684 // 3685 // API parameter values that are decorated as "sensitive" in the API will not 3686 // be included in the string output. The member name will be present, but the 3687 // value will be replaced with "sensitive". 3688 func (s EventAggregate) GoString() string { 3689 return s.String() 3690 } 3691 3692 // SetAggregateValue sets the AggregateValue field's value. 3693 func (s *EventAggregate) SetAggregateValue(v string) *EventAggregate { 3694 s.AggregateValue = &v 3695 return s 3696 } 3697 3698 // SetCount sets the Count field's value. 3699 func (s *EventAggregate) SetCount(v int64) *EventAggregate { 3700 s.Count = &v 3701 return s 3702 } 3703 3704 // The detailed description of the event. Included in the information returned 3705 // by the DescribeEventDetails (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html) 3706 // operation. 3707 type EventDescription struct { 3708 _ struct{} `type:"structure"` 3709 3710 // The most recent description of the event. 3711 LatestDescription *string `locationName:"latestDescription" type:"string"` 3712 } 3713 3714 // String returns the string representation. 3715 // 3716 // API parameter values that are decorated as "sensitive" in the API will not 3717 // be included in the string output. The member name will be present, but the 3718 // value will be replaced with "sensitive". 3719 func (s EventDescription) String() string { 3720 return awsutil.Prettify(s) 3721 } 3722 3723 // GoString returns the string representation. 3724 // 3725 // API parameter values that are decorated as "sensitive" in the API will not 3726 // be included in the string output. The member name will be present, but the 3727 // value will be replaced with "sensitive". 3728 func (s EventDescription) GoString() string { 3729 return s.String() 3730 } 3731 3732 // SetLatestDescription sets the LatestDescription field's value. 3733 func (s *EventDescription) SetLatestDescription(v string) *EventDescription { 3734 s.LatestDescription = &v 3735 return s 3736 } 3737 3738 // Detailed information about an event. A combination of an Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html) 3739 // object, an EventDescription (https://docs.aws.amazon.com/health/latest/APIReference/API_EventDescription.html) 3740 // object, and additional metadata about the event. Returned by the DescribeEventDetails 3741 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html) 3742 // operation. 3743 type EventDetails struct { 3744 _ struct{} `type:"structure"` 3745 3746 // Summary information about the event. 3747 Event *Event `locationName:"event" type:"structure"` 3748 3749 // The most recent description of the event. 3750 EventDescription *EventDescription `locationName:"eventDescription" type:"structure"` 3751 3752 // Additional metadata about the event. 3753 EventMetadata map[string]*string `locationName:"eventMetadata" type:"map"` 3754 } 3755 3756 // String returns the string representation. 3757 // 3758 // API parameter values that are decorated as "sensitive" in the API will not 3759 // be included in the string output. The member name will be present, but the 3760 // value will be replaced with "sensitive". 3761 func (s EventDetails) String() string { 3762 return awsutil.Prettify(s) 3763 } 3764 3765 // GoString returns the string representation. 3766 // 3767 // API parameter values that are decorated as "sensitive" in the API will not 3768 // be included in the string output. The member name will be present, but the 3769 // value will be replaced with "sensitive". 3770 func (s EventDetails) GoString() string { 3771 return s.String() 3772 } 3773 3774 // SetEvent sets the Event field's value. 3775 func (s *EventDetails) SetEvent(v *Event) *EventDetails { 3776 s.Event = v 3777 return s 3778 } 3779 3780 // SetEventDescription sets the EventDescription field's value. 3781 func (s *EventDetails) SetEventDescription(v *EventDescription) *EventDetails { 3782 s.EventDescription = v 3783 return s 3784 } 3785 3786 // SetEventMetadata sets the EventMetadata field's value. 3787 func (s *EventDetails) SetEventMetadata(v map[string]*string) *EventDetails { 3788 s.EventMetadata = v 3789 return s 3790 } 3791 3792 // Error information returned when a DescribeEventDetails (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html) 3793 // operation can't find a specified event. 3794 type EventDetailsErrorItem struct { 3795 _ struct{} `type:"structure"` 3796 3797 // A message that describes the error. 3798 ErrorMessage *string `locationName:"errorMessage" type:"string"` 3799 3800 // The name of the error. 3801 ErrorName *string `locationName:"errorName" type:"string"` 3802 3803 // 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 3804 // format. 3805 // 3806 // For example, an event ARN might look like the following: 3807 // 3808 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 3809 EventArn *string `locationName:"eventArn" type:"string"` 3810 } 3811 3812 // String returns the string representation. 3813 // 3814 // API parameter values that are decorated as "sensitive" in the API will not 3815 // be included in the string output. The member name will be present, but the 3816 // value will be replaced with "sensitive". 3817 func (s EventDetailsErrorItem) String() string { 3818 return awsutil.Prettify(s) 3819 } 3820 3821 // GoString returns the string representation. 3822 // 3823 // API parameter values that are decorated as "sensitive" in the API will not 3824 // be included in the string output. The member name will be present, but the 3825 // value will be replaced with "sensitive". 3826 func (s EventDetailsErrorItem) GoString() string { 3827 return s.String() 3828 } 3829 3830 // SetErrorMessage sets the ErrorMessage field's value. 3831 func (s *EventDetailsErrorItem) SetErrorMessage(v string) *EventDetailsErrorItem { 3832 s.ErrorMessage = &v 3833 return s 3834 } 3835 3836 // SetErrorName sets the ErrorName field's value. 3837 func (s *EventDetailsErrorItem) SetErrorName(v string) *EventDetailsErrorItem { 3838 s.ErrorName = &v 3839 return s 3840 } 3841 3842 // SetEventArn sets the EventArn field's value. 3843 func (s *EventDetailsErrorItem) SetEventArn(v string) *EventDetailsErrorItem { 3844 s.EventArn = &v 3845 return s 3846 } 3847 3848 // The values to use to filter results from the DescribeEvents (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEvents.html) 3849 // and DescribeEventAggregates (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventAggregates.html) 3850 // operations. 3851 type EventFilter struct { 3852 _ struct{} `type:"structure"` 3853 3854 // A list of AWS Availability Zones. 3855 AvailabilityZones []*string `locationName:"availabilityZones" type:"list"` 3856 3857 // A list of dates and times that the event ended. 3858 EndTimes []*DateTimeRange `locationName:"endTimes" min:"1" type:"list"` 3859 3860 // A list of entity ARNs (unique identifiers). 3861 EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` 3862 3863 // A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS 3864 // volumes (vol-426ab23e). 3865 EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` 3866 3867 // 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", 3868 // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" 3869 EventArns []*string `locationName:"eventArns" min:"1" type:"list"` 3870 3871 // A list of event status codes. 3872 EventStatusCodes []*string `locationName:"eventStatusCodes" min:"1" type:"list"` 3873 3874 // A list of event type category codes (issue, scheduledChange, or accountNotification). 3875 EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` 3876 3877 // A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED". 3878 EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` 3879 3880 // A list of dates and times that the event was last updated. 3881 LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` 3882 3883 // A list of AWS Regions. 3884 Regions []*string `locationName:"regions" min:"1" type:"list"` 3885 3886 // The AWS services associated with the event. For example, EC2, RDS. 3887 Services []*string `locationName:"services" min:"1" type:"list"` 3888 3889 // A list of dates and times that the event began. 3890 StartTimes []*DateTimeRange `locationName:"startTimes" min:"1" type:"list"` 3891 3892 // A map of entity tags attached to the affected entity. 3893 // 3894 // Currently, the tags property isn't supported. 3895 Tags []map[string]*string `locationName:"tags" type:"list"` 3896 } 3897 3898 // String returns the string representation. 3899 // 3900 // API parameter values that are decorated as "sensitive" in the API will not 3901 // be included in the string output. The member name will be present, but the 3902 // value will be replaced with "sensitive". 3903 func (s EventFilter) String() string { 3904 return awsutil.Prettify(s) 3905 } 3906 3907 // GoString returns the string representation. 3908 // 3909 // API parameter values that are decorated as "sensitive" in the API will not 3910 // be included in the string output. The member name will be present, but the 3911 // value will be replaced with "sensitive". 3912 func (s EventFilter) GoString() string { 3913 return s.String() 3914 } 3915 3916 // Validate inspects the fields of the type to determine if they are valid. 3917 func (s *EventFilter) Validate() error { 3918 invalidParams := request.ErrInvalidParams{Context: "EventFilter"} 3919 if s.EndTimes != nil && len(s.EndTimes) < 1 { 3920 invalidParams.Add(request.NewErrParamMinLen("EndTimes", 1)) 3921 } 3922 if s.EntityArns != nil && len(s.EntityArns) < 1 { 3923 invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) 3924 } 3925 if s.EntityValues != nil && len(s.EntityValues) < 1 { 3926 invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) 3927 } 3928 if s.EventArns != nil && len(s.EventArns) < 1 { 3929 invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) 3930 } 3931 if s.EventStatusCodes != nil && len(s.EventStatusCodes) < 1 { 3932 invalidParams.Add(request.NewErrParamMinLen("EventStatusCodes", 1)) 3933 } 3934 if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { 3935 invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) 3936 } 3937 if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { 3938 invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) 3939 } 3940 if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { 3941 invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) 3942 } 3943 if s.Regions != nil && len(s.Regions) < 1 { 3944 invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) 3945 } 3946 if s.Services != nil && len(s.Services) < 1 { 3947 invalidParams.Add(request.NewErrParamMinLen("Services", 1)) 3948 } 3949 if s.StartTimes != nil && len(s.StartTimes) < 1 { 3950 invalidParams.Add(request.NewErrParamMinLen("StartTimes", 1)) 3951 } 3952 3953 if invalidParams.Len() > 0 { 3954 return invalidParams 3955 } 3956 return nil 3957 } 3958 3959 // SetAvailabilityZones sets the AvailabilityZones field's value. 3960 func (s *EventFilter) SetAvailabilityZones(v []*string) *EventFilter { 3961 s.AvailabilityZones = v 3962 return s 3963 } 3964 3965 // SetEndTimes sets the EndTimes field's value. 3966 func (s *EventFilter) SetEndTimes(v []*DateTimeRange) *EventFilter { 3967 s.EndTimes = v 3968 return s 3969 } 3970 3971 // SetEntityArns sets the EntityArns field's value. 3972 func (s *EventFilter) SetEntityArns(v []*string) *EventFilter { 3973 s.EntityArns = v 3974 return s 3975 } 3976 3977 // SetEntityValues sets the EntityValues field's value. 3978 func (s *EventFilter) SetEntityValues(v []*string) *EventFilter { 3979 s.EntityValues = v 3980 return s 3981 } 3982 3983 // SetEventArns sets the EventArns field's value. 3984 func (s *EventFilter) SetEventArns(v []*string) *EventFilter { 3985 s.EventArns = v 3986 return s 3987 } 3988 3989 // SetEventStatusCodes sets the EventStatusCodes field's value. 3990 func (s *EventFilter) SetEventStatusCodes(v []*string) *EventFilter { 3991 s.EventStatusCodes = v 3992 return s 3993 } 3994 3995 // SetEventTypeCategories sets the EventTypeCategories field's value. 3996 func (s *EventFilter) SetEventTypeCategories(v []*string) *EventFilter { 3997 s.EventTypeCategories = v 3998 return s 3999 } 4000 4001 // SetEventTypeCodes sets the EventTypeCodes field's value. 4002 func (s *EventFilter) SetEventTypeCodes(v []*string) *EventFilter { 4003 s.EventTypeCodes = v 4004 return s 4005 } 4006 4007 // SetLastUpdatedTimes sets the LastUpdatedTimes field's value. 4008 func (s *EventFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EventFilter { 4009 s.LastUpdatedTimes = v 4010 return s 4011 } 4012 4013 // SetRegions sets the Regions field's value. 4014 func (s *EventFilter) SetRegions(v []*string) *EventFilter { 4015 s.Regions = v 4016 return s 4017 } 4018 4019 // SetServices sets the Services field's value. 4020 func (s *EventFilter) SetServices(v []*string) *EventFilter { 4021 s.Services = v 4022 return s 4023 } 4024 4025 // SetStartTimes sets the StartTimes field's value. 4026 func (s *EventFilter) SetStartTimes(v []*DateTimeRange) *EventFilter { 4027 s.StartTimes = v 4028 return s 4029 } 4030 4031 // SetTags sets the Tags field's value. 4032 func (s *EventFilter) SetTags(v []map[string]*string) *EventFilter { 4033 s.Tags = v 4034 return s 4035 } 4036 4037 // Contains the metadata about a type of event that is reported by AWS Health. 4038 // The EventType shows the category, service, and the event type code of the 4039 // event. For example, an issue might be the category, EC2 the service, and 4040 // AWS_EC2_SYSTEM_MAINTENANCE_EVENT the event type code. 4041 // 4042 // You can use the DescribeEventTypes (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventTypes.html) 4043 // API operation to return this information about an event. 4044 // 4045 // You can also use the Amazon CloudWatch Events console to create a rule so 4046 // that you can get notified or take action when AWS Health delivers a specific 4047 // event to your AWS account. For more information, see Monitor for AWS Health 4048 // events with Amazon CloudWatch Events (https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html) 4049 // in the AWS Health User Guide. 4050 type EventType struct { 4051 _ struct{} `type:"structure"` 4052 4053 // A list of event type category codes (issue, scheduledChange, or accountNotification). 4054 Category *string `locationName:"category" min:"3" type:"string" enum:"EventTypeCategory"` 4055 4056 // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION 4057 // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. 4058 Code *string `locationName:"code" min:"3" type:"string"` 4059 4060 // The AWS service that is affected by the event. For example, EC2, RDS. 4061 Service *string `locationName:"service" min:"2" type:"string"` 4062 } 4063 4064 // String returns the string representation. 4065 // 4066 // API parameter values that are decorated as "sensitive" in the API will not 4067 // be included in the string output. The member name will be present, but the 4068 // value will be replaced with "sensitive". 4069 func (s EventType) String() string { 4070 return awsutil.Prettify(s) 4071 } 4072 4073 // GoString returns the string representation. 4074 // 4075 // API parameter values that are decorated as "sensitive" in the API will not 4076 // be included in the string output. The member name will be present, but the 4077 // value will be replaced with "sensitive". 4078 func (s EventType) GoString() string { 4079 return s.String() 4080 } 4081 4082 // SetCategory sets the Category field's value. 4083 func (s *EventType) SetCategory(v string) *EventType { 4084 s.Category = &v 4085 return s 4086 } 4087 4088 // SetCode sets the Code field's value. 4089 func (s *EventType) SetCode(v string) *EventType { 4090 s.Code = &v 4091 return s 4092 } 4093 4094 // SetService sets the Service field's value. 4095 func (s *EventType) SetService(v string) *EventType { 4096 s.Service = &v 4097 return s 4098 } 4099 4100 // The values to use to filter results from the DescribeEventTypes (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventTypes.html) 4101 // operation. 4102 type EventTypeFilter struct { 4103 _ struct{} `type:"structure"` 4104 4105 // A list of event type category codes (issue, scheduledChange, or accountNotification). 4106 EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` 4107 4108 // A list of event type codes. 4109 EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` 4110 4111 // The AWS services associated with the event. For example, EC2, RDS. 4112 Services []*string `locationName:"services" min:"1" type:"list"` 4113 } 4114 4115 // String returns the string representation. 4116 // 4117 // API parameter values that are decorated as "sensitive" in the API will not 4118 // be included in the string output. The member name will be present, but the 4119 // value will be replaced with "sensitive". 4120 func (s EventTypeFilter) String() string { 4121 return awsutil.Prettify(s) 4122 } 4123 4124 // GoString returns the string representation. 4125 // 4126 // API parameter values that are decorated as "sensitive" in the API will not 4127 // be included in the string output. The member name will be present, but the 4128 // value will be replaced with "sensitive". 4129 func (s EventTypeFilter) GoString() string { 4130 return s.String() 4131 } 4132 4133 // Validate inspects the fields of the type to determine if they are valid. 4134 func (s *EventTypeFilter) Validate() error { 4135 invalidParams := request.ErrInvalidParams{Context: "EventTypeFilter"} 4136 if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { 4137 invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) 4138 } 4139 if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { 4140 invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) 4141 } 4142 if s.Services != nil && len(s.Services) < 1 { 4143 invalidParams.Add(request.NewErrParamMinLen("Services", 1)) 4144 } 4145 4146 if invalidParams.Len() > 0 { 4147 return invalidParams 4148 } 4149 return nil 4150 } 4151 4152 // SetEventTypeCategories sets the EventTypeCategories field's value. 4153 func (s *EventTypeFilter) SetEventTypeCategories(v []*string) *EventTypeFilter { 4154 s.EventTypeCategories = v 4155 return s 4156 } 4157 4158 // SetEventTypeCodes sets the EventTypeCodes field's value. 4159 func (s *EventTypeFilter) SetEventTypeCodes(v []*string) *EventTypeFilter { 4160 s.EventTypeCodes = v 4161 return s 4162 } 4163 4164 // SetServices sets the Services field's value. 4165 func (s *EventTypeFilter) SetServices(v []*string) *EventTypeFilter { 4166 s.Services = v 4167 return s 4168 } 4169 4170 // The specified pagination token (nextToken) is not valid. 4171 type InvalidPaginationToken struct { 4172 _ struct{} `type:"structure"` 4173 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4174 4175 Message_ *string `locationName:"message" type:"string"` 4176 } 4177 4178 // String returns the string representation. 4179 // 4180 // API parameter values that are decorated as "sensitive" in the API will not 4181 // be included in the string output. The member name will be present, but the 4182 // value will be replaced with "sensitive". 4183 func (s InvalidPaginationToken) String() string { 4184 return awsutil.Prettify(s) 4185 } 4186 4187 // GoString returns the string representation. 4188 // 4189 // API parameter values that are decorated as "sensitive" in the API will not 4190 // be included in the string output. The member name will be present, but the 4191 // value will be replaced with "sensitive". 4192 func (s InvalidPaginationToken) GoString() string { 4193 return s.String() 4194 } 4195 4196 func newErrorInvalidPaginationToken(v protocol.ResponseMetadata) error { 4197 return &InvalidPaginationToken{ 4198 RespMetadata: v, 4199 } 4200 } 4201 4202 // Code returns the exception type name. 4203 func (s *InvalidPaginationToken) Code() string { 4204 return "InvalidPaginationToken" 4205 } 4206 4207 // Message returns the exception's message. 4208 func (s *InvalidPaginationToken) Message() string { 4209 if s.Message_ != nil { 4210 return *s.Message_ 4211 } 4212 return "" 4213 } 4214 4215 // OrigErr always returns nil, satisfies awserr.Error interface. 4216 func (s *InvalidPaginationToken) OrigErr() error { 4217 return nil 4218 } 4219 4220 func (s *InvalidPaginationToken) Error() string { 4221 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4222 } 4223 4224 // Status code returns the HTTP status code for the request's response error. 4225 func (s *InvalidPaginationToken) StatusCode() int { 4226 return s.RespMetadata.StatusCode 4227 } 4228 4229 // RequestID returns the service's response RequestID for request. 4230 func (s *InvalidPaginationToken) RequestID() string { 4231 return s.RespMetadata.RequestID 4232 } 4233 4234 // Error information returned when a DescribeAffectedEntitiesForOrganization 4235 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntitiesForOrganization.html) 4236 // operation can't find or process a specific entity. 4237 type OrganizationAffectedEntitiesErrorItem struct { 4238 _ struct{} `type:"structure"` 4239 4240 // The 12-digit AWS account numbers that contains the affected entities. 4241 AwsAccountId *string `locationName:"awsAccountId" type:"string"` 4242 4243 // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. 4244 // For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. 4245 ErrorMessage *string `locationName:"errorMessage" type:"string"` 4246 4247 // The name of the error. 4248 ErrorName *string `locationName:"errorName" type:"string"` 4249 4250 // 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 4251 // format. 4252 // 4253 // For example, an event ARN might look like the following: 4254 // 4255 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 4256 EventArn *string `locationName:"eventArn" type:"string"` 4257 } 4258 4259 // String returns the string representation. 4260 // 4261 // API parameter values that are decorated as "sensitive" in the API will not 4262 // be included in the string output. The member name will be present, but the 4263 // value will be replaced with "sensitive". 4264 func (s OrganizationAffectedEntitiesErrorItem) String() string { 4265 return awsutil.Prettify(s) 4266 } 4267 4268 // GoString returns the string representation. 4269 // 4270 // API parameter values that are decorated as "sensitive" in the API will not 4271 // be included in the string output. The member name will be present, but the 4272 // value will be replaced with "sensitive". 4273 func (s OrganizationAffectedEntitiesErrorItem) GoString() string { 4274 return s.String() 4275 } 4276 4277 // SetAwsAccountId sets the AwsAccountId field's value. 4278 func (s *OrganizationAffectedEntitiesErrorItem) SetAwsAccountId(v string) *OrganizationAffectedEntitiesErrorItem { 4279 s.AwsAccountId = &v 4280 return s 4281 } 4282 4283 // SetErrorMessage sets the ErrorMessage field's value. 4284 func (s *OrganizationAffectedEntitiesErrorItem) SetErrorMessage(v string) *OrganizationAffectedEntitiesErrorItem { 4285 s.ErrorMessage = &v 4286 return s 4287 } 4288 4289 // SetErrorName sets the ErrorName field's value. 4290 func (s *OrganizationAffectedEntitiesErrorItem) SetErrorName(v string) *OrganizationAffectedEntitiesErrorItem { 4291 s.ErrorName = &v 4292 return s 4293 } 4294 4295 // SetEventArn sets the EventArn field's value. 4296 func (s *OrganizationAffectedEntitiesErrorItem) SetEventArn(v string) *OrganizationAffectedEntitiesErrorItem { 4297 s.EventArn = &v 4298 return s 4299 } 4300 4301 // Summary information about an event, returned by the DescribeEventsForOrganization 4302 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventsForOrganization.html) 4303 // operation. 4304 type OrganizationEvent struct { 4305 _ struct{} `type:"structure"` 4306 4307 // 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 4308 // format. 4309 // 4310 // For example, an event ARN might look like the following: 4311 // 4312 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 4313 Arn *string `locationName:"arn" type:"string"` 4314 4315 // The date and time that the event ended. 4316 EndTime *time.Time `locationName:"endTime" type:"timestamp"` 4317 4318 // This parameter specifies if the AWS Health event is a public AWS service 4319 // event or an account-specific event. 4320 // 4321 // * If the eventScopeCode value is PUBLIC, then the affectedAccounts value 4322 // is always empty. 4323 // 4324 // * If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts 4325 // value lists the affected AWS accounts in your organization. For example, 4326 // if an event affects a service such as Amazon Elastic Compute Cloud and 4327 // you have AWS accounts that use that service, those account IDs appear 4328 // in the response. 4329 // 4330 // * If the eventScopeCode value is NONE, then the eventArn that you specified 4331 // in the request is invalid or doesn't exist. 4332 EventScopeCode *string `locationName:"eventScopeCode" type:"string" enum:"EventScopeCode"` 4333 4334 // The category of the event type. 4335 EventTypeCategory *string `locationName:"eventTypeCategory" min:"3" type:"string" enum:"EventTypeCategory"` 4336 4337 // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. 4338 // For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. 4339 EventTypeCode *string `locationName:"eventTypeCode" min:"3" type:"string"` 4340 4341 // The most recent date and time that the event was updated. 4342 LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` 4343 4344 // The AWS Region name of the event. 4345 Region *string `locationName:"region" min:"2" type:"string"` 4346 4347 // The AWS service that is affected by the event, such as EC2 and RDS. 4348 Service *string `locationName:"service" min:"2" type:"string"` 4349 4350 // The date and time that the event began. 4351 StartTime *time.Time `locationName:"startTime" type:"timestamp"` 4352 4353 // The most recent status of the event. Possible values are open, closed, and 4354 // upcoming. 4355 StatusCode *string `locationName:"statusCode" type:"string" enum:"EventStatusCode"` 4356 } 4357 4358 // String returns the string representation. 4359 // 4360 // API parameter values that are decorated as "sensitive" in the API will not 4361 // be included in the string output. The member name will be present, but the 4362 // value will be replaced with "sensitive". 4363 func (s OrganizationEvent) String() string { 4364 return awsutil.Prettify(s) 4365 } 4366 4367 // GoString returns the string representation. 4368 // 4369 // API parameter values that are decorated as "sensitive" in the API will not 4370 // be included in the string output. The member name will be present, but the 4371 // value will be replaced with "sensitive". 4372 func (s OrganizationEvent) GoString() string { 4373 return s.String() 4374 } 4375 4376 // SetArn sets the Arn field's value. 4377 func (s *OrganizationEvent) SetArn(v string) *OrganizationEvent { 4378 s.Arn = &v 4379 return s 4380 } 4381 4382 // SetEndTime sets the EndTime field's value. 4383 func (s *OrganizationEvent) SetEndTime(v time.Time) *OrganizationEvent { 4384 s.EndTime = &v 4385 return s 4386 } 4387 4388 // SetEventScopeCode sets the EventScopeCode field's value. 4389 func (s *OrganizationEvent) SetEventScopeCode(v string) *OrganizationEvent { 4390 s.EventScopeCode = &v 4391 return s 4392 } 4393 4394 // SetEventTypeCategory sets the EventTypeCategory field's value. 4395 func (s *OrganizationEvent) SetEventTypeCategory(v string) *OrganizationEvent { 4396 s.EventTypeCategory = &v 4397 return s 4398 } 4399 4400 // SetEventTypeCode sets the EventTypeCode field's value. 4401 func (s *OrganizationEvent) SetEventTypeCode(v string) *OrganizationEvent { 4402 s.EventTypeCode = &v 4403 return s 4404 } 4405 4406 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 4407 func (s *OrganizationEvent) SetLastUpdatedTime(v time.Time) *OrganizationEvent { 4408 s.LastUpdatedTime = &v 4409 return s 4410 } 4411 4412 // SetRegion sets the Region field's value. 4413 func (s *OrganizationEvent) SetRegion(v string) *OrganizationEvent { 4414 s.Region = &v 4415 return s 4416 } 4417 4418 // SetService sets the Service field's value. 4419 func (s *OrganizationEvent) SetService(v string) *OrganizationEvent { 4420 s.Service = &v 4421 return s 4422 } 4423 4424 // SetStartTime sets the StartTime field's value. 4425 func (s *OrganizationEvent) SetStartTime(v time.Time) *OrganizationEvent { 4426 s.StartTime = &v 4427 return s 4428 } 4429 4430 // SetStatusCode sets the StatusCode field's value. 4431 func (s *OrganizationEvent) SetStatusCode(v string) *OrganizationEvent { 4432 s.StatusCode = &v 4433 return s 4434 } 4435 4436 // Detailed information about an event. A combination of an Event (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html) 4437 // object, an EventDescription (https://docs.aws.amazon.com/health/latest/APIReference/API_EventDescription.html) 4438 // object, and additional metadata about the event. Returned by the DescribeEventDetailsForOrganization 4439 // (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html) 4440 // operation. 4441 type OrganizationEventDetails struct { 4442 _ struct{} `type:"structure"` 4443 4444 // The 12-digit AWS account numbers that contains the affected entities. 4445 AwsAccountId *string `locationName:"awsAccountId" type:"string"` 4446 4447 // Summary information about an AWS Health event. 4448 // 4449 // AWS Health events can be public or account-specific: 4450 // 4451 // * Public events might be service events that are not specific to an AWS 4452 // account. For example, if there is an issue with an AWS Region, AWS Health 4453 // provides information about the event, even if you don't use services or 4454 // resources in that Region. 4455 // 4456 // * Account-specific events are specific to either your AWS account or an 4457 // account in your organization. For example, if there's an issue with Amazon 4458 // Elastic Compute Cloud in a Region that you use, AWS Health provides information 4459 // about the event and the affected resources in the account. 4460 // 4461 // You can determine if an event is public or account-specific by using the 4462 // eventScopeCode parameter. For more information, see eventScopeCode (https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html#AWSHealth-Type-Event-eventScopeCode). 4463 Event *Event `locationName:"event" type:"structure"` 4464 4465 // The detailed description of the event. Included in the information returned 4466 // by the DescribeEventDetails (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html) 4467 // operation. 4468 EventDescription *EventDescription `locationName:"eventDescription" type:"structure"` 4469 4470 // Additional metadata about the event. 4471 EventMetadata map[string]*string `locationName:"eventMetadata" type:"map"` 4472 } 4473 4474 // String returns the string representation. 4475 // 4476 // API parameter values that are decorated as "sensitive" in the API will not 4477 // be included in the string output. The member name will be present, but the 4478 // value will be replaced with "sensitive". 4479 func (s OrganizationEventDetails) String() string { 4480 return awsutil.Prettify(s) 4481 } 4482 4483 // GoString returns the string representation. 4484 // 4485 // API parameter values that are decorated as "sensitive" in the API will not 4486 // be included in the string output. The member name will be present, but the 4487 // value will be replaced with "sensitive". 4488 func (s OrganizationEventDetails) GoString() string { 4489 return s.String() 4490 } 4491 4492 // SetAwsAccountId sets the AwsAccountId field's value. 4493 func (s *OrganizationEventDetails) SetAwsAccountId(v string) *OrganizationEventDetails { 4494 s.AwsAccountId = &v 4495 return s 4496 } 4497 4498 // SetEvent sets the Event field's value. 4499 func (s *OrganizationEventDetails) SetEvent(v *Event) *OrganizationEventDetails { 4500 s.Event = v 4501 return s 4502 } 4503 4504 // SetEventDescription sets the EventDescription field's value. 4505 func (s *OrganizationEventDetails) SetEventDescription(v *EventDescription) *OrganizationEventDetails { 4506 s.EventDescription = v 4507 return s 4508 } 4509 4510 // SetEventMetadata sets the EventMetadata field's value. 4511 func (s *OrganizationEventDetails) SetEventMetadata(v map[string]*string) *OrganizationEventDetails { 4512 s.EventMetadata = v 4513 return s 4514 } 4515 4516 // Error information returned when a DescribeEventDetailsForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html) 4517 // operation can't find a specified event. 4518 type OrganizationEventDetailsErrorItem struct { 4519 _ struct{} `type:"structure"` 4520 4521 // Error information returned when a DescribeEventDetailsForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html) 4522 // operation can't find a specified event. 4523 AwsAccountId *string `locationName:"awsAccountId" type:"string"` 4524 4525 // A message that describes the error. 4526 // 4527 // If you call the DescribeEventDetailsForOrganization operation and receive 4528 // one of the following errors, follow the recommendations in the message: 4529 // 4530 // * We couldn't find a public event that matches your request. To find an 4531 // event that is account specific, you must enter an AWS account ID in the 4532 // request. 4533 // 4534 // * We couldn't find an account specific event for the specified AWS account. 4535 // To find an event that is public, you must enter a null value for the AWS 4536 // account ID in the request. 4537 // 4538 // * Your AWS account doesn't include the AWS Support plan required to use 4539 // the AWS Health API. You must have either a Business or Enterprise Support 4540 // plan. 4541 ErrorMessage *string `locationName:"errorMessage" type:"string"` 4542 4543 // The name of the error. 4544 ErrorName *string `locationName:"errorName" type:"string"` 4545 4546 // 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 4547 // format. 4548 // 4549 // For example, an event ARN might look like the following: 4550 // 4551 // arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 4552 EventArn *string `locationName:"eventArn" type:"string"` 4553 } 4554 4555 // String returns the string representation. 4556 // 4557 // API parameter values that are decorated as "sensitive" in the API will not 4558 // be included in the string output. The member name will be present, but the 4559 // value will be replaced with "sensitive". 4560 func (s OrganizationEventDetailsErrorItem) String() string { 4561 return awsutil.Prettify(s) 4562 } 4563 4564 // GoString returns the string representation. 4565 // 4566 // API parameter values that are decorated as "sensitive" in the API will not 4567 // be included in the string output. The member name will be present, but the 4568 // value will be replaced with "sensitive". 4569 func (s OrganizationEventDetailsErrorItem) GoString() string { 4570 return s.String() 4571 } 4572 4573 // SetAwsAccountId sets the AwsAccountId field's value. 4574 func (s *OrganizationEventDetailsErrorItem) SetAwsAccountId(v string) *OrganizationEventDetailsErrorItem { 4575 s.AwsAccountId = &v 4576 return s 4577 } 4578 4579 // SetErrorMessage sets the ErrorMessage field's value. 4580 func (s *OrganizationEventDetailsErrorItem) SetErrorMessage(v string) *OrganizationEventDetailsErrorItem { 4581 s.ErrorMessage = &v 4582 return s 4583 } 4584 4585 // SetErrorName sets the ErrorName field's value. 4586 func (s *OrganizationEventDetailsErrorItem) SetErrorName(v string) *OrganizationEventDetailsErrorItem { 4587 s.ErrorName = &v 4588 return s 4589 } 4590 4591 // SetEventArn sets the EventArn field's value. 4592 func (s *OrganizationEventDetailsErrorItem) SetEventArn(v string) *OrganizationEventDetailsErrorItem { 4593 s.EventArn = &v 4594 return s 4595 } 4596 4597 // The values to filter results from the DescribeEventsForOrganization (https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventsForOrganization.html) 4598 // operation. 4599 type OrganizationEventFilter struct { 4600 _ struct{} `type:"structure"` 4601 4602 // A list of 12-digit AWS account numbers that contains the affected entities. 4603 AwsAccountIds []*string `locationName:"awsAccountIds" min:"1" type:"list"` 4604 4605 // A range of dates and times that is used by the EventFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EventFilter.html) 4606 // and EntityFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EntityFilter.html) 4607 // objects. If from is set and to is set: match items where the timestamp (startTime, 4608 // endTime, or lastUpdatedTime) is between from and to inclusive. If from is 4609 // set and to is not set: match items where the timestamp value is equal to 4610 // or after from. If from is not set and to is set: match items where the timestamp 4611 // value is equal to or before to. 4612 EndTime *DateTimeRange `locationName:"endTime" type:"structure"` 4613 4614 // A list of entity ARNs (unique identifiers). 4615 EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` 4616 4617 // A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS 4618 // volumes (vol-426ab23e). 4619 EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` 4620 4621 // A list of event status codes. 4622 EventStatusCodes []*string `locationName:"eventStatusCodes" min:"1" type:"list"` 4623 4624 // A list of event type category codes (issue, scheduledChange, or accountNotification). 4625 EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` 4626 4627 // A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED". 4628 EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` 4629 4630 // A range of dates and times that is used by the EventFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EventFilter.html) 4631 // and EntityFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EntityFilter.html) 4632 // objects. If from is set and to is set: match items where the timestamp (startTime, 4633 // endTime, or lastUpdatedTime) is between from and to inclusive. If from is 4634 // set and to is not set: match items where the timestamp value is equal to 4635 // or after from. If from is not set and to is set: match items where the timestamp 4636 // value is equal to or before to. 4637 LastUpdatedTime *DateTimeRange `locationName:"lastUpdatedTime" type:"structure"` 4638 4639 // A list of AWS Regions. 4640 Regions []*string `locationName:"regions" min:"1" type:"list"` 4641 4642 // The AWS services associated with the event. For example, EC2, RDS. 4643 Services []*string `locationName:"services" min:"1" type:"list"` 4644 4645 // A range of dates and times that is used by the EventFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EventFilter.html) 4646 // and EntityFilter (https://docs.aws.amazon.com/health/latest/APIReference/API_EntityFilter.html) 4647 // objects. If from is set and to is set: match items where the timestamp (startTime, 4648 // endTime, or lastUpdatedTime) is between from and to inclusive. If from is 4649 // set and to is not set: match items where the timestamp value is equal to 4650 // or after from. If from is not set and to is set: match items where the timestamp 4651 // value is equal to or before to. 4652 StartTime *DateTimeRange `locationName:"startTime" type:"structure"` 4653 } 4654 4655 // String returns the string representation. 4656 // 4657 // API parameter values that are decorated as "sensitive" in the API will not 4658 // be included in the string output. The member name will be present, but the 4659 // value will be replaced with "sensitive". 4660 func (s OrganizationEventFilter) String() string { 4661 return awsutil.Prettify(s) 4662 } 4663 4664 // GoString returns the string representation. 4665 // 4666 // API parameter values that are decorated as "sensitive" in the API will not 4667 // be included in the string output. The member name will be present, but the 4668 // value will be replaced with "sensitive". 4669 func (s OrganizationEventFilter) GoString() string { 4670 return s.String() 4671 } 4672 4673 // Validate inspects the fields of the type to determine if they are valid. 4674 func (s *OrganizationEventFilter) Validate() error { 4675 invalidParams := request.ErrInvalidParams{Context: "OrganizationEventFilter"} 4676 if s.AwsAccountIds != nil && len(s.AwsAccountIds) < 1 { 4677 invalidParams.Add(request.NewErrParamMinLen("AwsAccountIds", 1)) 4678 } 4679 if s.EntityArns != nil && len(s.EntityArns) < 1 { 4680 invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) 4681 } 4682 if s.EntityValues != nil && len(s.EntityValues) < 1 { 4683 invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) 4684 } 4685 if s.EventStatusCodes != nil && len(s.EventStatusCodes) < 1 { 4686 invalidParams.Add(request.NewErrParamMinLen("EventStatusCodes", 1)) 4687 } 4688 if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { 4689 invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) 4690 } 4691 if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { 4692 invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) 4693 } 4694 if s.Regions != nil && len(s.Regions) < 1 { 4695 invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) 4696 } 4697 if s.Services != nil && len(s.Services) < 1 { 4698 invalidParams.Add(request.NewErrParamMinLen("Services", 1)) 4699 } 4700 4701 if invalidParams.Len() > 0 { 4702 return invalidParams 4703 } 4704 return nil 4705 } 4706 4707 // SetAwsAccountIds sets the AwsAccountIds field's value. 4708 func (s *OrganizationEventFilter) SetAwsAccountIds(v []*string) *OrganizationEventFilter { 4709 s.AwsAccountIds = v 4710 return s 4711 } 4712 4713 // SetEndTime sets the EndTime field's value. 4714 func (s *OrganizationEventFilter) SetEndTime(v *DateTimeRange) *OrganizationEventFilter { 4715 s.EndTime = v 4716 return s 4717 } 4718 4719 // SetEntityArns sets the EntityArns field's value. 4720 func (s *OrganizationEventFilter) SetEntityArns(v []*string) *OrganizationEventFilter { 4721 s.EntityArns = v 4722 return s 4723 } 4724 4725 // SetEntityValues sets the EntityValues field's value. 4726 func (s *OrganizationEventFilter) SetEntityValues(v []*string) *OrganizationEventFilter { 4727 s.EntityValues = v 4728 return s 4729 } 4730 4731 // SetEventStatusCodes sets the EventStatusCodes field's value. 4732 func (s *OrganizationEventFilter) SetEventStatusCodes(v []*string) *OrganizationEventFilter { 4733 s.EventStatusCodes = v 4734 return s 4735 } 4736 4737 // SetEventTypeCategories sets the EventTypeCategories field's value. 4738 func (s *OrganizationEventFilter) SetEventTypeCategories(v []*string) *OrganizationEventFilter { 4739 s.EventTypeCategories = v 4740 return s 4741 } 4742 4743 // SetEventTypeCodes sets the EventTypeCodes field's value. 4744 func (s *OrganizationEventFilter) SetEventTypeCodes(v []*string) *OrganizationEventFilter { 4745 s.EventTypeCodes = v 4746 return s 4747 } 4748 4749 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 4750 func (s *OrganizationEventFilter) SetLastUpdatedTime(v *DateTimeRange) *OrganizationEventFilter { 4751 s.LastUpdatedTime = v 4752 return s 4753 } 4754 4755 // SetRegions sets the Regions field's value. 4756 func (s *OrganizationEventFilter) SetRegions(v []*string) *OrganizationEventFilter { 4757 s.Regions = v 4758 return s 4759 } 4760 4761 // SetServices sets the Services field's value. 4762 func (s *OrganizationEventFilter) SetServices(v []*string) *OrganizationEventFilter { 4763 s.Services = v 4764 return s 4765 } 4766 4767 // SetStartTime sets the StartTime field's value. 4768 func (s *OrganizationEventFilter) SetStartTime(v *DateTimeRange) *OrganizationEventFilter { 4769 s.StartTime = v 4770 return s 4771 } 4772 4773 // The specified locale is not supported. 4774 type UnsupportedLocale struct { 4775 _ struct{} `type:"structure"` 4776 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4777 4778 Message_ *string `locationName:"message" type:"string"` 4779 } 4780 4781 // String returns the string representation. 4782 // 4783 // API parameter values that are decorated as "sensitive" in the API will not 4784 // be included in the string output. The member name will be present, but the 4785 // value will be replaced with "sensitive". 4786 func (s UnsupportedLocale) String() string { 4787 return awsutil.Prettify(s) 4788 } 4789 4790 // GoString returns the string representation. 4791 // 4792 // API parameter values that are decorated as "sensitive" in the API will not 4793 // be included in the string output. The member name will be present, but the 4794 // value will be replaced with "sensitive". 4795 func (s UnsupportedLocale) GoString() string { 4796 return s.String() 4797 } 4798 4799 func newErrorUnsupportedLocale(v protocol.ResponseMetadata) error { 4800 return &UnsupportedLocale{ 4801 RespMetadata: v, 4802 } 4803 } 4804 4805 // Code returns the exception type name. 4806 func (s *UnsupportedLocale) Code() string { 4807 return "UnsupportedLocale" 4808 } 4809 4810 // Message returns the exception's message. 4811 func (s *UnsupportedLocale) Message() string { 4812 if s.Message_ != nil { 4813 return *s.Message_ 4814 } 4815 return "" 4816 } 4817 4818 // OrigErr always returns nil, satisfies awserr.Error interface. 4819 func (s *UnsupportedLocale) OrigErr() error { 4820 return nil 4821 } 4822 4823 func (s *UnsupportedLocale) Error() string { 4824 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4825 } 4826 4827 // Status code returns the HTTP status code for the request's response error. 4828 func (s *UnsupportedLocale) StatusCode() int { 4829 return s.RespMetadata.StatusCode 4830 } 4831 4832 // RequestID returns the service's response RequestID for request. 4833 func (s *UnsupportedLocale) RequestID() string { 4834 return s.RespMetadata.RequestID 4835 } 4836 4837 const ( 4838 // EntityStatusCodeImpaired is a EntityStatusCode enum value 4839 EntityStatusCodeImpaired = "IMPAIRED" 4840 4841 // EntityStatusCodeUnimpaired is a EntityStatusCode enum value 4842 EntityStatusCodeUnimpaired = "UNIMPAIRED" 4843 4844 // EntityStatusCodeUnknown is a EntityStatusCode enum value 4845 EntityStatusCodeUnknown = "UNKNOWN" 4846 ) 4847 4848 // EntityStatusCode_Values returns all elements of the EntityStatusCode enum 4849 func EntityStatusCode_Values() []string { 4850 return []string{ 4851 EntityStatusCodeImpaired, 4852 EntityStatusCodeUnimpaired, 4853 EntityStatusCodeUnknown, 4854 } 4855 } 4856 4857 const ( 4858 // EventAggregateFieldEventTypeCategory is a EventAggregateField enum value 4859 EventAggregateFieldEventTypeCategory = "eventTypeCategory" 4860 ) 4861 4862 // EventAggregateField_Values returns all elements of the EventAggregateField enum 4863 func EventAggregateField_Values() []string { 4864 return []string{ 4865 EventAggregateFieldEventTypeCategory, 4866 } 4867 } 4868 4869 const ( 4870 // EventScopeCodePublic is a EventScopeCode enum value 4871 EventScopeCodePublic = "PUBLIC" 4872 4873 // EventScopeCodeAccountSpecific is a EventScopeCode enum value 4874 EventScopeCodeAccountSpecific = "ACCOUNT_SPECIFIC" 4875 4876 // EventScopeCodeNone is a EventScopeCode enum value 4877 EventScopeCodeNone = "NONE" 4878 ) 4879 4880 // EventScopeCode_Values returns all elements of the EventScopeCode enum 4881 func EventScopeCode_Values() []string { 4882 return []string{ 4883 EventScopeCodePublic, 4884 EventScopeCodeAccountSpecific, 4885 EventScopeCodeNone, 4886 } 4887 } 4888 4889 const ( 4890 // EventStatusCodeOpen is a EventStatusCode enum value 4891 EventStatusCodeOpen = "open" 4892 4893 // EventStatusCodeClosed is a EventStatusCode enum value 4894 EventStatusCodeClosed = "closed" 4895 4896 // EventStatusCodeUpcoming is a EventStatusCode enum value 4897 EventStatusCodeUpcoming = "upcoming" 4898 ) 4899 4900 // EventStatusCode_Values returns all elements of the EventStatusCode enum 4901 func EventStatusCode_Values() []string { 4902 return []string{ 4903 EventStatusCodeOpen, 4904 EventStatusCodeClosed, 4905 EventStatusCodeUpcoming, 4906 } 4907 } 4908 4909 const ( 4910 // EventTypeCategoryIssue is a EventTypeCategory enum value 4911 EventTypeCategoryIssue = "issue" 4912 4913 // EventTypeCategoryAccountNotification is a EventTypeCategory enum value 4914 EventTypeCategoryAccountNotification = "accountNotification" 4915 4916 // EventTypeCategoryScheduledChange is a EventTypeCategory enum value 4917 EventTypeCategoryScheduledChange = "scheduledChange" 4918 4919 // EventTypeCategoryInvestigation is a EventTypeCategory enum value 4920 EventTypeCategoryInvestigation = "investigation" 4921 ) 4922 4923 // EventTypeCategory_Values returns all elements of the EventTypeCategory enum 4924 func EventTypeCategory_Values() []string { 4925 return []string{ 4926 EventTypeCategoryIssue, 4927 EventTypeCategoryAccountNotification, 4928 EventTypeCategoryScheduledChange, 4929 EventTypeCategoryInvestigation, 4930 } 4931 }