1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package codestarnotifications 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const 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 42func (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 96func (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. 110func (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 117const 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 143func (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 184func (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. 198func (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 205const 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 231func (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 264func (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. 278func (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 285const 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 311func (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 347func (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. 361func (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 368const 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 394func (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 436func (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. 450func (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// 474func (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. 485func (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 509const 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 535func (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 577func (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. 591func (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// 615func (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. 626func (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 650const 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 676func (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 712func (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. 726func (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 733const 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 759func (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 801func (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. 815func (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// 839func (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. 850func (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 874const 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 900func (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 938func (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. 952func (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 959const 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 985func (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 1025func (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. 1039func (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 1046const 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 1072func (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 1106func (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. 1120func (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 1127const 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 1153func (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 1195func (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. 1209func (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 1216const 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 1242func (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 1284func (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. 1298func (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. 1307type 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 1315func (s AccessDeniedException) String() string { 1316 return awsutil.Prettify(s) 1317} 1318 1319// GoString returns the string representation 1320func (s AccessDeniedException) GoString() string { 1321 return s.String() 1322} 1323 1324func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1325 return &AccessDeniedException{ 1326 RespMetadata: v, 1327 } 1328} 1329 1330// Code returns the exception type name. 1331func (s *AccessDeniedException) Code() string { 1332 return "AccessDeniedException" 1333} 1334 1335// Message returns the exception's message. 1336func (s *AccessDeniedException) Message() string { 1337 if s.Message_ != nil { 1338 return *s.Message_ 1339 } 1340 return "" 1341} 1342 1343// OrigErr always returns nil, satisfies awserr.Error interface. 1344func (s *AccessDeniedException) OrigErr() error { 1345 return nil 1346} 1347 1348func (s *AccessDeniedException) Error() string { 1349 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1350} 1351 1352// Status code returns the HTTP status code for the request's response error. 1353func (s *AccessDeniedException) StatusCode() int { 1354 return s.RespMetadata.StatusCode 1355} 1356 1357// RequestID returns the service's response RequestID for request. 1358func (s *AccessDeniedException) RequestID() string { 1359 return s.RespMetadata.RequestID 1360} 1361 1362// AWS CodeStar Notifications can't complete the request because the resource 1363// is being modified by another process. Wait a few minutes and try again. 1364type ConcurrentModificationException struct { 1365 _ struct{} `type:"structure"` 1366 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1367 1368 Message_ *string `locationName:"Message" min:"1" type:"string"` 1369} 1370 1371// String returns the string representation 1372func (s ConcurrentModificationException) String() string { 1373 return awsutil.Prettify(s) 1374} 1375 1376// GoString returns the string representation 1377func (s ConcurrentModificationException) GoString() string { 1378 return s.String() 1379} 1380 1381func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1382 return &ConcurrentModificationException{ 1383 RespMetadata: v, 1384 } 1385} 1386 1387// Code returns the exception type name. 1388func (s *ConcurrentModificationException) Code() string { 1389 return "ConcurrentModificationException" 1390} 1391 1392// Message returns the exception's message. 1393func (s *ConcurrentModificationException) Message() string { 1394 if s.Message_ != nil { 1395 return *s.Message_ 1396 } 1397 return "" 1398} 1399 1400// OrigErr always returns nil, satisfies awserr.Error interface. 1401func (s *ConcurrentModificationException) OrigErr() error { 1402 return nil 1403} 1404 1405func (s *ConcurrentModificationException) Error() string { 1406 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1407} 1408 1409// Status code returns the HTTP status code for the request's response error. 1410func (s *ConcurrentModificationException) StatusCode() int { 1411 return s.RespMetadata.StatusCode 1412} 1413 1414// RequestID returns the service's response RequestID for request. 1415func (s *ConcurrentModificationException) RequestID() string { 1416 return s.RespMetadata.RequestID 1417} 1418 1419// Some or all of the configuration is incomplete, missing, or not valid. 1420type ConfigurationException struct { 1421 _ struct{} `type:"structure"` 1422 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1423 1424 Message_ *string `locationName:"Message" min:"1" type:"string"` 1425} 1426 1427// String returns the string representation 1428func (s ConfigurationException) String() string { 1429 return awsutil.Prettify(s) 1430} 1431 1432// GoString returns the string representation 1433func (s ConfigurationException) GoString() string { 1434 return s.String() 1435} 1436 1437func newErrorConfigurationException(v protocol.ResponseMetadata) error { 1438 return &ConfigurationException{ 1439 RespMetadata: v, 1440 } 1441} 1442 1443// Code returns the exception type name. 1444func (s *ConfigurationException) Code() string { 1445 return "ConfigurationException" 1446} 1447 1448// Message returns the exception's message. 1449func (s *ConfigurationException) Message() string { 1450 if s.Message_ != nil { 1451 return *s.Message_ 1452 } 1453 return "" 1454} 1455 1456// OrigErr always returns nil, satisfies awserr.Error interface. 1457func (s *ConfigurationException) OrigErr() error { 1458 return nil 1459} 1460 1461func (s *ConfigurationException) Error() string { 1462 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1463} 1464 1465// Status code returns the HTTP status code for the request's response error. 1466func (s *ConfigurationException) StatusCode() int { 1467 return s.RespMetadata.StatusCode 1468} 1469 1470// RequestID returns the service's response RequestID for request. 1471func (s *ConfigurationException) RequestID() string { 1472 return s.RespMetadata.RequestID 1473} 1474 1475type CreateNotificationRuleInput struct { 1476 _ struct{} `type:"structure"` 1477 1478 // A unique, client-generated idempotency token that, when provided in a request, 1479 // ensures the request cannot be repeated with a changed parameter. If a request 1480 // with the same parameters is received and a token is included, the request 1481 // returns information about the initial request that used that token. 1482 // 1483 // The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, 1484 // an idempotency token is created for you. 1485 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 1486 1487 // The level of detail to include in the notifications for this resource. BASIC 1488 // will include only the contents of the event as it would appear in AWS CloudWatch. 1489 // FULL will include any supplemental information provided by AWS CodeStar Notifications 1490 // and/or the service for the resource for which the notification is created. 1491 // 1492 // DetailType is a required field 1493 DetailType *string `type:"string" required:"true" enum:"DetailType"` 1494 1495 // A list of event types associated with this notification rule. For a list 1496 // of allowed events, see EventTypeSummary. 1497 // 1498 // EventTypeIds is a required field 1499 EventTypeIds []*string `type:"list" required:"true"` 1500 1501 // The name for the notification rule. Notifictaion rule names must be unique 1502 // in your AWS account. 1503 // 1504 // Name is a required field 1505 Name *string `min:"1" type:"string" required:"true" sensitive:"true"` 1506 1507 // The Amazon Resource Name (ARN) of the resource to associate with the notification 1508 // rule. Supported resources include pipelines in AWS CodePipeline, repositories 1509 // in AWS CodeCommit, and build projects in AWS CodeBuild. 1510 // 1511 // Resource is a required field 1512 Resource *string `type:"string" required:"true"` 1513 1514 // The status of the notification rule. The default value is ENABLED. If the 1515 // status is set to DISABLED, notifications aren't sent for the notification 1516 // rule. 1517 Status *string `type:"string" enum:"NotificationRuleStatus"` 1518 1519 // A list of tags to apply to this notification rule. Key names cannot start 1520 // with "aws". 1521 Tags map[string]*string `type:"map"` 1522 1523 // A list of Amazon Resource Names (ARNs) of SNS topics to associate with the 1524 // notification rule. 1525 // 1526 // Targets is a required field 1527 Targets []*Target `type:"list" required:"true"` 1528} 1529 1530// String returns the string representation 1531func (s CreateNotificationRuleInput) String() string { 1532 return awsutil.Prettify(s) 1533} 1534 1535// GoString returns the string representation 1536func (s CreateNotificationRuleInput) GoString() string { 1537 return s.String() 1538} 1539 1540// Validate inspects the fields of the type to determine if they are valid. 1541func (s *CreateNotificationRuleInput) Validate() error { 1542 invalidParams := request.ErrInvalidParams{Context: "CreateNotificationRuleInput"} 1543 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 1544 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 1545 } 1546 if s.DetailType == nil { 1547 invalidParams.Add(request.NewErrParamRequired("DetailType")) 1548 } 1549 if s.EventTypeIds == nil { 1550 invalidParams.Add(request.NewErrParamRequired("EventTypeIds")) 1551 } 1552 if s.Name == nil { 1553 invalidParams.Add(request.NewErrParamRequired("Name")) 1554 } 1555 if s.Name != nil && len(*s.Name) < 1 { 1556 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1557 } 1558 if s.Resource == nil { 1559 invalidParams.Add(request.NewErrParamRequired("Resource")) 1560 } 1561 if s.Targets == nil { 1562 invalidParams.Add(request.NewErrParamRequired("Targets")) 1563 } 1564 if s.Targets != nil { 1565 for i, v := range s.Targets { 1566 if v == nil { 1567 continue 1568 } 1569 if err := v.Validate(); err != nil { 1570 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) 1571 } 1572 } 1573 } 1574 1575 if invalidParams.Len() > 0 { 1576 return invalidParams 1577 } 1578 return nil 1579} 1580 1581// SetClientRequestToken sets the ClientRequestToken field's value. 1582func (s *CreateNotificationRuleInput) SetClientRequestToken(v string) *CreateNotificationRuleInput { 1583 s.ClientRequestToken = &v 1584 return s 1585} 1586 1587// SetDetailType sets the DetailType field's value. 1588func (s *CreateNotificationRuleInput) SetDetailType(v string) *CreateNotificationRuleInput { 1589 s.DetailType = &v 1590 return s 1591} 1592 1593// SetEventTypeIds sets the EventTypeIds field's value. 1594func (s *CreateNotificationRuleInput) SetEventTypeIds(v []*string) *CreateNotificationRuleInput { 1595 s.EventTypeIds = v 1596 return s 1597} 1598 1599// SetName sets the Name field's value. 1600func (s *CreateNotificationRuleInput) SetName(v string) *CreateNotificationRuleInput { 1601 s.Name = &v 1602 return s 1603} 1604 1605// SetResource sets the Resource field's value. 1606func (s *CreateNotificationRuleInput) SetResource(v string) *CreateNotificationRuleInput { 1607 s.Resource = &v 1608 return s 1609} 1610 1611// SetStatus sets the Status field's value. 1612func (s *CreateNotificationRuleInput) SetStatus(v string) *CreateNotificationRuleInput { 1613 s.Status = &v 1614 return s 1615} 1616 1617// SetTags sets the Tags field's value. 1618func (s *CreateNotificationRuleInput) SetTags(v map[string]*string) *CreateNotificationRuleInput { 1619 s.Tags = v 1620 return s 1621} 1622 1623// SetTargets sets the Targets field's value. 1624func (s *CreateNotificationRuleInput) SetTargets(v []*Target) *CreateNotificationRuleInput { 1625 s.Targets = v 1626 return s 1627} 1628 1629type CreateNotificationRuleOutput struct { 1630 _ struct{} `type:"structure"` 1631 1632 // The Amazon Resource Name (ARN) of the notification rule. 1633 Arn *string `type:"string"` 1634} 1635 1636// String returns the string representation 1637func (s CreateNotificationRuleOutput) String() string { 1638 return awsutil.Prettify(s) 1639} 1640 1641// GoString returns the string representation 1642func (s CreateNotificationRuleOutput) GoString() string { 1643 return s.String() 1644} 1645 1646// SetArn sets the Arn field's value. 1647func (s *CreateNotificationRuleOutput) SetArn(v string) *CreateNotificationRuleOutput { 1648 s.Arn = &v 1649 return s 1650} 1651 1652type DeleteNotificationRuleInput struct { 1653 _ struct{} `type:"structure"` 1654 1655 // The Amazon Resource Name (ARN) of the notification rule you want to delete. 1656 // 1657 // Arn is a required field 1658 Arn *string `type:"string" required:"true"` 1659} 1660 1661// String returns the string representation 1662func (s DeleteNotificationRuleInput) String() string { 1663 return awsutil.Prettify(s) 1664} 1665 1666// GoString returns the string representation 1667func (s DeleteNotificationRuleInput) GoString() string { 1668 return s.String() 1669} 1670 1671// Validate inspects the fields of the type to determine if they are valid. 1672func (s *DeleteNotificationRuleInput) Validate() error { 1673 invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationRuleInput"} 1674 if s.Arn == nil { 1675 invalidParams.Add(request.NewErrParamRequired("Arn")) 1676 } 1677 1678 if invalidParams.Len() > 0 { 1679 return invalidParams 1680 } 1681 return nil 1682} 1683 1684// SetArn sets the Arn field's value. 1685func (s *DeleteNotificationRuleInput) SetArn(v string) *DeleteNotificationRuleInput { 1686 s.Arn = &v 1687 return s 1688} 1689 1690type DeleteNotificationRuleOutput struct { 1691 _ struct{} `type:"structure"` 1692 1693 // The Amazon Resource Name (ARN) of the deleted notification rule. 1694 Arn *string `type:"string"` 1695} 1696 1697// String returns the string representation 1698func (s DeleteNotificationRuleOutput) String() string { 1699 return awsutil.Prettify(s) 1700} 1701 1702// GoString returns the string representation 1703func (s DeleteNotificationRuleOutput) GoString() string { 1704 return s.String() 1705} 1706 1707// SetArn sets the Arn field's value. 1708func (s *DeleteNotificationRuleOutput) SetArn(v string) *DeleteNotificationRuleOutput { 1709 s.Arn = &v 1710 return s 1711} 1712 1713type DeleteTargetInput struct { 1714 _ struct{} `type:"structure"` 1715 1716 // A Boolean value that can be used to delete all associations with this SNS 1717 // topic. The default value is FALSE. If set to TRUE, all associations between 1718 // that target and every notification rule in your AWS account are deleted. 1719 ForceUnsubscribeAll *bool `type:"boolean"` 1720 1721 // The Amazon Resource Name (ARN) of the SNS topic to delete. 1722 // 1723 // TargetAddress is a required field 1724 TargetAddress *string `min:"1" type:"string" required:"true" sensitive:"true"` 1725} 1726 1727// String returns the string representation 1728func (s DeleteTargetInput) String() string { 1729 return awsutil.Prettify(s) 1730} 1731 1732// GoString returns the string representation 1733func (s DeleteTargetInput) GoString() string { 1734 return s.String() 1735} 1736 1737// Validate inspects the fields of the type to determine if they are valid. 1738func (s *DeleteTargetInput) Validate() error { 1739 invalidParams := request.ErrInvalidParams{Context: "DeleteTargetInput"} 1740 if s.TargetAddress == nil { 1741 invalidParams.Add(request.NewErrParamRequired("TargetAddress")) 1742 } 1743 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 1744 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 1745 } 1746 1747 if invalidParams.Len() > 0 { 1748 return invalidParams 1749 } 1750 return nil 1751} 1752 1753// SetForceUnsubscribeAll sets the ForceUnsubscribeAll field's value. 1754func (s *DeleteTargetInput) SetForceUnsubscribeAll(v bool) *DeleteTargetInput { 1755 s.ForceUnsubscribeAll = &v 1756 return s 1757} 1758 1759// SetTargetAddress sets the TargetAddress field's value. 1760func (s *DeleteTargetInput) SetTargetAddress(v string) *DeleteTargetInput { 1761 s.TargetAddress = &v 1762 return s 1763} 1764 1765type DeleteTargetOutput struct { 1766 _ struct{} `type:"structure"` 1767} 1768 1769// String returns the string representation 1770func (s DeleteTargetOutput) String() string { 1771 return awsutil.Prettify(s) 1772} 1773 1774// GoString returns the string representation 1775func (s DeleteTargetOutput) GoString() string { 1776 return s.String() 1777} 1778 1779type DescribeNotificationRuleInput struct { 1780 _ struct{} `type:"structure"` 1781 1782 // The Amazon Resource Name (ARN) of the notification rule. 1783 // 1784 // Arn is a required field 1785 Arn *string `type:"string" required:"true"` 1786} 1787 1788// String returns the string representation 1789func (s DescribeNotificationRuleInput) String() string { 1790 return awsutil.Prettify(s) 1791} 1792 1793// GoString returns the string representation 1794func (s DescribeNotificationRuleInput) GoString() string { 1795 return s.String() 1796} 1797 1798// Validate inspects the fields of the type to determine if they are valid. 1799func (s *DescribeNotificationRuleInput) Validate() error { 1800 invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationRuleInput"} 1801 if s.Arn == nil { 1802 invalidParams.Add(request.NewErrParamRequired("Arn")) 1803 } 1804 1805 if invalidParams.Len() > 0 { 1806 return invalidParams 1807 } 1808 return nil 1809} 1810 1811// SetArn sets the Arn field's value. 1812func (s *DescribeNotificationRuleInput) SetArn(v string) *DescribeNotificationRuleInput { 1813 s.Arn = &v 1814 return s 1815} 1816 1817type DescribeNotificationRuleOutput struct { 1818 _ struct{} `type:"structure"` 1819 1820 // The Amazon Resource Name (ARN) of the notification rule. 1821 // 1822 // Arn is a required field 1823 Arn *string `type:"string" required:"true"` 1824 1825 // The name or email alias of the person who created the notification rule. 1826 CreatedBy *string `min:"1" type:"string"` 1827 1828 // The date and time the notification rule was created, in timestamp format. 1829 CreatedTimestamp *time.Time `type:"timestamp"` 1830 1831 // The level of detail included in the notifications for this resource. BASIC 1832 // will include only the contents of the event as it would appear in AWS CloudWatch. 1833 // FULL will include any supplemental information provided by AWS CodeStar Notifications 1834 // and/or the service for the resource for which the notification is created. 1835 DetailType *string `type:"string" enum:"DetailType"` 1836 1837 // A list of the event types associated with the notification rule. 1838 EventTypes []*EventTypeSummary `type:"list"` 1839 1840 // The date and time the notification rule was most recently updated, in timestamp 1841 // format. 1842 LastModifiedTimestamp *time.Time `type:"timestamp"` 1843 1844 // The name of the notification rule. 1845 Name *string `min:"1" type:"string" sensitive:"true"` 1846 1847 // The Amazon Resource Name (ARN) of the resource associated with the notification 1848 // rule. 1849 Resource *string `type:"string"` 1850 1851 // The status of the notification rule. Valid statuses are on (sending notifications) 1852 // or off (not sending notifications). 1853 Status *string `type:"string" enum:"NotificationRuleStatus"` 1854 1855 // The tags associated with the notification rule. 1856 Tags map[string]*string `type:"map"` 1857 1858 // A list of the SNS topics associated with the notification rule. 1859 Targets []*TargetSummary `type:"list"` 1860} 1861 1862// String returns the string representation 1863func (s DescribeNotificationRuleOutput) String() string { 1864 return awsutil.Prettify(s) 1865} 1866 1867// GoString returns the string representation 1868func (s DescribeNotificationRuleOutput) GoString() string { 1869 return s.String() 1870} 1871 1872// SetArn sets the Arn field's value. 1873func (s *DescribeNotificationRuleOutput) SetArn(v string) *DescribeNotificationRuleOutput { 1874 s.Arn = &v 1875 return s 1876} 1877 1878// SetCreatedBy sets the CreatedBy field's value. 1879func (s *DescribeNotificationRuleOutput) SetCreatedBy(v string) *DescribeNotificationRuleOutput { 1880 s.CreatedBy = &v 1881 return s 1882} 1883 1884// SetCreatedTimestamp sets the CreatedTimestamp field's value. 1885func (s *DescribeNotificationRuleOutput) SetCreatedTimestamp(v time.Time) *DescribeNotificationRuleOutput { 1886 s.CreatedTimestamp = &v 1887 return s 1888} 1889 1890// SetDetailType sets the DetailType field's value. 1891func (s *DescribeNotificationRuleOutput) SetDetailType(v string) *DescribeNotificationRuleOutput { 1892 s.DetailType = &v 1893 return s 1894} 1895 1896// SetEventTypes sets the EventTypes field's value. 1897func (s *DescribeNotificationRuleOutput) SetEventTypes(v []*EventTypeSummary) *DescribeNotificationRuleOutput { 1898 s.EventTypes = v 1899 return s 1900} 1901 1902// SetLastModifiedTimestamp sets the LastModifiedTimestamp field's value. 1903func (s *DescribeNotificationRuleOutput) SetLastModifiedTimestamp(v time.Time) *DescribeNotificationRuleOutput { 1904 s.LastModifiedTimestamp = &v 1905 return s 1906} 1907 1908// SetName sets the Name field's value. 1909func (s *DescribeNotificationRuleOutput) SetName(v string) *DescribeNotificationRuleOutput { 1910 s.Name = &v 1911 return s 1912} 1913 1914// SetResource sets the Resource field's value. 1915func (s *DescribeNotificationRuleOutput) SetResource(v string) *DescribeNotificationRuleOutput { 1916 s.Resource = &v 1917 return s 1918} 1919 1920// SetStatus sets the Status field's value. 1921func (s *DescribeNotificationRuleOutput) SetStatus(v string) *DescribeNotificationRuleOutput { 1922 s.Status = &v 1923 return s 1924} 1925 1926// SetTags sets the Tags field's value. 1927func (s *DescribeNotificationRuleOutput) SetTags(v map[string]*string) *DescribeNotificationRuleOutput { 1928 s.Tags = v 1929 return s 1930} 1931 1932// SetTargets sets the Targets field's value. 1933func (s *DescribeNotificationRuleOutput) SetTargets(v []*TargetSummary) *DescribeNotificationRuleOutput { 1934 s.Targets = v 1935 return s 1936} 1937 1938// Returns information about an event that has triggered a notification rule. 1939type EventTypeSummary struct { 1940 _ struct{} `type:"structure"` 1941 1942 // The system-generated ID of the event. 1943 EventTypeId *string `min:"1" type:"string"` 1944 1945 // The name of the event. 1946 EventTypeName *string `type:"string"` 1947 1948 // The resource type of the event. 1949 ResourceType *string `min:"1" type:"string"` 1950 1951 // The name of the service for which the event applies. 1952 ServiceName *string `type:"string"` 1953} 1954 1955// String returns the string representation 1956func (s EventTypeSummary) String() string { 1957 return awsutil.Prettify(s) 1958} 1959 1960// GoString returns the string representation 1961func (s EventTypeSummary) GoString() string { 1962 return s.String() 1963} 1964 1965// SetEventTypeId sets the EventTypeId field's value. 1966func (s *EventTypeSummary) SetEventTypeId(v string) *EventTypeSummary { 1967 s.EventTypeId = &v 1968 return s 1969} 1970 1971// SetEventTypeName sets the EventTypeName field's value. 1972func (s *EventTypeSummary) SetEventTypeName(v string) *EventTypeSummary { 1973 s.EventTypeName = &v 1974 return s 1975} 1976 1977// SetResourceType sets the ResourceType field's value. 1978func (s *EventTypeSummary) SetResourceType(v string) *EventTypeSummary { 1979 s.ResourceType = &v 1980 return s 1981} 1982 1983// SetServiceName sets the ServiceName field's value. 1984func (s *EventTypeSummary) SetServiceName(v string) *EventTypeSummary { 1985 s.ServiceName = &v 1986 return s 1987} 1988 1989// The value for the enumeration token used in the request to return the next 1990// batch of the results is not valid. 1991type InvalidNextTokenException struct { 1992 _ struct{} `type:"structure"` 1993 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1994 1995 Message_ *string `locationName:"Message" min:"1" type:"string"` 1996} 1997 1998// String returns the string representation 1999func (s InvalidNextTokenException) String() string { 2000 return awsutil.Prettify(s) 2001} 2002 2003// GoString returns the string representation 2004func (s InvalidNextTokenException) GoString() string { 2005 return s.String() 2006} 2007 2008func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 2009 return &InvalidNextTokenException{ 2010 RespMetadata: v, 2011 } 2012} 2013 2014// Code returns the exception type name. 2015func (s *InvalidNextTokenException) Code() string { 2016 return "InvalidNextTokenException" 2017} 2018 2019// Message returns the exception's message. 2020func (s *InvalidNextTokenException) Message() string { 2021 if s.Message_ != nil { 2022 return *s.Message_ 2023 } 2024 return "" 2025} 2026 2027// OrigErr always returns nil, satisfies awserr.Error interface. 2028func (s *InvalidNextTokenException) OrigErr() error { 2029 return nil 2030} 2031 2032func (s *InvalidNextTokenException) Error() string { 2033 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2034} 2035 2036// Status code returns the HTTP status code for the request's response error. 2037func (s *InvalidNextTokenException) StatusCode() int { 2038 return s.RespMetadata.StatusCode 2039} 2040 2041// RequestID returns the service's response RequestID for request. 2042func (s *InvalidNextTokenException) RequestID() string { 2043 return s.RespMetadata.RequestID 2044} 2045 2046// One of the AWS CodeStar Notifications limits has been exceeded. Limits apply 2047// to accounts, notification rules, notifications, resources, and targets. For 2048// more information, see Limits. 2049type LimitExceededException struct { 2050 _ struct{} `type:"structure"` 2051 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2052 2053 Message_ *string `locationName:"Message" min:"1" type:"string"` 2054} 2055 2056// String returns the string representation 2057func (s LimitExceededException) String() string { 2058 return awsutil.Prettify(s) 2059} 2060 2061// GoString returns the string representation 2062func (s LimitExceededException) GoString() string { 2063 return s.String() 2064} 2065 2066func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 2067 return &LimitExceededException{ 2068 RespMetadata: v, 2069 } 2070} 2071 2072// Code returns the exception type name. 2073func (s *LimitExceededException) Code() string { 2074 return "LimitExceededException" 2075} 2076 2077// Message returns the exception's message. 2078func (s *LimitExceededException) Message() string { 2079 if s.Message_ != nil { 2080 return *s.Message_ 2081 } 2082 return "" 2083} 2084 2085// OrigErr always returns nil, satisfies awserr.Error interface. 2086func (s *LimitExceededException) OrigErr() error { 2087 return nil 2088} 2089 2090func (s *LimitExceededException) Error() string { 2091 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2092} 2093 2094// Status code returns the HTTP status code for the request's response error. 2095func (s *LimitExceededException) StatusCode() int { 2096 return s.RespMetadata.StatusCode 2097} 2098 2099// RequestID returns the service's response RequestID for request. 2100func (s *LimitExceededException) RequestID() string { 2101 return s.RespMetadata.RequestID 2102} 2103 2104// Information about a filter to apply to the list of returned event types. 2105// You can filter by resource type or service name. 2106type ListEventTypesFilter struct { 2107 _ struct{} `type:"structure"` 2108 2109 // The system-generated name of the filter type you want to filter by. 2110 // 2111 // Name is a required field 2112 Name *string `type:"string" required:"true" enum:"ListEventTypesFilterName"` 2113 2114 // The name of the resource type (for example, pipeline) or service name (for 2115 // example, CodePipeline) that you want to filter by. 2116 // 2117 // Value is a required field 2118 Value *string `type:"string" required:"true"` 2119} 2120 2121// String returns the string representation 2122func (s ListEventTypesFilter) String() string { 2123 return awsutil.Prettify(s) 2124} 2125 2126// GoString returns the string representation 2127func (s ListEventTypesFilter) GoString() string { 2128 return s.String() 2129} 2130 2131// Validate inspects the fields of the type to determine if they are valid. 2132func (s *ListEventTypesFilter) Validate() error { 2133 invalidParams := request.ErrInvalidParams{Context: "ListEventTypesFilter"} 2134 if s.Name == nil { 2135 invalidParams.Add(request.NewErrParamRequired("Name")) 2136 } 2137 if s.Value == nil { 2138 invalidParams.Add(request.NewErrParamRequired("Value")) 2139 } 2140 2141 if invalidParams.Len() > 0 { 2142 return invalidParams 2143 } 2144 return nil 2145} 2146 2147// SetName sets the Name field's value. 2148func (s *ListEventTypesFilter) SetName(v string) *ListEventTypesFilter { 2149 s.Name = &v 2150 return s 2151} 2152 2153// SetValue sets the Value field's value. 2154func (s *ListEventTypesFilter) SetValue(v string) *ListEventTypesFilter { 2155 s.Value = &v 2156 return s 2157} 2158 2159type ListEventTypesInput struct { 2160 _ struct{} `type:"structure"` 2161 2162 // The filters to use to return information by service or resource type. 2163 Filters []*ListEventTypesFilter `type:"list"` 2164 2165 // A non-negative integer used to limit the number of returned results. The 2166 // default number is 50. The maximum number of results that can be returned 2167 // is 100. 2168 MaxResults *int64 `min:"1" type:"integer"` 2169 2170 // An enumeration token that, when provided in a request, returns the next batch 2171 // of the results. 2172 NextToken *string `type:"string"` 2173} 2174 2175// String returns the string representation 2176func (s ListEventTypesInput) String() string { 2177 return awsutil.Prettify(s) 2178} 2179 2180// GoString returns the string representation 2181func (s ListEventTypesInput) GoString() string { 2182 return s.String() 2183} 2184 2185// Validate inspects the fields of the type to determine if they are valid. 2186func (s *ListEventTypesInput) Validate() error { 2187 invalidParams := request.ErrInvalidParams{Context: "ListEventTypesInput"} 2188 if s.MaxResults != nil && *s.MaxResults < 1 { 2189 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2190 } 2191 if s.Filters != nil { 2192 for i, v := range s.Filters { 2193 if v == nil { 2194 continue 2195 } 2196 if err := v.Validate(); err != nil { 2197 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2198 } 2199 } 2200 } 2201 2202 if invalidParams.Len() > 0 { 2203 return invalidParams 2204 } 2205 return nil 2206} 2207 2208// SetFilters sets the Filters field's value. 2209func (s *ListEventTypesInput) SetFilters(v []*ListEventTypesFilter) *ListEventTypesInput { 2210 s.Filters = v 2211 return s 2212} 2213 2214// SetMaxResults sets the MaxResults field's value. 2215func (s *ListEventTypesInput) SetMaxResults(v int64) *ListEventTypesInput { 2216 s.MaxResults = &v 2217 return s 2218} 2219 2220// SetNextToken sets the NextToken field's value. 2221func (s *ListEventTypesInput) SetNextToken(v string) *ListEventTypesInput { 2222 s.NextToken = &v 2223 return s 2224} 2225 2226type ListEventTypesOutput struct { 2227 _ struct{} `type:"structure"` 2228 2229 // Information about each event, including service name, resource type, event 2230 // ID, and event name. 2231 EventTypes []*EventTypeSummary `type:"list"` 2232 2233 // An enumeration token that can be used in a request to return the next batch 2234 // of the results. 2235 NextToken *string `type:"string"` 2236} 2237 2238// String returns the string representation 2239func (s ListEventTypesOutput) String() string { 2240 return awsutil.Prettify(s) 2241} 2242 2243// GoString returns the string representation 2244func (s ListEventTypesOutput) GoString() string { 2245 return s.String() 2246} 2247 2248// SetEventTypes sets the EventTypes field's value. 2249func (s *ListEventTypesOutput) SetEventTypes(v []*EventTypeSummary) *ListEventTypesOutput { 2250 s.EventTypes = v 2251 return s 2252} 2253 2254// SetNextToken sets the NextToken field's value. 2255func (s *ListEventTypesOutput) SetNextToken(v string) *ListEventTypesOutput { 2256 s.NextToken = &v 2257 return s 2258} 2259 2260// Information about a filter to apply to the list of returned notification 2261// rules. You can filter by event type, owner, resource, or target. 2262type ListNotificationRulesFilter struct { 2263 _ struct{} `type:"structure"` 2264 2265 // The name of the attribute you want to use to filter the returned notification 2266 // rules. 2267 // 2268 // Name is a required field 2269 Name *string `type:"string" required:"true" enum:"ListNotificationRulesFilterName"` 2270 2271 // The value of the attribute you want to use to filter the returned notification 2272 // rules. For example, if you specify filtering by RESOURCE in Name, you might 2273 // specify the ARN of a pipeline in AWS CodePipeline for the value. 2274 // 2275 // Value is a required field 2276 Value *string `type:"string" required:"true"` 2277} 2278 2279// String returns the string representation 2280func (s ListNotificationRulesFilter) String() string { 2281 return awsutil.Prettify(s) 2282} 2283 2284// GoString returns the string representation 2285func (s ListNotificationRulesFilter) GoString() string { 2286 return s.String() 2287} 2288 2289// Validate inspects the fields of the type to determine if they are valid. 2290func (s *ListNotificationRulesFilter) Validate() error { 2291 invalidParams := request.ErrInvalidParams{Context: "ListNotificationRulesFilter"} 2292 if s.Name == nil { 2293 invalidParams.Add(request.NewErrParamRequired("Name")) 2294 } 2295 if s.Value == nil { 2296 invalidParams.Add(request.NewErrParamRequired("Value")) 2297 } 2298 2299 if invalidParams.Len() > 0 { 2300 return invalidParams 2301 } 2302 return nil 2303} 2304 2305// SetName sets the Name field's value. 2306func (s *ListNotificationRulesFilter) SetName(v string) *ListNotificationRulesFilter { 2307 s.Name = &v 2308 return s 2309} 2310 2311// SetValue sets the Value field's value. 2312func (s *ListNotificationRulesFilter) SetValue(v string) *ListNotificationRulesFilter { 2313 s.Value = &v 2314 return s 2315} 2316 2317type ListNotificationRulesInput struct { 2318 _ struct{} `type:"structure"` 2319 2320 // The filters to use to return information by service or resource type. For 2321 // valid values, see ListNotificationRulesFilter. 2322 // 2323 // A filter with the same name can appear more than once when used with OR statements. 2324 // Filters with different names should be applied with AND statements. 2325 Filters []*ListNotificationRulesFilter `type:"list"` 2326 2327 // A non-negative integer used to limit the number of returned results. The 2328 // maximum number of results that can be returned is 100. 2329 MaxResults *int64 `min:"1" type:"integer"` 2330 2331 // An enumeration token that, when provided in a request, returns the next batch 2332 // of the results. 2333 NextToken *string `type:"string"` 2334} 2335 2336// String returns the string representation 2337func (s ListNotificationRulesInput) String() string { 2338 return awsutil.Prettify(s) 2339} 2340 2341// GoString returns the string representation 2342func (s ListNotificationRulesInput) GoString() string { 2343 return s.String() 2344} 2345 2346// Validate inspects the fields of the type to determine if they are valid. 2347func (s *ListNotificationRulesInput) Validate() error { 2348 invalidParams := request.ErrInvalidParams{Context: "ListNotificationRulesInput"} 2349 if s.MaxResults != nil && *s.MaxResults < 1 { 2350 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2351 } 2352 if s.Filters != nil { 2353 for i, v := range s.Filters { 2354 if v == nil { 2355 continue 2356 } 2357 if err := v.Validate(); err != nil { 2358 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2359 } 2360 } 2361 } 2362 2363 if invalidParams.Len() > 0 { 2364 return invalidParams 2365 } 2366 return nil 2367} 2368 2369// SetFilters sets the Filters field's value. 2370func (s *ListNotificationRulesInput) SetFilters(v []*ListNotificationRulesFilter) *ListNotificationRulesInput { 2371 s.Filters = v 2372 return s 2373} 2374 2375// SetMaxResults sets the MaxResults field's value. 2376func (s *ListNotificationRulesInput) SetMaxResults(v int64) *ListNotificationRulesInput { 2377 s.MaxResults = &v 2378 return s 2379} 2380 2381// SetNextToken sets the NextToken field's value. 2382func (s *ListNotificationRulesInput) SetNextToken(v string) *ListNotificationRulesInput { 2383 s.NextToken = &v 2384 return s 2385} 2386 2387type ListNotificationRulesOutput struct { 2388 _ struct{} `type:"structure"` 2389 2390 // An enumeration token that can be used in a request to return the next batch 2391 // of the results. 2392 NextToken *string `type:"string"` 2393 2394 // The list of notification rules for the AWS account, by Amazon Resource Name 2395 // (ARN) and ID. 2396 NotificationRules []*NotificationRuleSummary `type:"list"` 2397} 2398 2399// String returns the string representation 2400func (s ListNotificationRulesOutput) String() string { 2401 return awsutil.Prettify(s) 2402} 2403 2404// GoString returns the string representation 2405func (s ListNotificationRulesOutput) GoString() string { 2406 return s.String() 2407} 2408 2409// SetNextToken sets the NextToken field's value. 2410func (s *ListNotificationRulesOutput) SetNextToken(v string) *ListNotificationRulesOutput { 2411 s.NextToken = &v 2412 return s 2413} 2414 2415// SetNotificationRules sets the NotificationRules field's value. 2416func (s *ListNotificationRulesOutput) SetNotificationRules(v []*NotificationRuleSummary) *ListNotificationRulesOutput { 2417 s.NotificationRules = v 2418 return s 2419} 2420 2421type ListTagsForResourceInput struct { 2422 _ struct{} `type:"structure"` 2423 2424 // The Amazon Resource Name (ARN) for the notification rule. 2425 // 2426 // Arn is a required field 2427 Arn *string `type:"string" required:"true"` 2428} 2429 2430// String returns the string representation 2431func (s ListTagsForResourceInput) String() string { 2432 return awsutil.Prettify(s) 2433} 2434 2435// GoString returns the string representation 2436func (s ListTagsForResourceInput) GoString() string { 2437 return s.String() 2438} 2439 2440// Validate inspects the fields of the type to determine if they are valid. 2441func (s *ListTagsForResourceInput) Validate() error { 2442 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 2443 if s.Arn == nil { 2444 invalidParams.Add(request.NewErrParamRequired("Arn")) 2445 } 2446 2447 if invalidParams.Len() > 0 { 2448 return invalidParams 2449 } 2450 return nil 2451} 2452 2453// SetArn sets the Arn field's value. 2454func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { 2455 s.Arn = &v 2456 return s 2457} 2458 2459type ListTagsForResourceOutput struct { 2460 _ struct{} `type:"structure"` 2461 2462 // The tags associated with the notification rule. 2463 Tags map[string]*string `type:"map"` 2464} 2465 2466// String returns the string representation 2467func (s ListTagsForResourceOutput) String() string { 2468 return awsutil.Prettify(s) 2469} 2470 2471// GoString returns the string representation 2472func (s ListTagsForResourceOutput) GoString() string { 2473 return s.String() 2474} 2475 2476// SetTags sets the Tags field's value. 2477func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 2478 s.Tags = v 2479 return s 2480} 2481 2482// Information about a filter to apply to the list of returned targets. You 2483// can filter by target type, address, or status. For example, to filter results 2484// to notification rules that have active Amazon SNS topics as targets, you 2485// could specify a ListTargetsFilter Name as TargetType and a Value of SNS, 2486// and a Name of TARGET_STATUS and a Value of ACTIVE. 2487type ListTargetsFilter struct { 2488 _ struct{} `type:"structure"` 2489 2490 // The name of the attribute you want to use to filter the returned targets. 2491 // 2492 // Name is a required field 2493 Name *string `type:"string" required:"true" enum:"ListTargetsFilterName"` 2494 2495 // The value of the attribute you want to use to filter the returned targets. 2496 // For example, if you specify SNS for the Target type, you could specify an 2497 // Amazon Resource Name (ARN) for a topic as the value. 2498 // 2499 // Value is a required field 2500 Value *string `type:"string" required:"true"` 2501} 2502 2503// String returns the string representation 2504func (s ListTargetsFilter) String() string { 2505 return awsutil.Prettify(s) 2506} 2507 2508// GoString returns the string representation 2509func (s ListTargetsFilter) GoString() string { 2510 return s.String() 2511} 2512 2513// Validate inspects the fields of the type to determine if they are valid. 2514func (s *ListTargetsFilter) Validate() error { 2515 invalidParams := request.ErrInvalidParams{Context: "ListTargetsFilter"} 2516 if s.Name == nil { 2517 invalidParams.Add(request.NewErrParamRequired("Name")) 2518 } 2519 if s.Value == nil { 2520 invalidParams.Add(request.NewErrParamRequired("Value")) 2521 } 2522 2523 if invalidParams.Len() > 0 { 2524 return invalidParams 2525 } 2526 return nil 2527} 2528 2529// SetName sets the Name field's value. 2530func (s *ListTargetsFilter) SetName(v string) *ListTargetsFilter { 2531 s.Name = &v 2532 return s 2533} 2534 2535// SetValue sets the Value field's value. 2536func (s *ListTargetsFilter) SetValue(v string) *ListTargetsFilter { 2537 s.Value = &v 2538 return s 2539} 2540 2541type ListTargetsInput struct { 2542 _ struct{} `type:"structure"` 2543 2544 // The filters to use to return information by service or resource type. Valid 2545 // filters include target type, target address, and target status. 2546 // 2547 // A filter with the same name can appear more than once when used with OR statements. 2548 // Filters with different names should be applied with AND statements. 2549 Filters []*ListTargetsFilter `type:"list"` 2550 2551 // A non-negative integer used to limit the number of returned results. The 2552 // maximum number of results that can be returned is 100. 2553 MaxResults *int64 `min:"1" type:"integer"` 2554 2555 // An enumeration token that, when provided in a request, returns the next batch 2556 // of the results. 2557 NextToken *string `type:"string"` 2558} 2559 2560// String returns the string representation 2561func (s ListTargetsInput) String() string { 2562 return awsutil.Prettify(s) 2563} 2564 2565// GoString returns the string representation 2566func (s ListTargetsInput) GoString() string { 2567 return s.String() 2568} 2569 2570// Validate inspects the fields of the type to determine if they are valid. 2571func (s *ListTargetsInput) Validate() error { 2572 invalidParams := request.ErrInvalidParams{Context: "ListTargetsInput"} 2573 if s.MaxResults != nil && *s.MaxResults < 1 { 2574 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2575 } 2576 if s.Filters != nil { 2577 for i, v := range s.Filters { 2578 if v == nil { 2579 continue 2580 } 2581 if err := v.Validate(); err != nil { 2582 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 2583 } 2584 } 2585 } 2586 2587 if invalidParams.Len() > 0 { 2588 return invalidParams 2589 } 2590 return nil 2591} 2592 2593// SetFilters sets the Filters field's value. 2594func (s *ListTargetsInput) SetFilters(v []*ListTargetsFilter) *ListTargetsInput { 2595 s.Filters = v 2596 return s 2597} 2598 2599// SetMaxResults sets the MaxResults field's value. 2600func (s *ListTargetsInput) SetMaxResults(v int64) *ListTargetsInput { 2601 s.MaxResults = &v 2602 return s 2603} 2604 2605// SetNextToken sets the NextToken field's value. 2606func (s *ListTargetsInput) SetNextToken(v string) *ListTargetsInput { 2607 s.NextToken = &v 2608 return s 2609} 2610 2611type ListTargetsOutput struct { 2612 _ struct{} `type:"structure"` 2613 2614 // An enumeration token that can be used in a request to return the next batch 2615 // of results. 2616 NextToken *string `type:"string"` 2617 2618 // The list of notification rule targets. 2619 Targets []*TargetSummary `type:"list"` 2620} 2621 2622// String returns the string representation 2623func (s ListTargetsOutput) String() string { 2624 return awsutil.Prettify(s) 2625} 2626 2627// GoString returns the string representation 2628func (s ListTargetsOutput) GoString() string { 2629 return s.String() 2630} 2631 2632// SetNextToken sets the NextToken field's value. 2633func (s *ListTargetsOutput) SetNextToken(v string) *ListTargetsOutput { 2634 s.NextToken = &v 2635 return s 2636} 2637 2638// SetTargets sets the Targets field's value. 2639func (s *ListTargetsOutput) SetTargets(v []*TargetSummary) *ListTargetsOutput { 2640 s.Targets = v 2641 return s 2642} 2643 2644// Information about a specified notification rule. 2645type NotificationRuleSummary struct { 2646 _ struct{} `type:"structure"` 2647 2648 // The Amazon Resource Name (ARN) of the notification rule. 2649 Arn *string `type:"string"` 2650 2651 // The unique ID of the notification rule. 2652 Id *string `min:"1" type:"string"` 2653} 2654 2655// String returns the string representation 2656func (s NotificationRuleSummary) String() string { 2657 return awsutil.Prettify(s) 2658} 2659 2660// GoString returns the string representation 2661func (s NotificationRuleSummary) GoString() string { 2662 return s.String() 2663} 2664 2665// SetArn sets the Arn field's value. 2666func (s *NotificationRuleSummary) SetArn(v string) *NotificationRuleSummary { 2667 s.Arn = &v 2668 return s 2669} 2670 2671// SetId sets the Id field's value. 2672func (s *NotificationRuleSummary) SetId(v string) *NotificationRuleSummary { 2673 s.Id = &v 2674 return s 2675} 2676 2677// A resource with the same name or ID already exists. Notification rule names 2678// must be unique in your AWS account. 2679type ResourceAlreadyExistsException struct { 2680 _ struct{} `type:"structure"` 2681 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2682 2683 Message_ *string `locationName:"Message" min:"1" type:"string"` 2684} 2685 2686// String returns the string representation 2687func (s ResourceAlreadyExistsException) String() string { 2688 return awsutil.Prettify(s) 2689} 2690 2691// GoString returns the string representation 2692func (s ResourceAlreadyExistsException) GoString() string { 2693 return s.String() 2694} 2695 2696func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 2697 return &ResourceAlreadyExistsException{ 2698 RespMetadata: v, 2699 } 2700} 2701 2702// Code returns the exception type name. 2703func (s *ResourceAlreadyExistsException) Code() string { 2704 return "ResourceAlreadyExistsException" 2705} 2706 2707// Message returns the exception's message. 2708func (s *ResourceAlreadyExistsException) Message() string { 2709 if s.Message_ != nil { 2710 return *s.Message_ 2711 } 2712 return "" 2713} 2714 2715// OrigErr always returns nil, satisfies awserr.Error interface. 2716func (s *ResourceAlreadyExistsException) OrigErr() error { 2717 return nil 2718} 2719 2720func (s *ResourceAlreadyExistsException) Error() string { 2721 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2722} 2723 2724// Status code returns the HTTP status code for the request's response error. 2725func (s *ResourceAlreadyExistsException) StatusCode() int { 2726 return s.RespMetadata.StatusCode 2727} 2728 2729// RequestID returns the service's response RequestID for request. 2730func (s *ResourceAlreadyExistsException) RequestID() string { 2731 return s.RespMetadata.RequestID 2732} 2733 2734// AWS CodeStar Notifications can't find a resource that matches the provided 2735// ARN. 2736type ResourceNotFoundException struct { 2737 _ struct{} `type:"structure"` 2738 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2739 2740 Message_ *string `locationName:"Message" min:"1" type:"string"` 2741} 2742 2743// String returns the string representation 2744func (s ResourceNotFoundException) String() string { 2745 return awsutil.Prettify(s) 2746} 2747 2748// GoString returns the string representation 2749func (s ResourceNotFoundException) GoString() string { 2750 return s.String() 2751} 2752 2753func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2754 return &ResourceNotFoundException{ 2755 RespMetadata: v, 2756 } 2757} 2758 2759// Code returns the exception type name. 2760func (s *ResourceNotFoundException) Code() string { 2761 return "ResourceNotFoundException" 2762} 2763 2764// Message returns the exception's message. 2765func (s *ResourceNotFoundException) Message() string { 2766 if s.Message_ != nil { 2767 return *s.Message_ 2768 } 2769 return "" 2770} 2771 2772// OrigErr always returns nil, satisfies awserr.Error interface. 2773func (s *ResourceNotFoundException) OrigErr() error { 2774 return nil 2775} 2776 2777func (s *ResourceNotFoundException) Error() string { 2778 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2779} 2780 2781// Status code returns the HTTP status code for the request's response error. 2782func (s *ResourceNotFoundException) StatusCode() int { 2783 return s.RespMetadata.StatusCode 2784} 2785 2786// RequestID returns the service's response RequestID for request. 2787func (s *ResourceNotFoundException) RequestID() string { 2788 return s.RespMetadata.RequestID 2789} 2790 2791type SubscribeInput struct { 2792 _ struct{} `type:"structure"` 2793 2794 // The Amazon Resource Name (ARN) of the notification rule for which you want 2795 // to create the association. 2796 // 2797 // Arn is a required field 2798 Arn *string `type:"string" required:"true"` 2799 2800 // An enumeration token that, when provided in a request, returns the next batch 2801 // of the results. 2802 ClientRequestToken *string `min:"1" type:"string"` 2803 2804 // Information about the SNS topics associated with a notification rule. 2805 // 2806 // Target is a required field 2807 Target *Target `type:"structure" required:"true"` 2808} 2809 2810// String returns the string representation 2811func (s SubscribeInput) String() string { 2812 return awsutil.Prettify(s) 2813} 2814 2815// GoString returns the string representation 2816func (s SubscribeInput) GoString() string { 2817 return s.String() 2818} 2819 2820// Validate inspects the fields of the type to determine if they are valid. 2821func (s *SubscribeInput) Validate() error { 2822 invalidParams := request.ErrInvalidParams{Context: "SubscribeInput"} 2823 if s.Arn == nil { 2824 invalidParams.Add(request.NewErrParamRequired("Arn")) 2825 } 2826 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2827 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2828 } 2829 if s.Target == nil { 2830 invalidParams.Add(request.NewErrParamRequired("Target")) 2831 } 2832 if s.Target != nil { 2833 if err := s.Target.Validate(); err != nil { 2834 invalidParams.AddNested("Target", err.(request.ErrInvalidParams)) 2835 } 2836 } 2837 2838 if invalidParams.Len() > 0 { 2839 return invalidParams 2840 } 2841 return nil 2842} 2843 2844// SetArn sets the Arn field's value. 2845func (s *SubscribeInput) SetArn(v string) *SubscribeInput { 2846 s.Arn = &v 2847 return s 2848} 2849 2850// SetClientRequestToken sets the ClientRequestToken field's value. 2851func (s *SubscribeInput) SetClientRequestToken(v string) *SubscribeInput { 2852 s.ClientRequestToken = &v 2853 return s 2854} 2855 2856// SetTarget sets the Target field's value. 2857func (s *SubscribeInput) SetTarget(v *Target) *SubscribeInput { 2858 s.Target = v 2859 return s 2860} 2861 2862type SubscribeOutput struct { 2863 _ struct{} `type:"structure"` 2864 2865 // The Amazon Resource Name (ARN) of the notification rule for which you have 2866 // created assocations. 2867 Arn *string `type:"string"` 2868} 2869 2870// String returns the string representation 2871func (s SubscribeOutput) String() string { 2872 return awsutil.Prettify(s) 2873} 2874 2875// GoString returns the string representation 2876func (s SubscribeOutput) GoString() string { 2877 return s.String() 2878} 2879 2880// SetArn sets the Arn field's value. 2881func (s *SubscribeOutput) SetArn(v string) *SubscribeOutput { 2882 s.Arn = &v 2883 return s 2884} 2885 2886type TagResourceInput struct { 2887 _ struct{} `type:"structure"` 2888 2889 // The Amazon Resource Name (ARN) of the notification rule to tag. 2890 // 2891 // Arn is a required field 2892 Arn *string `type:"string" required:"true"` 2893 2894 // The list of tags to associate with the resource. Tag key names cannot start 2895 // with "aws". 2896 // 2897 // Tags is a required field 2898 Tags map[string]*string `type:"map" required:"true"` 2899} 2900 2901// String returns the string representation 2902func (s TagResourceInput) String() string { 2903 return awsutil.Prettify(s) 2904} 2905 2906// GoString returns the string representation 2907func (s TagResourceInput) GoString() string { 2908 return s.String() 2909} 2910 2911// Validate inspects the fields of the type to determine if they are valid. 2912func (s *TagResourceInput) Validate() error { 2913 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 2914 if s.Arn == nil { 2915 invalidParams.Add(request.NewErrParamRequired("Arn")) 2916 } 2917 if s.Tags == nil { 2918 invalidParams.Add(request.NewErrParamRequired("Tags")) 2919 } 2920 2921 if invalidParams.Len() > 0 { 2922 return invalidParams 2923 } 2924 return nil 2925} 2926 2927// SetArn sets the Arn field's value. 2928func (s *TagResourceInput) SetArn(v string) *TagResourceInput { 2929 s.Arn = &v 2930 return s 2931} 2932 2933// SetTags sets the Tags field's value. 2934func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 2935 s.Tags = v 2936 return s 2937} 2938 2939type TagResourceOutput struct { 2940 _ struct{} `type:"structure"` 2941 2942 // The list of tags associated with the resource. 2943 Tags map[string]*string `type:"map"` 2944} 2945 2946// String returns the string representation 2947func (s TagResourceOutput) String() string { 2948 return awsutil.Prettify(s) 2949} 2950 2951// GoString returns the string representation 2952func (s TagResourceOutput) GoString() string { 2953 return s.String() 2954} 2955 2956// SetTags sets the Tags field's value. 2957func (s *TagResourceOutput) SetTags(v map[string]*string) *TagResourceOutput { 2958 s.Tags = v 2959 return s 2960} 2961 2962// Information about the SNS topics associated with a notification rule. 2963type Target struct { 2964 _ struct{} `type:"structure"` 2965 2966 // The Amazon Resource Name (ARN) of the SNS topic. 2967 TargetAddress *string `min:"1" type:"string" sensitive:"true"` 2968 2969 // The target type. Can be an Amazon SNS topic. 2970 TargetType *string `type:"string"` 2971} 2972 2973// String returns the string representation 2974func (s Target) String() string { 2975 return awsutil.Prettify(s) 2976} 2977 2978// GoString returns the string representation 2979func (s Target) GoString() string { 2980 return s.String() 2981} 2982 2983// Validate inspects the fields of the type to determine if they are valid. 2984func (s *Target) Validate() error { 2985 invalidParams := request.ErrInvalidParams{Context: "Target"} 2986 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 2987 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 2988 } 2989 2990 if invalidParams.Len() > 0 { 2991 return invalidParams 2992 } 2993 return nil 2994} 2995 2996// SetTargetAddress sets the TargetAddress field's value. 2997func (s *Target) SetTargetAddress(v string) *Target { 2998 s.TargetAddress = &v 2999 return s 3000} 3001 3002// SetTargetType sets the TargetType field's value. 3003func (s *Target) SetTargetType(v string) *Target { 3004 s.TargetType = &v 3005 return s 3006} 3007 3008// Information about the targets specified for a notification rule. 3009type TargetSummary struct { 3010 _ struct{} `type:"structure"` 3011 3012 // The Amazon Resource Name (ARN) of the SNS topic. 3013 TargetAddress *string `min:"1" type:"string" sensitive:"true"` 3014 3015 // The status of the target. 3016 TargetStatus *string `type:"string" enum:"TargetStatus"` 3017 3018 // The type of the target (for example, SNS). 3019 TargetType *string `type:"string"` 3020} 3021 3022// String returns the string representation 3023func (s TargetSummary) String() string { 3024 return awsutil.Prettify(s) 3025} 3026 3027// GoString returns the string representation 3028func (s TargetSummary) GoString() string { 3029 return s.String() 3030} 3031 3032// SetTargetAddress sets the TargetAddress field's value. 3033func (s *TargetSummary) SetTargetAddress(v string) *TargetSummary { 3034 s.TargetAddress = &v 3035 return s 3036} 3037 3038// SetTargetStatus sets the TargetStatus field's value. 3039func (s *TargetSummary) SetTargetStatus(v string) *TargetSummary { 3040 s.TargetStatus = &v 3041 return s 3042} 3043 3044// SetTargetType sets the TargetType field's value. 3045func (s *TargetSummary) SetTargetType(v string) *TargetSummary { 3046 s.TargetType = &v 3047 return s 3048} 3049 3050type UnsubscribeInput struct { 3051 _ struct{} `type:"structure"` 3052 3053 // The Amazon Resource Name (ARN) of the notification rule. 3054 // 3055 // Arn is a required field 3056 Arn *string `type:"string" required:"true"` 3057 3058 // The ARN of the SNS topic to unsubscribe from the notification rule. 3059 // 3060 // TargetAddress is a required field 3061 TargetAddress *string `min:"1" type:"string" required:"true" sensitive:"true"` 3062} 3063 3064// String returns the string representation 3065func (s UnsubscribeInput) String() string { 3066 return awsutil.Prettify(s) 3067} 3068 3069// GoString returns the string representation 3070func (s UnsubscribeInput) GoString() string { 3071 return s.String() 3072} 3073 3074// Validate inspects the fields of the type to determine if they are valid. 3075func (s *UnsubscribeInput) Validate() error { 3076 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeInput"} 3077 if s.Arn == nil { 3078 invalidParams.Add(request.NewErrParamRequired("Arn")) 3079 } 3080 if s.TargetAddress == nil { 3081 invalidParams.Add(request.NewErrParamRequired("TargetAddress")) 3082 } 3083 if s.TargetAddress != nil && len(*s.TargetAddress) < 1 { 3084 invalidParams.Add(request.NewErrParamMinLen("TargetAddress", 1)) 3085 } 3086 3087 if invalidParams.Len() > 0 { 3088 return invalidParams 3089 } 3090 return nil 3091} 3092 3093// SetArn sets the Arn field's value. 3094func (s *UnsubscribeInput) SetArn(v string) *UnsubscribeInput { 3095 s.Arn = &v 3096 return s 3097} 3098 3099// SetTargetAddress sets the TargetAddress field's value. 3100func (s *UnsubscribeInput) SetTargetAddress(v string) *UnsubscribeInput { 3101 s.TargetAddress = &v 3102 return s 3103} 3104 3105type UnsubscribeOutput struct { 3106 _ struct{} `type:"structure"` 3107 3108 // The Amazon Resource Name (ARN) of the the notification rule from which you 3109 // have removed a subscription. 3110 // 3111 // Arn is a required field 3112 Arn *string `type:"string" required:"true"` 3113} 3114 3115// String returns the string representation 3116func (s UnsubscribeOutput) String() string { 3117 return awsutil.Prettify(s) 3118} 3119 3120// GoString returns the string representation 3121func (s UnsubscribeOutput) GoString() string { 3122 return s.String() 3123} 3124 3125// SetArn sets the Arn field's value. 3126func (s *UnsubscribeOutput) SetArn(v string) *UnsubscribeOutput { 3127 s.Arn = &v 3128 return s 3129} 3130 3131type UntagResourceInput struct { 3132 _ struct{} `type:"structure"` 3133 3134 // The Amazon Resource Name (ARN) of the notification rule from which to remove 3135 // the tags. 3136 // 3137 // Arn is a required field 3138 Arn *string `type:"string" required:"true"` 3139 3140 // The key names of the tags to remove. 3141 // 3142 // TagKeys is a required field 3143 TagKeys []*string `type:"list" required:"true"` 3144} 3145 3146// String returns the string representation 3147func (s UntagResourceInput) String() string { 3148 return awsutil.Prettify(s) 3149} 3150 3151// GoString returns the string representation 3152func (s UntagResourceInput) GoString() string { 3153 return s.String() 3154} 3155 3156// Validate inspects the fields of the type to determine if they are valid. 3157func (s *UntagResourceInput) Validate() error { 3158 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 3159 if s.Arn == nil { 3160 invalidParams.Add(request.NewErrParamRequired("Arn")) 3161 } 3162 if s.TagKeys == nil { 3163 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 3164 } 3165 3166 if invalidParams.Len() > 0 { 3167 return invalidParams 3168 } 3169 return nil 3170} 3171 3172// SetArn sets the Arn field's value. 3173func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { 3174 s.Arn = &v 3175 return s 3176} 3177 3178// SetTagKeys sets the TagKeys field's value. 3179func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 3180 s.TagKeys = v 3181 return s 3182} 3183 3184type UntagResourceOutput struct { 3185 _ struct{} `type:"structure"` 3186} 3187 3188// String returns the string representation 3189func (s UntagResourceOutput) String() string { 3190 return awsutil.Prettify(s) 3191} 3192 3193// GoString returns the string representation 3194func (s UntagResourceOutput) GoString() string { 3195 return s.String() 3196} 3197 3198type UpdateNotificationRuleInput struct { 3199 _ struct{} `type:"structure"` 3200 3201 // The Amazon Resource Name (ARN) of the notification rule. 3202 // 3203 // Arn is a required field 3204 Arn *string `type:"string" required:"true"` 3205 3206 // The level of detail to include in the notifications for this resource. BASIC 3207 // will include only the contents of the event as it would appear in AWS CloudWatch. 3208 // FULL will include any supplemental information provided by AWS CodeStar Notifications 3209 // and/or the service for the resource for which the notification is created. 3210 DetailType *string `type:"string" enum:"DetailType"` 3211 3212 // A list of event types associated with this notification rule. 3213 EventTypeIds []*string `type:"list"` 3214 3215 // The name of the notification rule. 3216 Name *string `min:"1" type:"string" sensitive:"true"` 3217 3218 // The status of the notification rule. Valid statuses include enabled (sending 3219 // notifications) or disabled (not sending notifications). 3220 Status *string `type:"string" enum:"NotificationRuleStatus"` 3221 3222 // The address and type of the targets to receive notifications from this notification 3223 // rule. 3224 Targets []*Target `type:"list"` 3225} 3226 3227// String returns the string representation 3228func (s UpdateNotificationRuleInput) String() string { 3229 return awsutil.Prettify(s) 3230} 3231 3232// GoString returns the string representation 3233func (s UpdateNotificationRuleInput) GoString() string { 3234 return s.String() 3235} 3236 3237// Validate inspects the fields of the type to determine if they are valid. 3238func (s *UpdateNotificationRuleInput) Validate() error { 3239 invalidParams := request.ErrInvalidParams{Context: "UpdateNotificationRuleInput"} 3240 if s.Arn == nil { 3241 invalidParams.Add(request.NewErrParamRequired("Arn")) 3242 } 3243 if s.Name != nil && len(*s.Name) < 1 { 3244 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3245 } 3246 if s.Targets != nil { 3247 for i, v := range s.Targets { 3248 if v == nil { 3249 continue 3250 } 3251 if err := v.Validate(); err != nil { 3252 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) 3253 } 3254 } 3255 } 3256 3257 if invalidParams.Len() > 0 { 3258 return invalidParams 3259 } 3260 return nil 3261} 3262 3263// SetArn sets the Arn field's value. 3264func (s *UpdateNotificationRuleInput) SetArn(v string) *UpdateNotificationRuleInput { 3265 s.Arn = &v 3266 return s 3267} 3268 3269// SetDetailType sets the DetailType field's value. 3270func (s *UpdateNotificationRuleInput) SetDetailType(v string) *UpdateNotificationRuleInput { 3271 s.DetailType = &v 3272 return s 3273} 3274 3275// SetEventTypeIds sets the EventTypeIds field's value. 3276func (s *UpdateNotificationRuleInput) SetEventTypeIds(v []*string) *UpdateNotificationRuleInput { 3277 s.EventTypeIds = v 3278 return s 3279} 3280 3281// SetName sets the Name field's value. 3282func (s *UpdateNotificationRuleInput) SetName(v string) *UpdateNotificationRuleInput { 3283 s.Name = &v 3284 return s 3285} 3286 3287// SetStatus sets the Status field's value. 3288func (s *UpdateNotificationRuleInput) SetStatus(v string) *UpdateNotificationRuleInput { 3289 s.Status = &v 3290 return s 3291} 3292 3293// SetTargets sets the Targets field's value. 3294func (s *UpdateNotificationRuleInput) SetTargets(v []*Target) *UpdateNotificationRuleInput { 3295 s.Targets = v 3296 return s 3297} 3298 3299type UpdateNotificationRuleOutput struct { 3300 _ struct{} `type:"structure"` 3301} 3302 3303// String returns the string representation 3304func (s UpdateNotificationRuleOutput) String() string { 3305 return awsutil.Prettify(s) 3306} 3307 3308// GoString returns the string representation 3309func (s UpdateNotificationRuleOutput) GoString() string { 3310 return s.String() 3311} 3312 3313// One or more parameter values are not valid. 3314type ValidationException struct { 3315 _ struct{} `type:"structure"` 3316 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3317 3318 Message_ *string `locationName:"Message" min:"1" type:"string"` 3319} 3320 3321// String returns the string representation 3322func (s ValidationException) String() string { 3323 return awsutil.Prettify(s) 3324} 3325 3326// GoString returns the string representation 3327func (s ValidationException) GoString() string { 3328 return s.String() 3329} 3330 3331func newErrorValidationException(v protocol.ResponseMetadata) error { 3332 return &ValidationException{ 3333 RespMetadata: v, 3334 } 3335} 3336 3337// Code returns the exception type name. 3338func (s *ValidationException) Code() string { 3339 return "ValidationException" 3340} 3341 3342// Message returns the exception's message. 3343func (s *ValidationException) Message() string { 3344 if s.Message_ != nil { 3345 return *s.Message_ 3346 } 3347 return "" 3348} 3349 3350// OrigErr always returns nil, satisfies awserr.Error interface. 3351func (s *ValidationException) OrigErr() error { 3352 return nil 3353} 3354 3355func (s *ValidationException) Error() string { 3356 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3357} 3358 3359// Status code returns the HTTP status code for the request's response error. 3360func (s *ValidationException) StatusCode() int { 3361 return s.RespMetadata.StatusCode 3362} 3363 3364// RequestID returns the service's response RequestID for request. 3365func (s *ValidationException) RequestID() string { 3366 return s.RespMetadata.RequestID 3367} 3368 3369const ( 3370 // DetailTypeBasic is a DetailType enum value 3371 DetailTypeBasic = "BASIC" 3372 3373 // DetailTypeFull is a DetailType enum value 3374 DetailTypeFull = "FULL" 3375) 3376 3377// DetailType_Values returns all elements of the DetailType enum 3378func DetailType_Values() []string { 3379 return []string{ 3380 DetailTypeBasic, 3381 DetailTypeFull, 3382 } 3383} 3384 3385const ( 3386 // ListEventTypesFilterNameResourceType is a ListEventTypesFilterName enum value 3387 ListEventTypesFilterNameResourceType = "RESOURCE_TYPE" 3388 3389 // ListEventTypesFilterNameServiceName is a ListEventTypesFilterName enum value 3390 ListEventTypesFilterNameServiceName = "SERVICE_NAME" 3391) 3392 3393// ListEventTypesFilterName_Values returns all elements of the ListEventTypesFilterName enum 3394func ListEventTypesFilterName_Values() []string { 3395 return []string{ 3396 ListEventTypesFilterNameResourceType, 3397 ListEventTypesFilterNameServiceName, 3398 } 3399} 3400 3401const ( 3402 // ListNotificationRulesFilterNameEventTypeId is a ListNotificationRulesFilterName enum value 3403 ListNotificationRulesFilterNameEventTypeId = "EVENT_TYPE_ID" 3404 3405 // ListNotificationRulesFilterNameCreatedBy is a ListNotificationRulesFilterName enum value 3406 ListNotificationRulesFilterNameCreatedBy = "CREATED_BY" 3407 3408 // ListNotificationRulesFilterNameResource is a ListNotificationRulesFilterName enum value 3409 ListNotificationRulesFilterNameResource = "RESOURCE" 3410 3411 // ListNotificationRulesFilterNameTargetAddress is a ListNotificationRulesFilterName enum value 3412 ListNotificationRulesFilterNameTargetAddress = "TARGET_ADDRESS" 3413) 3414 3415// ListNotificationRulesFilterName_Values returns all elements of the ListNotificationRulesFilterName enum 3416func ListNotificationRulesFilterName_Values() []string { 3417 return []string{ 3418 ListNotificationRulesFilterNameEventTypeId, 3419 ListNotificationRulesFilterNameCreatedBy, 3420 ListNotificationRulesFilterNameResource, 3421 ListNotificationRulesFilterNameTargetAddress, 3422 } 3423} 3424 3425const ( 3426 // ListTargetsFilterNameTargetType is a ListTargetsFilterName enum value 3427 ListTargetsFilterNameTargetType = "TARGET_TYPE" 3428 3429 // ListTargetsFilterNameTargetAddress is a ListTargetsFilterName enum value 3430 ListTargetsFilterNameTargetAddress = "TARGET_ADDRESS" 3431 3432 // ListTargetsFilterNameTargetStatus is a ListTargetsFilterName enum value 3433 ListTargetsFilterNameTargetStatus = "TARGET_STATUS" 3434) 3435 3436// ListTargetsFilterName_Values returns all elements of the ListTargetsFilterName enum 3437func ListTargetsFilterName_Values() []string { 3438 return []string{ 3439 ListTargetsFilterNameTargetType, 3440 ListTargetsFilterNameTargetAddress, 3441 ListTargetsFilterNameTargetStatus, 3442 } 3443} 3444 3445const ( 3446 // NotificationRuleStatusEnabled is a NotificationRuleStatus enum value 3447 NotificationRuleStatusEnabled = "ENABLED" 3448 3449 // NotificationRuleStatusDisabled is a NotificationRuleStatus enum value 3450 NotificationRuleStatusDisabled = "DISABLED" 3451) 3452 3453// NotificationRuleStatus_Values returns all elements of the NotificationRuleStatus enum 3454func NotificationRuleStatus_Values() []string { 3455 return []string{ 3456 NotificationRuleStatusEnabled, 3457 NotificationRuleStatusDisabled, 3458 } 3459} 3460 3461const ( 3462 // TargetStatusPending is a TargetStatus enum value 3463 TargetStatusPending = "PENDING" 3464 3465 // TargetStatusActive is a TargetStatus enum value 3466 TargetStatusActive = "ACTIVE" 3467 3468 // TargetStatusUnreachable is a TargetStatus enum value 3469 TargetStatusUnreachable = "UNREACHABLE" 3470 3471 // TargetStatusInactive is a TargetStatus enum value 3472 TargetStatusInactive = "INACTIVE" 3473 3474 // TargetStatusDeactivated is a TargetStatus enum value 3475 TargetStatusDeactivated = "DEACTIVATED" 3476) 3477 3478// TargetStatus_Values returns all elements of the TargetStatus enum 3479func TargetStatus_Values() []string { 3480 return []string{ 3481 TargetStatusPending, 3482 TargetStatusActive, 3483 TargetStatusUnreachable, 3484 TargetStatusInactive, 3485 TargetStatusDeactivated, 3486 } 3487} 3488