github.com/aavshr/aws-sdk-go@v1.41.3/service/codestarnotifications/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package codestarnotifications 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/restjson" 14 ) 15 16 const opCreateNotificationRule = "CreateNotificationRule" 17 18 // CreateNotificationRuleRequest generates a "aws/request.Request" representing the 19 // client's request for the CreateNotificationRule 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 CreateNotificationRule for more information on using the CreateNotificationRule 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 CreateNotificationRuleRequest method. 34 // req, resp := client.CreateNotificationRuleRequest(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/codestar-notifications-2019-10-15/CreateNotificationRule 42 func (c *CodeStarNotifications) CreateNotificationRuleRequest(input *CreateNotificationRuleInput) (req *request.Request, output *CreateNotificationRuleOutput) { 43 op := &request.Operation{ 44 Name: opCreateNotificationRule, 45 HTTPMethod: "POST", 46 HTTPPath: "/createNotificationRule", 47 } 48 49 if input == nil { 50 input = &CreateNotificationRuleInput{} 51 } 52 53 output = &CreateNotificationRuleOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CreateNotificationRule API operation for AWS CodeStar Notifications. 59 // 60 // Creates a notification rule for a resource. The rule specifies the events 61 // you want notifications about and the targets (such as SNS topics) where you 62 // want to receive them. 63 // 64 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65 // with awserr.Error's Code and Message methods to get detailed information about 66 // the error. 67 // 68 // See the AWS API reference guide for AWS CodeStar Notifications's 69 // API operation CreateNotificationRule for usage and error information. 70 // 71 // Returned Error Types: 72 // * ResourceAlreadyExistsException 73 // A resource with the same name or ID already exists. Notification rule names 74 // must be unique in your AWS account. 75 // 76 // * ValidationException 77 // One or more parameter values are not valid. 78 // 79 // * LimitExceededException 80 // One of the AWS CodeStar Notifications limits has been exceeded. Limits apply 81 // to accounts, notification rules, notifications, resources, and targets. For 82 // more information, see Limits. 83 // 84 // * ConfigurationException 85 // Some or all of the configuration is incomplete, missing, or not valid. 86 // 87 // * ConcurrentModificationException 88 // AWS CodeStar Notifications can't complete the request because the resource 89 // is being modified by another process. Wait a few minutes and try again. 90 // 91 // * AccessDeniedException 92 // AWS CodeStar Notifications can't create the notification rule because you 93 // do not have sufficient permissions. 94 // 95 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/CreateNotificationRule 96 func (c *CodeStarNotifications) CreateNotificationRule(input *CreateNotificationRuleInput) (*CreateNotificationRuleOutput, error) { 97 req, out := c.CreateNotificationRuleRequest(input) 98 return out, req.Send() 99 } 100 101 // CreateNotificationRuleWithContext is the same as CreateNotificationRule with the addition of 102 // the ability to pass a context and additional request options. 103 // 104 // See CreateNotificationRule for details on how to use this API operation. 105 // 106 // The context must be non-nil and will be used for request cancellation. If 107 // the context is nil a panic will occur. In the future the SDK may create 108 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 109 // for more information on using Contexts. 110 func (c *CodeStarNotifications) CreateNotificationRuleWithContext(ctx aws.Context, input *CreateNotificationRuleInput, opts ...request.Option) (*CreateNotificationRuleOutput, error) { 111 req, out := c.CreateNotificationRuleRequest(input) 112 req.SetContext(ctx) 113 req.ApplyOptions(opts...) 114 return out, req.Send() 115 } 116 117 const opDeleteNotificationRule = "DeleteNotificationRule" 118 119 // DeleteNotificationRuleRequest generates a "aws/request.Request" representing the 120 // client's request for the DeleteNotificationRule operation. The "output" return 121 // value will be populated with the request's response once the request completes 122 // successfully. 123 // 124 // Use "Send" method on the returned Request to send the API call to the service. 125 // the "output" return value is not valid until after Send returns without error. 126 // 127 // See DeleteNotificationRule for more information on using the DeleteNotificationRule 128 // API call, and error handling. 129 // 130 // This method is useful when you want to inject custom logic or configuration 131 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 132 // 133 // 134 // // Example sending a request using the DeleteNotificationRuleRequest method. 135 // req, resp := client.DeleteNotificationRuleRequest(params) 136 // 137 // err := req.Send() 138 // if err == nil { // resp is now filled 139 // fmt.Println(resp) 140 // } 141 // 142 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DeleteNotificationRule 143 func (c *CodeStarNotifications) DeleteNotificationRuleRequest(input *DeleteNotificationRuleInput) (req *request.Request, output *DeleteNotificationRuleOutput) { 144 op := &request.Operation{ 145 Name: opDeleteNotificationRule, 146 HTTPMethod: "POST", 147 HTTPPath: "/deleteNotificationRule", 148 } 149 150 if input == nil { 151 input = &DeleteNotificationRuleInput{} 152 } 153 154 output = &DeleteNotificationRuleOutput{} 155 req = c.newRequest(op, input, output) 156 return 157 } 158 159 // DeleteNotificationRule API operation for AWS CodeStar Notifications. 160 // 161 // Deletes a notification rule for a resource. 162 // 163 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 164 // with awserr.Error's Code and Message methods to get detailed information about 165 // the error. 166 // 167 // See the AWS API reference guide for AWS CodeStar Notifications's 168 // API operation DeleteNotificationRule for usage and error information. 169 // 170 // Returned Error Types: 171 // * ValidationException 172 // One or more parameter values are not valid. 173 // 174 // * LimitExceededException 175 // One of the AWS CodeStar Notifications limits has been exceeded. Limits apply 176 // to accounts, notification rules, notifications, resources, and targets. For 177 // more information, see Limits. 178 // 179 // * ConcurrentModificationException 180 // AWS CodeStar Notifications can't complete the request because the resource 181 // is being modified by another process. Wait a few minutes and try again. 182 // 183 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DeleteNotificationRule 184 func (c *CodeStarNotifications) DeleteNotificationRule(input *DeleteNotificationRuleInput) (*DeleteNotificationRuleOutput, error) { 185 req, out := c.DeleteNotificationRuleRequest(input) 186 return out, req.Send() 187 } 188 189 // DeleteNotificationRuleWithContext is the same as DeleteNotificationRule with the addition of 190 // the ability to pass a context and additional request options. 191 // 192 // See DeleteNotificationRule for details on how to use this API operation. 193 // 194 // The context must be non-nil and will be used for request cancellation. If 195 // the context is nil a panic will occur. In the future the SDK may create 196 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 197 // for more information on using Contexts. 198 func (c *CodeStarNotifications) DeleteNotificationRuleWithContext(ctx aws.Context, input *DeleteNotificationRuleInput, opts ...request.Option) (*DeleteNotificationRuleOutput, error) { 199 req, out := c.DeleteNotificationRuleRequest(input) 200 req.SetContext(ctx) 201 req.ApplyOptions(opts...) 202 return out, req.Send() 203 } 204 205 const opDeleteTarget = "DeleteTarget" 206 207 // DeleteTargetRequest generates a "aws/request.Request" representing the 208 // client's request for the DeleteTarget operation. The "output" return 209 // value will be populated with the request's response once the request completes 210 // successfully. 211 // 212 // Use "Send" method on the returned Request to send the API call to the service. 213 // the "output" return value is not valid until after Send returns without error. 214 // 215 // See DeleteTarget for more information on using the DeleteTarget 216 // API call, and error handling. 217 // 218 // This method is useful when you want to inject custom logic or configuration 219 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 220 // 221 // 222 // // Example sending a request using the DeleteTargetRequest method. 223 // req, resp := client.DeleteTargetRequest(params) 224 // 225 // err := req.Send() 226 // if err == nil { // resp is now filled 227 // fmt.Println(resp) 228 // } 229 // 230 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DeleteTarget 231 func (c *CodeStarNotifications) DeleteTargetRequest(input *DeleteTargetInput) (req *request.Request, output *DeleteTargetOutput) { 232 op := &request.Operation{ 233 Name: opDeleteTarget, 234 HTTPMethod: "POST", 235 HTTPPath: "/deleteTarget", 236 } 237 238 if input == nil { 239 input = &DeleteTargetInput{} 240 } 241 242 output = &DeleteTargetOutput{} 243 req = c.newRequest(op, input, output) 244 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 245 return 246 } 247 248 // DeleteTarget API operation for AWS CodeStar Notifications. 249 // 250 // Deletes a specified target for notifications. 251 // 252 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 253 // with awserr.Error's Code and Message methods to get detailed information about 254 // the error. 255 // 256 // See the AWS API reference guide for AWS CodeStar Notifications's 257 // API operation DeleteTarget for usage and error information. 258 // 259 // Returned Error Types: 260 // * ValidationException 261 // One or more parameter values are not valid. 262 // 263 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DeleteTarget 264 func (c *CodeStarNotifications) DeleteTarget(input *DeleteTargetInput) (*DeleteTargetOutput, error) { 265 req, out := c.DeleteTargetRequest(input) 266 return out, req.Send() 267 } 268 269 // DeleteTargetWithContext is the same as DeleteTarget with the addition of 270 // the ability to pass a context and additional request options. 271 // 272 // See DeleteTarget for details on how to use this API operation. 273 // 274 // The context must be non-nil and will be used for request cancellation. If 275 // the context is nil a panic will occur. In the future the SDK may create 276 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 277 // for more information on using Contexts. 278 func (c *CodeStarNotifications) DeleteTargetWithContext(ctx aws.Context, input *DeleteTargetInput, opts ...request.Option) (*DeleteTargetOutput, error) { 279 req, out := c.DeleteTargetRequest(input) 280 req.SetContext(ctx) 281 req.ApplyOptions(opts...) 282 return out, req.Send() 283 } 284 285 const opDescribeNotificationRule = "DescribeNotificationRule" 286 287 // DescribeNotificationRuleRequest generates a "aws/request.Request" representing the 288 // client's request for the DescribeNotificationRule operation. The "output" return 289 // value will be populated with the request's response once the request completes 290 // successfully. 291 // 292 // Use "Send" method on the returned Request to send the API call to the service. 293 // the "output" return value is not valid until after Send returns without error. 294 // 295 // See DescribeNotificationRule for more information on using the DescribeNotificationRule 296 // API call, and error handling. 297 // 298 // This method is useful when you want to inject custom logic or configuration 299 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 300 // 301 // 302 // // Example sending a request using the DescribeNotificationRuleRequest method. 303 // req, resp := client.DescribeNotificationRuleRequest(params) 304 // 305 // err := req.Send() 306 // if err == nil { // resp is now filled 307 // fmt.Println(resp) 308 // } 309 // 310 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DescribeNotificationRule 311 func (c *CodeStarNotifications) DescribeNotificationRuleRequest(input *DescribeNotificationRuleInput) (req *request.Request, output *DescribeNotificationRuleOutput) { 312 op := &request.Operation{ 313 Name: opDescribeNotificationRule, 314 HTTPMethod: "POST", 315 HTTPPath: "/describeNotificationRule", 316 } 317 318 if input == nil { 319 input = &DescribeNotificationRuleInput{} 320 } 321 322 output = &DescribeNotificationRuleOutput{} 323 req = c.newRequest(op, input, output) 324 return 325 } 326 327 // DescribeNotificationRule API operation for AWS CodeStar Notifications. 328 // 329 // Returns information about a specified notification rule. 330 // 331 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 332 // with awserr.Error's Code and Message methods to get detailed information about 333 // the error. 334 // 335 // See the AWS API reference guide for AWS CodeStar Notifications's 336 // API operation DescribeNotificationRule for usage and error information. 337 // 338 // Returned Error Types: 339 // * ResourceNotFoundException 340 // AWS CodeStar Notifications can't find a resource that matches the provided 341 // ARN. 342 // 343 // * ValidationException 344 // One or more parameter values are not valid. 345 // 346 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/DescribeNotificationRule 347 func (c *CodeStarNotifications) DescribeNotificationRule(input *DescribeNotificationRuleInput) (*DescribeNotificationRuleOutput, error) { 348 req, out := c.DescribeNotificationRuleRequest(input) 349 return out, req.Send() 350 } 351 352 // DescribeNotificationRuleWithContext is the same as DescribeNotificationRule with the addition of 353 // the ability to pass a context and additional request options. 354 // 355 // See DescribeNotificationRule for details on how to use this API operation. 356 // 357 // The context must be non-nil and will be used for request cancellation. If 358 // the context is nil a panic will occur. In the future the SDK may create 359 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 360 // for more information on using Contexts. 361 func (c *CodeStarNotifications) DescribeNotificationRuleWithContext(ctx aws.Context, input *DescribeNotificationRuleInput, opts ...request.Option) (*DescribeNotificationRuleOutput, error) { 362 req, out := c.DescribeNotificationRuleRequest(input) 363 req.SetContext(ctx) 364 req.ApplyOptions(opts...) 365 return out, req.Send() 366 } 367 368 const opListEventTypes = "ListEventTypes" 369 370 // ListEventTypesRequest generates a "aws/request.Request" representing the 371 // client's request for the ListEventTypes operation. The "output" return 372 // value will be populated with the request's response once the request completes 373 // successfully. 374 // 375 // Use "Send" method on the returned Request to send the API call to the service. 376 // the "output" return value is not valid until after Send returns without error. 377 // 378 // See ListEventTypes for more information on using the ListEventTypes 379 // API call, and error handling. 380 // 381 // This method is useful when you want to inject custom logic or configuration 382 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 383 // 384 // 385 // // Example sending a request using the ListEventTypesRequest method. 386 // req, resp := client.ListEventTypesRequest(params) 387 // 388 // err := req.Send() 389 // if err == nil { // resp is now filled 390 // fmt.Println(resp) 391 // } 392 // 393 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListEventTypes 394 func (c *CodeStarNotifications) ListEventTypesRequest(input *ListEventTypesInput) (req *request.Request, output *ListEventTypesOutput) { 395 op := &request.Operation{ 396 Name: opListEventTypes, 397 HTTPMethod: "POST", 398 HTTPPath: "/listEventTypes", 399 Paginator: &request.Paginator{ 400 InputTokens: []string{"NextToken"}, 401 OutputTokens: []string{"NextToken"}, 402 LimitToken: "MaxResults", 403 TruncationToken: "", 404 }, 405 } 406 407 if input == nil { 408 input = &ListEventTypesInput{} 409 } 410 411 output = &ListEventTypesOutput{} 412 req = c.newRequest(op, input, output) 413 return 414 } 415 416 // ListEventTypes API operation for AWS CodeStar Notifications. 417 // 418 // Returns information about the event types available for configuring notifications. 419 // 420 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 421 // with awserr.Error's Code and Message methods to get detailed information about 422 // the error. 423 // 424 // See the AWS API reference guide for AWS CodeStar Notifications's 425 // API operation ListEventTypes for usage and error information. 426 // 427 // Returned Error Types: 428 // * InvalidNextTokenException 429 // The value for the enumeration token used in the request to return the next 430 // batch of the results is not valid. 431 // 432 // * ValidationException 433 // One or more parameter values are not valid. 434 // 435 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListEventTypes 436 func (c *CodeStarNotifications) ListEventTypes(input *ListEventTypesInput) (*ListEventTypesOutput, error) { 437 req, out := c.ListEventTypesRequest(input) 438 return out, req.Send() 439 } 440 441 // ListEventTypesWithContext is the same as ListEventTypes with the addition of 442 // the ability to pass a context and additional request options. 443 // 444 // See ListEventTypes for details on how to use this API operation. 445 // 446 // The context must be non-nil and will be used for request cancellation. If 447 // the context is nil a panic will occur. In the future the SDK may create 448 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 449 // for more information on using Contexts. 450 func (c *CodeStarNotifications) ListEventTypesWithContext(ctx aws.Context, input *ListEventTypesInput, opts ...request.Option) (*ListEventTypesOutput, error) { 451 req, out := c.ListEventTypesRequest(input) 452 req.SetContext(ctx) 453 req.ApplyOptions(opts...) 454 return out, req.Send() 455 } 456 457 // ListEventTypesPages iterates over the pages of a ListEventTypes operation, 458 // calling the "fn" function with the response data for each page. To stop 459 // iterating, return false from the fn function. 460 // 461 // See ListEventTypes method for more information on how to use this operation. 462 // 463 // Note: This operation can generate multiple requests to a service. 464 // 465 // // Example iterating over at most 3 pages of a ListEventTypes operation. 466 // pageNum := 0 467 // err := client.ListEventTypesPages(params, 468 // func(page *codestarnotifications.ListEventTypesOutput, lastPage bool) bool { 469 // pageNum++ 470 // fmt.Println(page) 471 // return pageNum <= 3 472 // }) 473 // 474 func (c *CodeStarNotifications) ListEventTypesPages(input *ListEventTypesInput, fn func(*ListEventTypesOutput, bool) bool) error { 475 return c.ListEventTypesPagesWithContext(aws.BackgroundContext(), input, fn) 476 } 477 478 // ListEventTypesPagesWithContext same as ListEventTypesPages except 479 // it takes a Context and allows setting request options on the pages. 480 // 481 // The context must be non-nil and will be used for request cancellation. If 482 // the context is nil a panic will occur. In the future the SDK may create 483 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 484 // for more information on using Contexts. 485 func (c *CodeStarNotifications) ListEventTypesPagesWithContext(ctx aws.Context, input *ListEventTypesInput, fn func(*ListEventTypesOutput, bool) bool, opts ...request.Option) error { 486 p := request.Pagination{ 487 NewRequest: func() (*request.Request, error) { 488 var inCpy *ListEventTypesInput 489 if input != nil { 490 tmp := *input 491 inCpy = &tmp 492 } 493 req, _ := c.ListEventTypesRequest(inCpy) 494 req.SetContext(ctx) 495 req.ApplyOptions(opts...) 496 return req, nil 497 }, 498 } 499 500 for p.Next() { 501 if !fn(p.Page().(*ListEventTypesOutput), !p.HasNextPage()) { 502 break 503 } 504 } 505 506 return p.Err() 507 } 508 509 const opListNotificationRules = "ListNotificationRules" 510 511 // ListNotificationRulesRequest generates a "aws/request.Request" representing the 512 // client's request for the ListNotificationRules operation. The "output" return 513 // value will be populated with the request's response once the request completes 514 // successfully. 515 // 516 // Use "Send" method on the returned Request to send the API call to the service. 517 // the "output" return value is not valid until after Send returns without error. 518 // 519 // See ListNotificationRules for more information on using the ListNotificationRules 520 // API call, and error handling. 521 // 522 // This method is useful when you want to inject custom logic or configuration 523 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 524 // 525 // 526 // // Example sending a request using the ListNotificationRulesRequest method. 527 // req, resp := client.ListNotificationRulesRequest(params) 528 // 529 // err := req.Send() 530 // if err == nil { // resp is now filled 531 // fmt.Println(resp) 532 // } 533 // 534 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListNotificationRules 535 func (c *CodeStarNotifications) ListNotificationRulesRequest(input *ListNotificationRulesInput) (req *request.Request, output *ListNotificationRulesOutput) { 536 op := &request.Operation{ 537 Name: opListNotificationRules, 538 HTTPMethod: "POST", 539 HTTPPath: "/listNotificationRules", 540 Paginator: &request.Paginator{ 541 InputTokens: []string{"NextToken"}, 542 OutputTokens: []string{"NextToken"}, 543 LimitToken: "MaxResults", 544 TruncationToken: "", 545 }, 546 } 547 548 if input == nil { 549 input = &ListNotificationRulesInput{} 550 } 551 552 output = &ListNotificationRulesOutput{} 553 req = c.newRequest(op, input, output) 554 return 555 } 556 557 // ListNotificationRules API operation for AWS CodeStar Notifications. 558 // 559 // Returns a list of the notification rules for an AWS account. 560 // 561 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 562 // with awserr.Error's Code and Message methods to get detailed information about 563 // the error. 564 // 565 // See the AWS API reference guide for AWS CodeStar Notifications's 566 // API operation ListNotificationRules for usage and error information. 567 // 568 // Returned Error Types: 569 // * InvalidNextTokenException 570 // The value for the enumeration token used in the request to return the next 571 // batch of the results is not valid. 572 // 573 // * ValidationException 574 // One or more parameter values are not valid. 575 // 576 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListNotificationRules 577 func (c *CodeStarNotifications) ListNotificationRules(input *ListNotificationRulesInput) (*ListNotificationRulesOutput, error) { 578 req, out := c.ListNotificationRulesRequest(input) 579 return out, req.Send() 580 } 581 582 // ListNotificationRulesWithContext is the same as ListNotificationRules with the addition of 583 // the ability to pass a context and additional request options. 584 // 585 // See ListNotificationRules for details on how to use this API operation. 586 // 587 // The context must be non-nil and will be used for request cancellation. If 588 // the context is nil a panic will occur. In the future the SDK may create 589 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 590 // for more information on using Contexts. 591 func (c *CodeStarNotifications) ListNotificationRulesWithContext(ctx aws.Context, input *ListNotificationRulesInput, opts ...request.Option) (*ListNotificationRulesOutput, error) { 592 req, out := c.ListNotificationRulesRequest(input) 593 req.SetContext(ctx) 594 req.ApplyOptions(opts...) 595 return out, req.Send() 596 } 597 598 // ListNotificationRulesPages iterates over the pages of a ListNotificationRules operation, 599 // calling the "fn" function with the response data for each page. To stop 600 // iterating, return false from the fn function. 601 // 602 // See ListNotificationRules method for more information on how to use this operation. 603 // 604 // Note: This operation can generate multiple requests to a service. 605 // 606 // // Example iterating over at most 3 pages of a ListNotificationRules operation. 607 // pageNum := 0 608 // err := client.ListNotificationRulesPages(params, 609 // func(page *codestarnotifications.ListNotificationRulesOutput, lastPage bool) bool { 610 // pageNum++ 611 // fmt.Println(page) 612 // return pageNum <= 3 613 // }) 614 // 615 func (c *CodeStarNotifications) ListNotificationRulesPages(input *ListNotificationRulesInput, fn func(*ListNotificationRulesOutput, bool) bool) error { 616 return c.ListNotificationRulesPagesWithContext(aws.BackgroundContext(), input, fn) 617 } 618 619 // ListNotificationRulesPagesWithContext same as ListNotificationRulesPages except 620 // it takes a Context and allows setting request options on the pages. 621 // 622 // The context must be non-nil and will be used for request cancellation. If 623 // the context is nil a panic will occur. In the future the SDK may create 624 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 625 // for more information on using Contexts. 626 func (c *CodeStarNotifications) ListNotificationRulesPagesWithContext(ctx aws.Context, input *ListNotificationRulesInput, fn func(*ListNotificationRulesOutput, bool) bool, opts ...request.Option) error { 627 p := request.Pagination{ 628 NewRequest: func() (*request.Request, error) { 629 var inCpy *ListNotificationRulesInput 630 if input != nil { 631 tmp := *input 632 inCpy = &tmp 633 } 634 req, _ := c.ListNotificationRulesRequest(inCpy) 635 req.SetContext(ctx) 636 req.ApplyOptions(opts...) 637 return req, nil 638 }, 639 } 640 641 for p.Next() { 642 if !fn(p.Page().(*ListNotificationRulesOutput), !p.HasNextPage()) { 643 break 644 } 645 } 646 647 return p.Err() 648 } 649 650 const opListTagsForResource = "ListTagsForResource" 651 652 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 653 // client's request for the ListTagsForResource operation. The "output" return 654 // value will be populated with the request's response once the request completes 655 // successfully. 656 // 657 // Use "Send" method on the returned Request to send the API call to the service. 658 // the "output" return value is not valid until after Send returns without error. 659 // 660 // See ListTagsForResource for more information on using the ListTagsForResource 661 // API call, and error handling. 662 // 663 // This method is useful when you want to inject custom logic or configuration 664 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 665 // 666 // 667 // // Example sending a request using the ListTagsForResourceRequest method. 668 // req, resp := client.ListTagsForResourceRequest(params) 669 // 670 // err := req.Send() 671 // if err == nil { // resp is now filled 672 // fmt.Println(resp) 673 // } 674 // 675 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListTagsForResource 676 func (c *CodeStarNotifications) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 677 op := &request.Operation{ 678 Name: opListTagsForResource, 679 HTTPMethod: "POST", 680 HTTPPath: "/listTagsForResource", 681 } 682 683 if input == nil { 684 input = &ListTagsForResourceInput{} 685 } 686 687 output = &ListTagsForResourceOutput{} 688 req = c.newRequest(op, input, output) 689 return 690 } 691 692 // ListTagsForResource API operation for AWS CodeStar Notifications. 693 // 694 // Returns a list of the tags associated with a notification rule. 695 // 696 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 697 // with awserr.Error's Code and Message methods to get detailed information about 698 // the error. 699 // 700 // See the AWS API reference guide for AWS CodeStar Notifications's 701 // API operation ListTagsForResource for usage and error information. 702 // 703 // Returned Error Types: 704 // * ResourceNotFoundException 705 // AWS CodeStar Notifications can't find a resource that matches the provided 706 // ARN. 707 // 708 // * ValidationException 709 // One or more parameter values are not valid. 710 // 711 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListTagsForResource 712 func (c *CodeStarNotifications) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 713 req, out := c.ListTagsForResourceRequest(input) 714 return out, req.Send() 715 } 716 717 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 718 // the ability to pass a context and additional request options. 719 // 720 // See ListTagsForResource for details on how to use this API operation. 721 // 722 // The context must be non-nil and will be used for request cancellation. If 723 // the context is nil a panic will occur. In the future the SDK may create 724 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 725 // for more information on using Contexts. 726 func (c *CodeStarNotifications) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 727 req, out := c.ListTagsForResourceRequest(input) 728 req.SetContext(ctx) 729 req.ApplyOptions(opts...) 730 return out, req.Send() 731 } 732 733 const opListTargets = "ListTargets" 734 735 // ListTargetsRequest generates a "aws/request.Request" representing the 736 // client's request for the ListTargets operation. The "output" return 737 // value will be populated with the request's response once the request completes 738 // successfully. 739 // 740 // Use "Send" method on the returned Request to send the API call to the service. 741 // the "output" return value is not valid until after Send returns without error. 742 // 743 // See ListTargets for more information on using the ListTargets 744 // API call, and error handling. 745 // 746 // This method is useful when you want to inject custom logic or configuration 747 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 748 // 749 // 750 // // Example sending a request using the ListTargetsRequest method. 751 // req, resp := client.ListTargetsRequest(params) 752 // 753 // err := req.Send() 754 // if err == nil { // resp is now filled 755 // fmt.Println(resp) 756 // } 757 // 758 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListTargets 759 func (c *CodeStarNotifications) ListTargetsRequest(input *ListTargetsInput) (req *request.Request, output *ListTargetsOutput) { 760 op := &request.Operation{ 761 Name: opListTargets, 762 HTTPMethod: "POST", 763 HTTPPath: "/listTargets", 764 Paginator: &request.Paginator{ 765 InputTokens: []string{"NextToken"}, 766 OutputTokens: []string{"NextToken"}, 767 LimitToken: "MaxResults", 768 TruncationToken: "", 769 }, 770 } 771 772 if input == nil { 773 input = &ListTargetsInput{} 774 } 775 776 output = &ListTargetsOutput{} 777 req = c.newRequest(op, input, output) 778 return 779 } 780 781 // ListTargets API operation for AWS CodeStar Notifications. 782 // 783 // Returns a list of the notification rule targets for an AWS account. 784 // 785 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 786 // with awserr.Error's Code and Message methods to get detailed information about 787 // the error. 788 // 789 // See the AWS API reference guide for AWS CodeStar Notifications's 790 // API operation ListTargets for usage and error information. 791 // 792 // Returned Error Types: 793 // * InvalidNextTokenException 794 // The value for the enumeration token used in the request to return the next 795 // batch of the results is not valid. 796 // 797 // * ValidationException 798 // One or more parameter values are not valid. 799 // 800 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListTargets 801 func (c *CodeStarNotifications) ListTargets(input *ListTargetsInput) (*ListTargetsOutput, error) { 802 req, out := c.ListTargetsRequest(input) 803 return out, req.Send() 804 } 805 806 // ListTargetsWithContext is the same as ListTargets with the addition of 807 // the ability to pass a context and additional request options. 808 // 809 // See ListTargets for details on how to use this API operation. 810 // 811 // The context must be non-nil and will be used for request cancellation. If 812 // the context is nil a panic will occur. In the future the SDK may create 813 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 814 // for more information on using Contexts. 815 func (c *CodeStarNotifications) ListTargetsWithContext(ctx aws.Context, input *ListTargetsInput, opts ...request.Option) (*ListTargetsOutput, error) { 816 req, out := c.ListTargetsRequest(input) 817 req.SetContext(ctx) 818 req.ApplyOptions(opts...) 819 return out, req.Send() 820 } 821 822 // ListTargetsPages iterates over the pages of a ListTargets operation, 823 // calling the "fn" function with the response data for each page. To stop 824 // iterating, return false from the fn function. 825 // 826 // See ListTargets method for more information on how to use this operation. 827 // 828 // Note: This operation can generate multiple requests to a service. 829 // 830 // // Example iterating over at most 3 pages of a ListTargets operation. 831 // pageNum := 0 832 // err := client.ListTargetsPages(params, 833 // func(page *codestarnotifications.ListTargetsOutput, lastPage bool) bool { 834 // pageNum++ 835 // fmt.Println(page) 836 // return pageNum <= 3 837 // }) 838 // 839 func (c *CodeStarNotifications) ListTargetsPages(input *ListTargetsInput, fn func(*ListTargetsOutput, bool) bool) error { 840 return c.ListTargetsPagesWithContext(aws.BackgroundContext(), input, fn) 841 } 842 843 // ListTargetsPagesWithContext same as ListTargetsPages except 844 // it takes a Context and allows setting request options on the pages. 845 // 846 // The context must be non-nil and will be used for request cancellation. If 847 // the context is nil a panic will occur. In the future the SDK may create 848 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 849 // for more information on using Contexts. 850 func (c *CodeStarNotifications) ListTargetsPagesWithContext(ctx aws.Context, input *ListTargetsInput, fn func(*ListTargetsOutput, bool) bool, opts ...request.Option) error { 851 p := request.Pagination{ 852 NewRequest: func() (*request.Request, error) { 853 var inCpy *ListTargetsInput 854 if input != nil { 855 tmp := *input 856 inCpy = &tmp 857 } 858 req, _ := c.ListTargetsRequest(inCpy) 859 req.SetContext(ctx) 860 req.ApplyOptions(opts...) 861 return req, nil 862 }, 863 } 864 865 for p.Next() { 866 if !fn(p.Page().(*ListTargetsOutput), !p.HasNextPage()) { 867 break 868 } 869 } 870 871 return p.Err() 872 } 873 874 const opSubscribe = "Subscribe" 875 876 // SubscribeRequest generates a "aws/request.Request" representing the 877 // client's request for the Subscribe operation. The "output" return 878 // value will be populated with the request's response once the request completes 879 // successfully. 880 // 881 // Use "Send" method on the returned Request to send the API call to the service. 882 // the "output" return value is not valid until after Send returns without error. 883 // 884 // See Subscribe for more information on using the Subscribe 885 // API call, and error handling. 886 // 887 // This method is useful when you want to inject custom logic or configuration 888 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 889 // 890 // 891 // // Example sending a request using the SubscribeRequest method. 892 // req, resp := client.SubscribeRequest(params) 893 // 894 // err := req.Send() 895 // if err == nil { // resp is now filled 896 // fmt.Println(resp) 897 // } 898 // 899 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/Subscribe 900 func (c *CodeStarNotifications) SubscribeRequest(input *SubscribeInput) (req *request.Request, output *SubscribeOutput) { 901 op := &request.Operation{ 902 Name: opSubscribe, 903 HTTPMethod: "POST", 904 HTTPPath: "/subscribe", 905 } 906 907 if input == nil { 908 input = &SubscribeInput{} 909 } 910 911 output = &SubscribeOutput{} 912 req = c.newRequest(op, input, output) 913 return 914 } 915 916 // Subscribe API operation for AWS CodeStar Notifications. 917 // 918 // Creates an association between a notification rule and an SNS topic so that 919 // the associated target can receive notifications when the events described 920 // in the rule are triggered. 921 // 922 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 923 // with awserr.Error's Code and Message methods to get detailed information about 924 // the error. 925 // 926 // See the AWS API reference guide for AWS CodeStar Notifications's 927 // API operation Subscribe for usage and error information. 928 // 929 // Returned Error Types: 930 // * ValidationException 931 // One or more parameter values are not valid. 932 // 933 // * ResourceNotFoundException 934 // AWS CodeStar Notifications can't find a resource that matches the provided 935 // ARN. 936 // 937 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/Subscribe 938 func (c *CodeStarNotifications) Subscribe(input *SubscribeInput) (*SubscribeOutput, error) { 939 req, out := c.SubscribeRequest(input) 940 return out, req.Send() 941 } 942 943 // SubscribeWithContext is the same as Subscribe with the addition of 944 // the ability to pass a context and additional request options. 945 // 946 // See Subscribe for details on how to use this API operation. 947 // 948 // The context must be non-nil and will be used for request cancellation. If 949 // the context is nil a panic will occur. In the future the SDK may create 950 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 951 // for more information on using Contexts. 952 func (c *CodeStarNotifications) SubscribeWithContext(ctx aws.Context, input *SubscribeInput, opts ...request.Option) (*SubscribeOutput, error) { 953 req, out := c.SubscribeRequest(input) 954 req.SetContext(ctx) 955 req.ApplyOptions(opts...) 956 return out, req.Send() 957 } 958 959 const opTagResource = "TagResource" 960 961 // TagResourceRequest generates a "aws/request.Request" representing the 962 // client's request for the TagResource operation. The "output" return 963 // value will be populated with the request's response once the request completes 964 // successfully. 965 // 966 // Use "Send" method on the returned Request to send the API call to the service. 967 // the "output" return value is not valid until after Send returns without error. 968 // 969 // See TagResource for more information on using the TagResource 970 // API call, and error handling. 971 // 972 // This method is useful when you want to inject custom logic or configuration 973 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 974 // 975 // 976 // // Example sending a request using the TagResourceRequest method. 977 // req, resp := client.TagResourceRequest(params) 978 // 979 // err := req.Send() 980 // if err == nil { // resp is now filled 981 // fmt.Println(resp) 982 // } 983 // 984 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/TagResource 985 func (c *CodeStarNotifications) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 986 op := &request.Operation{ 987 Name: opTagResource, 988 HTTPMethod: "POST", 989 HTTPPath: "/tagResource", 990 } 991 992 if input == nil { 993 input = &TagResourceInput{} 994 } 995 996 output = &TagResourceOutput{} 997 req = c.newRequest(op, input, output) 998 return 999 } 1000 1001 // TagResource API operation for AWS CodeStar Notifications. 1002 // 1003 // Associates a set of provided tags with a notification rule. 1004 // 1005 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1006 // with awserr.Error's Code and Message methods to get detailed information about 1007 // the error. 1008 // 1009 // See the AWS API reference guide for AWS CodeStar Notifications's 1010 // API operation TagResource for usage and error information. 1011 // 1012 // Returned Error Types: 1013 // * ResourceNotFoundException 1014 // AWS CodeStar Notifications can't find a resource that matches the provided 1015 // ARN. 1016 // 1017 // * ValidationException 1018 // One or more parameter values are not valid. 1019 // 1020 // * ConcurrentModificationException 1021 // AWS CodeStar Notifications can't complete the request because the resource 1022 // is being modified by another process. Wait a few minutes and try again. 1023 // 1024 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/TagResource 1025 func (c *CodeStarNotifications) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1026 req, out := c.TagResourceRequest(input) 1027 return out, req.Send() 1028 } 1029 1030 // TagResourceWithContext is the same as TagResource with the addition of 1031 // the ability to pass a context and additional request options. 1032 // 1033 // See TagResource for details on how to use this API operation. 1034 // 1035 // The context must be non-nil and will be used for request cancellation. If 1036 // the context is nil a panic will occur. In the future the SDK may create 1037 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1038 // for more information on using Contexts. 1039 func (c *CodeStarNotifications) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1040 req, out := c.TagResourceRequest(input) 1041 req.SetContext(ctx) 1042 req.ApplyOptions(opts...) 1043 return out, req.Send() 1044 } 1045 1046 const opUnsubscribe = "Unsubscribe" 1047 1048 // UnsubscribeRequest generates a "aws/request.Request" representing the 1049 // client's request for the Unsubscribe operation. The "output" return 1050 // value will be populated with the request's response once the request completes 1051 // successfully. 1052 // 1053 // Use "Send" method on the returned Request to send the API call to the service. 1054 // the "output" return value is not valid until after Send returns without error. 1055 // 1056 // See Unsubscribe for more information on using the Unsubscribe 1057 // API call, and error handling. 1058 // 1059 // This method is useful when you want to inject custom logic or configuration 1060 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1061 // 1062 // 1063 // // Example sending a request using the UnsubscribeRequest method. 1064 // req, resp := client.UnsubscribeRequest(params) 1065 // 1066 // err := req.Send() 1067 // if err == nil { // resp is now filled 1068 // fmt.Println(resp) 1069 // } 1070 // 1071 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/Unsubscribe 1072 func (c *CodeStarNotifications) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, output *UnsubscribeOutput) { 1073 op := &request.Operation{ 1074 Name: opUnsubscribe, 1075 HTTPMethod: "POST", 1076 HTTPPath: "/unsubscribe", 1077 } 1078 1079 if input == nil { 1080 input = &UnsubscribeInput{} 1081 } 1082 1083 output = &UnsubscribeOutput{} 1084 req = c.newRequest(op, input, output) 1085 return 1086 } 1087 1088 // Unsubscribe API operation for AWS CodeStar Notifications. 1089 // 1090 // Removes an association between a notification rule and an Amazon SNS topic 1091 // so that subscribers to that topic stop receiving notifications when the events 1092 // described in the rule are triggered. 1093 // 1094 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1095 // with awserr.Error's Code and Message methods to get detailed information about 1096 // the error. 1097 // 1098 // See the AWS API reference guide for AWS CodeStar Notifications's 1099 // API operation Unsubscribe for usage and error information. 1100 // 1101 // Returned Error Types: 1102 // * ValidationException 1103 // One or more parameter values are not valid. 1104 // 1105 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/Unsubscribe 1106 func (c *CodeStarNotifications) Unsubscribe(input *UnsubscribeInput) (*UnsubscribeOutput, error) { 1107 req, out := c.UnsubscribeRequest(input) 1108 return out, req.Send() 1109 } 1110 1111 // UnsubscribeWithContext is the same as Unsubscribe with the addition of 1112 // the ability to pass a context and additional request options. 1113 // 1114 // See Unsubscribe for details on how to use this API operation. 1115 // 1116 // The context must be non-nil and will be used for request cancellation. If 1117 // the context is nil a panic will occur. In the future the SDK may create 1118 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1119 // for more information on using Contexts. 1120 func (c *CodeStarNotifications) UnsubscribeWithContext(ctx aws.Context, input *UnsubscribeInput, opts ...request.Option) (*UnsubscribeOutput, error) { 1121 req, out := c.UnsubscribeRequest(input) 1122 req.SetContext(ctx) 1123 req.ApplyOptions(opts...) 1124 return out, req.Send() 1125 } 1126 1127 const opUntagResource = "UntagResource" 1128 1129 // UntagResourceRequest generates a "aws/request.Request" representing the 1130 // client's request for the UntagResource operation. The "output" return 1131 // value will be populated with the request's response once the request completes 1132 // successfully. 1133 // 1134 // Use "Send" method on the returned Request to send the API call to the service. 1135 // the "output" return value is not valid until after Send returns without error. 1136 // 1137 // See UntagResource for more information on using the UntagResource 1138 // API call, and error handling. 1139 // 1140 // This method is useful when you want to inject custom logic or configuration 1141 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1142 // 1143 // 1144 // // Example sending a request using the UntagResourceRequest method. 1145 // req, resp := client.UntagResourceRequest(params) 1146 // 1147 // err := req.Send() 1148 // if err == nil { // resp is now filled 1149 // fmt.Println(resp) 1150 // } 1151 // 1152 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/UntagResource 1153 func (c *CodeStarNotifications) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1154 op := &request.Operation{ 1155 Name: opUntagResource, 1156 HTTPMethod: "POST", 1157 HTTPPath: "/untagResource", 1158 } 1159 1160 if input == nil { 1161 input = &UntagResourceInput{} 1162 } 1163 1164 output = &UntagResourceOutput{} 1165 req = c.newRequest(op, input, output) 1166 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1167 return 1168 } 1169 1170 // UntagResource API operation for AWS CodeStar Notifications. 1171 // 1172 // Removes the association between one or more provided tags and a notification 1173 // rule. 1174 // 1175 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1176 // with awserr.Error's Code and Message methods to get detailed information about 1177 // the error. 1178 // 1179 // See the AWS API reference guide for AWS CodeStar Notifications's 1180 // API operation UntagResource for usage and error information. 1181 // 1182 // Returned Error Types: 1183 // * ResourceNotFoundException 1184 // AWS CodeStar Notifications can't find a resource that matches the provided 1185 // ARN. 1186 // 1187 // * ValidationException 1188 // One or more parameter values are not valid. 1189 // 1190 // * ConcurrentModificationException 1191 // AWS CodeStar Notifications can't complete the request because the resource 1192 // is being modified by another process. Wait a few minutes and try again. 1193 // 1194 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/UntagResource 1195 func (c *CodeStarNotifications) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1196 req, out := c.UntagResourceRequest(input) 1197 return out, req.Send() 1198 } 1199 1200 // UntagResourceWithContext is the same as UntagResource with the addition of 1201 // the ability to pass a context and additional request options. 1202 // 1203 // See UntagResource for details on how to use this API operation. 1204 // 1205 // The context must be non-nil and will be used for request cancellation. If 1206 // the context is nil a panic will occur. In the future the SDK may create 1207 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1208 // for more information on using Contexts. 1209 func (c *CodeStarNotifications) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1210 req, out := c.UntagResourceRequest(input) 1211 req.SetContext(ctx) 1212 req.ApplyOptions(opts...) 1213 return out, req.Send() 1214 } 1215 1216 const opUpdateNotificationRule = "UpdateNotificationRule" 1217 1218 // UpdateNotificationRuleRequest generates a "aws/request.Request" representing the 1219 // client's request for the UpdateNotificationRule operation. The "output" return 1220 // value will be populated with the request's response once the request completes 1221 // successfully. 1222 // 1223 // Use "Send" method on the returned Request to send the API call to the service. 1224 // the "output" return value is not valid until after Send returns without error. 1225 // 1226 // See UpdateNotificationRule for more information on using the UpdateNotificationRule 1227 // API call, and error handling. 1228 // 1229 // This method is useful when you want to inject custom logic or configuration 1230 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1231 // 1232 // 1233 // // Example sending a request using the UpdateNotificationRuleRequest method. 1234 // req, resp := client.UpdateNotificationRuleRequest(params) 1235 // 1236 // err := req.Send() 1237 // if err == nil { // resp is now filled 1238 // fmt.Println(resp) 1239 // } 1240 // 1241 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/UpdateNotificationRule 1242 func (c *CodeStarNotifications) UpdateNotificationRuleRequest(input *UpdateNotificationRuleInput) (req *request.Request, output *UpdateNotificationRuleOutput) { 1243 op := &request.Operation{ 1244 Name: opUpdateNotificationRule, 1245 HTTPMethod: "POST", 1246 HTTPPath: "/updateNotificationRule", 1247 } 1248 1249 if input == nil { 1250 input = &UpdateNotificationRuleInput{} 1251 } 1252 1253 output = &UpdateNotificationRuleOutput{} 1254 req = c.newRequest(op, input, output) 1255 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1256 return 1257 } 1258 1259 // UpdateNotificationRule API operation for AWS CodeStar Notifications. 1260 // 1261 // Updates a notification rule for a resource. You can change the events that 1262 // trigger the notification rule, the status of the rule, and the targets that 1263 // receive the notifications. 1264 // 1265 // To add or remove tags for a notification rule, you must use TagResource and 1266 // UntagResource. 1267 // 1268 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1269 // with awserr.Error's Code and Message methods to get detailed information about 1270 // the error. 1271 // 1272 // See the AWS API reference guide for AWS CodeStar Notifications's 1273 // API operation UpdateNotificationRule for usage and error information. 1274 // 1275 // Returned Error Types: 1276 // * ValidationException 1277 // One or more parameter values are not valid. 1278 // 1279 // * ResourceNotFoundException 1280 // AWS CodeStar Notifications can't find a resource that matches the provided 1281 // ARN. 1282 // 1283 // See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/UpdateNotificationRule 1284 func (c *CodeStarNotifications) UpdateNotificationRule(input *UpdateNotificationRuleInput) (*UpdateNotificationRuleOutput, error) { 1285 req, out := c.UpdateNotificationRuleRequest(input) 1286 return out, req.Send() 1287 } 1288 1289 // UpdateNotificationRuleWithContext is the same as UpdateNotificationRule with the addition of 1290 // the ability to pass a context and additional request options. 1291 // 1292 // See UpdateNotificationRule for details on how to use this API operation. 1293 // 1294 // The context must be non-nil and will be used for request cancellation. If 1295 // the context is nil a panic will occur. In the future the SDK may create 1296 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1297 // for more information on using Contexts. 1298 func (c *CodeStarNotifications) UpdateNotificationRuleWithContext(ctx aws.Context, input *UpdateNotificationRuleInput, opts ...request.Option) (*UpdateNotificationRuleOutput, error) { 1299 req, out := c.UpdateNotificationRuleRequest(input) 1300 req.SetContext(ctx) 1301 req.ApplyOptions(opts...) 1302 return out, req.Send() 1303 } 1304 1305 // AWS CodeStar Notifications can't create the notification rule because you 1306 // do not have sufficient permissions. 1307 type AccessDeniedException struct { 1308 _ struct{} `type:"structure"` 1309 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1310 1311 Message_ *string `locationName:"Message" min:"1" type:"string"` 1312 } 1313 1314 // String returns the string representation. 1315 // 1316 // API parameter values that are decorated as "sensitive" in the API will not 1317 // be included in the string output. The member name will be present, but the 1318 // value will be replaced with "sensitive". 1319 func (s AccessDeniedException) String() string { 1320 return awsutil.Prettify(s) 1321 } 1322 1323 // GoString returns the string representation. 1324 // 1325 // API parameter values that are decorated as "sensitive" in the API will not 1326 // be included in the string output. The member name will be present, but the 1327 // value will be replaced with "sensitive". 1328 func (s AccessDeniedException) GoString() string { 1329 return s.String() 1330 } 1331 1332 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1333 return &AccessDeniedException{ 1334 RespMetadata: v, 1335 } 1336 } 1337 1338 // Code returns the exception type name. 1339 func (s *AccessDeniedException) Code() string { 1340 return "AccessDeniedException" 1341 } 1342 1343 // Message returns the exception's message. 1344 func (s *AccessDeniedException) Message() string { 1345 if s.Message_ != nil { 1346 return *s.Message_ 1347 } 1348 return "" 1349 } 1350 1351 // OrigErr always returns nil, satisfies awserr.Error interface. 1352 func (s *AccessDeniedException) OrigErr() error { 1353 return nil 1354 } 1355 1356 func (s *AccessDeniedException) Error() string { 1357 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1358 } 1359 1360 // Status code returns the HTTP status code for the request's response error. 1361 func (s *AccessDeniedException) StatusCode() int { 1362 return s.RespMetadata.StatusCode 1363 } 1364 1365 // RequestID returns the service's response RequestID for request. 1366 func (s *AccessDeniedException) RequestID() string { 1367 return s.RespMetadata.RequestID 1368 } 1369 1370 // AWS CodeStar Notifications can't complete the request because the resource 1371 // is being modified by another process. Wait a few minutes and try again. 1372 type ConcurrentModificationException struct { 1373 _ struct{} `type:"structure"` 1374 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1375 1376 Message_ *string `locationName:"Message" min:"1" type:"string"` 1377 } 1378 1379 // String returns the string representation. 1380 // 1381 // API parameter values that are decorated as "sensitive" in the API will not 1382 // be included in the string output. The member name will be present, but the 1383 // value will be replaced with "sensitive". 1384 func (s ConcurrentModificationException) String() string { 1385 return awsutil.Prettify(s) 1386 } 1387 1388 // GoString returns the string representation. 1389 // 1390 // API parameter values that are decorated as "sensitive" in the API will not 1391 // be included in the string output. The member name will be present, but the 1392 // value will be replaced with "sensitive". 1393 func (s ConcurrentModificationException) GoString() string { 1394 return s.String() 1395 } 1396 1397 func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1398 return &ConcurrentModificationException{ 1399 RespMetadata: v, 1400 } 1401 } 1402 1403 // Code returns the exception type name. 1404 func (s *ConcurrentModificationException) Code() string { 1405 return "ConcurrentModificationException" 1406 } 1407 1408 // Message returns the exception's message. 1409 func (s *ConcurrentModificationException) Message() string { 1410 if s.Message_ != nil { 1411 return *s.Message_ 1412 } 1413 return "" 1414 } 1415 1416 // OrigErr always returns nil, satisfies awserr.Error interface. 1417 func (s *ConcurrentModificationException) OrigErr() error { 1418 return nil 1419 } 1420 1421 func (s *ConcurrentModificationException) Error() string { 1422 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1423 } 1424 1425 // Status code returns the HTTP status code for the request's response error. 1426 func (s *ConcurrentModificationException) StatusCode() int { 1427 return s.RespMetadata.StatusCode 1428 } 1429 1430 // RequestID returns the service's response RequestID for request. 1431 func (s *ConcurrentModificationException) RequestID() string { 1432 return s.RespMetadata.RequestID 1433 } 1434 1435 // Some or all of the configuration is incomplete, missing, or not valid. 1436 type ConfigurationException struct { 1437 _ struct{} `type:"structure"` 1438 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1439 1440 Message_ *string `locationName:"Message" min:"1" type:"string"` 1441 } 1442 1443 // String returns the string representation. 1444 // 1445 // API parameter values that are decorated as "sensitive" in the API will not 1446 // be included in the string output. The member name will be present, but the 1447 // value will be replaced with "sensitive". 1448 func (s ConfigurationException) String() string { 1449 return awsutil.Prettify(s) 1450 } 1451 1452 // GoString returns the string representation. 1453 // 1454 // API parameter values that are decorated as "sensitive" in the API will not 1455 // be included in the string output. The member name will be present, but the 1456 // value will be replaced with "sensitive". 1457 func (s ConfigurationException) GoString() string { 1458 return s.String() 1459 } 1460 1461 func newErrorConfigurationException(v protocol.ResponseMetadata) error { 1462 return &ConfigurationException{ 1463 RespMetadata: v, 1464 } 1465 } 1466 1467 // Code returns the exception type name. 1468 func (s *ConfigurationException) Code() string { 1469 return "ConfigurationException" 1470 } 1471 1472 // Message returns the exception's message. 1473 func (s *ConfigurationException) Message() string { 1474 if s.Message_ != nil { 1475 return *s.Message_ 1476 } 1477 return "" 1478 } 1479 1480 // OrigErr always returns nil, satisfies awserr.Error interface. 1481 func (s *ConfigurationException) OrigErr() error { 1482 return nil 1483 } 1484 1485 func (s *ConfigurationException) Error() string { 1486 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1487 } 1488 1489 // Status code returns the HTTP status code for the request's response error. 1490 func (s *ConfigurationException) StatusCode() int { 1491 return s.RespMetadata.StatusCode 1492 } 1493 1494 // RequestID returns the service's response RequestID for request. 1495 func (s *ConfigurationException) RequestID() string { 1496 return s.RespMetadata.RequestID 1497 } 1498 1499 type CreateNotificationRuleInput struct { 1500 _ struct{} `type:"structure"` 1501 1502 // A unique, client-generated idempotency token that, when provided in a request, 1503 // ensures the request cannot be repeated with a changed parameter. If a request 1504 // with the same parameters is received and a token is included, the request 1505 // returns information about the initial request that used that token. 1506 // 1507 // The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, 1508 // an idempotency token is created for you. 1509 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 1510 1511 // The level of detail to include in the notifications for this resource. BASIC 1512 // will include only the contents of the event as it would appear in AWS CloudWatch. 1513 // FULL will include any supplemental information provided by AWS CodeStar Notifications 1514 // and/or the service for the resource for which the notification is created. 1515 // 1516 // DetailType is a required field 1517 DetailType *string `type:"string" required:"true" enum:"DetailType"` 1518 1519 // A list of event types associated with this notification rule. For a list 1520 // of allowed events, see EventTypeSummary. 1521 // 1522 // EventTypeIds is a required field 1523 EventTypeIds []*string `type:"list" required:"true"` 1524 1525 // The name for the notification rule. Notifictaion rule names must be unique 1526 // in your AWS account. 1527 // 1528 // Name is a sensitive parameter and its value will be 1529 // replaced with "sensitive" in string returned by CreateNotificationRuleInput's 1530 // String and GoString methods. 1531 // 1532 // Name is a required field 1533 Name *string `min:"1" type:"string" required:"true" sensitive:"true"` 1534 1535 // The Amazon Resource Name (ARN) of the resource to associate with the notification 1536 // rule. Supported resources include pipelines in AWS CodePipeline, repositories 1537 // in AWS CodeCommit, and build projects in AWS CodeBuild. 1538 // 1539 // Resource is a required field 1540 Resource *string `type:"string" required:"true"` 1541 1542 // The status of the notification rule. The default value is ENABLED. If the 1543 // status is set to DISABLED, notifications aren't sent for the notification 1544 // rule. 1545 Status *string `type:"string" enum:"NotificationRuleStatus"` 1546 1547 // A list of tags to apply to this notification rule. Key names cannot start 1548 // with "aws". 1549 Tags map[string]*string `type:"map"` 1550 1551 // A list of Amazon Resource Names (ARNs) of SNS topics to associate with the 1552 // notification rule. 1553 // 1554 // Targets is a required field 1555 Targets []*Target `type:"list" required:"true"` 1556 } 1557 1558 // String returns the string representation. 1559 // 1560 // API parameter values that are decorated as "sensitive" in the API will not 1561 // be included in the string output. The member name will be present, but the 1562 // value will be replaced with "sensitive". 1563 func (s CreateNotificationRuleInput) String() string { 1564 return awsutil.Prettify(s) 1565 } 1566 1567 // GoString returns the string representation. 1568 // 1569 // API parameter values that are decorated as "sensitive" in the API will not 1570 // be included in the string output. The member name will be present, but the 1571 // value will be replaced with "sensitive". 1572 func (s CreateNotificationRuleInput) GoString() string { 1573 return s.String() 1574 } 1575 1576 // Validate inspects the fields of the type to determine if they are valid. 1577 func (s *CreateNotificationRuleInput) Validate() error { 1578 invalidParams := request.ErrInvalidParams{Context: "CreateNotificationRuleInput"} 1579 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 1580 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 1581 } 1582 if s.DetailType == nil { 1583 invalidParams.Add(request.NewErrParamRequired("DetailType")) 1584 } 1585 if s.EventTypeIds == nil { 1586 invalidParams.Add(request.NewErrParamRequired("EventTypeIds")) 1587 } 1588 if s.Name == nil { 1589 invalidParams.Add(request.NewErrParamRequired("Name")) 1590 } 1591 if s.Name != nil && len(*s.Name) < 1 { 1592 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1593 } 1594 if s.Resource == nil { 1595 invalidParams.Add(request.NewErrParamRequired("Resource")) 1596 } 1597 if s.Targets == nil { 1598 invalidParams.Add(request.NewErrParamRequired("Targets")) 1599 } 1600 if s.Targets != nil { 1601 for i, v := range s.Targets { 1602 if v == nil { 1603 continue 1604 } 1605 if err := v.Validate(); err != nil { 1606 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) 1607 } 1608 } 1609 } 1610 1611 if invalidParams.Len() > 0 { 1612 return invalidParams 1613 } 1614 return nil 1615 } 1616 1617 // SetClientRequestToken sets the ClientRequestToken field's value. 1618 func (s *CreateNotificationRuleInput) SetClientRequestToken(v string) *CreateNotificationRuleInput { 1619 s.ClientRequestToken = &v 1620 return s 1621 } 1622 1623 // SetDetailType sets the DetailType field's value. 1624 func (s *CreateNotificationRuleInput) SetDetailType(v string) *CreateNotificationRuleInput { 1625 s.DetailType = &v 1626 return s 1627 } 1628 1629 // SetEventTypeIds sets the EventTypeIds field's value. 1630 func (s *CreateNotificationRuleInput) SetEventTypeIds(v []*string) *CreateNotificationRuleInput { 1631 s.EventTypeIds = v 1632 return s 1633 } 1634 1635 // SetName sets the Name field's value. 1636 func (s *CreateNotificationRuleInput) SetName(v string) *CreateNotificationRuleInput { 1637 s.Name = &v 1638 return s 1639 } 1640 1641 // SetResource sets the Resource field's value. 1642 func (s *CreateNotificationRuleInput) SetResource(v string) *CreateNotificationRuleInput { 1643 s.Resource = &v 1644 return s 1645 } 1646 1647 // SetStatus sets the Status field's value. 1648 func (s *CreateNotificationRuleInput) SetStatus(v string) *CreateNotificationRuleInput { 1649 s.Status = &v 1650 return s 1651 } 1652 1653 // SetTags sets the Tags field's value. 1654 func (s *CreateNotificationRuleInput) SetTags(v map[string]*string) *CreateNotificationRuleInput { 1655 s.Tags = v 1656 return s 1657 } 1658 1659 // SetTargets sets the Targets field's value. 1660 func (s *CreateNotificationRuleInput) SetTargets(v []*Target) *CreateNotificationRuleInput { 1661 s.Targets = v 1662 return s 1663 } 1664 1665 type CreateNotificationRuleOutput struct { 1666 _ struct{} `type:"structure"` 1667 1668 // The Amazon Resource Name (ARN) of the notification rule. 1669 Arn *string `type:"string"` 1670 } 1671 1672 // String returns the string representation. 1673 // 1674 // API parameter values that are decorated as "sensitive" in the API will not 1675 // be included in the string output. The member name will be present, but the 1676 // value will be replaced with "sensitive". 1677 func (s CreateNotificationRuleOutput) String() string { 1678 return awsutil.Prettify(s) 1679 } 1680 1681 // GoString returns the string representation. 1682 // 1683 // API parameter values that are decorated as "sensitive" in the API will not 1684 // be included in the string output. The member name will be present, but the 1685 // value will be replaced with "sensitive". 1686 func (s CreateNotificationRuleOutput) GoString() string { 1687 return s.String() 1688 } 1689 1690 // SetArn sets the Arn field's value. 1691 func (s *CreateNotificationRuleOutput) SetArn(v string) *CreateNotificationRuleOutput { 1692 s.Arn = &v 1693 return s 1694 } 1695 1696 type DeleteNotificationRuleInput struct { 1697 _ struct{} `type:"structure"` 1698 1699 // The Amazon Resource Name (ARN) of the notification rule you want to delete. 1700 // 1701 // Arn is a required field 1702 Arn *string `type:"string" required:"true"` 1703 } 1704 1705 // String returns the string representation. 1706 // 1707 // API parameter values that are decorated as "sensitive" in the API will not 1708 // be included in the string output. The member name will be present, but the 1709 // value will be replaced with "sensitive". 1710 func (s DeleteNotificationRuleInput) String() string { 1711 return awsutil.Prettify(s) 1712 } 1713 1714 // GoString returns the string representation. 1715 // 1716 // API parameter values that are decorated as "sensitive" in the API will not 1717 // be included in the string output. The member name will be present, but the 1718 // value will be replaced with "sensitive". 1719 func (s DeleteNotificationRuleInput) GoString() string { 1720 return s.String() 1721 } 1722 1723 // Validate inspects the fields of the type to determine if they are valid. 1724 func (s *DeleteNotificationRuleInput) Validate() error { 1725 invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationRuleInput"} 1726 if s.Arn == nil { 1727 invalidParams.Add(request.NewErrParamRequired("Arn")) 1728 } 1729 1730 if invalidParams.Len() > 0 { 1731 return invalidParams 1732 } 1733 return nil 1734 } 1735 1736 // SetArn sets the Arn field's value. 1737 func (s *DeleteNotificationRuleInput) SetArn(v string) *DeleteNotificationRuleInput { 1738 s.Arn = &v 1739 return s 1740 } 1741 1742 type DeleteNotificationRuleOutput struct { 1743 _ struct{} `type:"structure"` 1744 1745 // The Amazon Resource Name (ARN) of the deleted notification rule. 1746 Arn *string `type:"string"` 1747 } 1748 1749 // String returns the string representation. 1750 // 1751 // API parameter values that are decorated as "sensitive" in the API will not 1752 // be included in the string output. The member name will be present, but the 1753 // value will be replaced with "sensitive". 1754 func (s DeleteNotificationRuleOutput) String() string { 1755 return awsutil.Prettify(s) 1756 } 1757 1758 // GoString returns the string representation. 1759 // 1760 // API parameter values that are decorated as "sensitive" in the API will not 1761 // be included in the string output. The member name will be present, but the 1762 // value will be replaced with "sensitive". 1763 func (s DeleteNotificationRuleOutput) GoString() string { 1764 return s.String() 1765 } 1766 1767 // SetArn sets the Arn field's value. 1768 func (s *DeleteNotificationRuleOutput) SetArn(v string) *DeleteNotificationRuleOutput { 1769 s.Arn = &v 1770 return s 1771 } 1772 1773 type DeleteTargetInput struct { 1774 _ struct{} `type:"structure"` 1775 1776 // A Boolean value that can be used to delete all associations with this SNS 1777 // topic. The default value is FALSE. If set to TRUE, all associations between 1778 // that target and every notification rule in your AWS account are deleted. 1779 ForceUnsubscribeAll *bool `type:"boolean"` 1780 1781 // The Amazon Resource Name (ARN) of the SNS topic to delete. 1782 // 1783 // TargetAddress is a sensitive parameter and its value will be 1784 // replaced with "sensitive" in string returned by DeleteTargetInput's 1785 // String and GoString methods. 1786 // 1787 // TargetAddress is a required field 1788 TargetAddress *string `min:"1" type:"string" required:"true" sensitive:"true"` 1789 } 1790 1791 // String returns the string representation. 1792 // 1793 // API parameter values that are decorated as "sensitive" in the API will not 1794 // be included in the string output. The member name will be present, but the 1795 // value will be replaced with "sensitive". 1796 func (s DeleteTargetInput) String() string { 1797 return awsutil.Prettify(s) 1798 } 1799 1800 // GoString returns the string representation. 1801 // 1802 // API parameter values that are decorated as "sensitive" in the API will not 1803 // be included in the string output. The member name will be present, but the 1804 // value will be replaced with "sensitive". 1805 func (s DeleteTargetInput) GoString() string { 1806 return s.String() 1807 } 1808 1809 // Validate inspects the fields of the type to determine if they are valid. 1810 func (s *DeleteTargetInput) Validate() error { 1811 invalidParams := request.ErrInvalidParams{Context: "DeleteTargetInput"} 1812 if s.TargetAddress == nil { 1813 invalidParams.Add(request.NewErrParamRequired("TargetAddress")) 1814 } 1815 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 1816 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 1817 } 1818 1819 if invalidParams.Len() > 0 { 1820 return invalidParams 1821 } 1822 return nil 1823 } 1824 1825 // SetForceUnsubscribeAll sets the ForceUnsubscribeAll field's value. 1826 func (s *DeleteTargetInput) SetForceUnsubscribeAll(v bool) *DeleteTargetInput { 1827 s.ForceUnsubscribeAll = &v 1828 return s 1829 } 1830 1831 // SetTargetAddress sets the TargetAddress field's value. 1832 func (s *DeleteTargetInput) SetTargetAddress(v string) *DeleteTargetInput { 1833 s.TargetAddress = &v 1834 return s 1835 } 1836 1837 type DeleteTargetOutput struct { 1838 _ struct{} `type:"structure" nopayload:"true"` 1839 } 1840 1841 // String returns the string representation. 1842 // 1843 // API parameter values that are decorated as "sensitive" in the API will not 1844 // be included in the string output. The member name will be present, but the 1845 // value will be replaced with "sensitive". 1846 func (s DeleteTargetOutput) String() string { 1847 return awsutil.Prettify(s) 1848 } 1849 1850 // GoString returns the string representation. 1851 // 1852 // API parameter values that are decorated as "sensitive" in the API will not 1853 // be included in the string output. The member name will be present, but the 1854 // value will be replaced with "sensitive". 1855 func (s DeleteTargetOutput) GoString() string { 1856 return s.String() 1857 } 1858 1859 type DescribeNotificationRuleInput struct { 1860 _ struct{} `type:"structure"` 1861 1862 // The Amazon Resource Name (ARN) of the notification rule. 1863 // 1864 // Arn is a required field 1865 Arn *string `type:"string" required:"true"` 1866 } 1867 1868 // String returns the string representation. 1869 // 1870 // API parameter values that are decorated as "sensitive" in the API will not 1871 // be included in the string output. The member name will be present, but the 1872 // value will be replaced with "sensitive". 1873 func (s DescribeNotificationRuleInput) String() string { 1874 return awsutil.Prettify(s) 1875 } 1876 1877 // GoString returns the string representation. 1878 // 1879 // API parameter values that are decorated as "sensitive" in the API will not 1880 // be included in the string output. The member name will be present, but the 1881 // value will be replaced with "sensitive". 1882 func (s DescribeNotificationRuleInput) GoString() string { 1883 return s.String() 1884 } 1885 1886 // Validate inspects the fields of the type to determine if they are valid. 1887 func (s *DescribeNotificationRuleInput) Validate() error { 1888 invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationRuleInput"} 1889 if s.Arn == nil { 1890 invalidParams.Add(request.NewErrParamRequired("Arn")) 1891 } 1892 1893 if invalidParams.Len() > 0 { 1894 return invalidParams 1895 } 1896 return nil 1897 } 1898 1899 // SetArn sets the Arn field's value. 1900 func (s *DescribeNotificationRuleInput) SetArn(v string) *DescribeNotificationRuleInput { 1901 s.Arn = &v 1902 return s 1903 } 1904 1905 type DescribeNotificationRuleOutput struct { 1906 _ struct{} `type:"structure"` 1907 1908 // The Amazon Resource Name (ARN) of the notification rule. 1909 // 1910 // Arn is a required field 1911 Arn *string `type:"string" required:"true"` 1912 1913 // The name or email alias of the person who created the notification rule. 1914 CreatedBy *string `min:"1" type:"string"` 1915 1916 // The date and time the notification rule was created, in timestamp format. 1917 CreatedTimestamp *time.Time `type:"timestamp"` 1918 1919 // The level of detail included in the notifications for this resource. BASIC 1920 // will include only the contents of the event as it would appear in AWS CloudWatch. 1921 // FULL will include any supplemental information provided by AWS CodeStar Notifications 1922 // and/or the service for the resource for which the notification is created. 1923 DetailType *string `type:"string" enum:"DetailType"` 1924 1925 // A list of the event types associated with the notification rule. 1926 EventTypes []*EventTypeSummary `type:"list"` 1927 1928 // The date and time the notification rule was most recently updated, in timestamp 1929 // format. 1930 LastModifiedTimestamp *time.Time `type:"timestamp"` 1931 1932 // The name of the notification rule. 1933 // 1934 // Name is a sensitive parameter and its value will be 1935 // replaced with "sensitive" in string returned by DescribeNotificationRuleOutput's 1936 // String and GoString methods. 1937 Name *string `min:"1" type:"string" sensitive:"true"` 1938 1939 // The Amazon Resource Name (ARN) of the resource associated with the notification 1940 // rule. 1941 Resource *string `type:"string"` 1942 1943 // The status of the notification rule. Valid statuses are on (sending notifications) 1944 // or off (not sending notifications). 1945 Status *string `type:"string" enum:"NotificationRuleStatus"` 1946 1947 // The tags associated with the notification rule. 1948 Tags map[string]*string `type:"map"` 1949 1950 // A list of the SNS topics associated with the notification rule. 1951 Targets []*TargetSummary `type:"list"` 1952 } 1953 1954 // String returns the string representation. 1955 // 1956 // API parameter values that are decorated as "sensitive" in the API will not 1957 // be included in the string output. The member name will be present, but the 1958 // value will be replaced with "sensitive". 1959 func (s DescribeNotificationRuleOutput) String() string { 1960 return awsutil.Prettify(s) 1961 } 1962 1963 // GoString returns the string representation. 1964 // 1965 // API parameter values that are decorated as "sensitive" in the API will not 1966 // be included in the string output. The member name will be present, but the 1967 // value will be replaced with "sensitive". 1968 func (s DescribeNotificationRuleOutput) GoString() string { 1969 return s.String() 1970 } 1971 1972 // SetArn sets the Arn field's value. 1973 func (s *DescribeNotificationRuleOutput) SetArn(v string) *DescribeNotificationRuleOutput { 1974 s.Arn = &v 1975 return s 1976 } 1977 1978 // SetCreatedBy sets the CreatedBy field's value. 1979 func (s *DescribeNotificationRuleOutput) SetCreatedBy(v string) *DescribeNotificationRuleOutput { 1980 s.CreatedBy = &v 1981 return s 1982 } 1983 1984 // SetCreatedTimestamp sets the CreatedTimestamp field's value. 1985 func (s *DescribeNotificationRuleOutput) SetCreatedTimestamp(v time.Time) *DescribeNotificationRuleOutput { 1986 s.CreatedTimestamp = &v 1987 return s 1988 } 1989 1990 // SetDetailType sets the DetailType field's value. 1991 func (s *DescribeNotificationRuleOutput) SetDetailType(v string) *DescribeNotificationRuleOutput { 1992 s.DetailType = &v 1993 return s 1994 } 1995 1996 // SetEventTypes sets the EventTypes field's value. 1997 func (s *DescribeNotificationRuleOutput) SetEventTypes(v []*EventTypeSummary) *DescribeNotificationRuleOutput { 1998 s.EventTypes = v 1999 return s 2000 } 2001 2002 // SetLastModifiedTimestamp sets the LastModifiedTimestamp field's value. 2003 func (s *DescribeNotificationRuleOutput) SetLastModifiedTimestamp(v time.Time) *DescribeNotificationRuleOutput { 2004 s.LastModifiedTimestamp = &v 2005 return s 2006 } 2007 2008 // SetName sets the Name field's value. 2009 func (s *DescribeNotificationRuleOutput) SetName(v string) *DescribeNotificationRuleOutput { 2010 s.Name = &v 2011 return s 2012 } 2013 2014 // SetResource sets the Resource field's value. 2015 func (s *DescribeNotificationRuleOutput) SetResource(v string) *DescribeNotificationRuleOutput { 2016 s.Resource = &v 2017 return s 2018 } 2019 2020 // SetStatus sets the Status field's value. 2021 func (s *DescribeNotificationRuleOutput) SetStatus(v string) *DescribeNotificationRuleOutput { 2022 s.Status = &v 2023 return s 2024 } 2025 2026 // SetTags sets the Tags field's value. 2027 func (s *DescribeNotificationRuleOutput) SetTags(v map[string]*string) *DescribeNotificationRuleOutput { 2028 s.Tags = v 2029 return s 2030 } 2031 2032 // SetTargets sets the Targets field's value. 2033 func (s *DescribeNotificationRuleOutput) SetTargets(v []*TargetSummary) *DescribeNotificationRuleOutput { 2034 s.Targets = v 2035 return s 2036 } 2037 2038 // Returns information about an event that has triggered a notification rule. 2039 type EventTypeSummary struct { 2040 _ struct{} `type:"structure"` 2041 2042 // The system-generated ID of the event. 2043 EventTypeId *string `min:"1" type:"string"` 2044 2045 // The name of the event. 2046 EventTypeName *string `type:"string"` 2047 2048 // The resource type of the event. 2049 ResourceType *string `min:"1" type:"string"` 2050 2051 // The name of the service for which the event applies. 2052 ServiceName *string `type:"string"` 2053 } 2054 2055 // String returns the string representation. 2056 // 2057 // API parameter values that are decorated as "sensitive" in the API will not 2058 // be included in the string output. The member name will be present, but the 2059 // value will be replaced with "sensitive". 2060 func (s EventTypeSummary) String() string { 2061 return awsutil.Prettify(s) 2062 } 2063 2064 // GoString returns the string representation. 2065 // 2066 // API parameter values that are decorated as "sensitive" in the API will not 2067 // be included in the string output. The member name will be present, but the 2068 // value will be replaced with "sensitive". 2069 func (s EventTypeSummary) GoString() string { 2070 return s.String() 2071 } 2072 2073 // SetEventTypeId sets the EventTypeId field's value. 2074 func (s *EventTypeSummary) SetEventTypeId(v string) *EventTypeSummary { 2075 s.EventTypeId = &v 2076 return s 2077 } 2078 2079 // SetEventTypeName sets the EventTypeName field's value. 2080 func (s *EventTypeSummary) SetEventTypeName(v string) *EventTypeSummary { 2081 s.EventTypeName = &v 2082 return s 2083 } 2084 2085 // SetResourceType sets the ResourceType field's value. 2086 func (s *EventTypeSummary) SetResourceType(v string) *EventTypeSummary { 2087 s.ResourceType = &v 2088 return s 2089 } 2090 2091 // SetServiceName sets the ServiceName field's value. 2092 func (s *EventTypeSummary) SetServiceName(v string) *EventTypeSummary { 2093 s.ServiceName = &v 2094 return s 2095 } 2096 2097 // The value for the enumeration token used in the request to return the next 2098 // batch of the results is not valid. 2099 type InvalidNextTokenException struct { 2100 _ struct{} `type:"structure"` 2101 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2102 2103 Message_ *string `locationName:"Message" min:"1" type:"string"` 2104 } 2105 2106 // String returns the string representation. 2107 // 2108 // API parameter values that are decorated as "sensitive" in the API will not 2109 // be included in the string output. The member name will be present, but the 2110 // value will be replaced with "sensitive". 2111 func (s InvalidNextTokenException) String() string { 2112 return awsutil.Prettify(s) 2113 } 2114 2115 // GoString returns the string representation. 2116 // 2117 // API parameter values that are decorated as "sensitive" in the API will not 2118 // be included in the string output. The member name will be present, but the 2119 // value will be replaced with "sensitive". 2120 func (s InvalidNextTokenException) GoString() string { 2121 return s.String() 2122 } 2123 2124 func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 2125 return &InvalidNextTokenException{ 2126 RespMetadata: v, 2127 } 2128 } 2129 2130 // Code returns the exception type name. 2131 func (s *InvalidNextTokenException) Code() string { 2132 return "InvalidNextTokenException" 2133 } 2134 2135 // Message returns the exception's message. 2136 func (s *InvalidNextTokenException) Message() string { 2137 if s.Message_ != nil { 2138 return *s.Message_ 2139 } 2140 return "" 2141 } 2142 2143 // OrigErr always returns nil, satisfies awserr.Error interface. 2144 func (s *InvalidNextTokenException) OrigErr() error { 2145 return nil 2146 } 2147 2148 func (s *InvalidNextTokenException) Error() string { 2149 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2150 } 2151 2152 // Status code returns the HTTP status code for the request's response error. 2153 func (s *InvalidNextTokenException) StatusCode() int { 2154 return s.RespMetadata.StatusCode 2155 } 2156 2157 // RequestID returns the service's response RequestID for request. 2158 func (s *InvalidNextTokenException) RequestID() string { 2159 return s.RespMetadata.RequestID 2160 } 2161 2162 // One of the AWS CodeStar Notifications limits has been exceeded. Limits apply 2163 // to accounts, notification rules, notifications, resources, and targets. For 2164 // more information, see Limits. 2165 type LimitExceededException struct { 2166 _ struct{} `type:"structure"` 2167 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2168 2169 Message_ *string `locationName:"Message" min:"1" type:"string"` 2170 } 2171 2172 // String returns the string representation. 2173 // 2174 // API parameter values that are decorated as "sensitive" in the API will not 2175 // be included in the string output. The member name will be present, but the 2176 // value will be replaced with "sensitive". 2177 func (s LimitExceededException) String() string { 2178 return awsutil.Prettify(s) 2179 } 2180 2181 // GoString returns the string representation. 2182 // 2183 // API parameter values that are decorated as "sensitive" in the API will not 2184 // be included in the string output. The member name will be present, but the 2185 // value will be replaced with "sensitive". 2186 func (s LimitExceededException) GoString() string { 2187 return s.String() 2188 } 2189 2190 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 2191 return &LimitExceededException{ 2192 RespMetadata: v, 2193 } 2194 } 2195 2196 // Code returns the exception type name. 2197 func (s *LimitExceededException) Code() string { 2198 return "LimitExceededException" 2199 } 2200 2201 // Message returns the exception's message. 2202 func (s *LimitExceededException) Message() string { 2203 if s.Message_ != nil { 2204 return *s.Message_ 2205 } 2206 return "" 2207 } 2208 2209 // OrigErr always returns nil, satisfies awserr.Error interface. 2210 func (s *LimitExceededException) OrigErr() error { 2211 return nil 2212 } 2213 2214 func (s *LimitExceededException) Error() string { 2215 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2216 } 2217 2218 // Status code returns the HTTP status code for the request's response error. 2219 func (s *LimitExceededException) StatusCode() int { 2220 return s.RespMetadata.StatusCode 2221 } 2222 2223 // RequestID returns the service's response RequestID for request. 2224 func (s *LimitExceededException) RequestID() string { 2225 return s.RespMetadata.RequestID 2226 } 2227 2228 // Information about a filter to apply to the list of returned event types. 2229 // You can filter by resource type or service name. 2230 type ListEventTypesFilter struct { 2231 _ struct{} `type:"structure"` 2232 2233 // The system-generated name of the filter type you want to filter by. 2234 // 2235 // Name is a required field 2236 Name *string `type:"string" required:"true" enum:"ListEventTypesFilterName"` 2237 2238 // The name of the resource type (for example, pipeline) or service name (for 2239 // example, CodePipeline) that you want to filter by. 2240 // 2241 // Value is a required field 2242 Value *string `type:"string" required:"true"` 2243 } 2244 2245 // String returns the string representation. 2246 // 2247 // API parameter values that are decorated as "sensitive" in the API will not 2248 // be included in the string output. The member name will be present, but the 2249 // value will be replaced with "sensitive". 2250 func (s ListEventTypesFilter) String() string { 2251 return awsutil.Prettify(s) 2252 } 2253 2254 // GoString returns the string representation. 2255 // 2256 // API parameter values that are decorated as "sensitive" in the API will not 2257 // be included in the string output. The member name will be present, but the 2258 // value will be replaced with "sensitive". 2259 func (s ListEventTypesFilter) GoString() string { 2260 return s.String() 2261 } 2262 2263 // Validate inspects the fields of the type to determine if they are valid. 2264 func (s *ListEventTypesFilter) Validate() error { 2265 invalidParams := request.ErrInvalidParams{Context: "ListEventTypesFilter"} 2266 if s.Name == nil { 2267 invalidParams.Add(request.NewErrParamRequired("Name")) 2268 } 2269 if s.Value == nil { 2270 invalidParams.Add(request.NewErrParamRequired("Value")) 2271 } 2272 2273 if invalidParams.Len() > 0 { 2274 return invalidParams 2275 } 2276 return nil 2277 } 2278 2279 // SetName sets the Name field's value. 2280 func (s *ListEventTypesFilter) SetName(v string) *ListEventTypesFilter { 2281 s.Name = &v 2282 return s 2283 } 2284 2285 // SetValue sets the Value field's value. 2286 func (s *ListEventTypesFilter) SetValue(v string) *ListEventTypesFilter { 2287 s.Value = &v 2288 return s 2289 } 2290 2291 type ListEventTypesInput struct { 2292 _ struct{} `type:"structure"` 2293 2294 // The filters to use to return information by service or resource type. 2295 Filters []*ListEventTypesFilter `type:"list"` 2296 2297 // A non-negative integer used to limit the number of returned results. The 2298 // default number is 50. The maximum number of results that can be returned 2299 // is 100. 2300 MaxResults *int64 `min:"1" type:"integer"` 2301 2302 // An enumeration token that, when provided in a request, returns the next batch 2303 // of the results. 2304 NextToken *string `type:"string"` 2305 } 2306 2307 // String returns the string representation. 2308 // 2309 // API parameter values that are decorated as "sensitive" in the API will not 2310 // be included in the string output. The member name will be present, but the 2311 // value will be replaced with "sensitive". 2312 func (s ListEventTypesInput) String() string { 2313 return awsutil.Prettify(s) 2314 } 2315 2316 // GoString returns the string representation. 2317 // 2318 // API parameter values that are decorated as "sensitive" in the API will not 2319 // be included in the string output. The member name will be present, but the 2320 // value will be replaced with "sensitive". 2321 func (s ListEventTypesInput) GoString() string { 2322 return s.String() 2323 } 2324 2325 // Validate inspects the fields of the type to determine if they are valid. 2326 func (s *ListEventTypesInput) Validate() error { 2327 invalidParams := request.ErrInvalidParams{Context: "ListEventTypesInput"} 2328 if s.MaxResults != nil && *s.MaxResults < 1 { 2329 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2330 } 2331 if s.Filters != nil { 2332 for i, v := range s.Filters { 2333 if v == nil { 2334 continue 2335 } 2336 if err := v.Validate(); err != nil { 2337 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2338 } 2339 } 2340 } 2341 2342 if invalidParams.Len() > 0 { 2343 return invalidParams 2344 } 2345 return nil 2346 } 2347 2348 // SetFilters sets the Filters field's value. 2349 func (s *ListEventTypesInput) SetFilters(v []*ListEventTypesFilter) *ListEventTypesInput { 2350 s.Filters = v 2351 return s 2352 } 2353 2354 // SetMaxResults sets the MaxResults field's value. 2355 func (s *ListEventTypesInput) SetMaxResults(v int64) *ListEventTypesInput { 2356 s.MaxResults = &v 2357 return s 2358 } 2359 2360 // SetNextToken sets the NextToken field's value. 2361 func (s *ListEventTypesInput) SetNextToken(v string) *ListEventTypesInput { 2362 s.NextToken = &v 2363 return s 2364 } 2365 2366 type ListEventTypesOutput struct { 2367 _ struct{} `type:"structure"` 2368 2369 // Information about each event, including service name, resource type, event 2370 // ID, and event name. 2371 EventTypes []*EventTypeSummary `type:"list"` 2372 2373 // An enumeration token that can be used in a request to return the next batch 2374 // of the results. 2375 NextToken *string `type:"string"` 2376 } 2377 2378 // String 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 ListEventTypesOutput) String() string { 2384 return awsutil.Prettify(s) 2385 } 2386 2387 // GoString returns the string representation. 2388 // 2389 // API parameter values that are decorated as "sensitive" in the API will not 2390 // be included in the string output. The member name will be present, but the 2391 // value will be replaced with "sensitive". 2392 func (s ListEventTypesOutput) GoString() string { 2393 return s.String() 2394 } 2395 2396 // SetEventTypes sets the EventTypes field's value. 2397 func (s *ListEventTypesOutput) SetEventTypes(v []*EventTypeSummary) *ListEventTypesOutput { 2398 s.EventTypes = v 2399 return s 2400 } 2401 2402 // SetNextToken sets the NextToken field's value. 2403 func (s *ListEventTypesOutput) SetNextToken(v string) *ListEventTypesOutput { 2404 s.NextToken = &v 2405 return s 2406 } 2407 2408 // Information about a filter to apply to the list of returned notification 2409 // rules. You can filter by event type, owner, resource, or target. 2410 type ListNotificationRulesFilter struct { 2411 _ struct{} `type:"structure"` 2412 2413 // The name of the attribute you want to use to filter the returned notification 2414 // rules. 2415 // 2416 // Name is a required field 2417 Name *string `type:"string" required:"true" enum:"ListNotificationRulesFilterName"` 2418 2419 // The value of the attribute you want to use to filter the returned notification 2420 // rules. For example, if you specify filtering by RESOURCE in Name, you might 2421 // specify the ARN of a pipeline in AWS CodePipeline for the value. 2422 // 2423 // Value is a required field 2424 Value *string `type:"string" required:"true"` 2425 } 2426 2427 // String returns the string representation. 2428 // 2429 // API parameter values that are decorated as "sensitive" in the API will not 2430 // be included in the string output. The member name will be present, but the 2431 // value will be replaced with "sensitive". 2432 func (s ListNotificationRulesFilter) String() string { 2433 return awsutil.Prettify(s) 2434 } 2435 2436 // GoString returns the string representation. 2437 // 2438 // API parameter values that are decorated as "sensitive" in the API will not 2439 // be included in the string output. The member name will be present, but the 2440 // value will be replaced with "sensitive". 2441 func (s ListNotificationRulesFilter) GoString() string { 2442 return s.String() 2443 } 2444 2445 // Validate inspects the fields of the type to determine if they are valid. 2446 func (s *ListNotificationRulesFilter) Validate() error { 2447 invalidParams := request.ErrInvalidParams{Context: "ListNotificationRulesFilter"} 2448 if s.Name == nil { 2449 invalidParams.Add(request.NewErrParamRequired("Name")) 2450 } 2451 if s.Value == nil { 2452 invalidParams.Add(request.NewErrParamRequired("Value")) 2453 } 2454 2455 if invalidParams.Len() > 0 { 2456 return invalidParams 2457 } 2458 return nil 2459 } 2460 2461 // SetName sets the Name field's value. 2462 func (s *ListNotificationRulesFilter) SetName(v string) *ListNotificationRulesFilter { 2463 s.Name = &v 2464 return s 2465 } 2466 2467 // SetValue sets the Value field's value. 2468 func (s *ListNotificationRulesFilter) SetValue(v string) *ListNotificationRulesFilter { 2469 s.Value = &v 2470 return s 2471 } 2472 2473 type ListNotificationRulesInput struct { 2474 _ struct{} `type:"structure"` 2475 2476 // The filters to use to return information by service or resource type. For 2477 // valid values, see ListNotificationRulesFilter. 2478 // 2479 // A filter with the same name can appear more than once when used with OR statements. 2480 // Filters with different names should be applied with AND statements. 2481 Filters []*ListNotificationRulesFilter `type:"list"` 2482 2483 // A non-negative integer used to limit the number of returned results. The 2484 // maximum number of results that can be returned is 100. 2485 MaxResults *int64 `min:"1" type:"integer"` 2486 2487 // An enumeration token that, when provided in a request, returns the next batch 2488 // of the results. 2489 NextToken *string `type:"string"` 2490 } 2491 2492 // String returns the string representation. 2493 // 2494 // API parameter values that are decorated as "sensitive" in the API will not 2495 // be included in the string output. The member name will be present, but the 2496 // value will be replaced with "sensitive". 2497 func (s ListNotificationRulesInput) String() string { 2498 return awsutil.Prettify(s) 2499 } 2500 2501 // GoString returns the string representation. 2502 // 2503 // API parameter values that are decorated as "sensitive" in the API will not 2504 // be included in the string output. The member name will be present, but the 2505 // value will be replaced with "sensitive". 2506 func (s ListNotificationRulesInput) GoString() string { 2507 return s.String() 2508 } 2509 2510 // Validate inspects the fields of the type to determine if they are valid. 2511 func (s *ListNotificationRulesInput) Validate() error { 2512 invalidParams := request.ErrInvalidParams{Context: "ListNotificationRulesInput"} 2513 if s.MaxResults != nil && *s.MaxResults < 1 { 2514 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2515 } 2516 if s.Filters != nil { 2517 for i, v := range s.Filters { 2518 if v == nil { 2519 continue 2520 } 2521 if err := v.Validate(); err != nil { 2522 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2523 } 2524 } 2525 } 2526 2527 if invalidParams.Len() > 0 { 2528 return invalidParams 2529 } 2530 return nil 2531 } 2532 2533 // SetFilters sets the Filters field's value. 2534 func (s *ListNotificationRulesInput) SetFilters(v []*ListNotificationRulesFilter) *ListNotificationRulesInput { 2535 s.Filters = v 2536 return s 2537 } 2538 2539 // SetMaxResults sets the MaxResults field's value. 2540 func (s *ListNotificationRulesInput) SetMaxResults(v int64) *ListNotificationRulesInput { 2541 s.MaxResults = &v 2542 return s 2543 } 2544 2545 // SetNextToken sets the NextToken field's value. 2546 func (s *ListNotificationRulesInput) SetNextToken(v string) *ListNotificationRulesInput { 2547 s.NextToken = &v 2548 return s 2549 } 2550 2551 type ListNotificationRulesOutput struct { 2552 _ struct{} `type:"structure"` 2553 2554 // An enumeration token that can be used in a request to return the next batch 2555 // of the results. 2556 NextToken *string `type:"string"` 2557 2558 // The list of notification rules for the AWS account, by Amazon Resource Name 2559 // (ARN) and ID. 2560 NotificationRules []*NotificationRuleSummary `type:"list"` 2561 } 2562 2563 // String returns the string representation. 2564 // 2565 // API parameter values that are decorated as "sensitive" in the API will not 2566 // be included in the string output. The member name will be present, but the 2567 // value will be replaced with "sensitive". 2568 func (s ListNotificationRulesOutput) String() string { 2569 return awsutil.Prettify(s) 2570 } 2571 2572 // GoString returns the string representation. 2573 // 2574 // API parameter values that are decorated as "sensitive" in the API will not 2575 // be included in the string output. The member name will be present, but the 2576 // value will be replaced with "sensitive". 2577 func (s ListNotificationRulesOutput) GoString() string { 2578 return s.String() 2579 } 2580 2581 // SetNextToken sets the NextToken field's value. 2582 func (s *ListNotificationRulesOutput) SetNextToken(v string) *ListNotificationRulesOutput { 2583 s.NextToken = &v 2584 return s 2585 } 2586 2587 // SetNotificationRules sets the NotificationRules field's value. 2588 func (s *ListNotificationRulesOutput) SetNotificationRules(v []*NotificationRuleSummary) *ListNotificationRulesOutput { 2589 s.NotificationRules = v 2590 return s 2591 } 2592 2593 type ListTagsForResourceInput struct { 2594 _ struct{} `type:"structure"` 2595 2596 // The Amazon Resource Name (ARN) for the notification rule. 2597 // 2598 // Arn is a required field 2599 Arn *string `type:"string" required:"true"` 2600 } 2601 2602 // String returns the string representation. 2603 // 2604 // API parameter values that are decorated as "sensitive" in the API will not 2605 // be included in the string output. The member name will be present, but the 2606 // value will be replaced with "sensitive". 2607 func (s ListTagsForResourceInput) String() string { 2608 return awsutil.Prettify(s) 2609 } 2610 2611 // GoString returns the string representation. 2612 // 2613 // API parameter values that are decorated as "sensitive" in the API will not 2614 // be included in the string output. The member name will be present, but the 2615 // value will be replaced with "sensitive". 2616 func (s ListTagsForResourceInput) GoString() string { 2617 return s.String() 2618 } 2619 2620 // Validate inspects the fields of the type to determine if they are valid. 2621 func (s *ListTagsForResourceInput) Validate() error { 2622 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 2623 if s.Arn == nil { 2624 invalidParams.Add(request.NewErrParamRequired("Arn")) 2625 } 2626 2627 if invalidParams.Len() > 0 { 2628 return invalidParams 2629 } 2630 return nil 2631 } 2632 2633 // SetArn sets the Arn field's value. 2634 func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { 2635 s.Arn = &v 2636 return s 2637 } 2638 2639 type ListTagsForResourceOutput struct { 2640 _ struct{} `type:"structure"` 2641 2642 // The tags associated with the notification rule. 2643 Tags map[string]*string `type:"map"` 2644 } 2645 2646 // String returns the string representation. 2647 // 2648 // API parameter values that are decorated as "sensitive" in the API will not 2649 // be included in the string output. The member name will be present, but the 2650 // value will be replaced with "sensitive". 2651 func (s ListTagsForResourceOutput) String() string { 2652 return awsutil.Prettify(s) 2653 } 2654 2655 // GoString returns the string representation. 2656 // 2657 // API parameter values that are decorated as "sensitive" in the API will not 2658 // be included in the string output. The member name will be present, but the 2659 // value will be replaced with "sensitive". 2660 func (s ListTagsForResourceOutput) GoString() string { 2661 return s.String() 2662 } 2663 2664 // SetTags sets the Tags field's value. 2665 func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 2666 s.Tags = v 2667 return s 2668 } 2669 2670 // Information about a filter to apply to the list of returned targets. You 2671 // can filter by target type, address, or status. For example, to filter results 2672 // to notification rules that have active Amazon SNS topics as targets, you 2673 // could specify a ListTargetsFilter Name as TargetType and a Value of SNS, 2674 // and a Name of TARGET_STATUS and a Value of ACTIVE. 2675 type ListTargetsFilter struct { 2676 _ struct{} `type:"structure"` 2677 2678 // The name of the attribute you want to use to filter the returned targets. 2679 // 2680 // Name is a required field 2681 Name *string `type:"string" required:"true" enum:"ListTargetsFilterName"` 2682 2683 // The value of the attribute you want to use to filter the returned targets. 2684 // For example, if you specify SNS for the Target type, you could specify an 2685 // Amazon Resource Name (ARN) for a topic as the value. 2686 // 2687 // Value is a required field 2688 Value *string `type:"string" required:"true"` 2689 } 2690 2691 // String returns the string representation. 2692 // 2693 // API parameter values that are decorated as "sensitive" in the API will not 2694 // be included in the string output. The member name will be present, but the 2695 // value will be replaced with "sensitive". 2696 func (s ListTargetsFilter) String() string { 2697 return awsutil.Prettify(s) 2698 } 2699 2700 // GoString returns the string representation. 2701 // 2702 // API parameter values that are decorated as "sensitive" in the API will not 2703 // be included in the string output. The member name will be present, but the 2704 // value will be replaced with "sensitive". 2705 func (s ListTargetsFilter) GoString() string { 2706 return s.String() 2707 } 2708 2709 // Validate inspects the fields of the type to determine if they are valid. 2710 func (s *ListTargetsFilter) Validate() error { 2711 invalidParams := request.ErrInvalidParams{Context: "ListTargetsFilter"} 2712 if s.Name == nil { 2713 invalidParams.Add(request.NewErrParamRequired("Name")) 2714 } 2715 if s.Value == nil { 2716 invalidParams.Add(request.NewErrParamRequired("Value")) 2717 } 2718 2719 if invalidParams.Len() > 0 { 2720 return invalidParams 2721 } 2722 return nil 2723 } 2724 2725 // SetName sets the Name field's value. 2726 func (s *ListTargetsFilter) SetName(v string) *ListTargetsFilter { 2727 s.Name = &v 2728 return s 2729 } 2730 2731 // SetValue sets the Value field's value. 2732 func (s *ListTargetsFilter) SetValue(v string) *ListTargetsFilter { 2733 s.Value = &v 2734 return s 2735 } 2736 2737 type ListTargetsInput struct { 2738 _ struct{} `type:"structure"` 2739 2740 // The filters to use to return information by service or resource type. Valid 2741 // filters include target type, target address, and target status. 2742 // 2743 // A filter with the same name can appear more than once when used with OR statements. 2744 // Filters with different names should be applied with AND statements. 2745 Filters []*ListTargetsFilter `type:"list"` 2746 2747 // A non-negative integer used to limit the number of returned results. The 2748 // maximum number of results that can be returned is 100. 2749 MaxResults *int64 `min:"1" type:"integer"` 2750 2751 // An enumeration token that, when provided in a request, returns the next batch 2752 // of the results. 2753 NextToken *string `type:"string"` 2754 } 2755 2756 // String returns the string representation. 2757 // 2758 // API parameter values that are decorated as "sensitive" in the API will not 2759 // be included in the string output. The member name will be present, but the 2760 // value will be replaced with "sensitive". 2761 func (s ListTargetsInput) String() string { 2762 return awsutil.Prettify(s) 2763 } 2764 2765 // GoString returns the string representation. 2766 // 2767 // API parameter values that are decorated as "sensitive" in the API will not 2768 // be included in the string output. The member name will be present, but the 2769 // value will be replaced with "sensitive". 2770 func (s ListTargetsInput) GoString() string { 2771 return s.String() 2772 } 2773 2774 // Validate inspects the fields of the type to determine if they are valid. 2775 func (s *ListTargetsInput) Validate() error { 2776 invalidParams := request.ErrInvalidParams{Context: "ListTargetsInput"} 2777 if s.MaxResults != nil && *s.MaxResults < 1 { 2778 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2779 } 2780 if s.Filters != nil { 2781 for i, v := range s.Filters { 2782 if v == nil { 2783 continue 2784 } 2785 if err := v.Validate(); err != nil { 2786 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2787 } 2788 } 2789 } 2790 2791 if invalidParams.Len() > 0 { 2792 return invalidParams 2793 } 2794 return nil 2795 } 2796 2797 // SetFilters sets the Filters field's value. 2798 func (s *ListTargetsInput) SetFilters(v []*ListTargetsFilter) *ListTargetsInput { 2799 s.Filters = v 2800 return s 2801 } 2802 2803 // SetMaxResults sets the MaxResults field's value. 2804 func (s *ListTargetsInput) SetMaxResults(v int64) *ListTargetsInput { 2805 s.MaxResults = &v 2806 return s 2807 } 2808 2809 // SetNextToken sets the NextToken field's value. 2810 func (s *ListTargetsInput) SetNextToken(v string) *ListTargetsInput { 2811 s.NextToken = &v 2812 return s 2813 } 2814 2815 type ListTargetsOutput struct { 2816 _ struct{} `type:"structure"` 2817 2818 // An enumeration token that can be used in a request to return the next batch 2819 // of results. 2820 NextToken *string `type:"string"` 2821 2822 // The list of notification rule targets. 2823 Targets []*TargetSummary `type:"list"` 2824 } 2825 2826 // String returns the string representation. 2827 // 2828 // API parameter values that are decorated as "sensitive" in the API will not 2829 // be included in the string output. The member name will be present, but the 2830 // value will be replaced with "sensitive". 2831 func (s ListTargetsOutput) String() string { 2832 return awsutil.Prettify(s) 2833 } 2834 2835 // GoString returns the string representation. 2836 // 2837 // API parameter values that are decorated as "sensitive" in the API will not 2838 // be included in the string output. The member name will be present, but the 2839 // value will be replaced with "sensitive". 2840 func (s ListTargetsOutput) GoString() string { 2841 return s.String() 2842 } 2843 2844 // SetNextToken sets the NextToken field's value. 2845 func (s *ListTargetsOutput) SetNextToken(v string) *ListTargetsOutput { 2846 s.NextToken = &v 2847 return s 2848 } 2849 2850 // SetTargets sets the Targets field's value. 2851 func (s *ListTargetsOutput) SetTargets(v []*TargetSummary) *ListTargetsOutput { 2852 s.Targets = v 2853 return s 2854 } 2855 2856 // Information about a specified notification rule. 2857 type NotificationRuleSummary struct { 2858 _ struct{} `type:"structure"` 2859 2860 // The Amazon Resource Name (ARN) of the notification rule. 2861 Arn *string `type:"string"` 2862 2863 // The unique ID of the notification rule. 2864 Id *string `min:"1" type:"string"` 2865 } 2866 2867 // String returns the string representation. 2868 // 2869 // API parameter values that are decorated as "sensitive" in the API will not 2870 // be included in the string output. The member name will be present, but the 2871 // value will be replaced with "sensitive". 2872 func (s NotificationRuleSummary) String() string { 2873 return awsutil.Prettify(s) 2874 } 2875 2876 // GoString returns the string representation. 2877 // 2878 // API parameter values that are decorated as "sensitive" in the API will not 2879 // be included in the string output. The member name will be present, but the 2880 // value will be replaced with "sensitive". 2881 func (s NotificationRuleSummary) GoString() string { 2882 return s.String() 2883 } 2884 2885 // SetArn sets the Arn field's value. 2886 func (s *NotificationRuleSummary) SetArn(v string) *NotificationRuleSummary { 2887 s.Arn = &v 2888 return s 2889 } 2890 2891 // SetId sets the Id field's value. 2892 func (s *NotificationRuleSummary) SetId(v string) *NotificationRuleSummary { 2893 s.Id = &v 2894 return s 2895 } 2896 2897 // A resource with the same name or ID already exists. Notification rule names 2898 // must be unique in your AWS account. 2899 type ResourceAlreadyExistsException struct { 2900 _ struct{} `type:"structure"` 2901 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2902 2903 Message_ *string `locationName:"Message" min:"1" type:"string"` 2904 } 2905 2906 // String returns the string representation. 2907 // 2908 // API parameter values that are decorated as "sensitive" in the API will not 2909 // be included in the string output. The member name will be present, but the 2910 // value will be replaced with "sensitive". 2911 func (s ResourceAlreadyExistsException) String() string { 2912 return awsutil.Prettify(s) 2913 } 2914 2915 // GoString returns the string representation. 2916 // 2917 // API parameter values that are decorated as "sensitive" in the API will not 2918 // be included in the string output. The member name will be present, but the 2919 // value will be replaced with "sensitive". 2920 func (s ResourceAlreadyExistsException) GoString() string { 2921 return s.String() 2922 } 2923 2924 func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 2925 return &ResourceAlreadyExistsException{ 2926 RespMetadata: v, 2927 } 2928 } 2929 2930 // Code returns the exception type name. 2931 func (s *ResourceAlreadyExistsException) Code() string { 2932 return "ResourceAlreadyExistsException" 2933 } 2934 2935 // Message returns the exception's message. 2936 func (s *ResourceAlreadyExistsException) Message() string { 2937 if s.Message_ != nil { 2938 return *s.Message_ 2939 } 2940 return "" 2941 } 2942 2943 // OrigErr always returns nil, satisfies awserr.Error interface. 2944 func (s *ResourceAlreadyExistsException) OrigErr() error { 2945 return nil 2946 } 2947 2948 func (s *ResourceAlreadyExistsException) Error() string { 2949 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2950 } 2951 2952 // Status code returns the HTTP status code for the request's response error. 2953 func (s *ResourceAlreadyExistsException) StatusCode() int { 2954 return s.RespMetadata.StatusCode 2955 } 2956 2957 // RequestID returns the service's response RequestID for request. 2958 func (s *ResourceAlreadyExistsException) RequestID() string { 2959 return s.RespMetadata.RequestID 2960 } 2961 2962 // AWS CodeStar Notifications can't find a resource that matches the provided 2963 // ARN. 2964 type ResourceNotFoundException struct { 2965 _ struct{} `type:"structure"` 2966 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2967 2968 Message_ *string `locationName:"Message" min:"1" type:"string"` 2969 } 2970 2971 // String returns the string representation. 2972 // 2973 // API parameter values that are decorated as "sensitive" in the API will not 2974 // be included in the string output. The member name will be present, but the 2975 // value will be replaced with "sensitive". 2976 func (s ResourceNotFoundException) String() string { 2977 return awsutil.Prettify(s) 2978 } 2979 2980 // GoString returns the string representation. 2981 // 2982 // API parameter values that are decorated as "sensitive" in the API will not 2983 // be included in the string output. The member name will be present, but the 2984 // value will be replaced with "sensitive". 2985 func (s ResourceNotFoundException) GoString() string { 2986 return s.String() 2987 } 2988 2989 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2990 return &ResourceNotFoundException{ 2991 RespMetadata: v, 2992 } 2993 } 2994 2995 // Code returns the exception type name. 2996 func (s *ResourceNotFoundException) Code() string { 2997 return "ResourceNotFoundException" 2998 } 2999 3000 // Message returns the exception's message. 3001 func (s *ResourceNotFoundException) Message() string { 3002 if s.Message_ != nil { 3003 return *s.Message_ 3004 } 3005 return "" 3006 } 3007 3008 // OrigErr always returns nil, satisfies awserr.Error interface. 3009 func (s *ResourceNotFoundException) OrigErr() error { 3010 return nil 3011 } 3012 3013 func (s *ResourceNotFoundException) Error() string { 3014 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3015 } 3016 3017 // Status code returns the HTTP status code for the request's response error. 3018 func (s *ResourceNotFoundException) StatusCode() int { 3019 return s.RespMetadata.StatusCode 3020 } 3021 3022 // RequestID returns the service's response RequestID for request. 3023 func (s *ResourceNotFoundException) RequestID() string { 3024 return s.RespMetadata.RequestID 3025 } 3026 3027 type SubscribeInput struct { 3028 _ struct{} `type:"structure"` 3029 3030 // The Amazon Resource Name (ARN) of the notification rule for which you want 3031 // to create the association. 3032 // 3033 // Arn is a required field 3034 Arn *string `type:"string" required:"true"` 3035 3036 // An enumeration token that, when provided in a request, returns the next batch 3037 // of the results. 3038 ClientRequestToken *string `min:"1" type:"string"` 3039 3040 // Information about the SNS topics associated with a notification rule. 3041 // 3042 // Target is a required field 3043 Target *Target `type:"structure" required:"true"` 3044 } 3045 3046 // String returns the string representation. 3047 // 3048 // API parameter values that are decorated as "sensitive" in the API will not 3049 // be included in the string output. The member name will be present, but the 3050 // value will be replaced with "sensitive". 3051 func (s SubscribeInput) String() string { 3052 return awsutil.Prettify(s) 3053 } 3054 3055 // GoString returns the string representation. 3056 // 3057 // API parameter values that are decorated as "sensitive" in the API will not 3058 // be included in the string output. The member name will be present, but the 3059 // value will be replaced with "sensitive". 3060 func (s SubscribeInput) GoString() string { 3061 return s.String() 3062 } 3063 3064 // Validate inspects the fields of the type to determine if they are valid. 3065 func (s *SubscribeInput) Validate() error { 3066 invalidParams := request.ErrInvalidParams{Context: "SubscribeInput"} 3067 if s.Arn == nil { 3068 invalidParams.Add(request.NewErrParamRequired("Arn")) 3069 } 3070 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 3071 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 3072 } 3073 if s.Target == nil { 3074 invalidParams.Add(request.NewErrParamRequired("Target")) 3075 } 3076 if s.Target != nil { 3077 if err := s.Target.Validate(); err != nil { 3078 invalidParams.AddNested("Target", err.(request.ErrInvalidParams)) 3079 } 3080 } 3081 3082 if invalidParams.Len() > 0 { 3083 return invalidParams 3084 } 3085 return nil 3086 } 3087 3088 // SetArn sets the Arn field's value. 3089 func (s *SubscribeInput) SetArn(v string) *SubscribeInput { 3090 s.Arn = &v 3091 return s 3092 } 3093 3094 // SetClientRequestToken sets the ClientRequestToken field's value. 3095 func (s *SubscribeInput) SetClientRequestToken(v string) *SubscribeInput { 3096 s.ClientRequestToken = &v 3097 return s 3098 } 3099 3100 // SetTarget sets the Target field's value. 3101 func (s *SubscribeInput) SetTarget(v *Target) *SubscribeInput { 3102 s.Target = v 3103 return s 3104 } 3105 3106 type SubscribeOutput struct { 3107 _ struct{} `type:"structure"` 3108 3109 // The Amazon Resource Name (ARN) of the notification rule for which you have 3110 // created assocations. 3111 Arn *string `type:"string"` 3112 } 3113 3114 // String returns the string representation. 3115 // 3116 // API parameter values that are decorated as "sensitive" in the API will not 3117 // be included in the string output. The member name will be present, but the 3118 // value will be replaced with "sensitive". 3119 func (s SubscribeOutput) String() string { 3120 return awsutil.Prettify(s) 3121 } 3122 3123 // GoString returns the string representation. 3124 // 3125 // API parameter values that are decorated as "sensitive" in the API will not 3126 // be included in the string output. The member name will be present, but the 3127 // value will be replaced with "sensitive". 3128 func (s SubscribeOutput) GoString() string { 3129 return s.String() 3130 } 3131 3132 // SetArn sets the Arn field's value. 3133 func (s *SubscribeOutput) SetArn(v string) *SubscribeOutput { 3134 s.Arn = &v 3135 return s 3136 } 3137 3138 type TagResourceInput struct { 3139 _ struct{} `type:"structure"` 3140 3141 // The Amazon Resource Name (ARN) of the notification rule to tag. 3142 // 3143 // Arn is a required field 3144 Arn *string `type:"string" required:"true"` 3145 3146 // The list of tags to associate with the resource. Tag key names cannot start 3147 // with "aws". 3148 // 3149 // Tags is a required field 3150 Tags map[string]*string `type:"map" required:"true"` 3151 } 3152 3153 // String returns the string representation. 3154 // 3155 // API parameter values that are decorated as "sensitive" in the API will not 3156 // be included in the string output. The member name will be present, but the 3157 // value will be replaced with "sensitive". 3158 func (s TagResourceInput) String() string { 3159 return awsutil.Prettify(s) 3160 } 3161 3162 // GoString returns the string representation. 3163 // 3164 // API parameter values that are decorated as "sensitive" in the API will not 3165 // be included in the string output. The member name will be present, but the 3166 // value will be replaced with "sensitive". 3167 func (s TagResourceInput) GoString() string { 3168 return s.String() 3169 } 3170 3171 // Validate inspects the fields of the type to determine if they are valid. 3172 func (s *TagResourceInput) Validate() error { 3173 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 3174 if s.Arn == nil { 3175 invalidParams.Add(request.NewErrParamRequired("Arn")) 3176 } 3177 if s.Tags == nil { 3178 invalidParams.Add(request.NewErrParamRequired("Tags")) 3179 } 3180 3181 if invalidParams.Len() > 0 { 3182 return invalidParams 3183 } 3184 return nil 3185 } 3186 3187 // SetArn sets the Arn field's value. 3188 func (s *TagResourceInput) SetArn(v string) *TagResourceInput { 3189 s.Arn = &v 3190 return s 3191 } 3192 3193 // SetTags sets the Tags field's value. 3194 func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 3195 s.Tags = v 3196 return s 3197 } 3198 3199 type TagResourceOutput struct { 3200 _ struct{} `type:"structure"` 3201 3202 // The list of tags associated with the resource. 3203 Tags map[string]*string `type:"map"` 3204 } 3205 3206 // String returns the string representation. 3207 // 3208 // API parameter values that are decorated as "sensitive" in the API will not 3209 // be included in the string output. The member name will be present, but the 3210 // value will be replaced with "sensitive". 3211 func (s TagResourceOutput) String() string { 3212 return awsutil.Prettify(s) 3213 } 3214 3215 // GoString returns the string representation. 3216 // 3217 // API parameter values that are decorated as "sensitive" in the API will not 3218 // be included in the string output. The member name will be present, but the 3219 // value will be replaced with "sensitive". 3220 func (s TagResourceOutput) GoString() string { 3221 return s.String() 3222 } 3223 3224 // SetTags sets the Tags field's value. 3225 func (s *TagResourceOutput) SetTags(v map[string]*string) *TagResourceOutput { 3226 s.Tags = v 3227 return s 3228 } 3229 3230 // Information about the SNS topics associated with a notification rule. 3231 type Target struct { 3232 _ struct{} `type:"structure"` 3233 3234 // The Amazon Resource Name (ARN) of the SNS topic. 3235 // 3236 // TargetAddress is a sensitive parameter and its value will be 3237 // replaced with "sensitive" in string returned by Target's 3238 // String and GoString methods. 3239 TargetAddress *string `min:"1" type:"string" sensitive:"true"` 3240 3241 // The target type. Can be an Amazon SNS topic. 3242 TargetType *string `type:"string"` 3243 } 3244 3245 // String returns the string representation. 3246 // 3247 // API parameter values that are decorated as "sensitive" in the API will not 3248 // be included in the string output. The member name will be present, but the 3249 // value will be replaced with "sensitive". 3250 func (s Target) String() string { 3251 return awsutil.Prettify(s) 3252 } 3253 3254 // GoString returns the string representation. 3255 // 3256 // API parameter values that are decorated as "sensitive" in the API will not 3257 // be included in the string output. The member name will be present, but the 3258 // value will be replaced with "sensitive". 3259 func (s Target) GoString() string { 3260 return s.String() 3261 } 3262 3263 // Validate inspects the fields of the type to determine if they are valid. 3264 func (s *Target) Validate() error { 3265 invalidParams := request.ErrInvalidParams{Context: "Target"} 3266 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 3267 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 3268 } 3269 3270 if invalidParams.Len() > 0 { 3271 return invalidParams 3272 } 3273 return nil 3274 } 3275 3276 // SetTargetAddress sets the TargetAddress field's value. 3277 func (s *Target) SetTargetAddress(v string) *Target { 3278 s.TargetAddress = &v 3279 return s 3280 } 3281 3282 // SetTargetType sets the TargetType field's value. 3283 func (s *Target) SetTargetType(v string) *Target { 3284 s.TargetType = &v 3285 return s 3286 } 3287 3288 // Information about the targets specified for a notification rule. 3289 type TargetSummary struct { 3290 _ struct{} `type:"structure"` 3291 3292 // The Amazon Resource Name (ARN) of the SNS topic. 3293 // 3294 // TargetAddress is a sensitive parameter and its value will be 3295 // replaced with "sensitive" in string returned by TargetSummary's 3296 // String and GoString methods. 3297 TargetAddress *string `min:"1" type:"string" sensitive:"true"` 3298 3299 // The status of the target. 3300 TargetStatus *string `type:"string" enum:"TargetStatus"` 3301 3302 // The type of the target (for example, SNS). 3303 TargetType *string `type:"string"` 3304 } 3305 3306 // String returns the string representation. 3307 // 3308 // API parameter values that are decorated as "sensitive" in the API will not 3309 // be included in the string output. The member name will be present, but the 3310 // value will be replaced with "sensitive". 3311 func (s TargetSummary) String() string { 3312 return awsutil.Prettify(s) 3313 } 3314 3315 // GoString returns the string representation. 3316 // 3317 // API parameter values that are decorated as "sensitive" in the API will not 3318 // be included in the string output. The member name will be present, but the 3319 // value will be replaced with "sensitive". 3320 func (s TargetSummary) GoString() string { 3321 return s.String() 3322 } 3323 3324 // SetTargetAddress sets the TargetAddress field's value. 3325 func (s *TargetSummary) SetTargetAddress(v string) *TargetSummary { 3326 s.TargetAddress = &v 3327 return s 3328 } 3329 3330 // SetTargetStatus sets the TargetStatus field's value. 3331 func (s *TargetSummary) SetTargetStatus(v string) *TargetSummary { 3332 s.TargetStatus = &v 3333 return s 3334 } 3335 3336 // SetTargetType sets the TargetType field's value. 3337 func (s *TargetSummary) SetTargetType(v string) *TargetSummary { 3338 s.TargetType = &v 3339 return s 3340 } 3341 3342 type UnsubscribeInput struct { 3343 _ struct{} `type:"structure"` 3344 3345 // The Amazon Resource Name (ARN) of the notification rule. 3346 // 3347 // Arn is a required field 3348 Arn *string `type:"string" required:"true"` 3349 3350 // The ARN of the SNS topic to unsubscribe from the notification rule. 3351 // 3352 // TargetAddress is a sensitive parameter and its value will be 3353 // replaced with "sensitive" in string returned by UnsubscribeInput's 3354 // String and GoString methods. 3355 // 3356 // TargetAddress is a required field 3357 TargetAddress *string `min:"1" type:"string" required:"true" sensitive:"true"` 3358 } 3359 3360 // String returns the string representation. 3361 // 3362 // API parameter values that are decorated as "sensitive" in the API will not 3363 // be included in the string output. The member name will be present, but the 3364 // value will be replaced with "sensitive". 3365 func (s UnsubscribeInput) String() string { 3366 return awsutil.Prettify(s) 3367 } 3368 3369 // GoString returns the string representation. 3370 // 3371 // API parameter values that are decorated as "sensitive" in the API will not 3372 // be included in the string output. The member name will be present, but the 3373 // value will be replaced with "sensitive". 3374 func (s UnsubscribeInput) GoString() string { 3375 return s.String() 3376 } 3377 3378 // Validate inspects the fields of the type to determine if they are valid. 3379 func (s *UnsubscribeInput) Validate() error { 3380 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeInput"} 3381 if s.Arn == nil { 3382 invalidParams.Add(request.NewErrParamRequired("Arn")) 3383 } 3384 if s.TargetAddress == nil { 3385 invalidParams.Add(request.NewErrParamRequired("TargetAddress")) 3386 } 3387 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 3388 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 3389 } 3390 3391 if invalidParams.Len() > 0 { 3392 return invalidParams 3393 } 3394 return nil 3395 } 3396 3397 // SetArn sets the Arn field's value. 3398 func (s *UnsubscribeInput) SetArn(v string) *UnsubscribeInput { 3399 s.Arn = &v 3400 return s 3401 } 3402 3403 // SetTargetAddress sets the TargetAddress field's value. 3404 func (s *UnsubscribeInput) SetTargetAddress(v string) *UnsubscribeInput { 3405 s.TargetAddress = &v 3406 return s 3407 } 3408 3409 type UnsubscribeOutput struct { 3410 _ struct{} `type:"structure"` 3411 3412 // The Amazon Resource Name (ARN) of the the notification rule from which you 3413 // have removed a subscription. 3414 // 3415 // Arn is a required field 3416 Arn *string `type:"string" required:"true"` 3417 } 3418 3419 // String returns the string representation. 3420 // 3421 // API parameter values that are decorated as "sensitive" in the API will not 3422 // be included in the string output. The member name will be present, but the 3423 // value will be replaced with "sensitive". 3424 func (s UnsubscribeOutput) String() string { 3425 return awsutil.Prettify(s) 3426 } 3427 3428 // GoString returns the string representation. 3429 // 3430 // API parameter values that are decorated as "sensitive" in the API will not 3431 // be included in the string output. The member name will be present, but the 3432 // value will be replaced with "sensitive". 3433 func (s UnsubscribeOutput) GoString() string { 3434 return s.String() 3435 } 3436 3437 // SetArn sets the Arn field's value. 3438 func (s *UnsubscribeOutput) SetArn(v string) *UnsubscribeOutput { 3439 s.Arn = &v 3440 return s 3441 } 3442 3443 type UntagResourceInput struct { 3444 _ struct{} `type:"structure"` 3445 3446 // The Amazon Resource Name (ARN) of the notification rule from which to remove 3447 // the tags. 3448 // 3449 // Arn is a required field 3450 Arn *string `type:"string" required:"true"` 3451 3452 // The key names of the tags to remove. 3453 // 3454 // TagKeys is a required field 3455 TagKeys []*string `type:"list" required:"true"` 3456 } 3457 3458 // String returns the string representation. 3459 // 3460 // API parameter values that are decorated as "sensitive" in the API will not 3461 // be included in the string output. The member name will be present, but the 3462 // value will be replaced with "sensitive". 3463 func (s UntagResourceInput) String() string { 3464 return awsutil.Prettify(s) 3465 } 3466 3467 // GoString returns the string representation. 3468 // 3469 // API parameter values that are decorated as "sensitive" in the API will not 3470 // be included in the string output. The member name will be present, but the 3471 // value will be replaced with "sensitive". 3472 func (s UntagResourceInput) GoString() string { 3473 return s.String() 3474 } 3475 3476 // Validate inspects the fields of the type to determine if they are valid. 3477 func (s *UntagResourceInput) Validate() error { 3478 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 3479 if s.Arn == nil { 3480 invalidParams.Add(request.NewErrParamRequired("Arn")) 3481 } 3482 if s.TagKeys == nil { 3483 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 3484 } 3485 3486 if invalidParams.Len() > 0 { 3487 return invalidParams 3488 } 3489 return nil 3490 } 3491 3492 // SetArn sets the Arn field's value. 3493 func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { 3494 s.Arn = &v 3495 return s 3496 } 3497 3498 // SetTagKeys sets the TagKeys field's value. 3499 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 3500 s.TagKeys = v 3501 return s 3502 } 3503 3504 type UntagResourceOutput struct { 3505 _ struct{} `type:"structure" nopayload:"true"` 3506 } 3507 3508 // String returns the string representation. 3509 // 3510 // API parameter values that are decorated as "sensitive" in the API will not 3511 // be included in the string output. The member name will be present, but the 3512 // value will be replaced with "sensitive". 3513 func (s UntagResourceOutput) String() string { 3514 return awsutil.Prettify(s) 3515 } 3516 3517 // GoString returns the string representation. 3518 // 3519 // API parameter values that are decorated as "sensitive" in the API will not 3520 // be included in the string output. The member name will be present, but the 3521 // value will be replaced with "sensitive". 3522 func (s UntagResourceOutput) GoString() string { 3523 return s.String() 3524 } 3525 3526 type UpdateNotificationRuleInput struct { 3527 _ struct{} `type:"structure"` 3528 3529 // The Amazon Resource Name (ARN) of the notification rule. 3530 // 3531 // Arn is a required field 3532 Arn *string `type:"string" required:"true"` 3533 3534 // The level of detail to include in the notifications for this resource. BASIC 3535 // will include only the contents of the event as it would appear in AWS CloudWatch. 3536 // FULL will include any supplemental information provided by AWS CodeStar Notifications 3537 // and/or the service for the resource for which the notification is created. 3538 DetailType *string `type:"string" enum:"DetailType"` 3539 3540 // A list of event types associated with this notification rule. 3541 EventTypeIds []*string `type:"list"` 3542 3543 // The name of the notification rule. 3544 // 3545 // Name is a sensitive parameter and its value will be 3546 // replaced with "sensitive" in string returned by UpdateNotificationRuleInput's 3547 // String and GoString methods. 3548 Name *string `min:"1" type:"string" sensitive:"true"` 3549 3550 // The status of the notification rule. Valid statuses include enabled (sending 3551 // notifications) or disabled (not sending notifications). 3552 Status *string `type:"string" enum:"NotificationRuleStatus"` 3553 3554 // The address and type of the targets to receive notifications from this notification 3555 // rule. 3556 Targets []*Target `type:"list"` 3557 } 3558 3559 // String returns the string representation. 3560 // 3561 // API parameter values that are decorated as "sensitive" in the API will not 3562 // be included in the string output. The member name will be present, but the 3563 // value will be replaced with "sensitive". 3564 func (s UpdateNotificationRuleInput) String() string { 3565 return awsutil.Prettify(s) 3566 } 3567 3568 // GoString returns the string representation. 3569 // 3570 // API parameter values that are decorated as "sensitive" in the API will not 3571 // be included in the string output. The member name will be present, but the 3572 // value will be replaced with "sensitive". 3573 func (s UpdateNotificationRuleInput) GoString() string { 3574 return s.String() 3575 } 3576 3577 // Validate inspects the fields of the type to determine if they are valid. 3578 func (s *UpdateNotificationRuleInput) Validate() error { 3579 invalidParams := request.ErrInvalidParams{Context: "UpdateNotificationRuleInput"} 3580 if s.Arn == nil { 3581 invalidParams.Add(request.NewErrParamRequired("Arn")) 3582 } 3583 if s.Name != nil && len(*s.Name) < 1 { 3584 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3585 } 3586 if s.Targets != nil { 3587 for i, v := range s.Targets { 3588 if v == nil { 3589 continue 3590 } 3591 if err := v.Validate(); err != nil { 3592 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) 3593 } 3594 } 3595 } 3596 3597 if invalidParams.Len() > 0 { 3598 return invalidParams 3599 } 3600 return nil 3601 } 3602 3603 // SetArn sets the Arn field's value. 3604 func (s *UpdateNotificationRuleInput) SetArn(v string) *UpdateNotificationRuleInput { 3605 s.Arn = &v 3606 return s 3607 } 3608 3609 // SetDetailType sets the DetailType field's value. 3610 func (s *UpdateNotificationRuleInput) SetDetailType(v string) *UpdateNotificationRuleInput { 3611 s.DetailType = &v 3612 return s 3613 } 3614 3615 // SetEventTypeIds sets the EventTypeIds field's value. 3616 func (s *UpdateNotificationRuleInput) SetEventTypeIds(v []*string) *UpdateNotificationRuleInput { 3617 s.EventTypeIds = v 3618 return s 3619 } 3620 3621 // SetName sets the Name field's value. 3622 func (s *UpdateNotificationRuleInput) SetName(v string) *UpdateNotificationRuleInput { 3623 s.Name = &v 3624 return s 3625 } 3626 3627 // SetStatus sets the Status field's value. 3628 func (s *UpdateNotificationRuleInput) SetStatus(v string) *UpdateNotificationRuleInput { 3629 s.Status = &v 3630 return s 3631 } 3632 3633 // SetTargets sets the Targets field's value. 3634 func (s *UpdateNotificationRuleInput) SetTargets(v []*Target) *UpdateNotificationRuleInput { 3635 s.Targets = v 3636 return s 3637 } 3638 3639 type UpdateNotificationRuleOutput struct { 3640 _ struct{} `type:"structure" nopayload:"true"` 3641 } 3642 3643 // String returns the string representation. 3644 // 3645 // API parameter values that are decorated as "sensitive" in the API will not 3646 // be included in the string output. The member name will be present, but the 3647 // value will be replaced with "sensitive". 3648 func (s UpdateNotificationRuleOutput) String() string { 3649 return awsutil.Prettify(s) 3650 } 3651 3652 // GoString returns the string representation. 3653 // 3654 // API parameter values that are decorated as "sensitive" in the API will not 3655 // be included in the string output. The member name will be present, but the 3656 // value will be replaced with "sensitive". 3657 func (s UpdateNotificationRuleOutput) GoString() string { 3658 return s.String() 3659 } 3660 3661 // One or more parameter values are not valid. 3662 type ValidationException struct { 3663 _ struct{} `type:"structure"` 3664 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3665 3666 Message_ *string `locationName:"Message" min:"1" type:"string"` 3667 } 3668 3669 // String returns the string representation. 3670 // 3671 // API parameter values that are decorated as "sensitive" in the API will not 3672 // be included in the string output. The member name will be present, but the 3673 // value will be replaced with "sensitive". 3674 func (s ValidationException) String() string { 3675 return awsutil.Prettify(s) 3676 } 3677 3678 // GoString returns the string representation. 3679 // 3680 // API parameter values that are decorated as "sensitive" in the API will not 3681 // be included in the string output. The member name will be present, but the 3682 // value will be replaced with "sensitive". 3683 func (s ValidationException) GoString() string { 3684 return s.String() 3685 } 3686 3687 func newErrorValidationException(v protocol.ResponseMetadata) error { 3688 return &ValidationException{ 3689 RespMetadata: v, 3690 } 3691 } 3692 3693 // Code returns the exception type name. 3694 func (s *ValidationException) Code() string { 3695 return "ValidationException" 3696 } 3697 3698 // Message returns the exception's message. 3699 func (s *ValidationException) Message() string { 3700 if s.Message_ != nil { 3701 return *s.Message_ 3702 } 3703 return "" 3704 } 3705 3706 // OrigErr always returns nil, satisfies awserr.Error interface. 3707 func (s *ValidationException) OrigErr() error { 3708 return nil 3709 } 3710 3711 func (s *ValidationException) Error() string { 3712 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3713 } 3714 3715 // Status code returns the HTTP status code for the request's response error. 3716 func (s *ValidationException) StatusCode() int { 3717 return s.RespMetadata.StatusCode 3718 } 3719 3720 // RequestID returns the service's response RequestID for request. 3721 func (s *ValidationException) RequestID() string { 3722 return s.RespMetadata.RequestID 3723 } 3724 3725 const ( 3726 // DetailTypeBasic is a DetailType enum value 3727 DetailTypeBasic = "BASIC" 3728 3729 // DetailTypeFull is a DetailType enum value 3730 DetailTypeFull = "FULL" 3731 ) 3732 3733 // DetailType_Values returns all elements of the DetailType enum 3734 func DetailType_Values() []string { 3735 return []string{ 3736 DetailTypeBasic, 3737 DetailTypeFull, 3738 } 3739 } 3740 3741 const ( 3742 // ListEventTypesFilterNameResourceType is a ListEventTypesFilterName enum value 3743 ListEventTypesFilterNameResourceType = "RESOURCE_TYPE" 3744 3745 // ListEventTypesFilterNameServiceName is a ListEventTypesFilterName enum value 3746 ListEventTypesFilterNameServiceName = "SERVICE_NAME" 3747 ) 3748 3749 // ListEventTypesFilterName_Values returns all elements of the ListEventTypesFilterName enum 3750 func ListEventTypesFilterName_Values() []string { 3751 return []string{ 3752 ListEventTypesFilterNameResourceType, 3753 ListEventTypesFilterNameServiceName, 3754 } 3755 } 3756 3757 const ( 3758 // ListNotificationRulesFilterNameEventTypeId is a ListNotificationRulesFilterName enum value 3759 ListNotificationRulesFilterNameEventTypeId = "EVENT_TYPE_ID" 3760 3761 // ListNotificationRulesFilterNameCreatedBy is a ListNotificationRulesFilterName enum value 3762 ListNotificationRulesFilterNameCreatedBy = "CREATED_BY" 3763 3764 // ListNotificationRulesFilterNameResource is a ListNotificationRulesFilterName enum value 3765 ListNotificationRulesFilterNameResource = "RESOURCE" 3766 3767 // ListNotificationRulesFilterNameTargetAddress is a ListNotificationRulesFilterName enum value 3768 ListNotificationRulesFilterNameTargetAddress = "TARGET_ADDRESS" 3769 ) 3770 3771 // ListNotificationRulesFilterName_Values returns all elements of the ListNotificationRulesFilterName enum 3772 func ListNotificationRulesFilterName_Values() []string { 3773 return []string{ 3774 ListNotificationRulesFilterNameEventTypeId, 3775 ListNotificationRulesFilterNameCreatedBy, 3776 ListNotificationRulesFilterNameResource, 3777 ListNotificationRulesFilterNameTargetAddress, 3778 } 3779 } 3780 3781 const ( 3782 // ListTargetsFilterNameTargetType is a ListTargetsFilterName enum value 3783 ListTargetsFilterNameTargetType = "TARGET_TYPE" 3784 3785 // ListTargetsFilterNameTargetAddress is a ListTargetsFilterName enum value 3786 ListTargetsFilterNameTargetAddress = "TARGET_ADDRESS" 3787 3788 // ListTargetsFilterNameTargetStatus is a ListTargetsFilterName enum value 3789 ListTargetsFilterNameTargetStatus = "TARGET_STATUS" 3790 ) 3791 3792 // ListTargetsFilterName_Values returns all elements of the ListTargetsFilterName enum 3793 func ListTargetsFilterName_Values() []string { 3794 return []string{ 3795 ListTargetsFilterNameTargetType, 3796 ListTargetsFilterNameTargetAddress, 3797 ListTargetsFilterNameTargetStatus, 3798 } 3799 } 3800 3801 const ( 3802 // NotificationRuleStatusEnabled is a NotificationRuleStatus enum value 3803 NotificationRuleStatusEnabled = "ENABLED" 3804 3805 // NotificationRuleStatusDisabled is a NotificationRuleStatus enum value 3806 NotificationRuleStatusDisabled = "DISABLED" 3807 ) 3808 3809 // NotificationRuleStatus_Values returns all elements of the NotificationRuleStatus enum 3810 func NotificationRuleStatus_Values() []string { 3811 return []string{ 3812 NotificationRuleStatusEnabled, 3813 NotificationRuleStatusDisabled, 3814 } 3815 } 3816 3817 const ( 3818 // TargetStatusPending is a TargetStatus enum value 3819 TargetStatusPending = "PENDING" 3820 3821 // TargetStatusActive is a TargetStatus enum value 3822 TargetStatusActive = "ACTIVE" 3823 3824 // TargetStatusUnreachable is a TargetStatus enum value 3825 TargetStatusUnreachable = "UNREACHABLE" 3826 3827 // TargetStatusInactive is a TargetStatus enum value 3828 TargetStatusInactive = "INACTIVE" 3829 3830 // TargetStatusDeactivated is a TargetStatus enum value 3831 TargetStatusDeactivated = "DEACTIVATED" 3832 ) 3833 3834 // TargetStatus_Values returns all elements of the TargetStatus enum 3835 func TargetStatus_Values() []string { 3836 return []string{ 3837 TargetStatusPending, 3838 TargetStatusActive, 3839 TargetStatusUnreachable, 3840 TargetStatusInactive, 3841 TargetStatusDeactivated, 3842 } 3843 }