1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package eventbridge 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/jsonrpc" 14) 15 16const opActivateEventSource = "ActivateEventSource" 17 18// ActivateEventSourceRequest generates a "aws/request.Request" representing the 19// client's request for the ActivateEventSource 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 ActivateEventSource for more information on using the ActivateEventSource 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 ActivateEventSourceRequest method. 34// req, resp := client.ActivateEventSourceRequest(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/eventbridge-2015-10-07/ActivateEventSource 42func (c *EventBridge) ActivateEventSourceRequest(input *ActivateEventSourceInput) (req *request.Request, output *ActivateEventSourceOutput) { 43 op := &request.Operation{ 44 Name: opActivateEventSource, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &ActivateEventSourceInput{} 51 } 52 53 output = &ActivateEventSourceOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57} 58 59// ActivateEventSource API operation for Amazon EventBridge. 60// 61// Activates a partner event source that has been deactivated. Once activated, 62// your matching event bus will start receiving events from the event source. 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 Amazon EventBridge's 69// API operation ActivateEventSource for usage and error information. 70// 71// Returned Error Types: 72// * ResourceNotFoundException 73// An entity that you specified does not exist. 74// 75// * ConcurrentModificationException 76// There is concurrent modification on a rule or target. 77// 78// * InvalidStateException 79// The specified state is not a valid state for an event source. 80// 81// * InternalException 82// This exception occurs due to unexpected causes. 83// 84// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ActivateEventSource 85func (c *EventBridge) ActivateEventSource(input *ActivateEventSourceInput) (*ActivateEventSourceOutput, error) { 86 req, out := c.ActivateEventSourceRequest(input) 87 return out, req.Send() 88} 89 90// ActivateEventSourceWithContext is the same as ActivateEventSource with the addition of 91// the ability to pass a context and additional request options. 92// 93// See ActivateEventSource for details on how to use this API operation. 94// 95// The context must be non-nil and will be used for request cancellation. If 96// the context is nil a panic will occur. In the future the SDK may create 97// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 98// for more information on using Contexts. 99func (c *EventBridge) ActivateEventSourceWithContext(ctx aws.Context, input *ActivateEventSourceInput, opts ...request.Option) (*ActivateEventSourceOutput, error) { 100 req, out := c.ActivateEventSourceRequest(input) 101 req.SetContext(ctx) 102 req.ApplyOptions(opts...) 103 return out, req.Send() 104} 105 106const opCreateEventBus = "CreateEventBus" 107 108// CreateEventBusRequest generates a "aws/request.Request" representing the 109// client's request for the CreateEventBus operation. The "output" return 110// value will be populated with the request's response once the request completes 111// successfully. 112// 113// Use "Send" method on the returned Request to send the API call to the service. 114// the "output" return value is not valid until after Send returns without error. 115// 116// See CreateEventBus for more information on using the CreateEventBus 117// API call, and error handling. 118// 119// This method is useful when you want to inject custom logic or configuration 120// into the SDK's request lifecycle. Such as custom headers, or retry logic. 121// 122// 123// // Example sending a request using the CreateEventBusRequest method. 124// req, resp := client.CreateEventBusRequest(params) 125// 126// err := req.Send() 127// if err == nil { // resp is now filled 128// fmt.Println(resp) 129// } 130// 131// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus 132func (c *EventBridge) CreateEventBusRequest(input *CreateEventBusInput) (req *request.Request, output *CreateEventBusOutput) { 133 op := &request.Operation{ 134 Name: opCreateEventBus, 135 HTTPMethod: "POST", 136 HTTPPath: "/", 137 } 138 139 if input == nil { 140 input = &CreateEventBusInput{} 141 } 142 143 output = &CreateEventBusOutput{} 144 req = c.newRequest(op, input, output) 145 return 146} 147 148// CreateEventBus API operation for Amazon EventBridge. 149// 150// Creates a new event bus within your account. This can be a custom event bus 151// which you can use to receive events from your custom applications and services, 152// or it can be a partner event bus which can be matched to a partner event 153// source. 154// 155// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 156// with awserr.Error's Code and Message methods to get detailed information about 157// the error. 158// 159// See the AWS API reference guide for Amazon EventBridge's 160// API operation CreateEventBus for usage and error information. 161// 162// Returned Error Types: 163// * ResourceAlreadyExistsException 164// The resource you are trying to create already exists. 165// 166// * ResourceNotFoundException 167// An entity that you specified does not exist. 168// 169// * InvalidStateException 170// The specified state is not a valid state for an event source. 171// 172// * InternalException 173// This exception occurs due to unexpected causes. 174// 175// * ConcurrentModificationException 176// There is concurrent modification on a rule or target. 177// 178// * LimitExceededException 179// You tried to create more rules or add more targets to a rule than is allowed. 180// 181// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus 182func (c *EventBridge) CreateEventBus(input *CreateEventBusInput) (*CreateEventBusOutput, error) { 183 req, out := c.CreateEventBusRequest(input) 184 return out, req.Send() 185} 186 187// CreateEventBusWithContext is the same as CreateEventBus with the addition of 188// the ability to pass a context and additional request options. 189// 190// See CreateEventBus for details on how to use this API operation. 191// 192// The context must be non-nil and will be used for request cancellation. If 193// the context is nil a panic will occur. In the future the SDK may create 194// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 195// for more information on using Contexts. 196func (c *EventBridge) CreateEventBusWithContext(ctx aws.Context, input *CreateEventBusInput, opts ...request.Option) (*CreateEventBusOutput, error) { 197 req, out := c.CreateEventBusRequest(input) 198 req.SetContext(ctx) 199 req.ApplyOptions(opts...) 200 return out, req.Send() 201} 202 203const opCreatePartnerEventSource = "CreatePartnerEventSource" 204 205// CreatePartnerEventSourceRequest generates a "aws/request.Request" representing the 206// client's request for the CreatePartnerEventSource operation. The "output" return 207// value will be populated with the request's response once the request completes 208// successfully. 209// 210// Use "Send" method on the returned Request to send the API call to the service. 211// the "output" return value is not valid until after Send returns without error. 212// 213// See CreatePartnerEventSource for more information on using the CreatePartnerEventSource 214// API call, and error handling. 215// 216// This method is useful when you want to inject custom logic or configuration 217// into the SDK's request lifecycle. Such as custom headers, or retry logic. 218// 219// 220// // Example sending a request using the CreatePartnerEventSourceRequest method. 221// req, resp := client.CreatePartnerEventSourceRequest(params) 222// 223// err := req.Send() 224// if err == nil { // resp is now filled 225// fmt.Println(resp) 226// } 227// 228// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource 229func (c *EventBridge) CreatePartnerEventSourceRequest(input *CreatePartnerEventSourceInput) (req *request.Request, output *CreatePartnerEventSourceOutput) { 230 op := &request.Operation{ 231 Name: opCreatePartnerEventSource, 232 HTTPMethod: "POST", 233 HTTPPath: "/", 234 } 235 236 if input == nil { 237 input = &CreatePartnerEventSourceInput{} 238 } 239 240 output = &CreatePartnerEventSourceOutput{} 241 req = c.newRequest(op, input, output) 242 return 243} 244 245// CreatePartnerEventSource API operation for Amazon EventBridge. 246// 247// Called by an SaaS partner to create a partner event source. This operation 248// is not used by AWS customers. 249// 250// Each partner event source can be used by one AWS account to create a matching 251// partner event bus in that AWS account. A SaaS partner must create one partner 252// event source for each AWS account that wants to receive those event types. 253// 254// A partner event source creates events based on resources within the SaaS 255// partner's service or application. 256// 257// An AWS account that creates a partner event bus that matches the partner 258// event source can use that event bus to receive events from the partner, and 259// then process them using AWS Events rules and targets. 260// 261// Partner event source names follow this format: 262// 263// partner_name/event_namespace/event_name 264// 265// partner_name is determined during partner registration and identifies the 266// partner to AWS customers. event_namespace is determined by the partner and 267// is a way for the partner to categorize their events. event_name is determined 268// by the partner, and should uniquely identify an event-generating resource 269// within the partner system. The combination of event_namespace and event_name 270// should help AWS customers decide whether to create an event bus to receive 271// these events. 272// 273// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 274// with awserr.Error's Code and Message methods to get detailed information about 275// the error. 276// 277// See the AWS API reference guide for Amazon EventBridge's 278// API operation CreatePartnerEventSource for usage and error information. 279// 280// Returned Error Types: 281// * ResourceAlreadyExistsException 282// The resource you are trying to create already exists. 283// 284// * InternalException 285// This exception occurs due to unexpected causes. 286// 287// * ConcurrentModificationException 288// There is concurrent modification on a rule or target. 289// 290// * LimitExceededException 291// You tried to create more rules or add more targets to a rule than is allowed. 292// 293// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource 294func (c *EventBridge) CreatePartnerEventSource(input *CreatePartnerEventSourceInput) (*CreatePartnerEventSourceOutput, error) { 295 req, out := c.CreatePartnerEventSourceRequest(input) 296 return out, req.Send() 297} 298 299// CreatePartnerEventSourceWithContext is the same as CreatePartnerEventSource with the addition of 300// the ability to pass a context and additional request options. 301// 302// See CreatePartnerEventSource for details on how to use this API operation. 303// 304// The context must be non-nil and will be used for request cancellation. If 305// the context is nil a panic will occur. In the future the SDK may create 306// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 307// for more information on using Contexts. 308func (c *EventBridge) CreatePartnerEventSourceWithContext(ctx aws.Context, input *CreatePartnerEventSourceInput, opts ...request.Option) (*CreatePartnerEventSourceOutput, error) { 309 req, out := c.CreatePartnerEventSourceRequest(input) 310 req.SetContext(ctx) 311 req.ApplyOptions(opts...) 312 return out, req.Send() 313} 314 315const opDeactivateEventSource = "DeactivateEventSource" 316 317// DeactivateEventSourceRequest generates a "aws/request.Request" representing the 318// client's request for the DeactivateEventSource operation. The "output" return 319// value will be populated with the request's response once the request completes 320// successfully. 321// 322// Use "Send" method on the returned Request to send the API call to the service. 323// the "output" return value is not valid until after Send returns without error. 324// 325// See DeactivateEventSource for more information on using the DeactivateEventSource 326// API call, and error handling. 327// 328// This method is useful when you want to inject custom logic or configuration 329// into the SDK's request lifecycle. Such as custom headers, or retry logic. 330// 331// 332// // Example sending a request using the DeactivateEventSourceRequest method. 333// req, resp := client.DeactivateEventSourceRequest(params) 334// 335// err := req.Send() 336// if err == nil { // resp is now filled 337// fmt.Println(resp) 338// } 339// 340// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource 341func (c *EventBridge) DeactivateEventSourceRequest(input *DeactivateEventSourceInput) (req *request.Request, output *DeactivateEventSourceOutput) { 342 op := &request.Operation{ 343 Name: opDeactivateEventSource, 344 HTTPMethod: "POST", 345 HTTPPath: "/", 346 } 347 348 if input == nil { 349 input = &DeactivateEventSourceInput{} 350 } 351 352 output = &DeactivateEventSourceOutput{} 353 req = c.newRequest(op, input, output) 354 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 355 return 356} 357 358// DeactivateEventSource API operation for Amazon EventBridge. 359// 360// You can use this operation to temporarily stop receiving events from the 361// specified partner event source. The matching event bus is not deleted. 362// 363// When you deactivate a partner event source, the source goes into PENDING 364// state. If it remains in PENDING state for more than two weeks, it is deleted. 365// 366// To activate a deactivated partner event source, use ActivateEventSource. 367// 368// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 369// with awserr.Error's Code and Message methods to get detailed information about 370// the error. 371// 372// See the AWS API reference guide for Amazon EventBridge's 373// API operation DeactivateEventSource for usage and error information. 374// 375// Returned Error Types: 376// * ResourceNotFoundException 377// An entity that you specified does not exist. 378// 379// * ConcurrentModificationException 380// There is concurrent modification on a rule or target. 381// 382// * InvalidStateException 383// The specified state is not a valid state for an event source. 384// 385// * InternalException 386// This exception occurs due to unexpected causes. 387// 388// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource 389func (c *EventBridge) DeactivateEventSource(input *DeactivateEventSourceInput) (*DeactivateEventSourceOutput, error) { 390 req, out := c.DeactivateEventSourceRequest(input) 391 return out, req.Send() 392} 393 394// DeactivateEventSourceWithContext is the same as DeactivateEventSource with the addition of 395// the ability to pass a context and additional request options. 396// 397// See DeactivateEventSource for details on how to use this API operation. 398// 399// The context must be non-nil and will be used for request cancellation. If 400// the context is nil a panic will occur. In the future the SDK may create 401// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 402// for more information on using Contexts. 403func (c *EventBridge) DeactivateEventSourceWithContext(ctx aws.Context, input *DeactivateEventSourceInput, opts ...request.Option) (*DeactivateEventSourceOutput, error) { 404 req, out := c.DeactivateEventSourceRequest(input) 405 req.SetContext(ctx) 406 req.ApplyOptions(opts...) 407 return out, req.Send() 408} 409 410const opDeleteEventBus = "DeleteEventBus" 411 412// DeleteEventBusRequest generates a "aws/request.Request" representing the 413// client's request for the DeleteEventBus operation. The "output" return 414// value will be populated with the request's response once the request completes 415// successfully. 416// 417// Use "Send" method on the returned Request to send the API call to the service. 418// the "output" return value is not valid until after Send returns without error. 419// 420// See DeleteEventBus for more information on using the DeleteEventBus 421// API call, and error handling. 422// 423// This method is useful when you want to inject custom logic or configuration 424// into the SDK's request lifecycle. Such as custom headers, or retry logic. 425// 426// 427// // Example sending a request using the DeleteEventBusRequest method. 428// req, resp := client.DeleteEventBusRequest(params) 429// 430// err := req.Send() 431// if err == nil { // resp is now filled 432// fmt.Println(resp) 433// } 434// 435// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus 436func (c *EventBridge) DeleteEventBusRequest(input *DeleteEventBusInput) (req *request.Request, output *DeleteEventBusOutput) { 437 op := &request.Operation{ 438 Name: opDeleteEventBus, 439 HTTPMethod: "POST", 440 HTTPPath: "/", 441 } 442 443 if input == nil { 444 input = &DeleteEventBusInput{} 445 } 446 447 output = &DeleteEventBusOutput{} 448 req = c.newRequest(op, input, output) 449 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 450 return 451} 452 453// DeleteEventBus API operation for Amazon EventBridge. 454// 455// Deletes the specified custom event bus or partner event bus. All rules associated 456// with this event bus need to be deleted. You can't delete your account's default 457// event bus. 458// 459// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 460// with awserr.Error's Code and Message methods to get detailed information about 461// the error. 462// 463// See the AWS API reference guide for Amazon EventBridge's 464// API operation DeleteEventBus for usage and error information. 465// 466// Returned Error Types: 467// * InternalException 468// This exception occurs due to unexpected causes. 469// 470// * ConcurrentModificationException 471// There is concurrent modification on a rule or target. 472// 473// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus 474func (c *EventBridge) DeleteEventBus(input *DeleteEventBusInput) (*DeleteEventBusOutput, error) { 475 req, out := c.DeleteEventBusRequest(input) 476 return out, req.Send() 477} 478 479// DeleteEventBusWithContext is the same as DeleteEventBus with the addition of 480// the ability to pass a context and additional request options. 481// 482// See DeleteEventBus for details on how to use this API operation. 483// 484// The context must be non-nil and will be used for request cancellation. If 485// the context is nil a panic will occur. In the future the SDK may create 486// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 487// for more information on using Contexts. 488func (c *EventBridge) DeleteEventBusWithContext(ctx aws.Context, input *DeleteEventBusInput, opts ...request.Option) (*DeleteEventBusOutput, error) { 489 req, out := c.DeleteEventBusRequest(input) 490 req.SetContext(ctx) 491 req.ApplyOptions(opts...) 492 return out, req.Send() 493} 494 495const opDeletePartnerEventSource = "DeletePartnerEventSource" 496 497// DeletePartnerEventSourceRequest generates a "aws/request.Request" representing the 498// client's request for the DeletePartnerEventSource operation. The "output" return 499// value will be populated with the request's response once the request completes 500// successfully. 501// 502// Use "Send" method on the returned Request to send the API call to the service. 503// the "output" return value is not valid until after Send returns without error. 504// 505// See DeletePartnerEventSource for more information on using the DeletePartnerEventSource 506// API call, and error handling. 507// 508// This method is useful when you want to inject custom logic or configuration 509// into the SDK's request lifecycle. Such as custom headers, or retry logic. 510// 511// 512// // Example sending a request using the DeletePartnerEventSourceRequest method. 513// req, resp := client.DeletePartnerEventSourceRequest(params) 514// 515// err := req.Send() 516// if err == nil { // resp is now filled 517// fmt.Println(resp) 518// } 519// 520// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource 521func (c *EventBridge) DeletePartnerEventSourceRequest(input *DeletePartnerEventSourceInput) (req *request.Request, output *DeletePartnerEventSourceOutput) { 522 op := &request.Operation{ 523 Name: opDeletePartnerEventSource, 524 HTTPMethod: "POST", 525 HTTPPath: "/", 526 } 527 528 if input == nil { 529 input = &DeletePartnerEventSourceInput{} 530 } 531 532 output = &DeletePartnerEventSourceOutput{} 533 req = c.newRequest(op, input, output) 534 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 535 return 536} 537 538// DeletePartnerEventSource API operation for Amazon EventBridge. 539// 540// This operation is used by SaaS partners to delete a partner event source. 541// This operation is not used by AWS customers. 542// 543// When you delete an event source, the status of the corresponding partner 544// event bus in the AWS customer account becomes DELETED. 545// 546// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 547// with awserr.Error's Code and Message methods to get detailed information about 548// the error. 549// 550// See the AWS API reference guide for Amazon EventBridge's 551// API operation DeletePartnerEventSource for usage and error information. 552// 553// Returned Error Types: 554// * InternalException 555// This exception occurs due to unexpected causes. 556// 557// * ConcurrentModificationException 558// There is concurrent modification on a rule or target. 559// 560// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource 561func (c *EventBridge) DeletePartnerEventSource(input *DeletePartnerEventSourceInput) (*DeletePartnerEventSourceOutput, error) { 562 req, out := c.DeletePartnerEventSourceRequest(input) 563 return out, req.Send() 564} 565 566// DeletePartnerEventSourceWithContext is the same as DeletePartnerEventSource with the addition of 567// the ability to pass a context and additional request options. 568// 569// See DeletePartnerEventSource for details on how to use this API operation. 570// 571// The context must be non-nil and will be used for request cancellation. If 572// the context is nil a panic will occur. In the future the SDK may create 573// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 574// for more information on using Contexts. 575func (c *EventBridge) DeletePartnerEventSourceWithContext(ctx aws.Context, input *DeletePartnerEventSourceInput, opts ...request.Option) (*DeletePartnerEventSourceOutput, error) { 576 req, out := c.DeletePartnerEventSourceRequest(input) 577 req.SetContext(ctx) 578 req.ApplyOptions(opts...) 579 return out, req.Send() 580} 581 582const opDeleteRule = "DeleteRule" 583 584// DeleteRuleRequest generates a "aws/request.Request" representing the 585// client's request for the DeleteRule operation. The "output" return 586// value will be populated with the request's response once the request completes 587// successfully. 588// 589// Use "Send" method on the returned Request to send the API call to the service. 590// the "output" return value is not valid until after Send returns without error. 591// 592// See DeleteRule for more information on using the DeleteRule 593// API call, and error handling. 594// 595// This method is useful when you want to inject custom logic or configuration 596// into the SDK's request lifecycle. Such as custom headers, or retry logic. 597// 598// 599// // Example sending a request using the DeleteRuleRequest method. 600// req, resp := client.DeleteRuleRequest(params) 601// 602// err := req.Send() 603// if err == nil { // resp is now filled 604// fmt.Println(resp) 605// } 606// 607// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule 608func (c *EventBridge) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { 609 op := &request.Operation{ 610 Name: opDeleteRule, 611 HTTPMethod: "POST", 612 HTTPPath: "/", 613 } 614 615 if input == nil { 616 input = &DeleteRuleInput{} 617 } 618 619 output = &DeleteRuleOutput{} 620 req = c.newRequest(op, input, output) 621 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 622 return 623} 624 625// DeleteRule API operation for Amazon EventBridge. 626// 627// Deletes the specified rule. 628// 629// Before you can delete the rule, you must remove all targets, using RemoveTargets. 630// 631// When you delete a rule, incoming events might continue to match to the deleted 632// rule. Allow a short period of time for changes to take effect. 633// 634// Managed rules are rules created and managed by another AWS service on your 635// behalf. These rules are created by those other AWS services to support functionality 636// in those services. You can delete these rules using the Force option, but 637// you should do so only if you are sure the other service is not still using 638// that rule. 639// 640// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 641// with awserr.Error's Code and Message methods to get detailed information about 642// the error. 643// 644// See the AWS API reference guide for Amazon EventBridge's 645// API operation DeleteRule for usage and error information. 646// 647// Returned Error Types: 648// * ConcurrentModificationException 649// There is concurrent modification on a rule or target. 650// 651// * ManagedRuleException 652// This rule was created by an AWS service on behalf of your account. It is 653// managed by that service. If you see this error in response to DeleteRule 654// or RemoveTargets, you can use the Force parameter in those calls to delete 655// the rule or remove targets from the rule. You cannot modify these managed 656// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 657// or UntagResource. 658// 659// * InternalException 660// This exception occurs due to unexpected causes. 661// 662// * ResourceNotFoundException 663// An entity that you specified does not exist. 664// 665// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule 666func (c *EventBridge) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { 667 req, out := c.DeleteRuleRequest(input) 668 return out, req.Send() 669} 670 671// DeleteRuleWithContext is the same as DeleteRule with the addition of 672// the ability to pass a context and additional request options. 673// 674// See DeleteRule for details on how to use this API operation. 675// 676// The context must be non-nil and will be used for request cancellation. If 677// the context is nil a panic will occur. In the future the SDK may create 678// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 679// for more information on using Contexts. 680func (c *EventBridge) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { 681 req, out := c.DeleteRuleRequest(input) 682 req.SetContext(ctx) 683 req.ApplyOptions(opts...) 684 return out, req.Send() 685} 686 687const opDescribeEventBus = "DescribeEventBus" 688 689// DescribeEventBusRequest generates a "aws/request.Request" representing the 690// client's request for the DescribeEventBus operation. The "output" return 691// value will be populated with the request's response once the request completes 692// successfully. 693// 694// Use "Send" method on the returned Request to send the API call to the service. 695// the "output" return value is not valid until after Send returns without error. 696// 697// See DescribeEventBus for more information on using the DescribeEventBus 698// API call, and error handling. 699// 700// This method is useful when you want to inject custom logic or configuration 701// into the SDK's request lifecycle. Such as custom headers, or retry logic. 702// 703// 704// // Example sending a request using the DescribeEventBusRequest method. 705// req, resp := client.DescribeEventBusRequest(params) 706// 707// err := req.Send() 708// if err == nil { // resp is now filled 709// fmt.Println(resp) 710// } 711// 712// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus 713func (c *EventBridge) DescribeEventBusRequest(input *DescribeEventBusInput) (req *request.Request, output *DescribeEventBusOutput) { 714 op := &request.Operation{ 715 Name: opDescribeEventBus, 716 HTTPMethod: "POST", 717 HTTPPath: "/", 718 } 719 720 if input == nil { 721 input = &DescribeEventBusInput{} 722 } 723 724 output = &DescribeEventBusOutput{} 725 req = c.newRequest(op, input, output) 726 return 727} 728 729// DescribeEventBus API operation for Amazon EventBridge. 730// 731// Displays details about an event bus in your account. This can include the 732// external AWS accounts that are permitted to write events to your default 733// event bus, and the associated policy. For custom event buses and partner 734// event buses, it displays the name, ARN, policy, state, and creation time. 735// 736// To enable your account to receive events from other accounts on its default 737// event bus, use PutPermission. 738// 739// For more information about partner event buses, see CreateEventBus. 740// 741// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 742// with awserr.Error's Code and Message methods to get detailed information about 743// the error. 744// 745// See the AWS API reference guide for Amazon EventBridge's 746// API operation DescribeEventBus for usage and error information. 747// 748// Returned Error Types: 749// * ResourceNotFoundException 750// An entity that you specified does not exist. 751// 752// * InternalException 753// This exception occurs due to unexpected causes. 754// 755// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus 756func (c *EventBridge) DescribeEventBus(input *DescribeEventBusInput) (*DescribeEventBusOutput, error) { 757 req, out := c.DescribeEventBusRequest(input) 758 return out, req.Send() 759} 760 761// DescribeEventBusWithContext is the same as DescribeEventBus with the addition of 762// the ability to pass a context and additional request options. 763// 764// See DescribeEventBus for details on how to use this API operation. 765// 766// The context must be non-nil and will be used for request cancellation. If 767// the context is nil a panic will occur. In the future the SDK may create 768// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 769// for more information on using Contexts. 770func (c *EventBridge) DescribeEventBusWithContext(ctx aws.Context, input *DescribeEventBusInput, opts ...request.Option) (*DescribeEventBusOutput, error) { 771 req, out := c.DescribeEventBusRequest(input) 772 req.SetContext(ctx) 773 req.ApplyOptions(opts...) 774 return out, req.Send() 775} 776 777const opDescribeEventSource = "DescribeEventSource" 778 779// DescribeEventSourceRequest generates a "aws/request.Request" representing the 780// client's request for the DescribeEventSource operation. The "output" return 781// value will be populated with the request's response once the request completes 782// successfully. 783// 784// Use "Send" method on the returned Request to send the API call to the service. 785// the "output" return value is not valid until after Send returns without error. 786// 787// See DescribeEventSource for more information on using the DescribeEventSource 788// API call, and error handling. 789// 790// This method is useful when you want to inject custom logic or configuration 791// into the SDK's request lifecycle. Such as custom headers, or retry logic. 792// 793// 794// // Example sending a request using the DescribeEventSourceRequest method. 795// req, resp := client.DescribeEventSourceRequest(params) 796// 797// err := req.Send() 798// if err == nil { // resp is now filled 799// fmt.Println(resp) 800// } 801// 802// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource 803func (c *EventBridge) DescribeEventSourceRequest(input *DescribeEventSourceInput) (req *request.Request, output *DescribeEventSourceOutput) { 804 op := &request.Operation{ 805 Name: opDescribeEventSource, 806 HTTPMethod: "POST", 807 HTTPPath: "/", 808 } 809 810 if input == nil { 811 input = &DescribeEventSourceInput{} 812 } 813 814 output = &DescribeEventSourceOutput{} 815 req = c.newRequest(op, input, output) 816 return 817} 818 819// DescribeEventSource API operation for Amazon EventBridge. 820// 821// This operation lists details about a partner event source that is shared 822// with your account. 823// 824// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 825// with awserr.Error's Code and Message methods to get detailed information about 826// the error. 827// 828// See the AWS API reference guide for Amazon EventBridge's 829// API operation DescribeEventSource for usage and error information. 830// 831// Returned Error Types: 832// * ResourceNotFoundException 833// An entity that you specified does not exist. 834// 835// * InternalException 836// This exception occurs due to unexpected causes. 837// 838// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource 839func (c *EventBridge) DescribeEventSource(input *DescribeEventSourceInput) (*DescribeEventSourceOutput, error) { 840 req, out := c.DescribeEventSourceRequest(input) 841 return out, req.Send() 842} 843 844// DescribeEventSourceWithContext is the same as DescribeEventSource with the addition of 845// the ability to pass a context and additional request options. 846// 847// See DescribeEventSource for details on how to use this API operation. 848// 849// The context must be non-nil and will be used for request cancellation. If 850// the context is nil a panic will occur. In the future the SDK may create 851// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 852// for more information on using Contexts. 853func (c *EventBridge) DescribeEventSourceWithContext(ctx aws.Context, input *DescribeEventSourceInput, opts ...request.Option) (*DescribeEventSourceOutput, error) { 854 req, out := c.DescribeEventSourceRequest(input) 855 req.SetContext(ctx) 856 req.ApplyOptions(opts...) 857 return out, req.Send() 858} 859 860const opDescribePartnerEventSource = "DescribePartnerEventSource" 861 862// DescribePartnerEventSourceRequest generates a "aws/request.Request" representing the 863// client's request for the DescribePartnerEventSource operation. The "output" return 864// value will be populated with the request's response once the request completes 865// successfully. 866// 867// Use "Send" method on the returned Request to send the API call to the service. 868// the "output" return value is not valid until after Send returns without error. 869// 870// See DescribePartnerEventSource for more information on using the DescribePartnerEventSource 871// API call, and error handling. 872// 873// This method is useful when you want to inject custom logic or configuration 874// into the SDK's request lifecycle. Such as custom headers, or retry logic. 875// 876// 877// // Example sending a request using the DescribePartnerEventSourceRequest method. 878// req, resp := client.DescribePartnerEventSourceRequest(params) 879// 880// err := req.Send() 881// if err == nil { // resp is now filled 882// fmt.Println(resp) 883// } 884// 885// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource 886func (c *EventBridge) DescribePartnerEventSourceRequest(input *DescribePartnerEventSourceInput) (req *request.Request, output *DescribePartnerEventSourceOutput) { 887 op := &request.Operation{ 888 Name: opDescribePartnerEventSource, 889 HTTPMethod: "POST", 890 HTTPPath: "/", 891 } 892 893 if input == nil { 894 input = &DescribePartnerEventSourceInput{} 895 } 896 897 output = &DescribePartnerEventSourceOutput{} 898 req = c.newRequest(op, input, output) 899 return 900} 901 902// DescribePartnerEventSource API operation for Amazon EventBridge. 903// 904// An SaaS partner can use this operation to list details about a partner event 905// source that they have created. AWS customers do not use this operation. Instead, 906// AWS customers can use DescribeEventSource to see details about a partner 907// event source that is shared with them. 908// 909// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 910// with awserr.Error's Code and Message methods to get detailed information about 911// the error. 912// 913// See the AWS API reference guide for Amazon EventBridge's 914// API operation DescribePartnerEventSource for usage and error information. 915// 916// Returned Error Types: 917// * ResourceNotFoundException 918// An entity that you specified does not exist. 919// 920// * InternalException 921// This exception occurs due to unexpected causes. 922// 923// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource 924func (c *EventBridge) DescribePartnerEventSource(input *DescribePartnerEventSourceInput) (*DescribePartnerEventSourceOutput, error) { 925 req, out := c.DescribePartnerEventSourceRequest(input) 926 return out, req.Send() 927} 928 929// DescribePartnerEventSourceWithContext is the same as DescribePartnerEventSource with the addition of 930// the ability to pass a context and additional request options. 931// 932// See DescribePartnerEventSource for details on how to use this API operation. 933// 934// The context must be non-nil and will be used for request cancellation. If 935// the context is nil a panic will occur. In the future the SDK may create 936// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 937// for more information on using Contexts. 938func (c *EventBridge) DescribePartnerEventSourceWithContext(ctx aws.Context, input *DescribePartnerEventSourceInput, opts ...request.Option) (*DescribePartnerEventSourceOutput, error) { 939 req, out := c.DescribePartnerEventSourceRequest(input) 940 req.SetContext(ctx) 941 req.ApplyOptions(opts...) 942 return out, req.Send() 943} 944 945const opDescribeRule = "DescribeRule" 946 947// DescribeRuleRequest generates a "aws/request.Request" representing the 948// client's request for the DescribeRule operation. The "output" return 949// value will be populated with the request's response once the request completes 950// successfully. 951// 952// Use "Send" method on the returned Request to send the API call to the service. 953// the "output" return value is not valid until after Send returns without error. 954// 955// See DescribeRule for more information on using the DescribeRule 956// API call, and error handling. 957// 958// This method is useful when you want to inject custom logic or configuration 959// into the SDK's request lifecycle. Such as custom headers, or retry logic. 960// 961// 962// // Example sending a request using the DescribeRuleRequest method. 963// req, resp := client.DescribeRuleRequest(params) 964// 965// err := req.Send() 966// if err == nil { // resp is now filled 967// fmt.Println(resp) 968// } 969// 970// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule 971func (c *EventBridge) DescribeRuleRequest(input *DescribeRuleInput) (req *request.Request, output *DescribeRuleOutput) { 972 op := &request.Operation{ 973 Name: opDescribeRule, 974 HTTPMethod: "POST", 975 HTTPPath: "/", 976 } 977 978 if input == nil { 979 input = &DescribeRuleInput{} 980 } 981 982 output = &DescribeRuleOutput{} 983 req = c.newRequest(op, input, output) 984 return 985} 986 987// DescribeRule API operation for Amazon EventBridge. 988// 989// Describes the specified rule. 990// 991// DescribeRule does not list the targets of a rule. To see the targets associated 992// with a rule, use ListTargetsByRule. 993// 994// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 995// with awserr.Error's Code and Message methods to get detailed information about 996// the error. 997// 998// See the AWS API reference guide for Amazon EventBridge's 999// API operation DescribeRule for usage and error information. 1000// 1001// Returned Error Types: 1002// * ResourceNotFoundException 1003// An entity that you specified does not exist. 1004// 1005// * InternalException 1006// This exception occurs due to unexpected causes. 1007// 1008// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule 1009func (c *EventBridge) DescribeRule(input *DescribeRuleInput) (*DescribeRuleOutput, error) { 1010 req, out := c.DescribeRuleRequest(input) 1011 return out, req.Send() 1012} 1013 1014// DescribeRuleWithContext is the same as DescribeRule with the addition of 1015// the ability to pass a context and additional request options. 1016// 1017// See DescribeRule for details on how to use this API operation. 1018// 1019// The context must be non-nil and will be used for request cancellation. If 1020// the context is nil a panic will occur. In the future the SDK may create 1021// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1022// for more information on using Contexts. 1023func (c *EventBridge) DescribeRuleWithContext(ctx aws.Context, input *DescribeRuleInput, opts ...request.Option) (*DescribeRuleOutput, error) { 1024 req, out := c.DescribeRuleRequest(input) 1025 req.SetContext(ctx) 1026 req.ApplyOptions(opts...) 1027 return out, req.Send() 1028} 1029 1030const opDisableRule = "DisableRule" 1031 1032// DisableRuleRequest generates a "aws/request.Request" representing the 1033// client's request for the DisableRule operation. The "output" return 1034// value will be populated with the request's response once the request completes 1035// successfully. 1036// 1037// Use "Send" method on the returned Request to send the API call to the service. 1038// the "output" return value is not valid until after Send returns without error. 1039// 1040// See DisableRule for more information on using the DisableRule 1041// API call, and error handling. 1042// 1043// This method is useful when you want to inject custom logic or configuration 1044// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1045// 1046// 1047// // Example sending a request using the DisableRuleRequest method. 1048// req, resp := client.DisableRuleRequest(params) 1049// 1050// err := req.Send() 1051// if err == nil { // resp is now filled 1052// fmt.Println(resp) 1053// } 1054// 1055// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule 1056func (c *EventBridge) DisableRuleRequest(input *DisableRuleInput) (req *request.Request, output *DisableRuleOutput) { 1057 op := &request.Operation{ 1058 Name: opDisableRule, 1059 HTTPMethod: "POST", 1060 HTTPPath: "/", 1061 } 1062 1063 if input == nil { 1064 input = &DisableRuleInput{} 1065 } 1066 1067 output = &DisableRuleOutput{} 1068 req = c.newRequest(op, input, output) 1069 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1070 return 1071} 1072 1073// DisableRule API operation for Amazon EventBridge. 1074// 1075// Disables the specified rule. A disabled rule won't match any events, and 1076// won't self-trigger if it has a schedule expression. 1077// 1078// When you disable a rule, incoming events might continue to match to the disabled 1079// rule. Allow a short period of time for changes to take effect. 1080// 1081// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1082// with awserr.Error's Code and Message methods to get detailed information about 1083// the error. 1084// 1085// See the AWS API reference guide for Amazon EventBridge's 1086// API operation DisableRule for usage and error information. 1087// 1088// Returned Error Types: 1089// * ResourceNotFoundException 1090// An entity that you specified does not exist. 1091// 1092// * ConcurrentModificationException 1093// There is concurrent modification on a rule or target. 1094// 1095// * ManagedRuleException 1096// This rule was created by an AWS service on behalf of your account. It is 1097// managed by that service. If you see this error in response to DeleteRule 1098// or RemoveTargets, you can use the Force parameter in those calls to delete 1099// the rule or remove targets from the rule. You cannot modify these managed 1100// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 1101// or UntagResource. 1102// 1103// * InternalException 1104// This exception occurs due to unexpected causes. 1105// 1106// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule 1107func (c *EventBridge) DisableRule(input *DisableRuleInput) (*DisableRuleOutput, error) { 1108 req, out := c.DisableRuleRequest(input) 1109 return out, req.Send() 1110} 1111 1112// DisableRuleWithContext is the same as DisableRule with the addition of 1113// the ability to pass a context and additional request options. 1114// 1115// See DisableRule for details on how to use this API operation. 1116// 1117// The context must be non-nil and will be used for request cancellation. If 1118// the context is nil a panic will occur. In the future the SDK may create 1119// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1120// for more information on using Contexts. 1121func (c *EventBridge) DisableRuleWithContext(ctx aws.Context, input *DisableRuleInput, opts ...request.Option) (*DisableRuleOutput, error) { 1122 req, out := c.DisableRuleRequest(input) 1123 req.SetContext(ctx) 1124 req.ApplyOptions(opts...) 1125 return out, req.Send() 1126} 1127 1128const opEnableRule = "EnableRule" 1129 1130// EnableRuleRequest generates a "aws/request.Request" representing the 1131// client's request for the EnableRule operation. The "output" return 1132// value will be populated with the request's response once the request completes 1133// successfully. 1134// 1135// Use "Send" method on the returned Request to send the API call to the service. 1136// the "output" return value is not valid until after Send returns without error. 1137// 1138// See EnableRule for more information on using the EnableRule 1139// API call, and error handling. 1140// 1141// This method is useful when you want to inject custom logic or configuration 1142// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1143// 1144// 1145// // Example sending a request using the EnableRuleRequest method. 1146// req, resp := client.EnableRuleRequest(params) 1147// 1148// err := req.Send() 1149// if err == nil { // resp is now filled 1150// fmt.Println(resp) 1151// } 1152// 1153// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule 1154func (c *EventBridge) EnableRuleRequest(input *EnableRuleInput) (req *request.Request, output *EnableRuleOutput) { 1155 op := &request.Operation{ 1156 Name: opEnableRule, 1157 HTTPMethod: "POST", 1158 HTTPPath: "/", 1159 } 1160 1161 if input == nil { 1162 input = &EnableRuleInput{} 1163 } 1164 1165 output = &EnableRuleOutput{} 1166 req = c.newRequest(op, input, output) 1167 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1168 return 1169} 1170 1171// EnableRule API operation for Amazon EventBridge. 1172// 1173// Enables the specified rule. If the rule does not exist, the operation fails. 1174// 1175// When you enable a rule, incoming events might not immediately start matching 1176// to a newly enabled rule. Allow a short period of time for changes to take 1177// effect. 1178// 1179// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1180// with awserr.Error's Code and Message methods to get detailed information about 1181// the error. 1182// 1183// See the AWS API reference guide for Amazon EventBridge's 1184// API operation EnableRule for usage and error information. 1185// 1186// Returned Error Types: 1187// * ResourceNotFoundException 1188// An entity that you specified does not exist. 1189// 1190// * ConcurrentModificationException 1191// There is concurrent modification on a rule or target. 1192// 1193// * ManagedRuleException 1194// This rule was created by an AWS service on behalf of your account. It is 1195// managed by that service. If you see this error in response to DeleteRule 1196// or RemoveTargets, you can use the Force parameter in those calls to delete 1197// the rule or remove targets from the rule. You cannot modify these managed 1198// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 1199// or UntagResource. 1200// 1201// * InternalException 1202// This exception occurs due to unexpected causes. 1203// 1204// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule 1205func (c *EventBridge) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) { 1206 req, out := c.EnableRuleRequest(input) 1207 return out, req.Send() 1208} 1209 1210// EnableRuleWithContext is the same as EnableRule with the addition of 1211// the ability to pass a context and additional request options. 1212// 1213// See EnableRule for details on how to use this API operation. 1214// 1215// The context must be non-nil and will be used for request cancellation. If 1216// the context is nil a panic will occur. In the future the SDK may create 1217// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1218// for more information on using Contexts. 1219func (c *EventBridge) EnableRuleWithContext(ctx aws.Context, input *EnableRuleInput, opts ...request.Option) (*EnableRuleOutput, error) { 1220 req, out := c.EnableRuleRequest(input) 1221 req.SetContext(ctx) 1222 req.ApplyOptions(opts...) 1223 return out, req.Send() 1224} 1225 1226const opListEventBuses = "ListEventBuses" 1227 1228// ListEventBusesRequest generates a "aws/request.Request" representing the 1229// client's request for the ListEventBuses operation. The "output" return 1230// value will be populated with the request's response once the request completes 1231// successfully. 1232// 1233// Use "Send" method on the returned Request to send the API call to the service. 1234// the "output" return value is not valid until after Send returns without error. 1235// 1236// See ListEventBuses for more information on using the ListEventBuses 1237// API call, and error handling. 1238// 1239// This method is useful when you want to inject custom logic or configuration 1240// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1241// 1242// 1243// // Example sending a request using the ListEventBusesRequest method. 1244// req, resp := client.ListEventBusesRequest(params) 1245// 1246// err := req.Send() 1247// if err == nil { // resp is now filled 1248// fmt.Println(resp) 1249// } 1250// 1251// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses 1252func (c *EventBridge) ListEventBusesRequest(input *ListEventBusesInput) (req *request.Request, output *ListEventBusesOutput) { 1253 op := &request.Operation{ 1254 Name: opListEventBuses, 1255 HTTPMethod: "POST", 1256 HTTPPath: "/", 1257 } 1258 1259 if input == nil { 1260 input = &ListEventBusesInput{} 1261 } 1262 1263 output = &ListEventBusesOutput{} 1264 req = c.newRequest(op, input, output) 1265 return 1266} 1267 1268// ListEventBuses API operation for Amazon EventBridge. 1269// 1270// Lists all the event buses in your account, including the default event bus, 1271// custom event buses, and partner event buses. 1272// 1273// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1274// with awserr.Error's Code and Message methods to get detailed information about 1275// the error. 1276// 1277// See the AWS API reference guide for Amazon EventBridge's 1278// API operation ListEventBuses for usage and error information. 1279// 1280// Returned Error Types: 1281// * InternalException 1282// This exception occurs due to unexpected causes. 1283// 1284// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses 1285func (c *EventBridge) ListEventBuses(input *ListEventBusesInput) (*ListEventBusesOutput, error) { 1286 req, out := c.ListEventBusesRequest(input) 1287 return out, req.Send() 1288} 1289 1290// ListEventBusesWithContext is the same as ListEventBuses with the addition of 1291// the ability to pass a context and additional request options. 1292// 1293// See ListEventBuses for details on how to use this API operation. 1294// 1295// The context must be non-nil and will be used for request cancellation. If 1296// the context is nil a panic will occur. In the future the SDK may create 1297// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1298// for more information on using Contexts. 1299func (c *EventBridge) ListEventBusesWithContext(ctx aws.Context, input *ListEventBusesInput, opts ...request.Option) (*ListEventBusesOutput, error) { 1300 req, out := c.ListEventBusesRequest(input) 1301 req.SetContext(ctx) 1302 req.ApplyOptions(opts...) 1303 return out, req.Send() 1304} 1305 1306const opListEventSources = "ListEventSources" 1307 1308// ListEventSourcesRequest generates a "aws/request.Request" representing the 1309// client's request for the ListEventSources operation. The "output" return 1310// value will be populated with the request's response once the request completes 1311// successfully. 1312// 1313// Use "Send" method on the returned Request to send the API call to the service. 1314// the "output" return value is not valid until after Send returns without error. 1315// 1316// See ListEventSources for more information on using the ListEventSources 1317// API call, and error handling. 1318// 1319// This method is useful when you want to inject custom logic or configuration 1320// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1321// 1322// 1323// // Example sending a request using the ListEventSourcesRequest method. 1324// req, resp := client.ListEventSourcesRequest(params) 1325// 1326// err := req.Send() 1327// if err == nil { // resp is now filled 1328// fmt.Println(resp) 1329// } 1330// 1331// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources 1332func (c *EventBridge) ListEventSourcesRequest(input *ListEventSourcesInput) (req *request.Request, output *ListEventSourcesOutput) { 1333 op := &request.Operation{ 1334 Name: opListEventSources, 1335 HTTPMethod: "POST", 1336 HTTPPath: "/", 1337 } 1338 1339 if input == nil { 1340 input = &ListEventSourcesInput{} 1341 } 1342 1343 output = &ListEventSourcesOutput{} 1344 req = c.newRequest(op, input, output) 1345 return 1346} 1347 1348// ListEventSources API operation for Amazon EventBridge. 1349// 1350// You can use this to see all the partner event sources that have been shared 1351// with your AWS account. For more information about partner event sources, 1352// see CreateEventBus. 1353// 1354// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1355// with awserr.Error's Code and Message methods to get detailed information about 1356// the error. 1357// 1358// See the AWS API reference guide for Amazon EventBridge's 1359// API operation ListEventSources for usage and error information. 1360// 1361// Returned Error Types: 1362// * InternalException 1363// This exception occurs due to unexpected causes. 1364// 1365// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources 1366func (c *EventBridge) ListEventSources(input *ListEventSourcesInput) (*ListEventSourcesOutput, error) { 1367 req, out := c.ListEventSourcesRequest(input) 1368 return out, req.Send() 1369} 1370 1371// ListEventSourcesWithContext is the same as ListEventSources with the addition of 1372// the ability to pass a context and additional request options. 1373// 1374// See ListEventSources for details on how to use this API operation. 1375// 1376// The context must be non-nil and will be used for request cancellation. If 1377// the context is nil a panic will occur. In the future the SDK may create 1378// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1379// for more information on using Contexts. 1380func (c *EventBridge) ListEventSourcesWithContext(ctx aws.Context, input *ListEventSourcesInput, opts ...request.Option) (*ListEventSourcesOutput, error) { 1381 req, out := c.ListEventSourcesRequest(input) 1382 req.SetContext(ctx) 1383 req.ApplyOptions(opts...) 1384 return out, req.Send() 1385} 1386 1387const opListPartnerEventSourceAccounts = "ListPartnerEventSourceAccounts" 1388 1389// ListPartnerEventSourceAccountsRequest generates a "aws/request.Request" representing the 1390// client's request for the ListPartnerEventSourceAccounts operation. The "output" return 1391// value will be populated with the request's response once the request completes 1392// successfully. 1393// 1394// Use "Send" method on the returned Request to send the API call to the service. 1395// the "output" return value is not valid until after Send returns without error. 1396// 1397// See ListPartnerEventSourceAccounts for more information on using the ListPartnerEventSourceAccounts 1398// API call, and error handling. 1399// 1400// This method is useful when you want to inject custom logic or configuration 1401// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1402// 1403// 1404// // Example sending a request using the ListPartnerEventSourceAccountsRequest method. 1405// req, resp := client.ListPartnerEventSourceAccountsRequest(params) 1406// 1407// err := req.Send() 1408// if err == nil { // resp is now filled 1409// fmt.Println(resp) 1410// } 1411// 1412// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts 1413func (c *EventBridge) ListPartnerEventSourceAccountsRequest(input *ListPartnerEventSourceAccountsInput) (req *request.Request, output *ListPartnerEventSourceAccountsOutput) { 1414 op := &request.Operation{ 1415 Name: opListPartnerEventSourceAccounts, 1416 HTTPMethod: "POST", 1417 HTTPPath: "/", 1418 } 1419 1420 if input == nil { 1421 input = &ListPartnerEventSourceAccountsInput{} 1422 } 1423 1424 output = &ListPartnerEventSourceAccountsOutput{} 1425 req = c.newRequest(op, input, output) 1426 return 1427} 1428 1429// ListPartnerEventSourceAccounts API operation for Amazon EventBridge. 1430// 1431// An SaaS partner can use this operation to display the AWS account ID that 1432// a particular partner event source name is associated with. This operation 1433// is not used by AWS customers. 1434// 1435// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1436// with awserr.Error's Code and Message methods to get detailed information about 1437// the error. 1438// 1439// See the AWS API reference guide for Amazon EventBridge's 1440// API operation ListPartnerEventSourceAccounts for usage and error information. 1441// 1442// Returned Error Types: 1443// * ResourceNotFoundException 1444// An entity that you specified does not exist. 1445// 1446// * InternalException 1447// This exception occurs due to unexpected causes. 1448// 1449// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts 1450func (c *EventBridge) ListPartnerEventSourceAccounts(input *ListPartnerEventSourceAccountsInput) (*ListPartnerEventSourceAccountsOutput, error) { 1451 req, out := c.ListPartnerEventSourceAccountsRequest(input) 1452 return out, req.Send() 1453} 1454 1455// ListPartnerEventSourceAccountsWithContext is the same as ListPartnerEventSourceAccounts with the addition of 1456// the ability to pass a context and additional request options. 1457// 1458// See ListPartnerEventSourceAccounts for details on how to use this API operation. 1459// 1460// The context must be non-nil and will be used for request cancellation. If 1461// the context is nil a panic will occur. In the future the SDK may create 1462// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1463// for more information on using Contexts. 1464func (c *EventBridge) ListPartnerEventSourceAccountsWithContext(ctx aws.Context, input *ListPartnerEventSourceAccountsInput, opts ...request.Option) (*ListPartnerEventSourceAccountsOutput, error) { 1465 req, out := c.ListPartnerEventSourceAccountsRequest(input) 1466 req.SetContext(ctx) 1467 req.ApplyOptions(opts...) 1468 return out, req.Send() 1469} 1470 1471const opListPartnerEventSources = "ListPartnerEventSources" 1472 1473// ListPartnerEventSourcesRequest generates a "aws/request.Request" representing the 1474// client's request for the ListPartnerEventSources operation. The "output" return 1475// value will be populated with the request's response once the request completes 1476// successfully. 1477// 1478// Use "Send" method on the returned Request to send the API call to the service. 1479// the "output" return value is not valid until after Send returns without error. 1480// 1481// See ListPartnerEventSources for more information on using the ListPartnerEventSources 1482// API call, and error handling. 1483// 1484// This method is useful when you want to inject custom logic or configuration 1485// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1486// 1487// 1488// // Example sending a request using the ListPartnerEventSourcesRequest method. 1489// req, resp := client.ListPartnerEventSourcesRequest(params) 1490// 1491// err := req.Send() 1492// if err == nil { // resp is now filled 1493// fmt.Println(resp) 1494// } 1495// 1496// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources 1497func (c *EventBridge) ListPartnerEventSourcesRequest(input *ListPartnerEventSourcesInput) (req *request.Request, output *ListPartnerEventSourcesOutput) { 1498 op := &request.Operation{ 1499 Name: opListPartnerEventSources, 1500 HTTPMethod: "POST", 1501 HTTPPath: "/", 1502 } 1503 1504 if input == nil { 1505 input = &ListPartnerEventSourcesInput{} 1506 } 1507 1508 output = &ListPartnerEventSourcesOutput{} 1509 req = c.newRequest(op, input, output) 1510 return 1511} 1512 1513// ListPartnerEventSources API operation for Amazon EventBridge. 1514// 1515// An SaaS partner can use this operation to list all the partner event source 1516// names that they have created. This operation is not used by AWS customers. 1517// 1518// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1519// with awserr.Error's Code and Message methods to get detailed information about 1520// the error. 1521// 1522// See the AWS API reference guide for Amazon EventBridge's 1523// API operation ListPartnerEventSources for usage and error information. 1524// 1525// Returned Error Types: 1526// * InternalException 1527// This exception occurs due to unexpected causes. 1528// 1529// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources 1530func (c *EventBridge) ListPartnerEventSources(input *ListPartnerEventSourcesInput) (*ListPartnerEventSourcesOutput, error) { 1531 req, out := c.ListPartnerEventSourcesRequest(input) 1532 return out, req.Send() 1533} 1534 1535// ListPartnerEventSourcesWithContext is the same as ListPartnerEventSources with the addition of 1536// the ability to pass a context and additional request options. 1537// 1538// See ListPartnerEventSources for details on how to use this API operation. 1539// 1540// The context must be non-nil and will be used for request cancellation. If 1541// the context is nil a panic will occur. In the future the SDK may create 1542// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1543// for more information on using Contexts. 1544func (c *EventBridge) ListPartnerEventSourcesWithContext(ctx aws.Context, input *ListPartnerEventSourcesInput, opts ...request.Option) (*ListPartnerEventSourcesOutput, error) { 1545 req, out := c.ListPartnerEventSourcesRequest(input) 1546 req.SetContext(ctx) 1547 req.ApplyOptions(opts...) 1548 return out, req.Send() 1549} 1550 1551const opListRuleNamesByTarget = "ListRuleNamesByTarget" 1552 1553// ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the 1554// client's request for the ListRuleNamesByTarget operation. The "output" return 1555// value will be populated with the request's response once the request completes 1556// successfully. 1557// 1558// Use "Send" method on the returned Request to send the API call to the service. 1559// the "output" return value is not valid until after Send returns without error. 1560// 1561// See ListRuleNamesByTarget for more information on using the ListRuleNamesByTarget 1562// API call, and error handling. 1563// 1564// This method is useful when you want to inject custom logic or configuration 1565// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1566// 1567// 1568// // Example sending a request using the ListRuleNamesByTargetRequest method. 1569// req, resp := client.ListRuleNamesByTargetRequest(params) 1570// 1571// err := req.Send() 1572// if err == nil { // resp is now filled 1573// fmt.Println(resp) 1574// } 1575// 1576// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget 1577func (c *EventBridge) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetInput) (req *request.Request, output *ListRuleNamesByTargetOutput) { 1578 op := &request.Operation{ 1579 Name: opListRuleNamesByTarget, 1580 HTTPMethod: "POST", 1581 HTTPPath: "/", 1582 } 1583 1584 if input == nil { 1585 input = &ListRuleNamesByTargetInput{} 1586 } 1587 1588 output = &ListRuleNamesByTargetOutput{} 1589 req = c.newRequest(op, input, output) 1590 return 1591} 1592 1593// ListRuleNamesByTarget API operation for Amazon EventBridge. 1594// 1595// Lists the rules for the specified target. You can see which of the rules 1596// in Amazon EventBridge can invoke a specific target in your account. 1597// 1598// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1599// with awserr.Error's Code and Message methods to get detailed information about 1600// the error. 1601// 1602// See the AWS API reference guide for Amazon EventBridge's 1603// API operation ListRuleNamesByTarget for usage and error information. 1604// 1605// Returned Error Types: 1606// * InternalException 1607// This exception occurs due to unexpected causes. 1608// 1609// * ResourceNotFoundException 1610// An entity that you specified does not exist. 1611// 1612// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget 1613func (c *EventBridge) ListRuleNamesByTarget(input *ListRuleNamesByTargetInput) (*ListRuleNamesByTargetOutput, error) { 1614 req, out := c.ListRuleNamesByTargetRequest(input) 1615 return out, req.Send() 1616} 1617 1618// ListRuleNamesByTargetWithContext is the same as ListRuleNamesByTarget with the addition of 1619// the ability to pass a context and additional request options. 1620// 1621// See ListRuleNamesByTarget for details on how to use this API operation. 1622// 1623// The context must be non-nil and will be used for request cancellation. If 1624// the context is nil a panic will occur. In the future the SDK may create 1625// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1626// for more information on using Contexts. 1627func (c *EventBridge) ListRuleNamesByTargetWithContext(ctx aws.Context, input *ListRuleNamesByTargetInput, opts ...request.Option) (*ListRuleNamesByTargetOutput, error) { 1628 req, out := c.ListRuleNamesByTargetRequest(input) 1629 req.SetContext(ctx) 1630 req.ApplyOptions(opts...) 1631 return out, req.Send() 1632} 1633 1634const opListRules = "ListRules" 1635 1636// ListRulesRequest generates a "aws/request.Request" representing the 1637// client's request for the ListRules operation. The "output" return 1638// value will be populated with the request's response once the request completes 1639// successfully. 1640// 1641// Use "Send" method on the returned Request to send the API call to the service. 1642// the "output" return value is not valid until after Send returns without error. 1643// 1644// See ListRules for more information on using the ListRules 1645// API call, and error handling. 1646// 1647// This method is useful when you want to inject custom logic or configuration 1648// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1649// 1650// 1651// // Example sending a request using the ListRulesRequest method. 1652// req, resp := client.ListRulesRequest(params) 1653// 1654// err := req.Send() 1655// if err == nil { // resp is now filled 1656// fmt.Println(resp) 1657// } 1658// 1659// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules 1660func (c *EventBridge) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { 1661 op := &request.Operation{ 1662 Name: opListRules, 1663 HTTPMethod: "POST", 1664 HTTPPath: "/", 1665 } 1666 1667 if input == nil { 1668 input = &ListRulesInput{} 1669 } 1670 1671 output = &ListRulesOutput{} 1672 req = c.newRequest(op, input, output) 1673 return 1674} 1675 1676// ListRules API operation for Amazon EventBridge. 1677// 1678// Lists your Amazon EventBridge rules. You can either list all the rules or 1679// you can provide a prefix to match to the rule names. 1680// 1681// ListRules does not list the targets of a rule. To see the targets associated 1682// with a rule, use ListTargetsByRule. 1683// 1684// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1685// with awserr.Error's Code and Message methods to get detailed information about 1686// the error. 1687// 1688// See the AWS API reference guide for Amazon EventBridge's 1689// API operation ListRules for usage and error information. 1690// 1691// Returned Error Types: 1692// * InternalException 1693// This exception occurs due to unexpected causes. 1694// 1695// * ResourceNotFoundException 1696// An entity that you specified does not exist. 1697// 1698// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules 1699func (c *EventBridge) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { 1700 req, out := c.ListRulesRequest(input) 1701 return out, req.Send() 1702} 1703 1704// ListRulesWithContext is the same as ListRules with the addition of 1705// the ability to pass a context and additional request options. 1706// 1707// See ListRules for details on how to use this API operation. 1708// 1709// The context must be non-nil and will be used for request cancellation. If 1710// the context is nil a panic will occur. In the future the SDK may create 1711// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1712// for more information on using Contexts. 1713func (c *EventBridge) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { 1714 req, out := c.ListRulesRequest(input) 1715 req.SetContext(ctx) 1716 req.ApplyOptions(opts...) 1717 return out, req.Send() 1718} 1719 1720const opListTagsForResource = "ListTagsForResource" 1721 1722// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1723// client's request for the ListTagsForResource operation. The "output" return 1724// value will be populated with the request's response once the request completes 1725// successfully. 1726// 1727// Use "Send" method on the returned Request to send the API call to the service. 1728// the "output" return value is not valid until after Send returns without error. 1729// 1730// See ListTagsForResource for more information on using the ListTagsForResource 1731// API call, and error handling. 1732// 1733// This method is useful when you want to inject custom logic or configuration 1734// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1735// 1736// 1737// // Example sending a request using the ListTagsForResourceRequest method. 1738// req, resp := client.ListTagsForResourceRequest(params) 1739// 1740// err := req.Send() 1741// if err == nil { // resp is now filled 1742// fmt.Println(resp) 1743// } 1744// 1745// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource 1746func (c *EventBridge) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1747 op := &request.Operation{ 1748 Name: opListTagsForResource, 1749 HTTPMethod: "POST", 1750 HTTPPath: "/", 1751 } 1752 1753 if input == nil { 1754 input = &ListTagsForResourceInput{} 1755 } 1756 1757 output = &ListTagsForResourceOutput{} 1758 req = c.newRequest(op, input, output) 1759 return 1760} 1761 1762// ListTagsForResource API operation for Amazon EventBridge. 1763// 1764// Displays the tags associated with an EventBridge resource. In EventBridge, 1765// rules and event buses can be tagged. 1766// 1767// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1768// with awserr.Error's Code and Message methods to get detailed information about 1769// the error. 1770// 1771// See the AWS API reference guide for Amazon EventBridge's 1772// API operation ListTagsForResource for usage and error information. 1773// 1774// Returned Error Types: 1775// * ResourceNotFoundException 1776// An entity that you specified does not exist. 1777// 1778// * InternalException 1779// This exception occurs due to unexpected causes. 1780// 1781// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource 1782func (c *EventBridge) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1783 req, out := c.ListTagsForResourceRequest(input) 1784 return out, req.Send() 1785} 1786 1787// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1788// the ability to pass a context and additional request options. 1789// 1790// See ListTagsForResource for details on how to use this API operation. 1791// 1792// The context must be non-nil and will be used for request cancellation. If 1793// the context is nil a panic will occur. In the future the SDK may create 1794// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1795// for more information on using Contexts. 1796func (c *EventBridge) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1797 req, out := c.ListTagsForResourceRequest(input) 1798 req.SetContext(ctx) 1799 req.ApplyOptions(opts...) 1800 return out, req.Send() 1801} 1802 1803const opListTargetsByRule = "ListTargetsByRule" 1804 1805// ListTargetsByRuleRequest generates a "aws/request.Request" representing the 1806// client's request for the ListTargetsByRule operation. The "output" return 1807// value will be populated with the request's response once the request completes 1808// successfully. 1809// 1810// Use "Send" method on the returned Request to send the API call to the service. 1811// the "output" return value is not valid until after Send returns without error. 1812// 1813// See ListTargetsByRule for more information on using the ListTargetsByRule 1814// API call, and error handling. 1815// 1816// This method is useful when you want to inject custom logic or configuration 1817// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1818// 1819// 1820// // Example sending a request using the ListTargetsByRuleRequest method. 1821// req, resp := client.ListTargetsByRuleRequest(params) 1822// 1823// err := req.Send() 1824// if err == nil { // resp is now filled 1825// fmt.Println(resp) 1826// } 1827// 1828// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule 1829func (c *EventBridge) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (req *request.Request, output *ListTargetsByRuleOutput) { 1830 op := &request.Operation{ 1831 Name: opListTargetsByRule, 1832 HTTPMethod: "POST", 1833 HTTPPath: "/", 1834 } 1835 1836 if input == nil { 1837 input = &ListTargetsByRuleInput{} 1838 } 1839 1840 output = &ListTargetsByRuleOutput{} 1841 req = c.newRequest(op, input, output) 1842 return 1843} 1844 1845// ListTargetsByRule API operation for Amazon EventBridge. 1846// 1847// Lists the targets assigned to the specified rule. 1848// 1849// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1850// with awserr.Error's Code and Message methods to get detailed information about 1851// the error. 1852// 1853// See the AWS API reference guide for Amazon EventBridge's 1854// API operation ListTargetsByRule for usage and error information. 1855// 1856// Returned Error Types: 1857// * ResourceNotFoundException 1858// An entity that you specified does not exist. 1859// 1860// * InternalException 1861// This exception occurs due to unexpected causes. 1862// 1863// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule 1864func (c *EventBridge) ListTargetsByRule(input *ListTargetsByRuleInput) (*ListTargetsByRuleOutput, error) { 1865 req, out := c.ListTargetsByRuleRequest(input) 1866 return out, req.Send() 1867} 1868 1869// ListTargetsByRuleWithContext is the same as ListTargetsByRule with the addition of 1870// the ability to pass a context and additional request options. 1871// 1872// See ListTargetsByRule for details on how to use this API operation. 1873// 1874// The context must be non-nil and will be used for request cancellation. If 1875// the context is nil a panic will occur. In the future the SDK may create 1876// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1877// for more information on using Contexts. 1878func (c *EventBridge) ListTargetsByRuleWithContext(ctx aws.Context, input *ListTargetsByRuleInput, opts ...request.Option) (*ListTargetsByRuleOutput, error) { 1879 req, out := c.ListTargetsByRuleRequest(input) 1880 req.SetContext(ctx) 1881 req.ApplyOptions(opts...) 1882 return out, req.Send() 1883} 1884 1885const opPutEvents = "PutEvents" 1886 1887// PutEventsRequest generates a "aws/request.Request" representing the 1888// client's request for the PutEvents operation. The "output" return 1889// value will be populated with the request's response once the request completes 1890// successfully. 1891// 1892// Use "Send" method on the returned Request to send the API call to the service. 1893// the "output" return value is not valid until after Send returns without error. 1894// 1895// See PutEvents for more information on using the PutEvents 1896// API call, and error handling. 1897// 1898// This method is useful when you want to inject custom logic or configuration 1899// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1900// 1901// 1902// // Example sending a request using the PutEventsRequest method. 1903// req, resp := client.PutEventsRequest(params) 1904// 1905// err := req.Send() 1906// if err == nil { // resp is now filled 1907// fmt.Println(resp) 1908// } 1909// 1910// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents 1911func (c *EventBridge) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { 1912 op := &request.Operation{ 1913 Name: opPutEvents, 1914 HTTPMethod: "POST", 1915 HTTPPath: "/", 1916 } 1917 1918 if input == nil { 1919 input = &PutEventsInput{} 1920 } 1921 1922 output = &PutEventsOutput{} 1923 req = c.newRequest(op, input, output) 1924 return 1925} 1926 1927// PutEvents API operation for Amazon EventBridge. 1928// 1929// Sends custom events to Amazon EventBridge so that they can be matched to 1930// rules. 1931// 1932// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1933// with awserr.Error's Code and Message methods to get detailed information about 1934// the error. 1935// 1936// See the AWS API reference guide for Amazon EventBridge's 1937// API operation PutEvents for usage and error information. 1938// 1939// Returned Error Types: 1940// * InternalException 1941// This exception occurs due to unexpected causes. 1942// 1943// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents 1944func (c *EventBridge) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { 1945 req, out := c.PutEventsRequest(input) 1946 return out, req.Send() 1947} 1948 1949// PutEventsWithContext is the same as PutEvents with the addition of 1950// the ability to pass a context and additional request options. 1951// 1952// See PutEvents for details on how to use this API operation. 1953// 1954// The context must be non-nil and will be used for request cancellation. If 1955// the context is nil a panic will occur. In the future the SDK may create 1956// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1957// for more information on using Contexts. 1958func (c *EventBridge) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { 1959 req, out := c.PutEventsRequest(input) 1960 req.SetContext(ctx) 1961 req.ApplyOptions(opts...) 1962 return out, req.Send() 1963} 1964 1965const opPutPartnerEvents = "PutPartnerEvents" 1966 1967// PutPartnerEventsRequest generates a "aws/request.Request" representing the 1968// client's request for the PutPartnerEvents operation. The "output" return 1969// value will be populated with the request's response once the request completes 1970// successfully. 1971// 1972// Use "Send" method on the returned Request to send the API call to the service. 1973// the "output" return value is not valid until after Send returns without error. 1974// 1975// See PutPartnerEvents for more information on using the PutPartnerEvents 1976// API call, and error handling. 1977// 1978// This method is useful when you want to inject custom logic or configuration 1979// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1980// 1981// 1982// // Example sending a request using the PutPartnerEventsRequest method. 1983// req, resp := client.PutPartnerEventsRequest(params) 1984// 1985// err := req.Send() 1986// if err == nil { // resp is now filled 1987// fmt.Println(resp) 1988// } 1989// 1990// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents 1991func (c *EventBridge) PutPartnerEventsRequest(input *PutPartnerEventsInput) (req *request.Request, output *PutPartnerEventsOutput) { 1992 op := &request.Operation{ 1993 Name: opPutPartnerEvents, 1994 HTTPMethod: "POST", 1995 HTTPPath: "/", 1996 } 1997 1998 if input == nil { 1999 input = &PutPartnerEventsInput{} 2000 } 2001 2002 output = &PutPartnerEventsOutput{} 2003 req = c.newRequest(op, input, output) 2004 return 2005} 2006 2007// PutPartnerEvents API operation for Amazon EventBridge. 2008// 2009// This is used by SaaS partners to write events to a customer's partner event 2010// bus. AWS customers do not use this operation. 2011// 2012// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2013// with awserr.Error's Code and Message methods to get detailed information about 2014// the error. 2015// 2016// See the AWS API reference guide for Amazon EventBridge's 2017// API operation PutPartnerEvents for usage and error information. 2018// 2019// Returned Error Types: 2020// * InternalException 2021// This exception occurs due to unexpected causes. 2022// 2023// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents 2024func (c *EventBridge) PutPartnerEvents(input *PutPartnerEventsInput) (*PutPartnerEventsOutput, error) { 2025 req, out := c.PutPartnerEventsRequest(input) 2026 return out, req.Send() 2027} 2028 2029// PutPartnerEventsWithContext is the same as PutPartnerEvents with the addition of 2030// the ability to pass a context and additional request options. 2031// 2032// See PutPartnerEvents for details on how to use this API operation. 2033// 2034// The context must be non-nil and will be used for request cancellation. If 2035// the context is nil a panic will occur. In the future the SDK may create 2036// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2037// for more information on using Contexts. 2038func (c *EventBridge) PutPartnerEventsWithContext(ctx aws.Context, input *PutPartnerEventsInput, opts ...request.Option) (*PutPartnerEventsOutput, error) { 2039 req, out := c.PutPartnerEventsRequest(input) 2040 req.SetContext(ctx) 2041 req.ApplyOptions(opts...) 2042 return out, req.Send() 2043} 2044 2045const opPutPermission = "PutPermission" 2046 2047// PutPermissionRequest generates a "aws/request.Request" representing the 2048// client's request for the PutPermission operation. The "output" return 2049// value will be populated with the request's response once the request completes 2050// successfully. 2051// 2052// Use "Send" method on the returned Request to send the API call to the service. 2053// the "output" return value is not valid until after Send returns without error. 2054// 2055// See PutPermission for more information on using the PutPermission 2056// API call, and error handling. 2057// 2058// This method is useful when you want to inject custom logic or configuration 2059// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2060// 2061// 2062// // Example sending a request using the PutPermissionRequest method. 2063// req, resp := client.PutPermissionRequest(params) 2064// 2065// err := req.Send() 2066// if err == nil { // resp is now filled 2067// fmt.Println(resp) 2068// } 2069// 2070// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission 2071func (c *EventBridge) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { 2072 op := &request.Operation{ 2073 Name: opPutPermission, 2074 HTTPMethod: "POST", 2075 HTTPPath: "/", 2076 } 2077 2078 if input == nil { 2079 input = &PutPermissionInput{} 2080 } 2081 2082 output = &PutPermissionOutput{} 2083 req = c.newRequest(op, input, output) 2084 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2085 return 2086} 2087 2088// PutPermission API operation for Amazon EventBridge. 2089// 2090// Running PutPermission permits the specified AWS account or AWS organization 2091// to put events to the specified event bus. CloudWatch Events rules in your 2092// account are triggered by these events arriving to an event bus in your account. 2093// 2094// For another account to send events to your account, that external account 2095// must have an EventBridge rule with your account's event bus as a target. 2096// 2097// To enable multiple AWS accounts to put events to your event bus, run PutPermission 2098// once for each of these accounts. Or, if all the accounts are members of the 2099// same AWS organization, you can run PutPermission once specifying Principal 2100// as "*" and specifying the AWS organization ID in Condition, to grant permissions 2101// to all accounts in that organization. 2102// 2103// If you grant permissions using an organization, then accounts in that organization 2104// must specify a RoleArn with proper permissions when they use PutTarget to 2105// add your account's event bus as a target. For more information, see Sending 2106// and Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) 2107// in the Amazon EventBridge User Guide. 2108// 2109// The permission policy on the default event bus cannot exceed 10 KB in size. 2110// 2111// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2112// with awserr.Error's Code and Message methods to get detailed information about 2113// the error. 2114// 2115// See the AWS API reference guide for Amazon EventBridge's 2116// API operation PutPermission for usage and error information. 2117// 2118// Returned Error Types: 2119// * ResourceNotFoundException 2120// An entity that you specified does not exist. 2121// 2122// * PolicyLengthExceededException 2123// The event bus policy is too long. For more information, see the limits. 2124// 2125// * InternalException 2126// This exception occurs due to unexpected causes. 2127// 2128// * ConcurrentModificationException 2129// There is concurrent modification on a rule or target. 2130// 2131// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission 2132func (c *EventBridge) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { 2133 req, out := c.PutPermissionRequest(input) 2134 return out, req.Send() 2135} 2136 2137// PutPermissionWithContext is the same as PutPermission with the addition of 2138// the ability to pass a context and additional request options. 2139// 2140// See PutPermission for details on how to use this API operation. 2141// 2142// The context must be non-nil and will be used for request cancellation. If 2143// the context is nil a panic will occur. In the future the SDK may create 2144// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2145// for more information on using Contexts. 2146func (c *EventBridge) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { 2147 req, out := c.PutPermissionRequest(input) 2148 req.SetContext(ctx) 2149 req.ApplyOptions(opts...) 2150 return out, req.Send() 2151} 2152 2153const opPutRule = "PutRule" 2154 2155// PutRuleRequest generates a "aws/request.Request" representing the 2156// client's request for the PutRule operation. The "output" return 2157// value will be populated with the request's response once the request completes 2158// successfully. 2159// 2160// Use "Send" method on the returned Request to send the API call to the service. 2161// the "output" return value is not valid until after Send returns without error. 2162// 2163// See PutRule for more information on using the PutRule 2164// API call, and error handling. 2165// 2166// This method is useful when you want to inject custom logic or configuration 2167// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2168// 2169// 2170// // Example sending a request using the PutRuleRequest method. 2171// req, resp := client.PutRuleRequest(params) 2172// 2173// err := req.Send() 2174// if err == nil { // resp is now filled 2175// fmt.Println(resp) 2176// } 2177// 2178// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule 2179func (c *EventBridge) PutRuleRequest(input *PutRuleInput) (req *request.Request, output *PutRuleOutput) { 2180 op := &request.Operation{ 2181 Name: opPutRule, 2182 HTTPMethod: "POST", 2183 HTTPPath: "/", 2184 } 2185 2186 if input == nil { 2187 input = &PutRuleInput{} 2188 } 2189 2190 output = &PutRuleOutput{} 2191 req = c.newRequest(op, input, output) 2192 return 2193} 2194 2195// PutRule API operation for Amazon EventBridge. 2196// 2197// Creates or updates the specified rule. Rules are enabled by default, or based 2198// on value of the state. You can disable a rule using DisableRule. 2199// 2200// A single rule watches for events from a single event bus. Events generated 2201// by AWS services go to your account's default event bus. Events generated 2202// by SaaS partner services or applications go to the matching partner event 2203// bus. If you have custom applications or services, you can specify whether 2204// their events go to your default event bus or a custom event bus that you 2205// have created. For more information, see CreateEventBus. 2206// 2207// If you are updating an existing rule, the rule is replaced with what you 2208// specify in this PutRule command. If you omit arguments in PutRule, the old 2209// values for those arguments are not kept. Instead, they are replaced with 2210// null values. 2211// 2212// When you create or update a rule, incoming events might not immediately start 2213// matching to new or updated rules. Allow a short period of time for changes 2214// to take effect. 2215// 2216// A rule must contain at least an EventPattern or ScheduleExpression. Rules 2217// with EventPatterns are triggered when a matching event is observed. Rules 2218// with ScheduleExpressions self-trigger based on the given schedule. A rule 2219// can have both an EventPattern and a ScheduleExpression, in which case the 2220// rule triggers on matching events as well as on a schedule. 2221// 2222// When you initially create a rule, you can optionally assign one or more tags 2223// to the rule. Tags can help you organize and categorize your resources. You 2224// can also use them to scope user permissions, by granting a user permission 2225// to access or change only rules with certain tag values. To use the PutRule 2226// operation and assign tags, you must have both the events:PutRule and events:TagResource 2227// permissions. 2228// 2229// If you are updating an existing rule, any tags you specify in the PutRule 2230// operation are ignored. To update the tags of an existing rule, use TagResource 2231// and UntagResource. 2232// 2233// Most services in AWS treat : or / as the same character in Amazon Resource 2234// Names (ARNs). However, EventBridge uses an exact match in event patterns 2235// and rules. Be sure to use the correct ARN characters when creating event 2236// patterns so that they match the ARN syntax in the event you want to match. 2237// 2238// In EventBridge, it is possible to create rules that lead to infinite loops, 2239// where a rule is fired repeatedly. For example, a rule might detect that ACLs 2240// have changed on an S3 bucket, and trigger software to change them to the 2241// desired state. If the rule is not written carefully, the subsequent change 2242// to the ACLs fires the rule again, creating an infinite loop. 2243// 2244// To prevent this, write the rules so that the triggered actions do not re-fire 2245// the same rule. For example, your rule could fire only if ACLs are found to 2246// be in a bad state, instead of after any change. 2247// 2248// An infinite loop can quickly cause higher than expected charges. We recommend 2249// that you use budgeting, which alerts you when charges exceed your specified 2250// limit. For more information, see Managing Your Costs with Budgets (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html). 2251// 2252// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2253// with awserr.Error's Code and Message methods to get detailed information about 2254// the error. 2255// 2256// See the AWS API reference guide for Amazon EventBridge's 2257// API operation PutRule for usage and error information. 2258// 2259// Returned Error Types: 2260// * InvalidEventPatternException 2261// The event pattern is not valid. 2262// 2263// * LimitExceededException 2264// You tried to create more rules or add more targets to a rule than is allowed. 2265// 2266// * ConcurrentModificationException 2267// There is concurrent modification on a rule or target. 2268// 2269// * ManagedRuleException 2270// This rule was created by an AWS service on behalf of your account. It is 2271// managed by that service. If you see this error in response to DeleteRule 2272// or RemoveTargets, you can use the Force parameter in those calls to delete 2273// the rule or remove targets from the rule. You cannot modify these managed 2274// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 2275// or UntagResource. 2276// 2277// * InternalException 2278// This exception occurs due to unexpected causes. 2279// 2280// * ResourceNotFoundException 2281// An entity that you specified does not exist. 2282// 2283// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule 2284func (c *EventBridge) PutRule(input *PutRuleInput) (*PutRuleOutput, error) { 2285 req, out := c.PutRuleRequest(input) 2286 return out, req.Send() 2287} 2288 2289// PutRuleWithContext is the same as PutRule with the addition of 2290// the ability to pass a context and additional request options. 2291// 2292// See PutRule for details on how to use this API operation. 2293// 2294// The context must be non-nil and will be used for request cancellation. If 2295// the context is nil a panic will occur. In the future the SDK may create 2296// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2297// for more information on using Contexts. 2298func (c *EventBridge) PutRuleWithContext(ctx aws.Context, input *PutRuleInput, opts ...request.Option) (*PutRuleOutput, error) { 2299 req, out := c.PutRuleRequest(input) 2300 req.SetContext(ctx) 2301 req.ApplyOptions(opts...) 2302 return out, req.Send() 2303} 2304 2305const opPutTargets = "PutTargets" 2306 2307// PutTargetsRequest generates a "aws/request.Request" representing the 2308// client's request for the PutTargets operation. The "output" return 2309// value will be populated with the request's response once the request completes 2310// successfully. 2311// 2312// Use "Send" method on the returned Request to send the API call to the service. 2313// the "output" return value is not valid until after Send returns without error. 2314// 2315// See PutTargets for more information on using the PutTargets 2316// API call, and error handling. 2317// 2318// This method is useful when you want to inject custom logic or configuration 2319// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2320// 2321// 2322// // Example sending a request using the PutTargetsRequest method. 2323// req, resp := client.PutTargetsRequest(params) 2324// 2325// err := req.Send() 2326// if err == nil { // resp is now filled 2327// fmt.Println(resp) 2328// } 2329// 2330// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets 2331func (c *EventBridge) PutTargetsRequest(input *PutTargetsInput) (req *request.Request, output *PutTargetsOutput) { 2332 op := &request.Operation{ 2333 Name: opPutTargets, 2334 HTTPMethod: "POST", 2335 HTTPPath: "/", 2336 } 2337 2338 if input == nil { 2339 input = &PutTargetsInput{} 2340 } 2341 2342 output = &PutTargetsOutput{} 2343 req = c.newRequest(op, input, output) 2344 return 2345} 2346 2347// PutTargets API operation for Amazon EventBridge. 2348// 2349// Adds the specified targets to the specified rule, or updates the targets 2350// if they are already associated with the rule. 2351// 2352// Targets are the resources that are invoked when a rule is triggered. 2353// 2354// You can configure the following as targets for Events: 2355// 2356// * EC2 instances 2357// 2358// * SSM Run Command 2359// 2360// * SSM Automation 2361// 2362// * AWS Lambda functions 2363// 2364// * Data streams in Amazon Kinesis Data Streams 2365// 2366// * Data delivery streams in Amazon Kinesis Data Firehose 2367// 2368// * Amazon ECS tasks 2369// 2370// * AWS Step Functions state machines 2371// 2372// * AWS Batch jobs 2373// 2374// * AWS CodeBuild projects 2375// 2376// * Pipelines in AWS CodePipeline 2377// 2378// * Amazon Inspector assessment templates 2379// 2380// * Amazon SNS topics 2381// 2382// * Amazon SQS queues, including FIFO queues 2383// 2384// * The default event bus of another AWS account 2385// 2386// Creating rules with built-in targets is supported only in the AWS Management 2387// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances 2388// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. 2389// 2390// For some target types, PutTargets provides target-specific parameters. If 2391// the target is a Kinesis data stream, you can optionally specify which shard 2392// the event goes to by using the KinesisParameters argument. To invoke a command 2393// on multiple EC2 instances with one rule, you can use the RunCommandParameters 2394// field. 2395// 2396// To be able to make API calls against the resources that you own, Amazon CloudWatch 2397// Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, 2398// EventBridge relies on resource-based policies. For EC2 instances, Kinesis 2399// data streams, and AWS Step Functions state machines, EventBridge relies on 2400// IAM roles that you specify in the RoleARN argument in PutTargets. For more 2401// information, see Authentication and Access Control (https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) 2402// in the Amazon EventBridge User Guide. 2403// 2404// If another AWS account is in the same region and has granted you permission 2405// (using PutPermission), you can send events to that account. Set that account's 2406// event bus as a target of the rules in your account. To send the matched events 2407// to the other account, specify that account's event bus as the Arn value when 2408// you run PutTargets. If your account sends events to another account, your 2409// account is charged for each sent event. Each event sent to another account 2410// is charged as a custom event. The account receiving the event is not charged. 2411// For more information, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). 2412// 2413// Input, InputPath, and InputTransformer are not available with PutTarget if 2414// the target is an event bus of a different AWS account. 2415// 2416// If you are setting the event bus of another account as the target, and that 2417// account granted permission to your account through an organization instead 2418// of directly by the account ID, then you must specify a RoleArn with proper 2419// permissions in the Target structure. For more information, see Sending and 2420// Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) 2421// in the Amazon EventBridge User Guide. 2422// 2423// For more information about enabling cross-account events, see PutPermission. 2424// 2425// Input, InputPath, and InputTransformer are mutually exclusive and optional 2426// parameters of a target. When a rule is triggered due to a matched event: 2427// 2428// * If none of the following arguments are specified for a target, then 2429// the entire event is passed to the target in JSON format (unless the target 2430// is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from 2431// the event is passed to the target). 2432// 2433// * If Input is specified in the form of valid JSON, then the matched event 2434// is overridden with this constant. 2435// 2436// * If InputPath is specified in the form of JSONPath (for example, $.detail), 2437// then only the part of the event specified in the path is passed to the 2438// target (for example, only the detail part of the event is passed). 2439// 2440// * If InputTransformer is specified, then one or more specified JSONPaths 2441// are extracted from the event and used as values in a template that you 2442// specify as the input to the target. 2443// 2444// When you specify InputPath or InputTransformer, you must use JSON dot notation, 2445// not bracket notation. 2446// 2447// When you add targets to a rule and the associated rule triggers soon after, 2448// new or updated targets might not be immediately invoked. Allow a short period 2449// of time for changes to take effect. 2450// 2451// This action can partially fail if too many requests are made at the same 2452// time. If that happens, FailedEntryCount is non-zero in the response and each 2453// entry in FailedEntries provides the ID of the failed target and the error 2454// code. 2455// 2456// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2457// with awserr.Error's Code and Message methods to get detailed information about 2458// the error. 2459// 2460// See the AWS API reference guide for Amazon EventBridge's 2461// API operation PutTargets for usage and error information. 2462// 2463// Returned Error Types: 2464// * ResourceNotFoundException 2465// An entity that you specified does not exist. 2466// 2467// * ConcurrentModificationException 2468// There is concurrent modification on a rule or target. 2469// 2470// * LimitExceededException 2471// You tried to create more rules or add more targets to a rule than is allowed. 2472// 2473// * ManagedRuleException 2474// This rule was created by an AWS service on behalf of your account. It is 2475// managed by that service. If you see this error in response to DeleteRule 2476// or RemoveTargets, you can use the Force parameter in those calls to delete 2477// the rule or remove targets from the rule. You cannot modify these managed 2478// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 2479// or UntagResource. 2480// 2481// * InternalException 2482// This exception occurs due to unexpected causes. 2483// 2484// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets 2485func (c *EventBridge) PutTargets(input *PutTargetsInput) (*PutTargetsOutput, error) { 2486 req, out := c.PutTargetsRequest(input) 2487 return out, req.Send() 2488} 2489 2490// PutTargetsWithContext is the same as PutTargets with the addition of 2491// the ability to pass a context and additional request options. 2492// 2493// See PutTargets for details on how to use this API operation. 2494// 2495// The context must be non-nil and will be used for request cancellation. If 2496// the context is nil a panic will occur. In the future the SDK may create 2497// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2498// for more information on using Contexts. 2499func (c *EventBridge) PutTargetsWithContext(ctx aws.Context, input *PutTargetsInput, opts ...request.Option) (*PutTargetsOutput, error) { 2500 req, out := c.PutTargetsRequest(input) 2501 req.SetContext(ctx) 2502 req.ApplyOptions(opts...) 2503 return out, req.Send() 2504} 2505 2506const opRemovePermission = "RemovePermission" 2507 2508// RemovePermissionRequest generates a "aws/request.Request" representing the 2509// client's request for the RemovePermission operation. The "output" return 2510// value will be populated with the request's response once the request completes 2511// successfully. 2512// 2513// Use "Send" method on the returned Request to send the API call to the service. 2514// the "output" return value is not valid until after Send returns without error. 2515// 2516// See RemovePermission for more information on using the RemovePermission 2517// API call, and error handling. 2518// 2519// This method is useful when you want to inject custom logic or configuration 2520// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2521// 2522// 2523// // Example sending a request using the RemovePermissionRequest method. 2524// req, resp := client.RemovePermissionRequest(params) 2525// 2526// err := req.Send() 2527// if err == nil { // resp is now filled 2528// fmt.Println(resp) 2529// } 2530// 2531// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission 2532func (c *EventBridge) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { 2533 op := &request.Operation{ 2534 Name: opRemovePermission, 2535 HTTPMethod: "POST", 2536 HTTPPath: "/", 2537 } 2538 2539 if input == nil { 2540 input = &RemovePermissionInput{} 2541 } 2542 2543 output = &RemovePermissionOutput{} 2544 req = c.newRequest(op, input, output) 2545 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2546 return 2547} 2548 2549// RemovePermission API operation for Amazon EventBridge. 2550// 2551// Revokes the permission of another AWS account to be able to put events to 2552// the specified event bus. Specify the account to revoke by the StatementId 2553// value that you associated with the account when you granted it permission 2554// with PutPermission. You can find the StatementId by using DescribeEventBus. 2555// 2556// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2557// with awserr.Error's Code and Message methods to get detailed information about 2558// the error. 2559// 2560// See the AWS API reference guide for Amazon EventBridge's 2561// API operation RemovePermission for usage and error information. 2562// 2563// Returned Error Types: 2564// * ResourceNotFoundException 2565// An entity that you specified does not exist. 2566// 2567// * InternalException 2568// This exception occurs due to unexpected causes. 2569// 2570// * ConcurrentModificationException 2571// There is concurrent modification on a rule or target. 2572// 2573// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission 2574func (c *EventBridge) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { 2575 req, out := c.RemovePermissionRequest(input) 2576 return out, req.Send() 2577} 2578 2579// RemovePermissionWithContext is the same as RemovePermission with the addition of 2580// the ability to pass a context and additional request options. 2581// 2582// See RemovePermission for details on how to use this API operation. 2583// 2584// The context must be non-nil and will be used for request cancellation. If 2585// the context is nil a panic will occur. In the future the SDK may create 2586// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2587// for more information on using Contexts. 2588func (c *EventBridge) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { 2589 req, out := c.RemovePermissionRequest(input) 2590 req.SetContext(ctx) 2591 req.ApplyOptions(opts...) 2592 return out, req.Send() 2593} 2594 2595const opRemoveTargets = "RemoveTargets" 2596 2597// RemoveTargetsRequest generates a "aws/request.Request" representing the 2598// client's request for the RemoveTargets operation. The "output" return 2599// value will be populated with the request's response once the request completes 2600// successfully. 2601// 2602// Use "Send" method on the returned Request to send the API call to the service. 2603// the "output" return value is not valid until after Send returns without error. 2604// 2605// See RemoveTargets for more information on using the RemoveTargets 2606// API call, and error handling. 2607// 2608// This method is useful when you want to inject custom logic or configuration 2609// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2610// 2611// 2612// // Example sending a request using the RemoveTargetsRequest method. 2613// req, resp := client.RemoveTargetsRequest(params) 2614// 2615// err := req.Send() 2616// if err == nil { // resp is now filled 2617// fmt.Println(resp) 2618// } 2619// 2620// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets 2621func (c *EventBridge) RemoveTargetsRequest(input *RemoveTargetsInput) (req *request.Request, output *RemoveTargetsOutput) { 2622 op := &request.Operation{ 2623 Name: opRemoveTargets, 2624 HTTPMethod: "POST", 2625 HTTPPath: "/", 2626 } 2627 2628 if input == nil { 2629 input = &RemoveTargetsInput{} 2630 } 2631 2632 output = &RemoveTargetsOutput{} 2633 req = c.newRequest(op, input, output) 2634 return 2635} 2636 2637// RemoveTargets API operation for Amazon EventBridge. 2638// 2639// Removes the specified targets from the specified rule. When the rule is triggered, 2640// those targets are no longer be invoked. 2641// 2642// When you remove a target, when the associated rule triggers, removed targets 2643// might continue to be invoked. Allow a short period of time for changes to 2644// take effect. 2645// 2646// This action can partially fail if too many requests are made at the same 2647// time. If that happens, FailedEntryCount is non-zero in the response and each 2648// entry in FailedEntries provides the ID of the failed target and the error 2649// code. 2650// 2651// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2652// with awserr.Error's Code and Message methods to get detailed information about 2653// the error. 2654// 2655// See the AWS API reference guide for Amazon EventBridge's 2656// API operation RemoveTargets for usage and error information. 2657// 2658// Returned Error Types: 2659// * ResourceNotFoundException 2660// An entity that you specified does not exist. 2661// 2662// * ConcurrentModificationException 2663// There is concurrent modification on a rule or target. 2664// 2665// * ManagedRuleException 2666// This rule was created by an AWS service on behalf of your account. It is 2667// managed by that service. If you see this error in response to DeleteRule 2668// or RemoveTargets, you can use the Force parameter in those calls to delete 2669// the rule or remove targets from the rule. You cannot modify these managed 2670// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 2671// or UntagResource. 2672// 2673// * InternalException 2674// This exception occurs due to unexpected causes. 2675// 2676// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets 2677func (c *EventBridge) RemoveTargets(input *RemoveTargetsInput) (*RemoveTargetsOutput, error) { 2678 req, out := c.RemoveTargetsRequest(input) 2679 return out, req.Send() 2680} 2681 2682// RemoveTargetsWithContext is the same as RemoveTargets with the addition of 2683// the ability to pass a context and additional request options. 2684// 2685// See RemoveTargets for details on how to use this API operation. 2686// 2687// The context must be non-nil and will be used for request cancellation. If 2688// the context is nil a panic will occur. In the future the SDK may create 2689// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2690// for more information on using Contexts. 2691func (c *EventBridge) RemoveTargetsWithContext(ctx aws.Context, input *RemoveTargetsInput, opts ...request.Option) (*RemoveTargetsOutput, error) { 2692 req, out := c.RemoveTargetsRequest(input) 2693 req.SetContext(ctx) 2694 req.ApplyOptions(opts...) 2695 return out, req.Send() 2696} 2697 2698const opTagResource = "TagResource" 2699 2700// TagResourceRequest generates a "aws/request.Request" representing the 2701// client's request for the TagResource operation. The "output" return 2702// value will be populated with the request's response once the request completes 2703// successfully. 2704// 2705// Use "Send" method on the returned Request to send the API call to the service. 2706// the "output" return value is not valid until after Send returns without error. 2707// 2708// See TagResource for more information on using the TagResource 2709// API call, and error handling. 2710// 2711// This method is useful when you want to inject custom logic or configuration 2712// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2713// 2714// 2715// // Example sending a request using the TagResourceRequest method. 2716// req, resp := client.TagResourceRequest(params) 2717// 2718// err := req.Send() 2719// if err == nil { // resp is now filled 2720// fmt.Println(resp) 2721// } 2722// 2723// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource 2724func (c *EventBridge) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2725 op := &request.Operation{ 2726 Name: opTagResource, 2727 HTTPMethod: "POST", 2728 HTTPPath: "/", 2729 } 2730 2731 if input == nil { 2732 input = &TagResourceInput{} 2733 } 2734 2735 output = &TagResourceOutput{} 2736 req = c.newRequest(op, input, output) 2737 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2738 return 2739} 2740 2741// TagResource API operation for Amazon EventBridge. 2742// 2743// Assigns one or more tags (key-value pairs) to the specified EventBridge resource. 2744// Tags can help you organize and categorize your resources. You can also use 2745// them to scope user permissions by granting a user permission to access or 2746// change only resources with certain tag values. In EventBridge, rules and 2747// event buses can be tagged. 2748// 2749// Tags don't have any semantic meaning to AWS and are interpreted strictly 2750// as strings of characters. 2751// 2752// You can use the TagResource action with a resource that already has tags. 2753// If you specify a new tag key, this tag is appended to the list of tags associated 2754// with the resource. If you specify a tag key that is already associated with 2755// the resource, the new tag value that you specify replaces the previous value 2756// for that tag. 2757// 2758// You can associate as many as 50 tags with a resource. 2759// 2760// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2761// with awserr.Error's Code and Message methods to get detailed information about 2762// the error. 2763// 2764// See the AWS API reference guide for Amazon EventBridge's 2765// API operation TagResource for usage and error information. 2766// 2767// Returned Error Types: 2768// * ResourceNotFoundException 2769// An entity that you specified does not exist. 2770// 2771// * ConcurrentModificationException 2772// There is concurrent modification on a rule or target. 2773// 2774// * InternalException 2775// This exception occurs due to unexpected causes. 2776// 2777// * ManagedRuleException 2778// This rule was created by an AWS service on behalf of your account. It is 2779// managed by that service. If you see this error in response to DeleteRule 2780// or RemoveTargets, you can use the Force parameter in those calls to delete 2781// the rule or remove targets from the rule. You cannot modify these managed 2782// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 2783// or UntagResource. 2784// 2785// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource 2786func (c *EventBridge) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2787 req, out := c.TagResourceRequest(input) 2788 return out, req.Send() 2789} 2790 2791// TagResourceWithContext is the same as TagResource with the addition of 2792// the ability to pass a context and additional request options. 2793// 2794// See TagResource for details on how to use this API operation. 2795// 2796// The context must be non-nil and will be used for request cancellation. If 2797// the context is nil a panic will occur. In the future the SDK may create 2798// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2799// for more information on using Contexts. 2800func (c *EventBridge) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2801 req, out := c.TagResourceRequest(input) 2802 req.SetContext(ctx) 2803 req.ApplyOptions(opts...) 2804 return out, req.Send() 2805} 2806 2807const opTestEventPattern = "TestEventPattern" 2808 2809// TestEventPatternRequest generates a "aws/request.Request" representing the 2810// client's request for the TestEventPattern operation. The "output" return 2811// value will be populated with the request's response once the request completes 2812// successfully. 2813// 2814// Use "Send" method on the returned Request to send the API call to the service. 2815// the "output" return value is not valid until after Send returns without error. 2816// 2817// See TestEventPattern for more information on using the TestEventPattern 2818// API call, and error handling. 2819// 2820// This method is useful when you want to inject custom logic or configuration 2821// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2822// 2823// 2824// // Example sending a request using the TestEventPatternRequest method. 2825// req, resp := client.TestEventPatternRequest(params) 2826// 2827// err := req.Send() 2828// if err == nil { // resp is now filled 2829// fmt.Println(resp) 2830// } 2831// 2832// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern 2833func (c *EventBridge) TestEventPatternRequest(input *TestEventPatternInput) (req *request.Request, output *TestEventPatternOutput) { 2834 op := &request.Operation{ 2835 Name: opTestEventPattern, 2836 HTTPMethod: "POST", 2837 HTTPPath: "/", 2838 } 2839 2840 if input == nil { 2841 input = &TestEventPatternInput{} 2842 } 2843 2844 output = &TestEventPatternOutput{} 2845 req = c.newRequest(op, input, output) 2846 return 2847} 2848 2849// TestEventPattern API operation for Amazon EventBridge. 2850// 2851// Tests whether the specified event pattern matches the provided event. 2852// 2853// Most services in AWS treat : or / as the same character in Amazon Resource 2854// Names (ARNs). However, EventBridge uses an exact match in event patterns 2855// and rules. Be sure to use the correct ARN characters when creating event 2856// patterns so that they match the ARN syntax in the event you want to match. 2857// 2858// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2859// with awserr.Error's Code and Message methods to get detailed information about 2860// the error. 2861// 2862// See the AWS API reference guide for Amazon EventBridge's 2863// API operation TestEventPattern for usage and error information. 2864// 2865// Returned Error Types: 2866// * InvalidEventPatternException 2867// The event pattern is not valid. 2868// 2869// * InternalException 2870// This exception occurs due to unexpected causes. 2871// 2872// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern 2873func (c *EventBridge) TestEventPattern(input *TestEventPatternInput) (*TestEventPatternOutput, error) { 2874 req, out := c.TestEventPatternRequest(input) 2875 return out, req.Send() 2876} 2877 2878// TestEventPatternWithContext is the same as TestEventPattern with the addition of 2879// the ability to pass a context and additional request options. 2880// 2881// See TestEventPattern for details on how to use this API operation. 2882// 2883// The context must be non-nil and will be used for request cancellation. If 2884// the context is nil a panic will occur. In the future the SDK may create 2885// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2886// for more information on using Contexts. 2887func (c *EventBridge) TestEventPatternWithContext(ctx aws.Context, input *TestEventPatternInput, opts ...request.Option) (*TestEventPatternOutput, error) { 2888 req, out := c.TestEventPatternRequest(input) 2889 req.SetContext(ctx) 2890 req.ApplyOptions(opts...) 2891 return out, req.Send() 2892} 2893 2894const opUntagResource = "UntagResource" 2895 2896// UntagResourceRequest generates a "aws/request.Request" representing the 2897// client's request for the UntagResource operation. The "output" return 2898// value will be populated with the request's response once the request completes 2899// successfully. 2900// 2901// Use "Send" method on the returned Request to send the API call to the service. 2902// the "output" return value is not valid until after Send returns without error. 2903// 2904// See UntagResource for more information on using the UntagResource 2905// API call, and error handling. 2906// 2907// This method is useful when you want to inject custom logic or configuration 2908// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2909// 2910// 2911// // Example sending a request using the UntagResourceRequest method. 2912// req, resp := client.UntagResourceRequest(params) 2913// 2914// err := req.Send() 2915// if err == nil { // resp is now filled 2916// fmt.Println(resp) 2917// } 2918// 2919// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource 2920func (c *EventBridge) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2921 op := &request.Operation{ 2922 Name: opUntagResource, 2923 HTTPMethod: "POST", 2924 HTTPPath: "/", 2925 } 2926 2927 if input == nil { 2928 input = &UntagResourceInput{} 2929 } 2930 2931 output = &UntagResourceOutput{} 2932 req = c.newRequest(op, input, output) 2933 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2934 return 2935} 2936 2937// UntagResource API operation for Amazon EventBridge. 2938// 2939// Removes one or more tags from the specified EventBridge resource. In CloudWatch 2940// Events, rules and event buses can be tagged. 2941// 2942// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2943// with awserr.Error's Code and Message methods to get detailed information about 2944// the error. 2945// 2946// See the AWS API reference guide for Amazon EventBridge's 2947// API operation UntagResource for usage and error information. 2948// 2949// Returned Error Types: 2950// * ResourceNotFoundException 2951// An entity that you specified does not exist. 2952// 2953// * InternalException 2954// This exception occurs due to unexpected causes. 2955// 2956// * ConcurrentModificationException 2957// There is concurrent modification on a rule or target. 2958// 2959// * ManagedRuleException 2960// This rule was created by an AWS service on behalf of your account. It is 2961// managed by that service. If you see this error in response to DeleteRule 2962// or RemoveTargets, you can use the Force parameter in those calls to delete 2963// the rule or remove targets from the rule. You cannot modify these managed 2964// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 2965// or UntagResource. 2966// 2967// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource 2968func (c *EventBridge) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2969 req, out := c.UntagResourceRequest(input) 2970 return out, req.Send() 2971} 2972 2973// UntagResourceWithContext is the same as UntagResource with the addition of 2974// the ability to pass a context and additional request options. 2975// 2976// See UntagResource for details on how to use this API operation. 2977// 2978// The context must be non-nil and will be used for request cancellation. If 2979// the context is nil a panic will occur. In the future the SDK may create 2980// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2981// for more information on using Contexts. 2982func (c *EventBridge) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2983 req, out := c.UntagResourceRequest(input) 2984 req.SetContext(ctx) 2985 req.ApplyOptions(opts...) 2986 return out, req.Send() 2987} 2988 2989type ActivateEventSourceInput struct { 2990 _ struct{} `type:"structure"` 2991 2992 // The name of the partner event source to activate. 2993 // 2994 // Name is a required field 2995 Name *string `min:"1" type:"string" required:"true"` 2996} 2997 2998// String returns the string representation 2999func (s ActivateEventSourceInput) String() string { 3000 return awsutil.Prettify(s) 3001} 3002 3003// GoString returns the string representation 3004func (s ActivateEventSourceInput) GoString() string { 3005 return s.String() 3006} 3007 3008// Validate inspects the fields of the type to determine if they are valid. 3009func (s *ActivateEventSourceInput) Validate() error { 3010 invalidParams := request.ErrInvalidParams{Context: "ActivateEventSourceInput"} 3011 if s.Name == nil { 3012 invalidParams.Add(request.NewErrParamRequired("Name")) 3013 } 3014 if s.Name != nil && len(*s.Name) < 1 { 3015 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3016 } 3017 3018 if invalidParams.Len() > 0 { 3019 return invalidParams 3020 } 3021 return nil 3022} 3023 3024// SetName sets the Name field's value. 3025func (s *ActivateEventSourceInput) SetName(v string) *ActivateEventSourceInput { 3026 s.Name = &v 3027 return s 3028} 3029 3030type ActivateEventSourceOutput struct { 3031 _ struct{} `type:"structure"` 3032} 3033 3034// String returns the string representation 3035func (s ActivateEventSourceOutput) String() string { 3036 return awsutil.Prettify(s) 3037} 3038 3039// GoString returns the string representation 3040func (s ActivateEventSourceOutput) GoString() string { 3041 return s.String() 3042} 3043 3044// This structure specifies the VPC subnets and security groups for the task, 3045// and whether a public IP address is to be used. This structure is relevant 3046// only for ECS tasks that use the awsvpc network mode. 3047type AwsVpcConfiguration struct { 3048 _ struct{} `type:"structure"` 3049 3050 // Specifies whether the task's elastic network interface receives a public 3051 // IP address. You can specify ENABLED only when LaunchType in EcsParameters 3052 // is set to FARGATE. 3053 AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` 3054 3055 // Specifies the security groups associated with the task. These security groups 3056 // must all be in the same VPC. You can specify as many as five security groups. 3057 // If you do not specify a security group, the default security group for the 3058 // VPC is used. 3059 SecurityGroups []*string `type:"list"` 3060 3061 // Specifies the subnets associated with the task. These subnets must all be 3062 // in the same VPC. You can specify as many as 16 subnets. 3063 // 3064 // Subnets is a required field 3065 Subnets []*string `type:"list" required:"true"` 3066} 3067 3068// String returns the string representation 3069func (s AwsVpcConfiguration) String() string { 3070 return awsutil.Prettify(s) 3071} 3072 3073// GoString returns the string representation 3074func (s AwsVpcConfiguration) GoString() string { 3075 return s.String() 3076} 3077 3078// Validate inspects the fields of the type to determine if they are valid. 3079func (s *AwsVpcConfiguration) Validate() error { 3080 invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} 3081 if s.Subnets == nil { 3082 invalidParams.Add(request.NewErrParamRequired("Subnets")) 3083 } 3084 3085 if invalidParams.Len() > 0 { 3086 return invalidParams 3087 } 3088 return nil 3089} 3090 3091// SetAssignPublicIp sets the AssignPublicIp field's value. 3092func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { 3093 s.AssignPublicIp = &v 3094 return s 3095} 3096 3097// SetSecurityGroups sets the SecurityGroups field's value. 3098func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { 3099 s.SecurityGroups = v 3100 return s 3101} 3102 3103// SetSubnets sets the Subnets field's value. 3104func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { 3105 s.Subnets = v 3106 return s 3107} 3108 3109// The array properties for the submitted job, such as the size of the array. 3110// The array size can be between 2 and 10,000. If you specify array properties 3111// for a job, it becomes an array job. This parameter is used only if the target 3112// is an AWS Batch job. 3113type BatchArrayProperties struct { 3114 _ struct{} `type:"structure"` 3115 3116 // The size of the array, if this is an array batch job. Valid values are integers 3117 // between 2 and 10,000. 3118 Size *int64 `type:"integer"` 3119} 3120 3121// String returns the string representation 3122func (s BatchArrayProperties) String() string { 3123 return awsutil.Prettify(s) 3124} 3125 3126// GoString returns the string representation 3127func (s BatchArrayProperties) GoString() string { 3128 return s.String() 3129} 3130 3131// SetSize sets the Size field's value. 3132func (s *BatchArrayProperties) SetSize(v int64) *BatchArrayProperties { 3133 s.Size = &v 3134 return s 3135} 3136 3137// The custom parameters to be used when the target is an AWS Batch job. 3138type BatchParameters struct { 3139 _ struct{} `type:"structure"` 3140 3141 // The array properties for the submitted job, such as the size of the array. 3142 // The array size can be between 2 and 10,000. If you specify array properties 3143 // for a job, it becomes an array job. This parameter is used only if the target 3144 // is an AWS Batch job. 3145 ArrayProperties *BatchArrayProperties `type:"structure"` 3146 3147 // The ARN or name of the job definition to use if the event target is an AWS 3148 // Batch job. This job definition must already exist. 3149 // 3150 // JobDefinition is a required field 3151 JobDefinition *string `type:"string" required:"true"` 3152 3153 // The name to use for this execution of the job, if the target is an AWS Batch 3154 // job. 3155 // 3156 // JobName is a required field 3157 JobName *string `type:"string" required:"true"` 3158 3159 // The retry strategy to use for failed jobs, if the target is an AWS Batch 3160 // job. The retry strategy is the number of times to retry the failed job execution. 3161 // Valid values are 1–10. When you specify a retry strategy here, it overrides 3162 // the retry strategy defined in the job definition. 3163 RetryStrategy *BatchRetryStrategy `type:"structure"` 3164} 3165 3166// String returns the string representation 3167func (s BatchParameters) String() string { 3168 return awsutil.Prettify(s) 3169} 3170 3171// GoString returns the string representation 3172func (s BatchParameters) GoString() string { 3173 return s.String() 3174} 3175 3176// Validate inspects the fields of the type to determine if they are valid. 3177func (s *BatchParameters) Validate() error { 3178 invalidParams := request.ErrInvalidParams{Context: "BatchParameters"} 3179 if s.JobDefinition == nil { 3180 invalidParams.Add(request.NewErrParamRequired("JobDefinition")) 3181 } 3182 if s.JobName == nil { 3183 invalidParams.Add(request.NewErrParamRequired("JobName")) 3184 } 3185 3186 if invalidParams.Len() > 0 { 3187 return invalidParams 3188 } 3189 return nil 3190} 3191 3192// SetArrayProperties sets the ArrayProperties field's value. 3193func (s *BatchParameters) SetArrayProperties(v *BatchArrayProperties) *BatchParameters { 3194 s.ArrayProperties = v 3195 return s 3196} 3197 3198// SetJobDefinition sets the JobDefinition field's value. 3199func (s *BatchParameters) SetJobDefinition(v string) *BatchParameters { 3200 s.JobDefinition = &v 3201 return s 3202} 3203 3204// SetJobName sets the JobName field's value. 3205func (s *BatchParameters) SetJobName(v string) *BatchParameters { 3206 s.JobName = &v 3207 return s 3208} 3209 3210// SetRetryStrategy sets the RetryStrategy field's value. 3211func (s *BatchParameters) SetRetryStrategy(v *BatchRetryStrategy) *BatchParameters { 3212 s.RetryStrategy = v 3213 return s 3214} 3215 3216// The retry strategy to use for failed jobs, if the target is an AWS Batch 3217// job. If you specify a retry strategy here, it overrides the retry strategy 3218// defined in the job definition. 3219type BatchRetryStrategy struct { 3220 _ struct{} `type:"structure"` 3221 3222 // The number of times to attempt to retry, if the job fails. Valid values are 3223 // 1–10. 3224 Attempts *int64 `type:"integer"` 3225} 3226 3227// String returns the string representation 3228func (s BatchRetryStrategy) String() string { 3229 return awsutil.Prettify(s) 3230} 3231 3232// GoString returns the string representation 3233func (s BatchRetryStrategy) GoString() string { 3234 return s.String() 3235} 3236 3237// SetAttempts sets the Attempts field's value. 3238func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { 3239 s.Attempts = &v 3240 return s 3241} 3242 3243// There is concurrent modification on a rule or target. 3244type ConcurrentModificationException struct { 3245 _ struct{} `type:"structure"` 3246 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3247 3248 Message_ *string `locationName:"message" type:"string"` 3249} 3250 3251// String returns the string representation 3252func (s ConcurrentModificationException) String() string { 3253 return awsutil.Prettify(s) 3254} 3255 3256// GoString returns the string representation 3257func (s ConcurrentModificationException) GoString() string { 3258 return s.String() 3259} 3260 3261func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 3262 return &ConcurrentModificationException{ 3263 RespMetadata: v, 3264 } 3265} 3266 3267// Code returns the exception type name. 3268func (s *ConcurrentModificationException) Code() string { 3269 return "ConcurrentModificationException" 3270} 3271 3272// Message returns the exception's message. 3273func (s *ConcurrentModificationException) Message() string { 3274 if s.Message_ != nil { 3275 return *s.Message_ 3276 } 3277 return "" 3278} 3279 3280// OrigErr always returns nil, satisfies awserr.Error interface. 3281func (s *ConcurrentModificationException) OrigErr() error { 3282 return nil 3283} 3284 3285func (s *ConcurrentModificationException) Error() string { 3286 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3287} 3288 3289// Status code returns the HTTP status code for the request's response error. 3290func (s *ConcurrentModificationException) StatusCode() int { 3291 return s.RespMetadata.StatusCode 3292} 3293 3294// RequestID returns the service's response RequestID for request. 3295func (s *ConcurrentModificationException) RequestID() string { 3296 return s.RespMetadata.RequestID 3297} 3298 3299// A JSON string which you can use to limit the event bus permissions you are 3300// granting to only accounts that fulfill the condition. Currently, the only 3301// supported condition is membership in a certain AWS organization. The string 3302// must contain Type, Key, and Value fields. The Value field specifies the ID 3303// of the AWS organization. Following is an example value for Condition: 3304// 3305// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' 3306type Condition struct { 3307 _ struct{} `type:"structure"` 3308 3309 // Specifies the key for the condition. Currently the only supported key is 3310 // aws:PrincipalOrgID. 3311 // 3312 // Key is a required field 3313 Key *string `type:"string" required:"true"` 3314 3315 // Specifies the type of condition. Currently the only supported value is StringEquals. 3316 // 3317 // Type is a required field 3318 Type *string `type:"string" required:"true"` 3319 3320 // Specifies the value for the key. Currently, this must be the ID of the organization. 3321 // 3322 // Value is a required field 3323 Value *string `type:"string" required:"true"` 3324} 3325 3326// String returns the string representation 3327func (s Condition) String() string { 3328 return awsutil.Prettify(s) 3329} 3330 3331// GoString returns the string representation 3332func (s Condition) GoString() string { 3333 return s.String() 3334} 3335 3336// Validate inspects the fields of the type to determine if they are valid. 3337func (s *Condition) Validate() error { 3338 invalidParams := request.ErrInvalidParams{Context: "Condition"} 3339 if s.Key == nil { 3340 invalidParams.Add(request.NewErrParamRequired("Key")) 3341 } 3342 if s.Type == nil { 3343 invalidParams.Add(request.NewErrParamRequired("Type")) 3344 } 3345 if s.Value == nil { 3346 invalidParams.Add(request.NewErrParamRequired("Value")) 3347 } 3348 3349 if invalidParams.Len() > 0 { 3350 return invalidParams 3351 } 3352 return nil 3353} 3354 3355// SetKey sets the Key field's value. 3356func (s *Condition) SetKey(v string) *Condition { 3357 s.Key = &v 3358 return s 3359} 3360 3361// SetType sets the Type field's value. 3362func (s *Condition) SetType(v string) *Condition { 3363 s.Type = &v 3364 return s 3365} 3366 3367// SetValue sets the Value field's value. 3368func (s *Condition) SetValue(v string) *Condition { 3369 s.Value = &v 3370 return s 3371} 3372 3373type CreateEventBusInput struct { 3374 _ struct{} `type:"structure"` 3375 3376 // If you are creating a partner event bus, this specifies the partner event 3377 // source that the new event bus will be matched with. 3378 EventSourceName *string `min:"1" type:"string"` 3379 3380 // The name of the new event bus. 3381 // 3382 // Event bus names cannot contain the / character. You can't use the name default 3383 // for a custom event bus, as this name is already used for your account's default 3384 // event bus. 3385 // 3386 // If this is a partner event bus, the name must exactly match the name of the 3387 // partner event source that this event bus is matched to. 3388 // 3389 // Name is a required field 3390 Name *string `min:"1" type:"string" required:"true"` 3391 3392 // Tags to associate with the event bus. 3393 Tags []*Tag `type:"list"` 3394} 3395 3396// String returns the string representation 3397func (s CreateEventBusInput) String() string { 3398 return awsutil.Prettify(s) 3399} 3400 3401// GoString returns the string representation 3402func (s CreateEventBusInput) GoString() string { 3403 return s.String() 3404} 3405 3406// Validate inspects the fields of the type to determine if they are valid. 3407func (s *CreateEventBusInput) Validate() error { 3408 invalidParams := request.ErrInvalidParams{Context: "CreateEventBusInput"} 3409 if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { 3410 invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) 3411 } 3412 if s.Name == nil { 3413 invalidParams.Add(request.NewErrParamRequired("Name")) 3414 } 3415 if s.Name != nil && len(*s.Name) < 1 { 3416 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3417 } 3418 if s.Tags != nil { 3419 for i, v := range s.Tags { 3420 if v == nil { 3421 continue 3422 } 3423 if err := v.Validate(); err != nil { 3424 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3425 } 3426 } 3427 } 3428 3429 if invalidParams.Len() > 0 { 3430 return invalidParams 3431 } 3432 return nil 3433} 3434 3435// SetEventSourceName sets the EventSourceName field's value. 3436func (s *CreateEventBusInput) SetEventSourceName(v string) *CreateEventBusInput { 3437 s.EventSourceName = &v 3438 return s 3439} 3440 3441// SetName sets the Name field's value. 3442func (s *CreateEventBusInput) SetName(v string) *CreateEventBusInput { 3443 s.Name = &v 3444 return s 3445} 3446 3447// SetTags sets the Tags field's value. 3448func (s *CreateEventBusInput) SetTags(v []*Tag) *CreateEventBusInput { 3449 s.Tags = v 3450 return s 3451} 3452 3453type CreateEventBusOutput struct { 3454 _ struct{} `type:"structure"` 3455 3456 // The ARN of the new event bus. 3457 EventBusArn *string `type:"string"` 3458} 3459 3460// String returns the string representation 3461func (s CreateEventBusOutput) String() string { 3462 return awsutil.Prettify(s) 3463} 3464 3465// GoString returns the string representation 3466func (s CreateEventBusOutput) GoString() string { 3467 return s.String() 3468} 3469 3470// SetEventBusArn sets the EventBusArn field's value. 3471func (s *CreateEventBusOutput) SetEventBusArn(v string) *CreateEventBusOutput { 3472 s.EventBusArn = &v 3473 return s 3474} 3475 3476type CreatePartnerEventSourceInput struct { 3477 _ struct{} `type:"structure"` 3478 3479 // The AWS account ID that is permitted to create a matching partner event bus 3480 // for this partner event source. 3481 // 3482 // Account is a required field 3483 Account *string `min:"12" type:"string" required:"true"` 3484 3485 // The name of the partner event source. This name must be unique and must be 3486 // in the format partner_name/event_namespace/event_name . The AWS account that 3487 // wants to use this partner event source must create a partner event bus with 3488 // a name that matches the name of the partner event source. 3489 // 3490 // Name is a required field 3491 Name *string `min:"1" type:"string" required:"true"` 3492} 3493 3494// String returns the string representation 3495func (s CreatePartnerEventSourceInput) String() string { 3496 return awsutil.Prettify(s) 3497} 3498 3499// GoString returns the string representation 3500func (s CreatePartnerEventSourceInput) GoString() string { 3501 return s.String() 3502} 3503 3504// Validate inspects the fields of the type to determine if they are valid. 3505func (s *CreatePartnerEventSourceInput) Validate() error { 3506 invalidParams := request.ErrInvalidParams{Context: "CreatePartnerEventSourceInput"} 3507 if s.Account == nil { 3508 invalidParams.Add(request.NewErrParamRequired("Account")) 3509 } 3510 if s.Account != nil && len(*s.Account) < 12 { 3511 invalidParams.Add(request.NewErrParamMinLen("Account", 12)) 3512 } 3513 if s.Name == nil { 3514 invalidParams.Add(request.NewErrParamRequired("Name")) 3515 } 3516 if s.Name != nil && len(*s.Name) < 1 { 3517 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3518 } 3519 3520 if invalidParams.Len() > 0 { 3521 return invalidParams 3522 } 3523 return nil 3524} 3525 3526// SetAccount sets the Account field's value. 3527func (s *CreatePartnerEventSourceInput) SetAccount(v string) *CreatePartnerEventSourceInput { 3528 s.Account = &v 3529 return s 3530} 3531 3532// SetName sets the Name field's value. 3533func (s *CreatePartnerEventSourceInput) SetName(v string) *CreatePartnerEventSourceInput { 3534 s.Name = &v 3535 return s 3536} 3537 3538type CreatePartnerEventSourceOutput struct { 3539 _ struct{} `type:"structure"` 3540 3541 // The ARN of the partner event source. 3542 EventSourceArn *string `type:"string"` 3543} 3544 3545// String returns the string representation 3546func (s CreatePartnerEventSourceOutput) String() string { 3547 return awsutil.Prettify(s) 3548} 3549 3550// GoString returns the string representation 3551func (s CreatePartnerEventSourceOutput) GoString() string { 3552 return s.String() 3553} 3554 3555// SetEventSourceArn sets the EventSourceArn field's value. 3556func (s *CreatePartnerEventSourceOutput) SetEventSourceArn(v string) *CreatePartnerEventSourceOutput { 3557 s.EventSourceArn = &v 3558 return s 3559} 3560 3561type DeactivateEventSourceInput struct { 3562 _ struct{} `type:"structure"` 3563 3564 // The name of the partner event source to deactivate. 3565 // 3566 // Name is a required field 3567 Name *string `min:"1" type:"string" required:"true"` 3568} 3569 3570// String returns the string representation 3571func (s DeactivateEventSourceInput) String() string { 3572 return awsutil.Prettify(s) 3573} 3574 3575// GoString returns the string representation 3576func (s DeactivateEventSourceInput) GoString() string { 3577 return s.String() 3578} 3579 3580// Validate inspects the fields of the type to determine if they are valid. 3581func (s *DeactivateEventSourceInput) Validate() error { 3582 invalidParams := request.ErrInvalidParams{Context: "DeactivateEventSourceInput"} 3583 if s.Name == nil { 3584 invalidParams.Add(request.NewErrParamRequired("Name")) 3585 } 3586 if s.Name != nil && len(*s.Name) < 1 { 3587 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3588 } 3589 3590 if invalidParams.Len() > 0 { 3591 return invalidParams 3592 } 3593 return nil 3594} 3595 3596// SetName sets the Name field's value. 3597func (s *DeactivateEventSourceInput) SetName(v string) *DeactivateEventSourceInput { 3598 s.Name = &v 3599 return s 3600} 3601 3602type DeactivateEventSourceOutput struct { 3603 _ struct{} `type:"structure"` 3604} 3605 3606// String returns the string representation 3607func (s DeactivateEventSourceOutput) String() string { 3608 return awsutil.Prettify(s) 3609} 3610 3611// GoString returns the string representation 3612func (s DeactivateEventSourceOutput) GoString() string { 3613 return s.String() 3614} 3615 3616type DeleteEventBusInput struct { 3617 _ struct{} `type:"structure"` 3618 3619 // The name of the event bus to delete. 3620 // 3621 // Name is a required field 3622 Name *string `min:"1" type:"string" required:"true"` 3623} 3624 3625// String returns the string representation 3626func (s DeleteEventBusInput) String() string { 3627 return awsutil.Prettify(s) 3628} 3629 3630// GoString returns the string representation 3631func (s DeleteEventBusInput) GoString() string { 3632 return s.String() 3633} 3634 3635// Validate inspects the fields of the type to determine if they are valid. 3636func (s *DeleteEventBusInput) Validate() error { 3637 invalidParams := request.ErrInvalidParams{Context: "DeleteEventBusInput"} 3638 if s.Name == nil { 3639 invalidParams.Add(request.NewErrParamRequired("Name")) 3640 } 3641 if s.Name != nil && len(*s.Name) < 1 { 3642 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3643 } 3644 3645 if invalidParams.Len() > 0 { 3646 return invalidParams 3647 } 3648 return nil 3649} 3650 3651// SetName sets the Name field's value. 3652func (s *DeleteEventBusInput) SetName(v string) *DeleteEventBusInput { 3653 s.Name = &v 3654 return s 3655} 3656 3657type DeleteEventBusOutput struct { 3658 _ struct{} `type:"structure"` 3659} 3660 3661// String returns the string representation 3662func (s DeleteEventBusOutput) String() string { 3663 return awsutil.Prettify(s) 3664} 3665 3666// GoString returns the string representation 3667func (s DeleteEventBusOutput) GoString() string { 3668 return s.String() 3669} 3670 3671type DeletePartnerEventSourceInput struct { 3672 _ struct{} `type:"structure"` 3673 3674 // The AWS account ID of the AWS customer that the event source was created 3675 // for. 3676 // 3677 // Account is a required field 3678 Account *string `min:"12" type:"string" required:"true"` 3679 3680 // The name of the event source to delete. 3681 // 3682 // Name is a required field 3683 Name *string `min:"1" type:"string" required:"true"` 3684} 3685 3686// String returns the string representation 3687func (s DeletePartnerEventSourceInput) String() string { 3688 return awsutil.Prettify(s) 3689} 3690 3691// GoString returns the string representation 3692func (s DeletePartnerEventSourceInput) GoString() string { 3693 return s.String() 3694} 3695 3696// Validate inspects the fields of the type to determine if they are valid. 3697func (s *DeletePartnerEventSourceInput) Validate() error { 3698 invalidParams := request.ErrInvalidParams{Context: "DeletePartnerEventSourceInput"} 3699 if s.Account == nil { 3700 invalidParams.Add(request.NewErrParamRequired("Account")) 3701 } 3702 if s.Account != nil && len(*s.Account) < 12 { 3703 invalidParams.Add(request.NewErrParamMinLen("Account", 12)) 3704 } 3705 if s.Name == nil { 3706 invalidParams.Add(request.NewErrParamRequired("Name")) 3707 } 3708 if s.Name != nil && len(*s.Name) < 1 { 3709 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3710 } 3711 3712 if invalidParams.Len() > 0 { 3713 return invalidParams 3714 } 3715 return nil 3716} 3717 3718// SetAccount sets the Account field's value. 3719func (s *DeletePartnerEventSourceInput) SetAccount(v string) *DeletePartnerEventSourceInput { 3720 s.Account = &v 3721 return s 3722} 3723 3724// SetName sets the Name field's value. 3725func (s *DeletePartnerEventSourceInput) SetName(v string) *DeletePartnerEventSourceInput { 3726 s.Name = &v 3727 return s 3728} 3729 3730type DeletePartnerEventSourceOutput struct { 3731 _ struct{} `type:"structure"` 3732} 3733 3734// String returns the string representation 3735func (s DeletePartnerEventSourceOutput) String() string { 3736 return awsutil.Prettify(s) 3737} 3738 3739// GoString returns the string representation 3740func (s DeletePartnerEventSourceOutput) GoString() string { 3741 return s.String() 3742} 3743 3744type DeleteRuleInput struct { 3745 _ struct{} `type:"structure"` 3746 3747 // The event bus associated with the rule. If you omit this, the default event 3748 // bus is used. 3749 EventBusName *string `min:"1" type:"string"` 3750 3751 // If this is a managed rule, created by an AWS service on your behalf, you 3752 // must specify Force as True to delete the rule. This parameter is ignored 3753 // for rules that are not managed rules. You can check whether a rule is a managed 3754 // rule by using DescribeRule or ListRules and checking the ManagedBy field 3755 // of the response. 3756 Force *bool `type:"boolean"` 3757 3758 // The name of the rule. 3759 // 3760 // Name is a required field 3761 Name *string `min:"1" type:"string" required:"true"` 3762} 3763 3764// String returns the string representation 3765func (s DeleteRuleInput) String() string { 3766 return awsutil.Prettify(s) 3767} 3768 3769// GoString returns the string representation 3770func (s DeleteRuleInput) GoString() string { 3771 return s.String() 3772} 3773 3774// Validate inspects the fields of the type to determine if they are valid. 3775func (s *DeleteRuleInput) Validate() error { 3776 invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} 3777 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 3778 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 3779 } 3780 if s.Name == nil { 3781 invalidParams.Add(request.NewErrParamRequired("Name")) 3782 } 3783 if s.Name != nil && len(*s.Name) < 1 { 3784 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3785 } 3786 3787 if invalidParams.Len() > 0 { 3788 return invalidParams 3789 } 3790 return nil 3791} 3792 3793// SetEventBusName sets the EventBusName field's value. 3794func (s *DeleteRuleInput) SetEventBusName(v string) *DeleteRuleInput { 3795 s.EventBusName = &v 3796 return s 3797} 3798 3799// SetForce sets the Force field's value. 3800func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { 3801 s.Force = &v 3802 return s 3803} 3804 3805// SetName sets the Name field's value. 3806func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { 3807 s.Name = &v 3808 return s 3809} 3810 3811type DeleteRuleOutput struct { 3812 _ struct{} `type:"structure"` 3813} 3814 3815// String returns the string representation 3816func (s DeleteRuleOutput) String() string { 3817 return awsutil.Prettify(s) 3818} 3819 3820// GoString returns the string representation 3821func (s DeleteRuleOutput) GoString() string { 3822 return s.String() 3823} 3824 3825type DescribeEventBusInput struct { 3826 _ struct{} `type:"structure"` 3827 3828 // The name of the event bus to show details for. If you omit this, the default 3829 // event bus is displayed. 3830 Name *string `min:"1" type:"string"` 3831} 3832 3833// String returns the string representation 3834func (s DescribeEventBusInput) String() string { 3835 return awsutil.Prettify(s) 3836} 3837 3838// GoString returns the string representation 3839func (s DescribeEventBusInput) GoString() string { 3840 return s.String() 3841} 3842 3843// Validate inspects the fields of the type to determine if they are valid. 3844func (s *DescribeEventBusInput) Validate() error { 3845 invalidParams := request.ErrInvalidParams{Context: "DescribeEventBusInput"} 3846 if s.Name != nil && len(*s.Name) < 1 { 3847 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3848 } 3849 3850 if invalidParams.Len() > 0 { 3851 return invalidParams 3852 } 3853 return nil 3854} 3855 3856// SetName sets the Name field's value. 3857func (s *DescribeEventBusInput) SetName(v string) *DescribeEventBusInput { 3858 s.Name = &v 3859 return s 3860} 3861 3862type DescribeEventBusOutput struct { 3863 _ struct{} `type:"structure"` 3864 3865 // The Amazon Resource Name (ARN) of the account permitted to write events to 3866 // the current account. 3867 Arn *string `type:"string"` 3868 3869 // The name of the event bus. Currently, this is always default. 3870 Name *string `type:"string"` 3871 3872 // The policy that enables the external account to send events to your account. 3873 Policy *string `type:"string"` 3874} 3875 3876// String returns the string representation 3877func (s DescribeEventBusOutput) String() string { 3878 return awsutil.Prettify(s) 3879} 3880 3881// GoString returns the string representation 3882func (s DescribeEventBusOutput) GoString() string { 3883 return s.String() 3884} 3885 3886// SetArn sets the Arn field's value. 3887func (s *DescribeEventBusOutput) SetArn(v string) *DescribeEventBusOutput { 3888 s.Arn = &v 3889 return s 3890} 3891 3892// SetName sets the Name field's value. 3893func (s *DescribeEventBusOutput) SetName(v string) *DescribeEventBusOutput { 3894 s.Name = &v 3895 return s 3896} 3897 3898// SetPolicy sets the Policy field's value. 3899func (s *DescribeEventBusOutput) SetPolicy(v string) *DescribeEventBusOutput { 3900 s.Policy = &v 3901 return s 3902} 3903 3904type DescribeEventSourceInput struct { 3905 _ struct{} `type:"structure"` 3906 3907 // The name of the partner event source to display the details of. 3908 // 3909 // Name is a required field 3910 Name *string `min:"1" type:"string" required:"true"` 3911} 3912 3913// String returns the string representation 3914func (s DescribeEventSourceInput) String() string { 3915 return awsutil.Prettify(s) 3916} 3917 3918// GoString returns the string representation 3919func (s DescribeEventSourceInput) GoString() string { 3920 return s.String() 3921} 3922 3923// Validate inspects the fields of the type to determine if they are valid. 3924func (s *DescribeEventSourceInput) Validate() error { 3925 invalidParams := request.ErrInvalidParams{Context: "DescribeEventSourceInput"} 3926 if s.Name == nil { 3927 invalidParams.Add(request.NewErrParamRequired("Name")) 3928 } 3929 if s.Name != nil && len(*s.Name) < 1 { 3930 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3931 } 3932 3933 if invalidParams.Len() > 0 { 3934 return invalidParams 3935 } 3936 return nil 3937} 3938 3939// SetName sets the Name field's value. 3940func (s *DescribeEventSourceInput) SetName(v string) *DescribeEventSourceInput { 3941 s.Name = &v 3942 return s 3943} 3944 3945type DescribeEventSourceOutput struct { 3946 _ struct{} `type:"structure"` 3947 3948 // The ARN of the partner event source. 3949 Arn *string `type:"string"` 3950 3951 // The name of the SaaS partner that created the event source. 3952 CreatedBy *string `type:"string"` 3953 3954 // The date and time that the event source was created. 3955 CreationTime *time.Time `type:"timestamp"` 3956 3957 // The date and time that the event source will expire if you do not create 3958 // a matching event bus. 3959 ExpirationTime *time.Time `type:"timestamp"` 3960 3961 // The name of the partner event source. 3962 Name *string `type:"string"` 3963 3964 // The state of the event source. If it is ACTIVE, you have already created 3965 // a matching event bus for this event source, and that event bus is active. 3966 // If it is PENDING, either you haven't yet created a matching event bus, or 3967 // that event bus is deactivated. If it is DELETED, you have created a matching 3968 // event bus, but the event source has since been deleted. 3969 State *string `type:"string" enum:"EventSourceState"` 3970} 3971 3972// String returns the string representation 3973func (s DescribeEventSourceOutput) String() string { 3974 return awsutil.Prettify(s) 3975} 3976 3977// GoString returns the string representation 3978func (s DescribeEventSourceOutput) GoString() string { 3979 return s.String() 3980} 3981 3982// SetArn sets the Arn field's value. 3983func (s *DescribeEventSourceOutput) SetArn(v string) *DescribeEventSourceOutput { 3984 s.Arn = &v 3985 return s 3986} 3987 3988// SetCreatedBy sets the CreatedBy field's value. 3989func (s *DescribeEventSourceOutput) SetCreatedBy(v string) *DescribeEventSourceOutput { 3990 s.CreatedBy = &v 3991 return s 3992} 3993 3994// SetCreationTime sets the CreationTime field's value. 3995func (s *DescribeEventSourceOutput) SetCreationTime(v time.Time) *DescribeEventSourceOutput { 3996 s.CreationTime = &v 3997 return s 3998} 3999 4000// SetExpirationTime sets the ExpirationTime field's value. 4001func (s *DescribeEventSourceOutput) SetExpirationTime(v time.Time) *DescribeEventSourceOutput { 4002 s.ExpirationTime = &v 4003 return s 4004} 4005 4006// SetName sets the Name field's value. 4007func (s *DescribeEventSourceOutput) SetName(v string) *DescribeEventSourceOutput { 4008 s.Name = &v 4009 return s 4010} 4011 4012// SetState sets the State field's value. 4013func (s *DescribeEventSourceOutput) SetState(v string) *DescribeEventSourceOutput { 4014 s.State = &v 4015 return s 4016} 4017 4018type DescribePartnerEventSourceInput struct { 4019 _ struct{} `type:"structure"` 4020 4021 // The name of the event source to display. 4022 // 4023 // Name is a required field 4024 Name *string `min:"1" type:"string" required:"true"` 4025} 4026 4027// String returns the string representation 4028func (s DescribePartnerEventSourceInput) String() string { 4029 return awsutil.Prettify(s) 4030} 4031 4032// GoString returns the string representation 4033func (s DescribePartnerEventSourceInput) GoString() string { 4034 return s.String() 4035} 4036 4037// Validate inspects the fields of the type to determine if they are valid. 4038func (s *DescribePartnerEventSourceInput) Validate() error { 4039 invalidParams := request.ErrInvalidParams{Context: "DescribePartnerEventSourceInput"} 4040 if s.Name == nil { 4041 invalidParams.Add(request.NewErrParamRequired("Name")) 4042 } 4043 if s.Name != nil && len(*s.Name) < 1 { 4044 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4045 } 4046 4047 if invalidParams.Len() > 0 { 4048 return invalidParams 4049 } 4050 return nil 4051} 4052 4053// SetName sets the Name field's value. 4054func (s *DescribePartnerEventSourceInput) SetName(v string) *DescribePartnerEventSourceInput { 4055 s.Name = &v 4056 return s 4057} 4058 4059type DescribePartnerEventSourceOutput struct { 4060 _ struct{} `type:"structure"` 4061 4062 // The ARN of the event source. 4063 Arn *string `type:"string"` 4064 4065 // The name of the event source. 4066 Name *string `type:"string"` 4067} 4068 4069// String returns the string representation 4070func (s DescribePartnerEventSourceOutput) String() string { 4071 return awsutil.Prettify(s) 4072} 4073 4074// GoString returns the string representation 4075func (s DescribePartnerEventSourceOutput) GoString() string { 4076 return s.String() 4077} 4078 4079// SetArn sets the Arn field's value. 4080func (s *DescribePartnerEventSourceOutput) SetArn(v string) *DescribePartnerEventSourceOutput { 4081 s.Arn = &v 4082 return s 4083} 4084 4085// SetName sets the Name field's value. 4086func (s *DescribePartnerEventSourceOutput) SetName(v string) *DescribePartnerEventSourceOutput { 4087 s.Name = &v 4088 return s 4089} 4090 4091type DescribeRuleInput struct { 4092 _ struct{} `type:"structure"` 4093 4094 // The event bus associated with the rule. If you omit this, the default event 4095 // bus is used. 4096 EventBusName *string `min:"1" type:"string"` 4097 4098 // The name of the rule. 4099 // 4100 // Name is a required field 4101 Name *string `min:"1" type:"string" required:"true"` 4102} 4103 4104// String returns the string representation 4105func (s DescribeRuleInput) String() string { 4106 return awsutil.Prettify(s) 4107} 4108 4109// GoString returns the string representation 4110func (s DescribeRuleInput) GoString() string { 4111 return s.String() 4112} 4113 4114// Validate inspects the fields of the type to determine if they are valid. 4115func (s *DescribeRuleInput) Validate() error { 4116 invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} 4117 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 4118 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 4119 } 4120 if s.Name == nil { 4121 invalidParams.Add(request.NewErrParamRequired("Name")) 4122 } 4123 if s.Name != nil && len(*s.Name) < 1 { 4124 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4125 } 4126 4127 if invalidParams.Len() > 0 { 4128 return invalidParams 4129 } 4130 return nil 4131} 4132 4133// SetEventBusName sets the EventBusName field's value. 4134func (s *DescribeRuleInput) SetEventBusName(v string) *DescribeRuleInput { 4135 s.EventBusName = &v 4136 return s 4137} 4138 4139// SetName sets the Name field's value. 4140func (s *DescribeRuleInput) SetName(v string) *DescribeRuleInput { 4141 s.Name = &v 4142 return s 4143} 4144 4145type DescribeRuleOutput struct { 4146 _ struct{} `type:"structure"` 4147 4148 // The Amazon Resource Name (ARN) of the rule. 4149 Arn *string `min:"1" type:"string"` 4150 4151 // The description of the rule. 4152 Description *string `type:"string"` 4153 4154 // The event bus associated with the rule. 4155 EventBusName *string `min:"1" type:"string"` 4156 4157 // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) 4158 // in the Amazon EventBridge User Guide. 4159 EventPattern *string `type:"string"` 4160 4161 // If this is a managed rule, created by an AWS service on your behalf, this 4162 // field displays the principal name of the AWS service that created the rule. 4163 ManagedBy *string `min:"1" type:"string"` 4164 4165 // The name of the rule. 4166 Name *string `min:"1" type:"string"` 4167 4168 // The Amazon Resource Name (ARN) of the IAM role associated with the rule. 4169 RoleArn *string `min:"1" type:"string"` 4170 4171 // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". 4172 ScheduleExpression *string `type:"string"` 4173 4174 // Specifies whether the rule is enabled or disabled. 4175 State *string `type:"string" enum:"RuleState"` 4176} 4177 4178// String returns the string representation 4179func (s DescribeRuleOutput) String() string { 4180 return awsutil.Prettify(s) 4181} 4182 4183// GoString returns the string representation 4184func (s DescribeRuleOutput) GoString() string { 4185 return s.String() 4186} 4187 4188// SetArn sets the Arn field's value. 4189func (s *DescribeRuleOutput) SetArn(v string) *DescribeRuleOutput { 4190 s.Arn = &v 4191 return s 4192} 4193 4194// SetDescription sets the Description field's value. 4195func (s *DescribeRuleOutput) SetDescription(v string) *DescribeRuleOutput { 4196 s.Description = &v 4197 return s 4198} 4199 4200// SetEventBusName sets the EventBusName field's value. 4201func (s *DescribeRuleOutput) SetEventBusName(v string) *DescribeRuleOutput { 4202 s.EventBusName = &v 4203 return s 4204} 4205 4206// SetEventPattern sets the EventPattern field's value. 4207func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { 4208 s.EventPattern = &v 4209 return s 4210} 4211 4212// SetManagedBy sets the ManagedBy field's value. 4213func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { 4214 s.ManagedBy = &v 4215 return s 4216} 4217 4218// SetName sets the Name field's value. 4219func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { 4220 s.Name = &v 4221 return s 4222} 4223 4224// SetRoleArn sets the RoleArn field's value. 4225func (s *DescribeRuleOutput) SetRoleArn(v string) *DescribeRuleOutput { 4226 s.RoleArn = &v 4227 return s 4228} 4229 4230// SetScheduleExpression sets the ScheduleExpression field's value. 4231func (s *DescribeRuleOutput) SetScheduleExpression(v string) *DescribeRuleOutput { 4232 s.ScheduleExpression = &v 4233 return s 4234} 4235 4236// SetState sets the State field's value. 4237func (s *DescribeRuleOutput) SetState(v string) *DescribeRuleOutput { 4238 s.State = &v 4239 return s 4240} 4241 4242type DisableRuleInput struct { 4243 _ struct{} `type:"structure"` 4244 4245 // The event bus associated with the rule. If you omit this, the default event 4246 // bus is used. 4247 EventBusName *string `min:"1" type:"string"` 4248 4249 // The name of the rule. 4250 // 4251 // Name is a required field 4252 Name *string `min:"1" type:"string" required:"true"` 4253} 4254 4255// String returns the string representation 4256func (s DisableRuleInput) String() string { 4257 return awsutil.Prettify(s) 4258} 4259 4260// GoString returns the string representation 4261func (s DisableRuleInput) GoString() string { 4262 return s.String() 4263} 4264 4265// Validate inspects the fields of the type to determine if they are valid. 4266func (s *DisableRuleInput) Validate() error { 4267 invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} 4268 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 4269 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 4270 } 4271 if s.Name == nil { 4272 invalidParams.Add(request.NewErrParamRequired("Name")) 4273 } 4274 if s.Name != nil && len(*s.Name) < 1 { 4275 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4276 } 4277 4278 if invalidParams.Len() > 0 { 4279 return invalidParams 4280 } 4281 return nil 4282} 4283 4284// SetEventBusName sets the EventBusName field's value. 4285func (s *DisableRuleInput) SetEventBusName(v string) *DisableRuleInput { 4286 s.EventBusName = &v 4287 return s 4288} 4289 4290// SetName sets the Name field's value. 4291func (s *DisableRuleInput) SetName(v string) *DisableRuleInput { 4292 s.Name = &v 4293 return s 4294} 4295 4296type DisableRuleOutput struct { 4297 _ struct{} `type:"structure"` 4298} 4299 4300// String returns the string representation 4301func (s DisableRuleOutput) String() string { 4302 return awsutil.Prettify(s) 4303} 4304 4305// GoString returns the string representation 4306func (s DisableRuleOutput) GoString() string { 4307 return s.String() 4308} 4309 4310// The custom parameters to be used when the target is an Amazon ECS task. 4311type EcsParameters struct { 4312 _ struct{} `type:"structure"` 4313 4314 // Specifies an ECS task group for the task. The maximum length is 255 characters. 4315 Group *string `type:"string"` 4316 4317 // Specifies the launch type on which your task is running. The launch type 4318 // that you specify here must match one of the launch type (compatibilities) 4319 // of the target task. The FARGATE value is supported only in the Regions where 4320 // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate 4321 // on Amazon ECS (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) 4322 // in the Amazon Elastic Container Service Developer Guide. 4323 LaunchType *string `type:"string" enum:"LaunchType"` 4324 4325 // Use this structure if the ECS task uses the awsvpc network mode. This structure 4326 // specifies the VPC subnets and security groups associated with the task, and 4327 // whether a public IP address is to be used. This structure is required if 4328 // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. 4329 // 4330 // If you specify NetworkConfiguration when the target ECS task does not use 4331 // the awsvpc network mode, the task fails. 4332 NetworkConfiguration *NetworkConfiguration `type:"structure"` 4333 4334 // Specifies the platform version for the task. Specify only the numeric portion 4335 // of the platform version, such as 1.1.0. 4336 // 4337 // This structure is used only if LaunchType is FARGATE. For more information 4338 // about valid platform versions, see AWS Fargate Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 4339 // in the Amazon Elastic Container Service Developer Guide. 4340 PlatformVersion *string `type:"string"` 4341 4342 // The number of tasks to create based on TaskDefinition. The default is 1. 4343 TaskCount *int64 `min:"1" type:"integer"` 4344 4345 // The ARN of the task definition to use if the event target is an Amazon ECS 4346 // task. 4347 // 4348 // TaskDefinitionArn is a required field 4349 TaskDefinitionArn *string `min:"1" type:"string" required:"true"` 4350} 4351 4352// String returns the string representation 4353func (s EcsParameters) String() string { 4354 return awsutil.Prettify(s) 4355} 4356 4357// GoString returns the string representation 4358func (s EcsParameters) GoString() string { 4359 return s.String() 4360} 4361 4362// Validate inspects the fields of the type to determine if they are valid. 4363func (s *EcsParameters) Validate() error { 4364 invalidParams := request.ErrInvalidParams{Context: "EcsParameters"} 4365 if s.TaskCount != nil && *s.TaskCount < 1 { 4366 invalidParams.Add(request.NewErrParamMinValue("TaskCount", 1)) 4367 } 4368 if s.TaskDefinitionArn == nil { 4369 invalidParams.Add(request.NewErrParamRequired("TaskDefinitionArn")) 4370 } 4371 if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { 4372 invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) 4373 } 4374 if s.NetworkConfiguration != nil { 4375 if err := s.NetworkConfiguration.Validate(); err != nil { 4376 invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) 4377 } 4378 } 4379 4380 if invalidParams.Len() > 0 { 4381 return invalidParams 4382 } 4383 return nil 4384} 4385 4386// SetGroup sets the Group field's value. 4387func (s *EcsParameters) SetGroup(v string) *EcsParameters { 4388 s.Group = &v 4389 return s 4390} 4391 4392// SetLaunchType sets the LaunchType field's value. 4393func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { 4394 s.LaunchType = &v 4395 return s 4396} 4397 4398// SetNetworkConfiguration sets the NetworkConfiguration field's value. 4399func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { 4400 s.NetworkConfiguration = v 4401 return s 4402} 4403 4404// SetPlatformVersion sets the PlatformVersion field's value. 4405func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { 4406 s.PlatformVersion = &v 4407 return s 4408} 4409 4410// SetTaskCount sets the TaskCount field's value. 4411func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { 4412 s.TaskCount = &v 4413 return s 4414} 4415 4416// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. 4417func (s *EcsParameters) SetTaskDefinitionArn(v string) *EcsParameters { 4418 s.TaskDefinitionArn = &v 4419 return s 4420} 4421 4422type EnableRuleInput struct { 4423 _ struct{} `type:"structure"` 4424 4425 // The event bus associated with the rule. If you omit this, the default event 4426 // bus is used. 4427 EventBusName *string `min:"1" type:"string"` 4428 4429 // The name of the rule. 4430 // 4431 // Name is a required field 4432 Name *string `min:"1" type:"string" required:"true"` 4433} 4434 4435// String returns the string representation 4436func (s EnableRuleInput) String() string { 4437 return awsutil.Prettify(s) 4438} 4439 4440// GoString returns the string representation 4441func (s EnableRuleInput) GoString() string { 4442 return s.String() 4443} 4444 4445// Validate inspects the fields of the type to determine if they are valid. 4446func (s *EnableRuleInput) Validate() error { 4447 invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} 4448 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 4449 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 4450 } 4451 if s.Name == nil { 4452 invalidParams.Add(request.NewErrParamRequired("Name")) 4453 } 4454 if s.Name != nil && len(*s.Name) < 1 { 4455 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4456 } 4457 4458 if invalidParams.Len() > 0 { 4459 return invalidParams 4460 } 4461 return nil 4462} 4463 4464// SetEventBusName sets the EventBusName field's value. 4465func (s *EnableRuleInput) SetEventBusName(v string) *EnableRuleInput { 4466 s.EventBusName = &v 4467 return s 4468} 4469 4470// SetName sets the Name field's value. 4471func (s *EnableRuleInput) SetName(v string) *EnableRuleInput { 4472 s.Name = &v 4473 return s 4474} 4475 4476type EnableRuleOutput struct { 4477 _ struct{} `type:"structure"` 4478} 4479 4480// String returns the string representation 4481func (s EnableRuleOutput) String() string { 4482 return awsutil.Prettify(s) 4483} 4484 4485// GoString returns the string representation 4486func (s EnableRuleOutput) GoString() string { 4487 return s.String() 4488} 4489 4490// An event bus receives events from a source and routes them to rules associated 4491// with that event bus. Your account's default event bus receives rules from 4492// AWS services. A custom event bus can receive rules from AWS services as well 4493// as your custom applications and services. A partner event bus receives events 4494// from an event source created by an SaaS partner. These events come from the 4495// partners services or applications. 4496type EventBus struct { 4497 _ struct{} `type:"structure"` 4498 4499 // The ARN of the event bus. 4500 Arn *string `type:"string"` 4501 4502 // The name of the event bus. 4503 Name *string `type:"string"` 4504 4505 // The permissions policy of the event bus, describing which other AWS accounts 4506 // can write events to this event bus. 4507 Policy *string `type:"string"` 4508} 4509 4510// String returns the string representation 4511func (s EventBus) String() string { 4512 return awsutil.Prettify(s) 4513} 4514 4515// GoString returns the string representation 4516func (s EventBus) GoString() string { 4517 return s.String() 4518} 4519 4520// SetArn sets the Arn field's value. 4521func (s *EventBus) SetArn(v string) *EventBus { 4522 s.Arn = &v 4523 return s 4524} 4525 4526// SetName sets the Name field's value. 4527func (s *EventBus) SetName(v string) *EventBus { 4528 s.Name = &v 4529 return s 4530} 4531 4532// SetPolicy sets the Policy field's value. 4533func (s *EventBus) SetPolicy(v string) *EventBus { 4534 s.Policy = &v 4535 return s 4536} 4537 4538// A partner event source is created by an SaaS partner. If a customer creates 4539// a partner event bus that matches this event source, that AWS account can 4540// receive events from the partner's applications or services. 4541type EventSource struct { 4542 _ struct{} `type:"structure"` 4543 4544 // The ARN of the event source. 4545 Arn *string `type:"string"` 4546 4547 // The name of the partner that created the event source. 4548 CreatedBy *string `type:"string"` 4549 4550 // The date and time the event source was created. 4551 CreationTime *time.Time `type:"timestamp"` 4552 4553 // The date and time that the event source will expire, if the AWS account doesn't 4554 // create a matching event bus for it. 4555 ExpirationTime *time.Time `type:"timestamp"` 4556 4557 // The name of the event source. 4558 Name *string `type:"string"` 4559 4560 // The state of the event source. If it is ACTIVE, you have already created 4561 // a matching event bus for this event source, and that event bus is active. 4562 // If it is PENDING, either you haven't yet created a matching event bus, or 4563 // that event bus is deactivated. If it is DELETED, you have created a matching 4564 // event bus, but the event source has since been deleted. 4565 State *string `type:"string" enum:"EventSourceState"` 4566} 4567 4568// String returns the string representation 4569func (s EventSource) String() string { 4570 return awsutil.Prettify(s) 4571} 4572 4573// GoString returns the string representation 4574func (s EventSource) GoString() string { 4575 return s.String() 4576} 4577 4578// SetArn sets the Arn field's value. 4579func (s *EventSource) SetArn(v string) *EventSource { 4580 s.Arn = &v 4581 return s 4582} 4583 4584// SetCreatedBy sets the CreatedBy field's value. 4585func (s *EventSource) SetCreatedBy(v string) *EventSource { 4586 s.CreatedBy = &v 4587 return s 4588} 4589 4590// SetCreationTime sets the CreationTime field's value. 4591func (s *EventSource) SetCreationTime(v time.Time) *EventSource { 4592 s.CreationTime = &v 4593 return s 4594} 4595 4596// SetExpirationTime sets the ExpirationTime field's value. 4597func (s *EventSource) SetExpirationTime(v time.Time) *EventSource { 4598 s.ExpirationTime = &v 4599 return s 4600} 4601 4602// SetName sets the Name field's value. 4603func (s *EventSource) SetName(v string) *EventSource { 4604 s.Name = &v 4605 return s 4606} 4607 4608// SetState sets the State field's value. 4609func (s *EventSource) SetState(v string) *EventSource { 4610 s.State = &v 4611 return s 4612} 4613 4614// Contains the parameters needed for you to provide custom input to a target 4615// based on one or more pieces of data extracted from the event. 4616type InputTransformer struct { 4617 _ struct{} `type:"structure"` 4618 4619 // Map of JSON paths to be extracted from the event. You can then insert these 4620 // in the template in InputTemplate to produce the output you want to be sent 4621 // to the target. 4622 // 4623 // InputPathsMap is an array key-value pairs, where each value is a valid JSON 4624 // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, 4625 // not bracket notation. 4626 // 4627 // The keys cannot start with "AWS." 4628 InputPathsMap map[string]*string `type:"map"` 4629 4630 // Input template where you specify placeholders that will be filled with the 4631 // values of the keys from InputPathsMap to customize the data sent to the target. 4632 // Enclose each InputPathsMaps value in brackets: <value> The InputTemplate 4633 // must be valid JSON. 4634 // 4635 // If InputTemplate is a JSON object (surrounded by curly braces), the following 4636 // restrictions apply: 4637 // 4638 // * The placeholder cannot be used as an object key. 4639 // 4640 // * Object values cannot include quote marks. 4641 // 4642 // The following example shows the syntax for using InputPathsMap and InputTemplate. 4643 // 4644 // "InputTransformer": 4645 // 4646 // { 4647 // 4648 // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, 4649 // 4650 // "InputTemplate": "<instance> is in state <status>" 4651 // 4652 // } 4653 // 4654 // To have the InputTemplate include quote marks within a JSON string, escape 4655 // each quote marks with a slash, as in the following example: 4656 // 4657 // "InputTransformer": 4658 // 4659 // { 4660 // 4661 // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, 4662 // 4663 // "InputTemplate": "<instance> is in state \"<status>\"" 4664 // 4665 // } 4666 // 4667 // InputTemplate is a required field 4668 InputTemplate *string `min:"1" type:"string" required:"true"` 4669} 4670 4671// String returns the string representation 4672func (s InputTransformer) String() string { 4673 return awsutil.Prettify(s) 4674} 4675 4676// GoString returns the string representation 4677func (s InputTransformer) GoString() string { 4678 return s.String() 4679} 4680 4681// Validate inspects the fields of the type to determine if they are valid. 4682func (s *InputTransformer) Validate() error { 4683 invalidParams := request.ErrInvalidParams{Context: "InputTransformer"} 4684 if s.InputTemplate == nil { 4685 invalidParams.Add(request.NewErrParamRequired("InputTemplate")) 4686 } 4687 if s.InputTemplate != nil && len(*s.InputTemplate) < 1 { 4688 invalidParams.Add(request.NewErrParamMinLen("InputTemplate", 1)) 4689 } 4690 4691 if invalidParams.Len() > 0 { 4692 return invalidParams 4693 } 4694 return nil 4695} 4696 4697// SetInputPathsMap sets the InputPathsMap field's value. 4698func (s *InputTransformer) SetInputPathsMap(v map[string]*string) *InputTransformer { 4699 s.InputPathsMap = v 4700 return s 4701} 4702 4703// SetInputTemplate sets the InputTemplate field's value. 4704func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { 4705 s.InputTemplate = &v 4706 return s 4707} 4708 4709// This exception occurs due to unexpected causes. 4710type InternalException struct { 4711 _ struct{} `type:"structure"` 4712 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4713 4714 Message_ *string `locationName:"message" type:"string"` 4715} 4716 4717// String returns the string representation 4718func (s InternalException) String() string { 4719 return awsutil.Prettify(s) 4720} 4721 4722// GoString returns the string representation 4723func (s InternalException) GoString() string { 4724 return s.String() 4725} 4726 4727func newErrorInternalException(v protocol.ResponseMetadata) error { 4728 return &InternalException{ 4729 RespMetadata: v, 4730 } 4731} 4732 4733// Code returns the exception type name. 4734func (s *InternalException) Code() string { 4735 return "InternalException" 4736} 4737 4738// Message returns the exception's message. 4739func (s *InternalException) Message() string { 4740 if s.Message_ != nil { 4741 return *s.Message_ 4742 } 4743 return "" 4744} 4745 4746// OrigErr always returns nil, satisfies awserr.Error interface. 4747func (s *InternalException) OrigErr() error { 4748 return nil 4749} 4750 4751func (s *InternalException) Error() string { 4752 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4753} 4754 4755// Status code returns the HTTP status code for the request's response error. 4756func (s *InternalException) StatusCode() int { 4757 return s.RespMetadata.StatusCode 4758} 4759 4760// RequestID returns the service's response RequestID for request. 4761func (s *InternalException) RequestID() string { 4762 return s.RespMetadata.RequestID 4763} 4764 4765// The event pattern is not valid. 4766type InvalidEventPatternException struct { 4767 _ struct{} `type:"structure"` 4768 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4769 4770 Message_ *string `locationName:"message" type:"string"` 4771} 4772 4773// String returns the string representation 4774func (s InvalidEventPatternException) String() string { 4775 return awsutil.Prettify(s) 4776} 4777 4778// GoString returns the string representation 4779func (s InvalidEventPatternException) GoString() string { 4780 return s.String() 4781} 4782 4783func newErrorInvalidEventPatternException(v protocol.ResponseMetadata) error { 4784 return &InvalidEventPatternException{ 4785 RespMetadata: v, 4786 } 4787} 4788 4789// Code returns the exception type name. 4790func (s *InvalidEventPatternException) Code() string { 4791 return "InvalidEventPatternException" 4792} 4793 4794// Message returns the exception's message. 4795func (s *InvalidEventPatternException) Message() string { 4796 if s.Message_ != nil { 4797 return *s.Message_ 4798 } 4799 return "" 4800} 4801 4802// OrigErr always returns nil, satisfies awserr.Error interface. 4803func (s *InvalidEventPatternException) OrigErr() error { 4804 return nil 4805} 4806 4807func (s *InvalidEventPatternException) Error() string { 4808 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4809} 4810 4811// Status code returns the HTTP status code for the request's response error. 4812func (s *InvalidEventPatternException) StatusCode() int { 4813 return s.RespMetadata.StatusCode 4814} 4815 4816// RequestID returns the service's response RequestID for request. 4817func (s *InvalidEventPatternException) RequestID() string { 4818 return s.RespMetadata.RequestID 4819} 4820 4821// The specified state is not a valid state for an event source. 4822type InvalidStateException struct { 4823 _ struct{} `type:"structure"` 4824 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4825 4826 Message_ *string `locationName:"message" type:"string"` 4827} 4828 4829// String returns the string representation 4830func (s InvalidStateException) String() string { 4831 return awsutil.Prettify(s) 4832} 4833 4834// GoString returns the string representation 4835func (s InvalidStateException) GoString() string { 4836 return s.String() 4837} 4838 4839func newErrorInvalidStateException(v protocol.ResponseMetadata) error { 4840 return &InvalidStateException{ 4841 RespMetadata: v, 4842 } 4843} 4844 4845// Code returns the exception type name. 4846func (s *InvalidStateException) Code() string { 4847 return "InvalidStateException" 4848} 4849 4850// Message returns the exception's message. 4851func (s *InvalidStateException) Message() string { 4852 if s.Message_ != nil { 4853 return *s.Message_ 4854 } 4855 return "" 4856} 4857 4858// OrigErr always returns nil, satisfies awserr.Error interface. 4859func (s *InvalidStateException) OrigErr() error { 4860 return nil 4861} 4862 4863func (s *InvalidStateException) Error() string { 4864 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4865} 4866 4867// Status code returns the HTTP status code for the request's response error. 4868func (s *InvalidStateException) StatusCode() int { 4869 return s.RespMetadata.StatusCode 4870} 4871 4872// RequestID returns the service's response RequestID for request. 4873func (s *InvalidStateException) RequestID() string { 4874 return s.RespMetadata.RequestID 4875} 4876 4877// This object enables you to specify a JSON path to extract from the event 4878// and use as the partition key for the Amazon Kinesis data stream, so that 4879// you can control the shard to which the event goes. If you do not include 4880// this parameter, the default is to use the eventId as the partition key. 4881type KinesisParameters struct { 4882 _ struct{} `type:"structure"` 4883 4884 // The JSON path to be extracted from the event and used as the partition key. 4885 // For more information, see Amazon Kinesis Streams Key Concepts (https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) 4886 // in the Amazon Kinesis Streams Developer Guide. 4887 // 4888 // PartitionKeyPath is a required field 4889 PartitionKeyPath *string `type:"string" required:"true"` 4890} 4891 4892// String returns the string representation 4893func (s KinesisParameters) String() string { 4894 return awsutil.Prettify(s) 4895} 4896 4897// GoString returns the string representation 4898func (s KinesisParameters) GoString() string { 4899 return s.String() 4900} 4901 4902// Validate inspects the fields of the type to determine if they are valid. 4903func (s *KinesisParameters) Validate() error { 4904 invalidParams := request.ErrInvalidParams{Context: "KinesisParameters"} 4905 if s.PartitionKeyPath == nil { 4906 invalidParams.Add(request.NewErrParamRequired("PartitionKeyPath")) 4907 } 4908 4909 if invalidParams.Len() > 0 { 4910 return invalidParams 4911 } 4912 return nil 4913} 4914 4915// SetPartitionKeyPath sets the PartitionKeyPath field's value. 4916func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { 4917 s.PartitionKeyPath = &v 4918 return s 4919} 4920 4921// You tried to create more rules or add more targets to a rule than is allowed. 4922type LimitExceededException struct { 4923 _ struct{} `type:"structure"` 4924 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4925 4926 Message_ *string `locationName:"message" type:"string"` 4927} 4928 4929// String returns the string representation 4930func (s LimitExceededException) String() string { 4931 return awsutil.Prettify(s) 4932} 4933 4934// GoString returns the string representation 4935func (s LimitExceededException) GoString() string { 4936 return s.String() 4937} 4938 4939func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 4940 return &LimitExceededException{ 4941 RespMetadata: v, 4942 } 4943} 4944 4945// Code returns the exception type name. 4946func (s *LimitExceededException) Code() string { 4947 return "LimitExceededException" 4948} 4949 4950// Message returns the exception's message. 4951func (s *LimitExceededException) Message() string { 4952 if s.Message_ != nil { 4953 return *s.Message_ 4954 } 4955 return "" 4956} 4957 4958// OrigErr always returns nil, satisfies awserr.Error interface. 4959func (s *LimitExceededException) OrigErr() error { 4960 return nil 4961} 4962 4963func (s *LimitExceededException) Error() string { 4964 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4965} 4966 4967// Status code returns the HTTP status code for the request's response error. 4968func (s *LimitExceededException) StatusCode() int { 4969 return s.RespMetadata.StatusCode 4970} 4971 4972// RequestID returns the service's response RequestID for request. 4973func (s *LimitExceededException) RequestID() string { 4974 return s.RespMetadata.RequestID 4975} 4976 4977type ListEventBusesInput struct { 4978 _ struct{} `type:"structure"` 4979 4980 // Specifying this limits the number of results returned by this operation. 4981 // The operation also returns a NextToken which you can use in a subsequent 4982 // operation to retrieve the next set of results. 4983 Limit *int64 `min:"1" type:"integer"` 4984 4985 // Specifying this limits the results to only those event buses with names that 4986 // start with the specified prefix. 4987 NamePrefix *string `min:"1" type:"string"` 4988 4989 // The token returned by a previous call to retrieve the next set of results. 4990 NextToken *string `min:"1" type:"string"` 4991} 4992 4993// String returns the string representation 4994func (s ListEventBusesInput) String() string { 4995 return awsutil.Prettify(s) 4996} 4997 4998// GoString returns the string representation 4999func (s ListEventBusesInput) GoString() string { 5000 return s.String() 5001} 5002 5003// Validate inspects the fields of the type to determine if they are valid. 5004func (s *ListEventBusesInput) Validate() error { 5005 invalidParams := request.ErrInvalidParams{Context: "ListEventBusesInput"} 5006 if s.Limit != nil && *s.Limit < 1 { 5007 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5008 } 5009 if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { 5010 invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) 5011 } 5012 if s.NextToken != nil && len(*s.NextToken) < 1 { 5013 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5014 } 5015 5016 if invalidParams.Len() > 0 { 5017 return invalidParams 5018 } 5019 return nil 5020} 5021 5022// SetLimit sets the Limit field's value. 5023func (s *ListEventBusesInput) SetLimit(v int64) *ListEventBusesInput { 5024 s.Limit = &v 5025 return s 5026} 5027 5028// SetNamePrefix sets the NamePrefix field's value. 5029func (s *ListEventBusesInput) SetNamePrefix(v string) *ListEventBusesInput { 5030 s.NamePrefix = &v 5031 return s 5032} 5033 5034// SetNextToken sets the NextToken field's value. 5035func (s *ListEventBusesInput) SetNextToken(v string) *ListEventBusesInput { 5036 s.NextToken = &v 5037 return s 5038} 5039 5040type ListEventBusesOutput struct { 5041 _ struct{} `type:"structure"` 5042 5043 // This list of event buses. 5044 EventBuses []*EventBus `type:"list"` 5045 5046 // A token you can use in a subsequent operation to retrieve the next set of 5047 // results. 5048 NextToken *string `min:"1" type:"string"` 5049} 5050 5051// String returns the string representation 5052func (s ListEventBusesOutput) String() string { 5053 return awsutil.Prettify(s) 5054} 5055 5056// GoString returns the string representation 5057func (s ListEventBusesOutput) GoString() string { 5058 return s.String() 5059} 5060 5061// SetEventBuses sets the EventBuses field's value. 5062func (s *ListEventBusesOutput) SetEventBuses(v []*EventBus) *ListEventBusesOutput { 5063 s.EventBuses = v 5064 return s 5065} 5066 5067// SetNextToken sets the NextToken field's value. 5068func (s *ListEventBusesOutput) SetNextToken(v string) *ListEventBusesOutput { 5069 s.NextToken = &v 5070 return s 5071} 5072 5073type ListEventSourcesInput struct { 5074 _ struct{} `type:"structure"` 5075 5076 // Specifying this limits the number of results returned by this operation. 5077 // The operation also returns a NextToken which you can use in a subsequent 5078 // operation to retrieve the next set of results. 5079 Limit *int64 `min:"1" type:"integer"` 5080 5081 // Specifying this limits the results to only those partner event sources with 5082 // names that start with the specified prefix. 5083 NamePrefix *string `min:"1" type:"string"` 5084 5085 // The token returned by a previous call to retrieve the next set of results. 5086 NextToken *string `min:"1" type:"string"` 5087} 5088 5089// String returns the string representation 5090func (s ListEventSourcesInput) String() string { 5091 return awsutil.Prettify(s) 5092} 5093 5094// GoString returns the string representation 5095func (s ListEventSourcesInput) GoString() string { 5096 return s.String() 5097} 5098 5099// Validate inspects the fields of the type to determine if they are valid. 5100func (s *ListEventSourcesInput) Validate() error { 5101 invalidParams := request.ErrInvalidParams{Context: "ListEventSourcesInput"} 5102 if s.Limit != nil && *s.Limit < 1 { 5103 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5104 } 5105 if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { 5106 invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) 5107 } 5108 if s.NextToken != nil && len(*s.NextToken) < 1 { 5109 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5110 } 5111 5112 if invalidParams.Len() > 0 { 5113 return invalidParams 5114 } 5115 return nil 5116} 5117 5118// SetLimit sets the Limit field's value. 5119func (s *ListEventSourcesInput) SetLimit(v int64) *ListEventSourcesInput { 5120 s.Limit = &v 5121 return s 5122} 5123 5124// SetNamePrefix sets the NamePrefix field's value. 5125func (s *ListEventSourcesInput) SetNamePrefix(v string) *ListEventSourcesInput { 5126 s.NamePrefix = &v 5127 return s 5128} 5129 5130// SetNextToken sets the NextToken field's value. 5131func (s *ListEventSourcesInput) SetNextToken(v string) *ListEventSourcesInput { 5132 s.NextToken = &v 5133 return s 5134} 5135 5136type ListEventSourcesOutput struct { 5137 _ struct{} `type:"structure"` 5138 5139 // The list of event sources. 5140 EventSources []*EventSource `type:"list"` 5141 5142 // A token you can use in a subsequent operation to retrieve the next set of 5143 // results. 5144 NextToken *string `min:"1" type:"string"` 5145} 5146 5147// String returns the string representation 5148func (s ListEventSourcesOutput) String() string { 5149 return awsutil.Prettify(s) 5150} 5151 5152// GoString returns the string representation 5153func (s ListEventSourcesOutput) GoString() string { 5154 return s.String() 5155} 5156 5157// SetEventSources sets the EventSources field's value. 5158func (s *ListEventSourcesOutput) SetEventSources(v []*EventSource) *ListEventSourcesOutput { 5159 s.EventSources = v 5160 return s 5161} 5162 5163// SetNextToken sets the NextToken field's value. 5164func (s *ListEventSourcesOutput) SetNextToken(v string) *ListEventSourcesOutput { 5165 s.NextToken = &v 5166 return s 5167} 5168 5169type ListPartnerEventSourceAccountsInput struct { 5170 _ struct{} `type:"structure"` 5171 5172 // The name of the partner event source to display account information about. 5173 // 5174 // EventSourceName is a required field 5175 EventSourceName *string `min:"1" type:"string" required:"true"` 5176 5177 // Specifying this limits the number of results returned by this operation. 5178 // The operation also returns a NextToken which you can use in a subsequent 5179 // operation to retrieve the next set of results. 5180 Limit *int64 `min:"1" type:"integer"` 5181 5182 // The token returned by a previous call to this operation. Specifying this 5183 // retrieves the next set of results. 5184 NextToken *string `min:"1" type:"string"` 5185} 5186 5187// String returns the string representation 5188func (s ListPartnerEventSourceAccountsInput) String() string { 5189 return awsutil.Prettify(s) 5190} 5191 5192// GoString returns the string representation 5193func (s ListPartnerEventSourceAccountsInput) GoString() string { 5194 return s.String() 5195} 5196 5197// Validate inspects the fields of the type to determine if they are valid. 5198func (s *ListPartnerEventSourceAccountsInput) Validate() error { 5199 invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourceAccountsInput"} 5200 if s.EventSourceName == nil { 5201 invalidParams.Add(request.NewErrParamRequired("EventSourceName")) 5202 } 5203 if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { 5204 invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) 5205 } 5206 if s.Limit != nil && *s.Limit < 1 { 5207 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5208 } 5209 if s.NextToken != nil && len(*s.NextToken) < 1 { 5210 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5211 } 5212 5213 if invalidParams.Len() > 0 { 5214 return invalidParams 5215 } 5216 return nil 5217} 5218 5219// SetEventSourceName sets the EventSourceName field's value. 5220func (s *ListPartnerEventSourceAccountsInput) SetEventSourceName(v string) *ListPartnerEventSourceAccountsInput { 5221 s.EventSourceName = &v 5222 return s 5223} 5224 5225// SetLimit sets the Limit field's value. 5226func (s *ListPartnerEventSourceAccountsInput) SetLimit(v int64) *ListPartnerEventSourceAccountsInput { 5227 s.Limit = &v 5228 return s 5229} 5230 5231// SetNextToken sets the NextToken field's value. 5232func (s *ListPartnerEventSourceAccountsInput) SetNextToken(v string) *ListPartnerEventSourceAccountsInput { 5233 s.NextToken = &v 5234 return s 5235} 5236 5237type ListPartnerEventSourceAccountsOutput struct { 5238 _ struct{} `type:"structure"` 5239 5240 // A token you can use in a subsequent operation to retrieve the next set of 5241 // results. 5242 NextToken *string `min:"1" type:"string"` 5243 5244 // The list of partner event sources returned by the operation. 5245 PartnerEventSourceAccounts []*PartnerEventSourceAccount `type:"list"` 5246} 5247 5248// String returns the string representation 5249func (s ListPartnerEventSourceAccountsOutput) String() string { 5250 return awsutil.Prettify(s) 5251} 5252 5253// GoString returns the string representation 5254func (s ListPartnerEventSourceAccountsOutput) GoString() string { 5255 return s.String() 5256} 5257 5258// SetNextToken sets the NextToken field's value. 5259func (s *ListPartnerEventSourceAccountsOutput) SetNextToken(v string) *ListPartnerEventSourceAccountsOutput { 5260 s.NextToken = &v 5261 return s 5262} 5263 5264// SetPartnerEventSourceAccounts sets the PartnerEventSourceAccounts field's value. 5265func (s *ListPartnerEventSourceAccountsOutput) SetPartnerEventSourceAccounts(v []*PartnerEventSourceAccount) *ListPartnerEventSourceAccountsOutput { 5266 s.PartnerEventSourceAccounts = v 5267 return s 5268} 5269 5270type ListPartnerEventSourcesInput struct { 5271 _ struct{} `type:"structure"` 5272 5273 // pecifying this limits the number of results returned by this operation. The 5274 // operation also returns a NextToken which you can use in a subsequent operation 5275 // to retrieve the next set of results. 5276 Limit *int64 `min:"1" type:"integer"` 5277 5278 // If you specify this, the results are limited to only those partner event 5279 // sources that start with the string you specify. 5280 // 5281 // NamePrefix is a required field 5282 NamePrefix *string `min:"1" type:"string" required:"true"` 5283 5284 // The token returned by a previous call to this operation. Specifying this 5285 // retrieves the next set of results. 5286 NextToken *string `min:"1" type:"string"` 5287} 5288 5289// String returns the string representation 5290func (s ListPartnerEventSourcesInput) String() string { 5291 return awsutil.Prettify(s) 5292} 5293 5294// GoString returns the string representation 5295func (s ListPartnerEventSourcesInput) GoString() string { 5296 return s.String() 5297} 5298 5299// Validate inspects the fields of the type to determine if they are valid. 5300func (s *ListPartnerEventSourcesInput) Validate() error { 5301 invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourcesInput"} 5302 if s.Limit != nil && *s.Limit < 1 { 5303 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5304 } 5305 if s.NamePrefix == nil { 5306 invalidParams.Add(request.NewErrParamRequired("NamePrefix")) 5307 } 5308 if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { 5309 invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) 5310 } 5311 if s.NextToken != nil && len(*s.NextToken) < 1 { 5312 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5313 } 5314 5315 if invalidParams.Len() > 0 { 5316 return invalidParams 5317 } 5318 return nil 5319} 5320 5321// SetLimit sets the Limit field's value. 5322func (s *ListPartnerEventSourcesInput) SetLimit(v int64) *ListPartnerEventSourcesInput { 5323 s.Limit = &v 5324 return s 5325} 5326 5327// SetNamePrefix sets the NamePrefix field's value. 5328func (s *ListPartnerEventSourcesInput) SetNamePrefix(v string) *ListPartnerEventSourcesInput { 5329 s.NamePrefix = &v 5330 return s 5331} 5332 5333// SetNextToken sets the NextToken field's value. 5334func (s *ListPartnerEventSourcesInput) SetNextToken(v string) *ListPartnerEventSourcesInput { 5335 s.NextToken = &v 5336 return s 5337} 5338 5339type ListPartnerEventSourcesOutput struct { 5340 _ struct{} `type:"structure"` 5341 5342 // A token you can use in a subsequent operation to retrieve the next set of 5343 // results. 5344 NextToken *string `min:"1" type:"string"` 5345 5346 // The list of partner event sources returned by the operation. 5347 PartnerEventSources []*PartnerEventSource `type:"list"` 5348} 5349 5350// String returns the string representation 5351func (s ListPartnerEventSourcesOutput) String() string { 5352 return awsutil.Prettify(s) 5353} 5354 5355// GoString returns the string representation 5356func (s ListPartnerEventSourcesOutput) GoString() string { 5357 return s.String() 5358} 5359 5360// SetNextToken sets the NextToken field's value. 5361func (s *ListPartnerEventSourcesOutput) SetNextToken(v string) *ListPartnerEventSourcesOutput { 5362 s.NextToken = &v 5363 return s 5364} 5365 5366// SetPartnerEventSources sets the PartnerEventSources field's value. 5367func (s *ListPartnerEventSourcesOutput) SetPartnerEventSources(v []*PartnerEventSource) *ListPartnerEventSourcesOutput { 5368 s.PartnerEventSources = v 5369 return s 5370} 5371 5372type ListRuleNamesByTargetInput struct { 5373 _ struct{} `type:"structure"` 5374 5375 // Limits the results to show only the rules associated with the specified event 5376 // bus. 5377 EventBusName *string `min:"1" type:"string"` 5378 5379 // The maximum number of results to return. 5380 Limit *int64 `min:"1" type:"integer"` 5381 5382 // The token returned by a previous call to retrieve the next set of results. 5383 NextToken *string `min:"1" type:"string"` 5384 5385 // The Amazon Resource Name (ARN) of the target resource. 5386 // 5387 // TargetArn is a required field 5388 TargetArn *string `min:"1" type:"string" required:"true"` 5389} 5390 5391// String returns the string representation 5392func (s ListRuleNamesByTargetInput) String() string { 5393 return awsutil.Prettify(s) 5394} 5395 5396// GoString returns the string representation 5397func (s ListRuleNamesByTargetInput) GoString() string { 5398 return s.String() 5399} 5400 5401// Validate inspects the fields of the type to determine if they are valid. 5402func (s *ListRuleNamesByTargetInput) Validate() error { 5403 invalidParams := request.ErrInvalidParams{Context: "ListRuleNamesByTargetInput"} 5404 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 5405 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 5406 } 5407 if s.Limit != nil && *s.Limit < 1 { 5408 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5409 } 5410 if s.NextToken != nil && len(*s.NextToken) < 1 { 5411 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5412 } 5413 if s.TargetArn == nil { 5414 invalidParams.Add(request.NewErrParamRequired("TargetArn")) 5415 } 5416 if s.TargetArn != nil && len(*s.TargetArn) < 1 { 5417 invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) 5418 } 5419 5420 if invalidParams.Len() > 0 { 5421 return invalidParams 5422 } 5423 return nil 5424} 5425 5426// SetEventBusName sets the EventBusName field's value. 5427func (s *ListRuleNamesByTargetInput) SetEventBusName(v string) *ListRuleNamesByTargetInput { 5428 s.EventBusName = &v 5429 return s 5430} 5431 5432// SetLimit sets the Limit field's value. 5433func (s *ListRuleNamesByTargetInput) SetLimit(v int64) *ListRuleNamesByTargetInput { 5434 s.Limit = &v 5435 return s 5436} 5437 5438// SetNextToken sets the NextToken field's value. 5439func (s *ListRuleNamesByTargetInput) SetNextToken(v string) *ListRuleNamesByTargetInput { 5440 s.NextToken = &v 5441 return s 5442} 5443 5444// SetTargetArn sets the TargetArn field's value. 5445func (s *ListRuleNamesByTargetInput) SetTargetArn(v string) *ListRuleNamesByTargetInput { 5446 s.TargetArn = &v 5447 return s 5448} 5449 5450type ListRuleNamesByTargetOutput struct { 5451 _ struct{} `type:"structure"` 5452 5453 // Indicates whether there are additional results to retrieve. If there are 5454 // no more results, the value is null. 5455 NextToken *string `min:"1" type:"string"` 5456 5457 // The names of the rules that can invoke the given target. 5458 RuleNames []*string `type:"list"` 5459} 5460 5461// String returns the string representation 5462func (s ListRuleNamesByTargetOutput) String() string { 5463 return awsutil.Prettify(s) 5464} 5465 5466// GoString returns the string representation 5467func (s ListRuleNamesByTargetOutput) GoString() string { 5468 return s.String() 5469} 5470 5471// SetNextToken sets the NextToken field's value. 5472func (s *ListRuleNamesByTargetOutput) SetNextToken(v string) *ListRuleNamesByTargetOutput { 5473 s.NextToken = &v 5474 return s 5475} 5476 5477// SetRuleNames sets the RuleNames field's value. 5478func (s *ListRuleNamesByTargetOutput) SetRuleNames(v []*string) *ListRuleNamesByTargetOutput { 5479 s.RuleNames = v 5480 return s 5481} 5482 5483type ListRulesInput struct { 5484 _ struct{} `type:"structure"` 5485 5486 // Limits the results to show only the rules associated with the specified event 5487 // bus. 5488 EventBusName *string `min:"1" type:"string"` 5489 5490 // The maximum number of results to return. 5491 Limit *int64 `min:"1" type:"integer"` 5492 5493 // The prefix matching the rule name. 5494 NamePrefix *string `min:"1" type:"string"` 5495 5496 // The token returned by a previous call to retrieve the next set of results. 5497 NextToken *string `min:"1" type:"string"` 5498} 5499 5500// String returns the string representation 5501func (s ListRulesInput) String() string { 5502 return awsutil.Prettify(s) 5503} 5504 5505// GoString returns the string representation 5506func (s ListRulesInput) GoString() string { 5507 return s.String() 5508} 5509 5510// Validate inspects the fields of the type to determine if they are valid. 5511func (s *ListRulesInput) Validate() error { 5512 invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} 5513 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 5514 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 5515 } 5516 if s.Limit != nil && *s.Limit < 1 { 5517 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5518 } 5519 if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { 5520 invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) 5521 } 5522 if s.NextToken != nil && len(*s.NextToken) < 1 { 5523 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5524 } 5525 5526 if invalidParams.Len() > 0 { 5527 return invalidParams 5528 } 5529 return nil 5530} 5531 5532// SetEventBusName sets the EventBusName field's value. 5533func (s *ListRulesInput) SetEventBusName(v string) *ListRulesInput { 5534 s.EventBusName = &v 5535 return s 5536} 5537 5538// SetLimit sets the Limit field's value. 5539func (s *ListRulesInput) SetLimit(v int64) *ListRulesInput { 5540 s.Limit = &v 5541 return s 5542} 5543 5544// SetNamePrefix sets the NamePrefix field's value. 5545func (s *ListRulesInput) SetNamePrefix(v string) *ListRulesInput { 5546 s.NamePrefix = &v 5547 return s 5548} 5549 5550// SetNextToken sets the NextToken field's value. 5551func (s *ListRulesInput) SetNextToken(v string) *ListRulesInput { 5552 s.NextToken = &v 5553 return s 5554} 5555 5556type ListRulesOutput struct { 5557 _ struct{} `type:"structure"` 5558 5559 // Indicates whether there are additional results to retrieve. If there are 5560 // no more results, the value is null. 5561 NextToken *string `min:"1" type:"string"` 5562 5563 // The rules that match the specified criteria. 5564 Rules []*Rule `type:"list"` 5565} 5566 5567// String returns the string representation 5568func (s ListRulesOutput) String() string { 5569 return awsutil.Prettify(s) 5570} 5571 5572// GoString returns the string representation 5573func (s ListRulesOutput) GoString() string { 5574 return s.String() 5575} 5576 5577// SetNextToken sets the NextToken field's value. 5578func (s *ListRulesOutput) SetNextToken(v string) *ListRulesOutput { 5579 s.NextToken = &v 5580 return s 5581} 5582 5583// SetRules sets the Rules field's value. 5584func (s *ListRulesOutput) SetRules(v []*Rule) *ListRulesOutput { 5585 s.Rules = v 5586 return s 5587} 5588 5589type ListTagsForResourceInput struct { 5590 _ struct{} `type:"structure"` 5591 5592 // The ARN of the EventBridge resource for which you want to view tags. 5593 // 5594 // ResourceARN is a required field 5595 ResourceARN *string `min:"1" type:"string" required:"true"` 5596} 5597 5598// String returns the string representation 5599func (s ListTagsForResourceInput) String() string { 5600 return awsutil.Prettify(s) 5601} 5602 5603// GoString returns the string representation 5604func (s ListTagsForResourceInput) GoString() string { 5605 return s.String() 5606} 5607 5608// Validate inspects the fields of the type to determine if they are valid. 5609func (s *ListTagsForResourceInput) Validate() error { 5610 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 5611 if s.ResourceARN == nil { 5612 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 5613 } 5614 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 5615 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 5616 } 5617 5618 if invalidParams.Len() > 0 { 5619 return invalidParams 5620 } 5621 return nil 5622} 5623 5624// SetResourceARN sets the ResourceARN field's value. 5625func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 5626 s.ResourceARN = &v 5627 return s 5628} 5629 5630type ListTagsForResourceOutput struct { 5631 _ struct{} `type:"structure"` 5632 5633 // The list of tag keys and values associated with the resource you specified 5634 Tags []*Tag `type:"list"` 5635} 5636 5637// String returns the string representation 5638func (s ListTagsForResourceOutput) String() string { 5639 return awsutil.Prettify(s) 5640} 5641 5642// GoString returns the string representation 5643func (s ListTagsForResourceOutput) GoString() string { 5644 return s.String() 5645} 5646 5647// SetTags sets the Tags field's value. 5648func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 5649 s.Tags = v 5650 return s 5651} 5652 5653type ListTargetsByRuleInput struct { 5654 _ struct{} `type:"structure"` 5655 5656 // The event bus associated with the rule. If you omit this, the default event 5657 // bus is used. 5658 EventBusName *string `min:"1" type:"string"` 5659 5660 // The maximum number of results to return. 5661 Limit *int64 `min:"1" type:"integer"` 5662 5663 // The token returned by a previous call to retrieve the next set of results. 5664 NextToken *string `min:"1" type:"string"` 5665 5666 // The name of the rule. 5667 // 5668 // Rule is a required field 5669 Rule *string `min:"1" type:"string" required:"true"` 5670} 5671 5672// String returns the string representation 5673func (s ListTargetsByRuleInput) String() string { 5674 return awsutil.Prettify(s) 5675} 5676 5677// GoString returns the string representation 5678func (s ListTargetsByRuleInput) GoString() string { 5679 return s.String() 5680} 5681 5682// Validate inspects the fields of the type to determine if they are valid. 5683func (s *ListTargetsByRuleInput) Validate() error { 5684 invalidParams := request.ErrInvalidParams{Context: "ListTargetsByRuleInput"} 5685 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 5686 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 5687 } 5688 if s.Limit != nil && *s.Limit < 1 { 5689 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5690 } 5691 if s.NextToken != nil && len(*s.NextToken) < 1 { 5692 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5693 } 5694 if s.Rule == nil { 5695 invalidParams.Add(request.NewErrParamRequired("Rule")) 5696 } 5697 if s.Rule != nil && len(*s.Rule) < 1 { 5698 invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) 5699 } 5700 5701 if invalidParams.Len() > 0 { 5702 return invalidParams 5703 } 5704 return nil 5705} 5706 5707// SetEventBusName sets the EventBusName field's value. 5708func (s *ListTargetsByRuleInput) SetEventBusName(v string) *ListTargetsByRuleInput { 5709 s.EventBusName = &v 5710 return s 5711} 5712 5713// SetLimit sets the Limit field's value. 5714func (s *ListTargetsByRuleInput) SetLimit(v int64) *ListTargetsByRuleInput { 5715 s.Limit = &v 5716 return s 5717} 5718 5719// SetNextToken sets the NextToken field's value. 5720func (s *ListTargetsByRuleInput) SetNextToken(v string) *ListTargetsByRuleInput { 5721 s.NextToken = &v 5722 return s 5723} 5724 5725// SetRule sets the Rule field's value. 5726func (s *ListTargetsByRuleInput) SetRule(v string) *ListTargetsByRuleInput { 5727 s.Rule = &v 5728 return s 5729} 5730 5731type ListTargetsByRuleOutput struct { 5732 _ struct{} `type:"structure"` 5733 5734 // Indicates whether there are additional results to retrieve. If there are 5735 // no more results, the value is null. 5736 NextToken *string `min:"1" type:"string"` 5737 5738 // The targets assigned to the rule. 5739 Targets []*Target `min:"1" type:"list"` 5740} 5741 5742// String returns the string representation 5743func (s ListTargetsByRuleOutput) String() string { 5744 return awsutil.Prettify(s) 5745} 5746 5747// GoString returns the string representation 5748func (s ListTargetsByRuleOutput) GoString() string { 5749 return s.String() 5750} 5751 5752// SetNextToken sets the NextToken field's value. 5753func (s *ListTargetsByRuleOutput) SetNextToken(v string) *ListTargetsByRuleOutput { 5754 s.NextToken = &v 5755 return s 5756} 5757 5758// SetTargets sets the Targets field's value. 5759func (s *ListTargetsByRuleOutput) SetTargets(v []*Target) *ListTargetsByRuleOutput { 5760 s.Targets = v 5761 return s 5762} 5763 5764// This rule was created by an AWS service on behalf of your account. It is 5765// managed by that service. If you see this error in response to DeleteRule 5766// or RemoveTargets, you can use the Force parameter in those calls to delete 5767// the rule or remove targets from the rule. You cannot modify these managed 5768// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, 5769// or UntagResource. 5770type ManagedRuleException struct { 5771 _ struct{} `type:"structure"` 5772 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5773 5774 Message_ *string `locationName:"message" type:"string"` 5775} 5776 5777// String returns the string representation 5778func (s ManagedRuleException) String() string { 5779 return awsutil.Prettify(s) 5780} 5781 5782// GoString returns the string representation 5783func (s ManagedRuleException) GoString() string { 5784 return s.String() 5785} 5786 5787func newErrorManagedRuleException(v protocol.ResponseMetadata) error { 5788 return &ManagedRuleException{ 5789 RespMetadata: v, 5790 } 5791} 5792 5793// Code returns the exception type name. 5794func (s *ManagedRuleException) Code() string { 5795 return "ManagedRuleException" 5796} 5797 5798// Message returns the exception's message. 5799func (s *ManagedRuleException) Message() string { 5800 if s.Message_ != nil { 5801 return *s.Message_ 5802 } 5803 return "" 5804} 5805 5806// OrigErr always returns nil, satisfies awserr.Error interface. 5807func (s *ManagedRuleException) OrigErr() error { 5808 return nil 5809} 5810 5811func (s *ManagedRuleException) Error() string { 5812 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5813} 5814 5815// Status code returns the HTTP status code for the request's response error. 5816func (s *ManagedRuleException) StatusCode() int { 5817 return s.RespMetadata.StatusCode 5818} 5819 5820// RequestID returns the service's response RequestID for request. 5821func (s *ManagedRuleException) RequestID() string { 5822 return s.RespMetadata.RequestID 5823} 5824 5825// This structure specifies the network configuration for an ECS task. 5826type NetworkConfiguration struct { 5827 _ struct{} `type:"structure"` 5828 5829 // Use this structure to specify the VPC subnets and security groups for the 5830 // task, and whether a public IP address is to be used. This structure is relevant 5831 // only for ECS tasks that use the awsvpc network mode. 5832 AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` 5833} 5834 5835// String returns the string representation 5836func (s NetworkConfiguration) String() string { 5837 return awsutil.Prettify(s) 5838} 5839 5840// GoString returns the string representation 5841func (s NetworkConfiguration) GoString() string { 5842 return s.String() 5843} 5844 5845// Validate inspects the fields of the type to determine if they are valid. 5846func (s *NetworkConfiguration) Validate() error { 5847 invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} 5848 if s.AwsvpcConfiguration != nil { 5849 if err := s.AwsvpcConfiguration.Validate(); err != nil { 5850 invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) 5851 } 5852 } 5853 5854 if invalidParams.Len() > 0 { 5855 return invalidParams 5856 } 5857 return nil 5858} 5859 5860// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. 5861func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { 5862 s.AwsvpcConfiguration = v 5863 return s 5864} 5865 5866// A partner event source is created by an SaaS partner. If a customer creates 5867// a partner event bus that matches this event source, that AWS account can 5868// receive events from the partner's applications or services. 5869type PartnerEventSource struct { 5870 _ struct{} `type:"structure"` 5871 5872 // The ARN of the partner event source. 5873 Arn *string `type:"string"` 5874 5875 // The name of the partner event source. 5876 Name *string `type:"string"` 5877} 5878 5879// String returns the string representation 5880func (s PartnerEventSource) String() string { 5881 return awsutil.Prettify(s) 5882} 5883 5884// GoString returns the string representation 5885func (s PartnerEventSource) GoString() string { 5886 return s.String() 5887} 5888 5889// SetArn sets the Arn field's value. 5890func (s *PartnerEventSource) SetArn(v string) *PartnerEventSource { 5891 s.Arn = &v 5892 return s 5893} 5894 5895// SetName sets the Name field's value. 5896func (s *PartnerEventSource) SetName(v string) *PartnerEventSource { 5897 s.Name = &v 5898 return s 5899} 5900 5901// The AWS account that a partner event source has been offered to. 5902type PartnerEventSourceAccount struct { 5903 _ struct{} `type:"structure"` 5904 5905 // The AWS account ID that the partner event source was offered to. 5906 Account *string `min:"12" type:"string"` 5907 5908 // The date and time the event source was created. 5909 CreationTime *time.Time `type:"timestamp"` 5910 5911 // The date and time that the event source will expire, if the AWS account doesn't 5912 // create a matching event bus for it. 5913 ExpirationTime *time.Time `type:"timestamp"` 5914 5915 // The state of the event source. If it is ACTIVE, you have already created 5916 // a matching event bus for this event source, and that event bus is active. 5917 // If it is PENDING, either you haven't yet created a matching event bus, or 5918 // that event bus is deactivated. If it is DELETED, you have created a matching 5919 // event bus, but the event source has since been deleted. 5920 State *string `type:"string" enum:"EventSourceState"` 5921} 5922 5923// String returns the string representation 5924func (s PartnerEventSourceAccount) String() string { 5925 return awsutil.Prettify(s) 5926} 5927 5928// GoString returns the string representation 5929func (s PartnerEventSourceAccount) GoString() string { 5930 return s.String() 5931} 5932 5933// SetAccount sets the Account field's value. 5934func (s *PartnerEventSourceAccount) SetAccount(v string) *PartnerEventSourceAccount { 5935 s.Account = &v 5936 return s 5937} 5938 5939// SetCreationTime sets the CreationTime field's value. 5940func (s *PartnerEventSourceAccount) SetCreationTime(v time.Time) *PartnerEventSourceAccount { 5941 s.CreationTime = &v 5942 return s 5943} 5944 5945// SetExpirationTime sets the ExpirationTime field's value. 5946func (s *PartnerEventSourceAccount) SetExpirationTime(v time.Time) *PartnerEventSourceAccount { 5947 s.ExpirationTime = &v 5948 return s 5949} 5950 5951// SetState sets the State field's value. 5952func (s *PartnerEventSourceAccount) SetState(v string) *PartnerEventSourceAccount { 5953 s.State = &v 5954 return s 5955} 5956 5957// The event bus policy is too long. For more information, see the limits. 5958type PolicyLengthExceededException struct { 5959 _ struct{} `type:"structure"` 5960 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5961 5962 Message_ *string `locationName:"message" type:"string"` 5963} 5964 5965// String returns the string representation 5966func (s PolicyLengthExceededException) String() string { 5967 return awsutil.Prettify(s) 5968} 5969 5970// GoString returns the string representation 5971func (s PolicyLengthExceededException) GoString() string { 5972 return s.String() 5973} 5974 5975func newErrorPolicyLengthExceededException(v protocol.ResponseMetadata) error { 5976 return &PolicyLengthExceededException{ 5977 RespMetadata: v, 5978 } 5979} 5980 5981// Code returns the exception type name. 5982func (s *PolicyLengthExceededException) Code() string { 5983 return "PolicyLengthExceededException" 5984} 5985 5986// Message returns the exception's message. 5987func (s *PolicyLengthExceededException) Message() string { 5988 if s.Message_ != nil { 5989 return *s.Message_ 5990 } 5991 return "" 5992} 5993 5994// OrigErr always returns nil, satisfies awserr.Error interface. 5995func (s *PolicyLengthExceededException) OrigErr() error { 5996 return nil 5997} 5998 5999func (s *PolicyLengthExceededException) Error() string { 6000 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6001} 6002 6003// Status code returns the HTTP status code for the request's response error. 6004func (s *PolicyLengthExceededException) StatusCode() int { 6005 return s.RespMetadata.StatusCode 6006} 6007 6008// RequestID returns the service's response RequestID for request. 6009func (s *PolicyLengthExceededException) RequestID() string { 6010 return s.RespMetadata.RequestID 6011} 6012 6013type PutEventsInput struct { 6014 _ struct{} `type:"structure"` 6015 6016 // The entry that defines an event in your system. You can specify several parameters 6017 // for the entry such as the source and type of the event, resources associated 6018 // with the event, and so on. 6019 // 6020 // Entries is a required field 6021 Entries []*PutEventsRequestEntry `min:"1" type:"list" required:"true"` 6022} 6023 6024// String returns the string representation 6025func (s PutEventsInput) String() string { 6026 return awsutil.Prettify(s) 6027} 6028 6029// GoString returns the string representation 6030func (s PutEventsInput) GoString() string { 6031 return s.String() 6032} 6033 6034// Validate inspects the fields of the type to determine if they are valid. 6035func (s *PutEventsInput) Validate() error { 6036 invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} 6037 if s.Entries == nil { 6038 invalidParams.Add(request.NewErrParamRequired("Entries")) 6039 } 6040 if s.Entries != nil && len(s.Entries) < 1 { 6041 invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) 6042 } 6043 if s.Entries != nil { 6044 for i, v := range s.Entries { 6045 if v == nil { 6046 continue 6047 } 6048 if err := v.Validate(); err != nil { 6049 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) 6050 } 6051 } 6052 } 6053 6054 if invalidParams.Len() > 0 { 6055 return invalidParams 6056 } 6057 return nil 6058} 6059 6060// SetEntries sets the Entries field's value. 6061func (s *PutEventsInput) SetEntries(v []*PutEventsRequestEntry) *PutEventsInput { 6062 s.Entries = v 6063 return s 6064} 6065 6066type PutEventsOutput struct { 6067 _ struct{} `type:"structure"` 6068 6069 // The successfully and unsuccessfully ingested events results. If the ingestion 6070 // was successful, the entry has the event ID in it. Otherwise, you can use 6071 // the error code and error message to identify the problem with the entry. 6072 Entries []*PutEventsResultEntry `type:"list"` 6073 6074 // The number of failed entries. 6075 FailedEntryCount *int64 `type:"integer"` 6076} 6077 6078// String returns the string representation 6079func (s PutEventsOutput) String() string { 6080 return awsutil.Prettify(s) 6081} 6082 6083// GoString returns the string representation 6084func (s PutEventsOutput) GoString() string { 6085 return s.String() 6086} 6087 6088// SetEntries sets the Entries field's value. 6089func (s *PutEventsOutput) SetEntries(v []*PutEventsResultEntry) *PutEventsOutput { 6090 s.Entries = v 6091 return s 6092} 6093 6094// SetFailedEntryCount sets the FailedEntryCount field's value. 6095func (s *PutEventsOutput) SetFailedEntryCount(v int64) *PutEventsOutput { 6096 s.FailedEntryCount = &v 6097 return s 6098} 6099 6100// Represents an event to be submitted. 6101type PutEventsRequestEntry struct { 6102 _ struct{} `type:"structure"` 6103 6104 // A valid JSON string. There is no other schema imposed. The JSON string may 6105 // contain fields and nested subobjects. 6106 Detail *string `type:"string"` 6107 6108 // Free-form string used to decide what fields to expect in the event detail. 6109 DetailType *string `type:"string"` 6110 6111 // The event bus that will receive the event. Only the rules that are associated 6112 // with this event bus will be able to match the event. 6113 EventBusName *string `min:"1" type:"string"` 6114 6115 // AWS resources, identified by Amazon Resource Name (ARN), which the event 6116 // primarily concerns. Any number, including zero, may be present. 6117 Resources []*string `type:"list"` 6118 6119 // The source of the event. 6120 Source *string `type:"string"` 6121 6122 // The time stamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). 6123 // If no time stamp is provided, the time stamp of the PutEvents call is used. 6124 Time *time.Time `type:"timestamp"` 6125} 6126 6127// String returns the string representation 6128func (s PutEventsRequestEntry) String() string { 6129 return awsutil.Prettify(s) 6130} 6131 6132// GoString returns the string representation 6133func (s PutEventsRequestEntry) GoString() string { 6134 return s.String() 6135} 6136 6137// Validate inspects the fields of the type to determine if they are valid. 6138func (s *PutEventsRequestEntry) Validate() error { 6139 invalidParams := request.ErrInvalidParams{Context: "PutEventsRequestEntry"} 6140 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6141 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6142 } 6143 6144 if invalidParams.Len() > 0 { 6145 return invalidParams 6146 } 6147 return nil 6148} 6149 6150// SetDetail sets the Detail field's value. 6151func (s *PutEventsRequestEntry) SetDetail(v string) *PutEventsRequestEntry { 6152 s.Detail = &v 6153 return s 6154} 6155 6156// SetDetailType sets the DetailType field's value. 6157func (s *PutEventsRequestEntry) SetDetailType(v string) *PutEventsRequestEntry { 6158 s.DetailType = &v 6159 return s 6160} 6161 6162// SetEventBusName sets the EventBusName field's value. 6163func (s *PutEventsRequestEntry) SetEventBusName(v string) *PutEventsRequestEntry { 6164 s.EventBusName = &v 6165 return s 6166} 6167 6168// SetResources sets the Resources field's value. 6169func (s *PutEventsRequestEntry) SetResources(v []*string) *PutEventsRequestEntry { 6170 s.Resources = v 6171 return s 6172} 6173 6174// SetSource sets the Source field's value. 6175func (s *PutEventsRequestEntry) SetSource(v string) *PutEventsRequestEntry { 6176 s.Source = &v 6177 return s 6178} 6179 6180// SetTime sets the Time field's value. 6181func (s *PutEventsRequestEntry) SetTime(v time.Time) *PutEventsRequestEntry { 6182 s.Time = &v 6183 return s 6184} 6185 6186// Represents an event that failed to be submitted. 6187type PutEventsResultEntry struct { 6188 _ struct{} `type:"structure"` 6189 6190 // The error code that indicates why the event submission failed. 6191 ErrorCode *string `type:"string"` 6192 6193 // The error message that explains why the event submission failed. 6194 ErrorMessage *string `type:"string"` 6195 6196 // The ID of the event. 6197 EventId *string `type:"string"` 6198} 6199 6200// String returns the string representation 6201func (s PutEventsResultEntry) String() string { 6202 return awsutil.Prettify(s) 6203} 6204 6205// GoString returns the string representation 6206func (s PutEventsResultEntry) GoString() string { 6207 return s.String() 6208} 6209 6210// SetErrorCode sets the ErrorCode field's value. 6211func (s *PutEventsResultEntry) SetErrorCode(v string) *PutEventsResultEntry { 6212 s.ErrorCode = &v 6213 return s 6214} 6215 6216// SetErrorMessage sets the ErrorMessage field's value. 6217func (s *PutEventsResultEntry) SetErrorMessage(v string) *PutEventsResultEntry { 6218 s.ErrorMessage = &v 6219 return s 6220} 6221 6222// SetEventId sets the EventId field's value. 6223func (s *PutEventsResultEntry) SetEventId(v string) *PutEventsResultEntry { 6224 s.EventId = &v 6225 return s 6226} 6227 6228type PutPartnerEventsInput struct { 6229 _ struct{} `type:"structure"` 6230 6231 // The list of events to write to the event bus. 6232 // 6233 // Entries is a required field 6234 Entries []*PutPartnerEventsRequestEntry `min:"1" type:"list" required:"true"` 6235} 6236 6237// String returns the string representation 6238func (s PutPartnerEventsInput) String() string { 6239 return awsutil.Prettify(s) 6240} 6241 6242// GoString returns the string representation 6243func (s PutPartnerEventsInput) GoString() string { 6244 return s.String() 6245} 6246 6247// Validate inspects the fields of the type to determine if they are valid. 6248func (s *PutPartnerEventsInput) Validate() error { 6249 invalidParams := request.ErrInvalidParams{Context: "PutPartnerEventsInput"} 6250 if s.Entries == nil { 6251 invalidParams.Add(request.NewErrParamRequired("Entries")) 6252 } 6253 if s.Entries != nil && len(s.Entries) < 1 { 6254 invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) 6255 } 6256 if s.Entries != nil { 6257 for i, v := range s.Entries { 6258 if v == nil { 6259 continue 6260 } 6261 if err := v.Validate(); err != nil { 6262 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) 6263 } 6264 } 6265 } 6266 6267 if invalidParams.Len() > 0 { 6268 return invalidParams 6269 } 6270 return nil 6271} 6272 6273// SetEntries sets the Entries field's value. 6274func (s *PutPartnerEventsInput) SetEntries(v []*PutPartnerEventsRequestEntry) *PutPartnerEventsInput { 6275 s.Entries = v 6276 return s 6277} 6278 6279type PutPartnerEventsOutput struct { 6280 _ struct{} `type:"structure"` 6281 6282 // The list of events from this operation that were successfully written to 6283 // the partner event bus. 6284 Entries []*PutPartnerEventsResultEntry `type:"list"` 6285 6286 // The number of events from this operation that could not be written to the 6287 // partner event bus. 6288 FailedEntryCount *int64 `type:"integer"` 6289} 6290 6291// String returns the string representation 6292func (s PutPartnerEventsOutput) String() string { 6293 return awsutil.Prettify(s) 6294} 6295 6296// GoString returns the string representation 6297func (s PutPartnerEventsOutput) GoString() string { 6298 return s.String() 6299} 6300 6301// SetEntries sets the Entries field's value. 6302func (s *PutPartnerEventsOutput) SetEntries(v []*PutPartnerEventsResultEntry) *PutPartnerEventsOutput { 6303 s.Entries = v 6304 return s 6305} 6306 6307// SetFailedEntryCount sets the FailedEntryCount field's value. 6308func (s *PutPartnerEventsOutput) SetFailedEntryCount(v int64) *PutPartnerEventsOutput { 6309 s.FailedEntryCount = &v 6310 return s 6311} 6312 6313// The details about an event generated by an SaaS partner. 6314type PutPartnerEventsRequestEntry struct { 6315 _ struct{} `type:"structure"` 6316 6317 // A valid JSON string. There is no other schema imposed. The JSON string may 6318 // contain fields and nested subobjects. 6319 Detail *string `type:"string"` 6320 6321 // A free-form string used to decide what fields to expect in the event detail. 6322 DetailType *string `type:"string"` 6323 6324 // AWS resources, identified by Amazon Resource Name (ARN), which the event 6325 // primarily concerns. Any number, including zero, may be present. 6326 Resources []*string `type:"list"` 6327 6328 // The event source that is generating the evntry. 6329 Source *string `min:"1" type:"string"` 6330 6331 // The date and time of the event. 6332 Time *time.Time `type:"timestamp"` 6333} 6334 6335// String returns the string representation 6336func (s PutPartnerEventsRequestEntry) String() string { 6337 return awsutil.Prettify(s) 6338} 6339 6340// GoString returns the string representation 6341func (s PutPartnerEventsRequestEntry) GoString() string { 6342 return s.String() 6343} 6344 6345// Validate inspects the fields of the type to determine if they are valid. 6346func (s *PutPartnerEventsRequestEntry) Validate() error { 6347 invalidParams := request.ErrInvalidParams{Context: "PutPartnerEventsRequestEntry"} 6348 if s.Source != nil && len(*s.Source) < 1 { 6349 invalidParams.Add(request.NewErrParamMinLen("Source", 1)) 6350 } 6351 6352 if invalidParams.Len() > 0 { 6353 return invalidParams 6354 } 6355 return nil 6356} 6357 6358// SetDetail sets the Detail field's value. 6359func (s *PutPartnerEventsRequestEntry) SetDetail(v string) *PutPartnerEventsRequestEntry { 6360 s.Detail = &v 6361 return s 6362} 6363 6364// SetDetailType sets the DetailType field's value. 6365func (s *PutPartnerEventsRequestEntry) SetDetailType(v string) *PutPartnerEventsRequestEntry { 6366 s.DetailType = &v 6367 return s 6368} 6369 6370// SetResources sets the Resources field's value. 6371func (s *PutPartnerEventsRequestEntry) SetResources(v []*string) *PutPartnerEventsRequestEntry { 6372 s.Resources = v 6373 return s 6374} 6375 6376// SetSource sets the Source field's value. 6377func (s *PutPartnerEventsRequestEntry) SetSource(v string) *PutPartnerEventsRequestEntry { 6378 s.Source = &v 6379 return s 6380} 6381 6382// SetTime sets the Time field's value. 6383func (s *PutPartnerEventsRequestEntry) SetTime(v time.Time) *PutPartnerEventsRequestEntry { 6384 s.Time = &v 6385 return s 6386} 6387 6388// Represents an event that a partner tried to generate, but failed. 6389type PutPartnerEventsResultEntry struct { 6390 _ struct{} `type:"structure"` 6391 6392 // The error code that indicates why the event submission failed. 6393 ErrorCode *string `type:"string"` 6394 6395 // The error message that explains why the event submission failed. 6396 ErrorMessage *string `type:"string"` 6397 6398 // The ID of the event. 6399 EventId *string `type:"string"` 6400} 6401 6402// String returns the string representation 6403func (s PutPartnerEventsResultEntry) String() string { 6404 return awsutil.Prettify(s) 6405} 6406 6407// GoString returns the string representation 6408func (s PutPartnerEventsResultEntry) GoString() string { 6409 return s.String() 6410} 6411 6412// SetErrorCode sets the ErrorCode field's value. 6413func (s *PutPartnerEventsResultEntry) SetErrorCode(v string) *PutPartnerEventsResultEntry { 6414 s.ErrorCode = &v 6415 return s 6416} 6417 6418// SetErrorMessage sets the ErrorMessage field's value. 6419func (s *PutPartnerEventsResultEntry) SetErrorMessage(v string) *PutPartnerEventsResultEntry { 6420 s.ErrorMessage = &v 6421 return s 6422} 6423 6424// SetEventId sets the EventId field's value. 6425func (s *PutPartnerEventsResultEntry) SetEventId(v string) *PutPartnerEventsResultEntry { 6426 s.EventId = &v 6427 return s 6428} 6429 6430type PutPermissionInput struct { 6431 _ struct{} `type:"structure"` 6432 6433 // The action that you are enabling the other account to perform. Currently, 6434 // this must be events:PutEvents. 6435 // 6436 // Action is a required field 6437 Action *string `min:"1" type:"string" required:"true"` 6438 6439 // This parameter enables you to limit the permission to accounts that fulfill 6440 // a certain condition, such as being a member of a certain AWS organization. 6441 // For more information about AWS Organizations, see What Is AWS Organizations 6442 // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) 6443 // in the AWS Organizations User Guide. 6444 // 6445 // If you specify Condition with an AWS organization ID, and specify "*" as 6446 // the value for Principal, you grant permission to all the accounts in the 6447 // named organization. 6448 // 6449 // The Condition is a JSON string which must contain Type, Key, and Value fields. 6450 Condition *Condition `type:"structure"` 6451 6452 // The event bus associated with the rule. If you omit this, the default event 6453 // bus is used. 6454 EventBusName *string `min:"1" type:"string"` 6455 6456 // The 12-digit AWS account ID that you are permitting to put events to your 6457 // default event bus. Specify "*" to permit any account to put events to your 6458 // default event bus. 6459 // 6460 // If you specify "*" without specifying Condition, avoid creating rules that 6461 // may match undesirable events. To create more secure rules, make sure that 6462 // the event pattern for each rule contains an account field with a specific 6463 // account ID from which to receive events. Rules with an account field do not 6464 // match any events sent from other accounts. 6465 // 6466 // Principal is a required field 6467 Principal *string `min:"1" type:"string" required:"true"` 6468 6469 // An identifier string for the external account that you are granting permissions 6470 // to. If you later want to revoke the permission for this external account, 6471 // specify this StatementId when you run RemovePermission. 6472 // 6473 // StatementId is a required field 6474 StatementId *string `min:"1" type:"string" required:"true"` 6475} 6476 6477// String returns the string representation 6478func (s PutPermissionInput) String() string { 6479 return awsutil.Prettify(s) 6480} 6481 6482// GoString returns the string representation 6483func (s PutPermissionInput) GoString() string { 6484 return s.String() 6485} 6486 6487// Validate inspects the fields of the type to determine if they are valid. 6488func (s *PutPermissionInput) Validate() error { 6489 invalidParams := request.ErrInvalidParams{Context: "PutPermissionInput"} 6490 if s.Action == nil { 6491 invalidParams.Add(request.NewErrParamRequired("Action")) 6492 } 6493 if s.Action != nil && len(*s.Action) < 1 { 6494 invalidParams.Add(request.NewErrParamMinLen("Action", 1)) 6495 } 6496 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6497 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6498 } 6499 if s.Principal == nil { 6500 invalidParams.Add(request.NewErrParamRequired("Principal")) 6501 } 6502 if s.Principal != nil && len(*s.Principal) < 1 { 6503 invalidParams.Add(request.NewErrParamMinLen("Principal", 1)) 6504 } 6505 if s.StatementId == nil { 6506 invalidParams.Add(request.NewErrParamRequired("StatementId")) 6507 } 6508 if s.StatementId != nil && len(*s.StatementId) < 1 { 6509 invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) 6510 } 6511 if s.Condition != nil { 6512 if err := s.Condition.Validate(); err != nil { 6513 invalidParams.AddNested("Condition", err.(request.ErrInvalidParams)) 6514 } 6515 } 6516 6517 if invalidParams.Len() > 0 { 6518 return invalidParams 6519 } 6520 return nil 6521} 6522 6523// SetAction sets the Action field's value. 6524func (s *PutPermissionInput) SetAction(v string) *PutPermissionInput { 6525 s.Action = &v 6526 return s 6527} 6528 6529// SetCondition sets the Condition field's value. 6530func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { 6531 s.Condition = v 6532 return s 6533} 6534 6535// SetEventBusName sets the EventBusName field's value. 6536func (s *PutPermissionInput) SetEventBusName(v string) *PutPermissionInput { 6537 s.EventBusName = &v 6538 return s 6539} 6540 6541// SetPrincipal sets the Principal field's value. 6542func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { 6543 s.Principal = &v 6544 return s 6545} 6546 6547// SetStatementId sets the StatementId field's value. 6548func (s *PutPermissionInput) SetStatementId(v string) *PutPermissionInput { 6549 s.StatementId = &v 6550 return s 6551} 6552 6553type PutPermissionOutput struct { 6554 _ struct{} `type:"structure"` 6555} 6556 6557// String returns the string representation 6558func (s PutPermissionOutput) String() string { 6559 return awsutil.Prettify(s) 6560} 6561 6562// GoString returns the string representation 6563func (s PutPermissionOutput) GoString() string { 6564 return s.String() 6565} 6566 6567type PutRuleInput struct { 6568 _ struct{} `type:"structure"` 6569 6570 // A description of the rule. 6571 Description *string `type:"string"` 6572 6573 // The event bus to associate with this rule. If you omit this, the default 6574 // event bus is used. 6575 EventBusName *string `min:"1" type:"string"` 6576 6577 // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) 6578 // in the Amazon EventBridge User Guide. 6579 EventPattern *string `type:"string"` 6580 6581 // The name of the rule that you are creating or updating. 6582 // 6583 // Name is a required field 6584 Name *string `min:"1" type:"string" required:"true"` 6585 6586 // The Amazon Resource Name (ARN) of the IAM role associated with the rule. 6587 RoleArn *string `min:"1" type:"string"` 6588 6589 // The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". 6590 ScheduleExpression *string `type:"string"` 6591 6592 // Indicates whether the rule is enabled or disabled. 6593 State *string `type:"string" enum:"RuleState"` 6594 6595 // The list of key-value pairs to associate with the rule. 6596 Tags []*Tag `type:"list"` 6597} 6598 6599// String returns the string representation 6600func (s PutRuleInput) String() string { 6601 return awsutil.Prettify(s) 6602} 6603 6604// GoString returns the string representation 6605func (s PutRuleInput) GoString() string { 6606 return s.String() 6607} 6608 6609// Validate inspects the fields of the type to determine if they are valid. 6610func (s *PutRuleInput) Validate() error { 6611 invalidParams := request.ErrInvalidParams{Context: "PutRuleInput"} 6612 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6613 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6614 } 6615 if s.Name == nil { 6616 invalidParams.Add(request.NewErrParamRequired("Name")) 6617 } 6618 if s.Name != nil && len(*s.Name) < 1 { 6619 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6620 } 6621 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 6622 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 6623 } 6624 if s.Tags != nil { 6625 for i, v := range s.Tags { 6626 if v == nil { 6627 continue 6628 } 6629 if err := v.Validate(); err != nil { 6630 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6631 } 6632 } 6633 } 6634 6635 if invalidParams.Len() > 0 { 6636 return invalidParams 6637 } 6638 return nil 6639} 6640 6641// SetDescription sets the Description field's value. 6642func (s *PutRuleInput) SetDescription(v string) *PutRuleInput { 6643 s.Description = &v 6644 return s 6645} 6646 6647// SetEventBusName sets the EventBusName field's value. 6648func (s *PutRuleInput) SetEventBusName(v string) *PutRuleInput { 6649 s.EventBusName = &v 6650 return s 6651} 6652 6653// SetEventPattern sets the EventPattern field's value. 6654func (s *PutRuleInput) SetEventPattern(v string) *PutRuleInput { 6655 s.EventPattern = &v 6656 return s 6657} 6658 6659// SetName sets the Name field's value. 6660func (s *PutRuleInput) SetName(v string) *PutRuleInput { 6661 s.Name = &v 6662 return s 6663} 6664 6665// SetRoleArn sets the RoleArn field's value. 6666func (s *PutRuleInput) SetRoleArn(v string) *PutRuleInput { 6667 s.RoleArn = &v 6668 return s 6669} 6670 6671// SetScheduleExpression sets the ScheduleExpression field's value. 6672func (s *PutRuleInput) SetScheduleExpression(v string) *PutRuleInput { 6673 s.ScheduleExpression = &v 6674 return s 6675} 6676 6677// SetState sets the State field's value. 6678func (s *PutRuleInput) SetState(v string) *PutRuleInput { 6679 s.State = &v 6680 return s 6681} 6682 6683// SetTags sets the Tags field's value. 6684func (s *PutRuleInput) SetTags(v []*Tag) *PutRuleInput { 6685 s.Tags = v 6686 return s 6687} 6688 6689type PutRuleOutput struct { 6690 _ struct{} `type:"structure"` 6691 6692 // The Amazon Resource Name (ARN) of the rule. 6693 RuleArn *string `min:"1" type:"string"` 6694} 6695 6696// String returns the string representation 6697func (s PutRuleOutput) String() string { 6698 return awsutil.Prettify(s) 6699} 6700 6701// GoString returns the string representation 6702func (s PutRuleOutput) GoString() string { 6703 return s.String() 6704} 6705 6706// SetRuleArn sets the RuleArn field's value. 6707func (s *PutRuleOutput) SetRuleArn(v string) *PutRuleOutput { 6708 s.RuleArn = &v 6709 return s 6710} 6711 6712type PutTargetsInput struct { 6713 _ struct{} `type:"structure"` 6714 6715 // The name of the event bus associated with the rule. If you omit this, the 6716 // default event bus is used. 6717 EventBusName *string `min:"1" type:"string"` 6718 6719 // The name of the rule. 6720 // 6721 // Rule is a required field 6722 Rule *string `min:"1" type:"string" required:"true"` 6723 6724 // The targets to update or add to the rule. 6725 // 6726 // Targets is a required field 6727 Targets []*Target `min:"1" type:"list" required:"true"` 6728} 6729 6730// String returns the string representation 6731func (s PutTargetsInput) String() string { 6732 return awsutil.Prettify(s) 6733} 6734 6735// GoString returns the string representation 6736func (s PutTargetsInput) GoString() string { 6737 return s.String() 6738} 6739 6740// Validate inspects the fields of the type to determine if they are valid. 6741func (s *PutTargetsInput) Validate() error { 6742 invalidParams := request.ErrInvalidParams{Context: "PutTargetsInput"} 6743 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6744 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6745 } 6746 if s.Rule == nil { 6747 invalidParams.Add(request.NewErrParamRequired("Rule")) 6748 } 6749 if s.Rule != nil && len(*s.Rule) < 1 { 6750 invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) 6751 } 6752 if s.Targets == nil { 6753 invalidParams.Add(request.NewErrParamRequired("Targets")) 6754 } 6755 if s.Targets != nil && len(s.Targets) < 1 { 6756 invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) 6757 } 6758 if s.Targets != nil { 6759 for i, v := range s.Targets { 6760 if v == nil { 6761 continue 6762 } 6763 if err := v.Validate(); err != nil { 6764 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) 6765 } 6766 } 6767 } 6768 6769 if invalidParams.Len() > 0 { 6770 return invalidParams 6771 } 6772 return nil 6773} 6774 6775// SetEventBusName sets the EventBusName field's value. 6776func (s *PutTargetsInput) SetEventBusName(v string) *PutTargetsInput { 6777 s.EventBusName = &v 6778 return s 6779} 6780 6781// SetRule sets the Rule field's value. 6782func (s *PutTargetsInput) SetRule(v string) *PutTargetsInput { 6783 s.Rule = &v 6784 return s 6785} 6786 6787// SetTargets sets the Targets field's value. 6788func (s *PutTargetsInput) SetTargets(v []*Target) *PutTargetsInput { 6789 s.Targets = v 6790 return s 6791} 6792 6793type PutTargetsOutput struct { 6794 _ struct{} `type:"structure"` 6795 6796 // The failed target entries. 6797 FailedEntries []*PutTargetsResultEntry `type:"list"` 6798 6799 // The number of failed entries. 6800 FailedEntryCount *int64 `type:"integer"` 6801} 6802 6803// String returns the string representation 6804func (s PutTargetsOutput) String() string { 6805 return awsutil.Prettify(s) 6806} 6807 6808// GoString returns the string representation 6809func (s PutTargetsOutput) GoString() string { 6810 return s.String() 6811} 6812 6813// SetFailedEntries sets the FailedEntries field's value. 6814func (s *PutTargetsOutput) SetFailedEntries(v []*PutTargetsResultEntry) *PutTargetsOutput { 6815 s.FailedEntries = v 6816 return s 6817} 6818 6819// SetFailedEntryCount sets the FailedEntryCount field's value. 6820func (s *PutTargetsOutput) SetFailedEntryCount(v int64) *PutTargetsOutput { 6821 s.FailedEntryCount = &v 6822 return s 6823} 6824 6825// Represents a target that failed to be added to a rule. 6826type PutTargetsResultEntry struct { 6827 _ struct{} `type:"structure"` 6828 6829 // The error code that indicates why the target addition failed. If the value 6830 // is ConcurrentModificationException, too many requests were made at the same 6831 // time. 6832 ErrorCode *string `type:"string"` 6833 6834 // The error message that explains why the target addition failed. 6835 ErrorMessage *string `type:"string"` 6836 6837 // The ID of the target. 6838 TargetId *string `min:"1" type:"string"` 6839} 6840 6841// String returns the string representation 6842func (s PutTargetsResultEntry) String() string { 6843 return awsutil.Prettify(s) 6844} 6845 6846// GoString returns the string representation 6847func (s PutTargetsResultEntry) GoString() string { 6848 return s.String() 6849} 6850 6851// SetErrorCode sets the ErrorCode field's value. 6852func (s *PutTargetsResultEntry) SetErrorCode(v string) *PutTargetsResultEntry { 6853 s.ErrorCode = &v 6854 return s 6855} 6856 6857// SetErrorMessage sets the ErrorMessage field's value. 6858func (s *PutTargetsResultEntry) SetErrorMessage(v string) *PutTargetsResultEntry { 6859 s.ErrorMessage = &v 6860 return s 6861} 6862 6863// SetTargetId sets the TargetId field's value. 6864func (s *PutTargetsResultEntry) SetTargetId(v string) *PutTargetsResultEntry { 6865 s.TargetId = &v 6866 return s 6867} 6868 6869type RemovePermissionInput struct { 6870 _ struct{} `type:"structure"` 6871 6872 // The name of the event bus to revoke permissions for. If you omit this, the 6873 // default event bus is used. 6874 EventBusName *string `min:"1" type:"string"` 6875 6876 // The statement ID corresponding to the account that is no longer allowed to 6877 // put events to the default event bus. 6878 // 6879 // StatementId is a required field 6880 StatementId *string `min:"1" type:"string" required:"true"` 6881} 6882 6883// String returns the string representation 6884func (s RemovePermissionInput) String() string { 6885 return awsutil.Prettify(s) 6886} 6887 6888// GoString returns the string representation 6889func (s RemovePermissionInput) GoString() string { 6890 return s.String() 6891} 6892 6893// Validate inspects the fields of the type to determine if they are valid. 6894func (s *RemovePermissionInput) Validate() error { 6895 invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} 6896 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6897 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6898 } 6899 if s.StatementId == nil { 6900 invalidParams.Add(request.NewErrParamRequired("StatementId")) 6901 } 6902 if s.StatementId != nil && len(*s.StatementId) < 1 { 6903 invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) 6904 } 6905 6906 if invalidParams.Len() > 0 { 6907 return invalidParams 6908 } 6909 return nil 6910} 6911 6912// SetEventBusName sets the EventBusName field's value. 6913func (s *RemovePermissionInput) SetEventBusName(v string) *RemovePermissionInput { 6914 s.EventBusName = &v 6915 return s 6916} 6917 6918// SetStatementId sets the StatementId field's value. 6919func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput { 6920 s.StatementId = &v 6921 return s 6922} 6923 6924type RemovePermissionOutput struct { 6925 _ struct{} `type:"structure"` 6926} 6927 6928// String returns the string representation 6929func (s RemovePermissionOutput) String() string { 6930 return awsutil.Prettify(s) 6931} 6932 6933// GoString returns the string representation 6934func (s RemovePermissionOutput) GoString() string { 6935 return s.String() 6936} 6937 6938type RemoveTargetsInput struct { 6939 _ struct{} `type:"structure"` 6940 6941 // The name of the event bus associated with the rule. 6942 EventBusName *string `min:"1" type:"string"` 6943 6944 // If this is a managed rule, created by an AWS service on your behalf, you 6945 // must specify Force as True to remove targets. This parameter is ignored for 6946 // rules that are not managed rules. You can check whether a rule is a managed 6947 // rule by using DescribeRule or ListRules and checking the ManagedBy field 6948 // of the response. 6949 Force *bool `type:"boolean"` 6950 6951 // The IDs of the targets to remove from the rule. 6952 // 6953 // Ids is a required field 6954 Ids []*string `min:"1" type:"list" required:"true"` 6955 6956 // The name of the rule. 6957 // 6958 // Rule is a required field 6959 Rule *string `min:"1" type:"string" required:"true"` 6960} 6961 6962// String returns the string representation 6963func (s RemoveTargetsInput) String() string { 6964 return awsutil.Prettify(s) 6965} 6966 6967// GoString returns the string representation 6968func (s RemoveTargetsInput) GoString() string { 6969 return s.String() 6970} 6971 6972// Validate inspects the fields of the type to determine if they are valid. 6973func (s *RemoveTargetsInput) Validate() error { 6974 invalidParams := request.ErrInvalidParams{Context: "RemoveTargetsInput"} 6975 if s.EventBusName != nil && len(*s.EventBusName) < 1 { 6976 invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) 6977 } 6978 if s.Ids == nil { 6979 invalidParams.Add(request.NewErrParamRequired("Ids")) 6980 } 6981 if s.Ids != nil && len(s.Ids) < 1 { 6982 invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) 6983 } 6984 if s.Rule == nil { 6985 invalidParams.Add(request.NewErrParamRequired("Rule")) 6986 } 6987 if s.Rule != nil && len(*s.Rule) < 1 { 6988 invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) 6989 } 6990 6991 if invalidParams.Len() > 0 { 6992 return invalidParams 6993 } 6994 return nil 6995} 6996 6997// SetEventBusName sets the EventBusName field's value. 6998func (s *RemoveTargetsInput) SetEventBusName(v string) *RemoveTargetsInput { 6999 s.EventBusName = &v 7000 return s 7001} 7002 7003// SetForce sets the Force field's value. 7004func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput { 7005 s.Force = &v 7006 return s 7007} 7008 7009// SetIds sets the Ids field's value. 7010func (s *RemoveTargetsInput) SetIds(v []*string) *RemoveTargetsInput { 7011 s.Ids = v 7012 return s 7013} 7014 7015// SetRule sets the Rule field's value. 7016func (s *RemoveTargetsInput) SetRule(v string) *RemoveTargetsInput { 7017 s.Rule = &v 7018 return s 7019} 7020 7021type RemoveTargetsOutput struct { 7022 _ struct{} `type:"structure"` 7023 7024 // The failed target entries. 7025 FailedEntries []*RemoveTargetsResultEntry `type:"list"` 7026 7027 // The number of failed entries. 7028 FailedEntryCount *int64 `type:"integer"` 7029} 7030 7031// String returns the string representation 7032func (s RemoveTargetsOutput) String() string { 7033 return awsutil.Prettify(s) 7034} 7035 7036// GoString returns the string representation 7037func (s RemoveTargetsOutput) GoString() string { 7038 return s.String() 7039} 7040 7041// SetFailedEntries sets the FailedEntries field's value. 7042func (s *RemoveTargetsOutput) SetFailedEntries(v []*RemoveTargetsResultEntry) *RemoveTargetsOutput { 7043 s.FailedEntries = v 7044 return s 7045} 7046 7047// SetFailedEntryCount sets the FailedEntryCount field's value. 7048func (s *RemoveTargetsOutput) SetFailedEntryCount(v int64) *RemoveTargetsOutput { 7049 s.FailedEntryCount = &v 7050 return s 7051} 7052 7053// Represents a target that failed to be removed from a rule. 7054type RemoveTargetsResultEntry struct { 7055 _ struct{} `type:"structure"` 7056 7057 // The error code that indicates why the target removal failed. If the value 7058 // is ConcurrentModificationException, too many requests were made at the same 7059 // time. 7060 ErrorCode *string `type:"string"` 7061 7062 // The error message that explains why the target removal failed. 7063 ErrorMessage *string `type:"string"` 7064 7065 // The ID of the target. 7066 TargetId *string `min:"1" type:"string"` 7067} 7068 7069// String returns the string representation 7070func (s RemoveTargetsResultEntry) String() string { 7071 return awsutil.Prettify(s) 7072} 7073 7074// GoString returns the string representation 7075func (s RemoveTargetsResultEntry) GoString() string { 7076 return s.String() 7077} 7078 7079// SetErrorCode sets the ErrorCode field's value. 7080func (s *RemoveTargetsResultEntry) SetErrorCode(v string) *RemoveTargetsResultEntry { 7081 s.ErrorCode = &v 7082 return s 7083} 7084 7085// SetErrorMessage sets the ErrorMessage field's value. 7086func (s *RemoveTargetsResultEntry) SetErrorMessage(v string) *RemoveTargetsResultEntry { 7087 s.ErrorMessage = &v 7088 return s 7089} 7090 7091// SetTargetId sets the TargetId field's value. 7092func (s *RemoveTargetsResultEntry) SetTargetId(v string) *RemoveTargetsResultEntry { 7093 s.TargetId = &v 7094 return s 7095} 7096 7097// The resource you are trying to create already exists. 7098type ResourceAlreadyExistsException struct { 7099 _ struct{} `type:"structure"` 7100 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7101 7102 Message_ *string `locationName:"message" type:"string"` 7103} 7104 7105// String returns the string representation 7106func (s ResourceAlreadyExistsException) String() string { 7107 return awsutil.Prettify(s) 7108} 7109 7110// GoString returns the string representation 7111func (s ResourceAlreadyExistsException) GoString() string { 7112 return s.String() 7113} 7114 7115func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 7116 return &ResourceAlreadyExistsException{ 7117 RespMetadata: v, 7118 } 7119} 7120 7121// Code returns the exception type name. 7122func (s *ResourceAlreadyExistsException) Code() string { 7123 return "ResourceAlreadyExistsException" 7124} 7125 7126// Message returns the exception's message. 7127func (s *ResourceAlreadyExistsException) Message() string { 7128 if s.Message_ != nil { 7129 return *s.Message_ 7130 } 7131 return "" 7132} 7133 7134// OrigErr always returns nil, satisfies awserr.Error interface. 7135func (s *ResourceAlreadyExistsException) OrigErr() error { 7136 return nil 7137} 7138 7139func (s *ResourceAlreadyExistsException) Error() string { 7140 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7141} 7142 7143// Status code returns the HTTP status code for the request's response error. 7144func (s *ResourceAlreadyExistsException) StatusCode() int { 7145 return s.RespMetadata.StatusCode 7146} 7147 7148// RequestID returns the service's response RequestID for request. 7149func (s *ResourceAlreadyExistsException) RequestID() string { 7150 return s.RespMetadata.RequestID 7151} 7152 7153// An entity that you specified does not exist. 7154type ResourceNotFoundException struct { 7155 _ struct{} `type:"structure"` 7156 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7157 7158 Message_ *string `locationName:"message" type:"string"` 7159} 7160 7161// String returns the string representation 7162func (s ResourceNotFoundException) String() string { 7163 return awsutil.Prettify(s) 7164} 7165 7166// GoString returns the string representation 7167func (s ResourceNotFoundException) GoString() string { 7168 return s.String() 7169} 7170 7171func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 7172 return &ResourceNotFoundException{ 7173 RespMetadata: v, 7174 } 7175} 7176 7177// Code returns the exception type name. 7178func (s *ResourceNotFoundException) Code() string { 7179 return "ResourceNotFoundException" 7180} 7181 7182// Message returns the exception's message. 7183func (s *ResourceNotFoundException) Message() string { 7184 if s.Message_ != nil { 7185 return *s.Message_ 7186 } 7187 return "" 7188} 7189 7190// OrigErr always returns nil, satisfies awserr.Error interface. 7191func (s *ResourceNotFoundException) OrigErr() error { 7192 return nil 7193} 7194 7195func (s *ResourceNotFoundException) Error() string { 7196 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7197} 7198 7199// Status code returns the HTTP status code for the request's response error. 7200func (s *ResourceNotFoundException) StatusCode() int { 7201 return s.RespMetadata.StatusCode 7202} 7203 7204// RequestID returns the service's response RequestID for request. 7205func (s *ResourceNotFoundException) RequestID() string { 7206 return s.RespMetadata.RequestID 7207} 7208 7209// Contains information about a rule in Amazon EventBridge. 7210type Rule struct { 7211 _ struct{} `type:"structure"` 7212 7213 // The Amazon Resource Name (ARN) of the rule. 7214 Arn *string `min:"1" type:"string"` 7215 7216 // The description of the rule. 7217 Description *string `type:"string"` 7218 7219 // The event bus associated with the rule. 7220 EventBusName *string `min:"1" type:"string"` 7221 7222 // The event pattern of the rule. For more information, see Events and Event 7223 // Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) 7224 // in the Amazon EventBridge User Guide. 7225 EventPattern *string `type:"string"` 7226 7227 // If the rule was created on behalf of your account by an AWS service, this 7228 // field displays the principal name of the service that created the rule. 7229 ManagedBy *string `min:"1" type:"string"` 7230 7231 // The name of the rule. 7232 Name *string `min:"1" type:"string"` 7233 7234 // The Amazon Resource Name (ARN) of the role that is used for target invocation. 7235 RoleArn *string `min:"1" type:"string"` 7236 7237 // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". 7238 ScheduleExpression *string `type:"string"` 7239 7240 // The state of the rule. 7241 State *string `type:"string" enum:"RuleState"` 7242} 7243 7244// String returns the string representation 7245func (s Rule) String() string { 7246 return awsutil.Prettify(s) 7247} 7248 7249// GoString returns the string representation 7250func (s Rule) GoString() string { 7251 return s.String() 7252} 7253 7254// SetArn sets the Arn field's value. 7255func (s *Rule) SetArn(v string) *Rule { 7256 s.Arn = &v 7257 return s 7258} 7259 7260// SetDescription sets the Description field's value. 7261func (s *Rule) SetDescription(v string) *Rule { 7262 s.Description = &v 7263 return s 7264} 7265 7266// SetEventBusName sets the EventBusName field's value. 7267func (s *Rule) SetEventBusName(v string) *Rule { 7268 s.EventBusName = &v 7269 return s 7270} 7271 7272// SetEventPattern sets the EventPattern field's value. 7273func (s *Rule) SetEventPattern(v string) *Rule { 7274 s.EventPattern = &v 7275 return s 7276} 7277 7278// SetManagedBy sets the ManagedBy field's value. 7279func (s *Rule) SetManagedBy(v string) *Rule { 7280 s.ManagedBy = &v 7281 return s 7282} 7283 7284// SetName sets the Name field's value. 7285func (s *Rule) SetName(v string) *Rule { 7286 s.Name = &v 7287 return s 7288} 7289 7290// SetRoleArn sets the RoleArn field's value. 7291func (s *Rule) SetRoleArn(v string) *Rule { 7292 s.RoleArn = &v 7293 return s 7294} 7295 7296// SetScheduleExpression sets the ScheduleExpression field's value. 7297func (s *Rule) SetScheduleExpression(v string) *Rule { 7298 s.ScheduleExpression = &v 7299 return s 7300} 7301 7302// SetState sets the State field's value. 7303func (s *Rule) SetState(v string) *Rule { 7304 s.State = &v 7305 return s 7306} 7307 7308// This parameter contains the criteria (either InstanceIds or a tag) used to 7309// specify which EC2 instances are to be sent the command. 7310type RunCommandParameters struct { 7311 _ struct{} `type:"structure"` 7312 7313 // Currently, we support including only one RunCommandTarget block, which specifies 7314 // either an array of InstanceIds or a tag. 7315 // 7316 // RunCommandTargets is a required field 7317 RunCommandTargets []*RunCommandTarget `min:"1" type:"list" required:"true"` 7318} 7319 7320// String returns the string representation 7321func (s RunCommandParameters) String() string { 7322 return awsutil.Prettify(s) 7323} 7324 7325// GoString returns the string representation 7326func (s RunCommandParameters) GoString() string { 7327 return s.String() 7328} 7329 7330// Validate inspects the fields of the type to determine if they are valid. 7331func (s *RunCommandParameters) Validate() error { 7332 invalidParams := request.ErrInvalidParams{Context: "RunCommandParameters"} 7333 if s.RunCommandTargets == nil { 7334 invalidParams.Add(request.NewErrParamRequired("RunCommandTargets")) 7335 } 7336 if s.RunCommandTargets != nil && len(s.RunCommandTargets) < 1 { 7337 invalidParams.Add(request.NewErrParamMinLen("RunCommandTargets", 1)) 7338 } 7339 if s.RunCommandTargets != nil { 7340 for i, v := range s.RunCommandTargets { 7341 if v == nil { 7342 continue 7343 } 7344 if err := v.Validate(); err != nil { 7345 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RunCommandTargets", i), err.(request.ErrInvalidParams)) 7346 } 7347 } 7348 } 7349 7350 if invalidParams.Len() > 0 { 7351 return invalidParams 7352 } 7353 return nil 7354} 7355 7356// SetRunCommandTargets sets the RunCommandTargets field's value. 7357func (s *RunCommandParameters) SetRunCommandTargets(v []*RunCommandTarget) *RunCommandParameters { 7358 s.RunCommandTargets = v 7359 return s 7360} 7361 7362// Information about the EC2 instances that are to be sent the command, specified 7363// as key-value pairs. Each RunCommandTarget block can include only one key, 7364// but this key may specify multiple values. 7365type RunCommandTarget struct { 7366 _ struct{} `type:"structure"` 7367 7368 // Can be either tag: tag-key or InstanceIds. 7369 // 7370 // Key is a required field 7371 Key *string `min:"1" type:"string" required:"true"` 7372 7373 // If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, 7374 // Values is a list of Amazon EC2 instance IDs. 7375 // 7376 // Values is a required field 7377 Values []*string `min:"1" type:"list" required:"true"` 7378} 7379 7380// String returns the string representation 7381func (s RunCommandTarget) String() string { 7382 return awsutil.Prettify(s) 7383} 7384 7385// GoString returns the string representation 7386func (s RunCommandTarget) GoString() string { 7387 return s.String() 7388} 7389 7390// Validate inspects the fields of the type to determine if they are valid. 7391func (s *RunCommandTarget) Validate() error { 7392 invalidParams := request.ErrInvalidParams{Context: "RunCommandTarget"} 7393 if s.Key == nil { 7394 invalidParams.Add(request.NewErrParamRequired("Key")) 7395 } 7396 if s.Key != nil && len(*s.Key) < 1 { 7397 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 7398 } 7399 if s.Values == nil { 7400 invalidParams.Add(request.NewErrParamRequired("Values")) 7401 } 7402 if s.Values != nil && len(s.Values) < 1 { 7403 invalidParams.Add(request.NewErrParamMinLen("Values", 1)) 7404 } 7405 7406 if invalidParams.Len() > 0 { 7407 return invalidParams 7408 } 7409 return nil 7410} 7411 7412// SetKey sets the Key field's value. 7413func (s *RunCommandTarget) SetKey(v string) *RunCommandTarget { 7414 s.Key = &v 7415 return s 7416} 7417 7418// SetValues sets the Values field's value. 7419func (s *RunCommandTarget) SetValues(v []*string) *RunCommandTarget { 7420 s.Values = v 7421 return s 7422} 7423 7424// This structure includes the custom parameter to be used when the target is 7425// an SQS FIFO queue. 7426type SqsParameters struct { 7427 _ struct{} `type:"structure"` 7428 7429 // The FIFO message group ID to use as the target. 7430 MessageGroupId *string `type:"string"` 7431} 7432 7433// String returns the string representation 7434func (s SqsParameters) String() string { 7435 return awsutil.Prettify(s) 7436} 7437 7438// GoString returns the string representation 7439func (s SqsParameters) GoString() string { 7440 return s.String() 7441} 7442 7443// SetMessageGroupId sets the MessageGroupId field's value. 7444func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { 7445 s.MessageGroupId = &v 7446 return s 7447} 7448 7449// A key-value pair associated with an AWS resource. In EventBridge, rules and 7450// event buses support tagging. 7451type Tag struct { 7452 _ struct{} `type:"structure"` 7453 7454 // A string you can use to assign a value. The combination of tag keys and values 7455 // can help you organize and categorize your resources. 7456 // 7457 // Key is a required field 7458 Key *string `min:"1" type:"string" required:"true"` 7459 7460 // The value for the specified tag key. 7461 // 7462 // Value is a required field 7463 Value *string `type:"string" required:"true"` 7464} 7465 7466// String returns the string representation 7467func (s Tag) String() string { 7468 return awsutil.Prettify(s) 7469} 7470 7471// GoString returns the string representation 7472func (s Tag) GoString() string { 7473 return s.String() 7474} 7475 7476// Validate inspects the fields of the type to determine if they are valid. 7477func (s *Tag) Validate() error { 7478 invalidParams := request.ErrInvalidParams{Context: "Tag"} 7479 if s.Key == nil { 7480 invalidParams.Add(request.NewErrParamRequired("Key")) 7481 } 7482 if s.Key != nil && len(*s.Key) < 1 { 7483 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 7484 } 7485 if s.Value == nil { 7486 invalidParams.Add(request.NewErrParamRequired("Value")) 7487 } 7488 7489 if invalidParams.Len() > 0 { 7490 return invalidParams 7491 } 7492 return nil 7493} 7494 7495// SetKey sets the Key field's value. 7496func (s *Tag) SetKey(v string) *Tag { 7497 s.Key = &v 7498 return s 7499} 7500 7501// SetValue sets the Value field's value. 7502func (s *Tag) SetValue(v string) *Tag { 7503 s.Value = &v 7504 return s 7505} 7506 7507type TagResourceInput struct { 7508 _ struct{} `type:"structure"` 7509 7510 // The ARN of the EventBridge resource that you're adding tags to. 7511 // 7512 // ResourceARN is a required field 7513 ResourceARN *string `min:"1" type:"string" required:"true"` 7514 7515 // The list of key-value pairs to associate with the resource. 7516 // 7517 // Tags is a required field 7518 Tags []*Tag `type:"list" required:"true"` 7519} 7520 7521// String returns the string representation 7522func (s TagResourceInput) String() string { 7523 return awsutil.Prettify(s) 7524} 7525 7526// GoString returns the string representation 7527func (s TagResourceInput) GoString() string { 7528 return s.String() 7529} 7530 7531// Validate inspects the fields of the type to determine if they are valid. 7532func (s *TagResourceInput) Validate() error { 7533 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 7534 if s.ResourceARN == nil { 7535 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 7536 } 7537 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 7538 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 7539 } 7540 if s.Tags == nil { 7541 invalidParams.Add(request.NewErrParamRequired("Tags")) 7542 } 7543 if s.Tags != nil { 7544 for i, v := range s.Tags { 7545 if v == nil { 7546 continue 7547 } 7548 if err := v.Validate(); err != nil { 7549 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 7550 } 7551 } 7552 } 7553 7554 if invalidParams.Len() > 0 { 7555 return invalidParams 7556 } 7557 return nil 7558} 7559 7560// SetResourceARN sets the ResourceARN field's value. 7561func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 7562 s.ResourceARN = &v 7563 return s 7564} 7565 7566// SetTags sets the Tags field's value. 7567func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 7568 s.Tags = v 7569 return s 7570} 7571 7572type TagResourceOutput struct { 7573 _ struct{} `type:"structure"` 7574} 7575 7576// String returns the string representation 7577func (s TagResourceOutput) String() string { 7578 return awsutil.Prettify(s) 7579} 7580 7581// GoString returns the string representation 7582func (s TagResourceOutput) GoString() string { 7583 return s.String() 7584} 7585 7586// Targets are the resources to be invoked when a rule is triggered. For a complete 7587// list of services and resources that can be set as a target, see PutTargets. 7588// 7589// If you are setting the event bus of another account as the target, and that 7590// account granted permission to your account through an organization instead 7591// of directly by the account ID, then you must specify a RoleArn with proper 7592// permissions in the Target structure. For more information, see Sending and 7593// Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) 7594// in the Amazon EventBridge User Guide. 7595type Target struct { 7596 _ struct{} `type:"structure"` 7597 7598 // The Amazon Resource Name (ARN) of the target. 7599 // 7600 // Arn is a required field 7601 Arn *string `min:"1" type:"string" required:"true"` 7602 7603 // If the event target is an AWS Batch job, this contains the job definition, 7604 // job name, and other parameters. For more information, see Jobs (https://docs.aws.amazon.com/batch/latest/userguide/jobs.html) 7605 // in the AWS Batch User Guide. 7606 BatchParameters *BatchParameters `type:"structure"` 7607 7608 // Contains the Amazon ECS task definition and task count to be used, if the 7609 // event target is an Amazon ECS task. For more information about Amazon ECS 7610 // tasks, see Task Definitions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) 7611 // in the Amazon EC2 Container Service Developer Guide. 7612 EcsParameters *EcsParameters `type:"structure"` 7613 7614 // The ID of the target. 7615 // 7616 // Id is a required field 7617 Id *string `min:"1" type:"string" required:"true"` 7618 7619 // Valid JSON text passed to the target. In this case, nothing from the event 7620 // itself is passed to the target. For more information, see The JavaScript 7621 // Object Notation (JSON) Data Interchange Format (http://www.rfc-editor.org/rfc/rfc7159.txt). 7622 Input *string `type:"string"` 7623 7624 // The value of the JSONPath that is used for extracting part of the matched 7625 // event when passing it to the target. You must use JSON dot notation, not 7626 // bracket notation. For more information about JSON paths, see JSONPath (http://goessner.net/articles/JsonPath/). 7627 InputPath *string `type:"string"` 7628 7629 // Settings to enable you to provide custom input to a target based on certain 7630 // event data. You can extract one or more key-value pairs from the event and 7631 // then use that data to send customized input to the target. 7632 InputTransformer *InputTransformer `type:"structure"` 7633 7634 // The custom parameter you can use to control the shard assignment, when the 7635 // target is a Kinesis data stream. If you do not include this parameter, the 7636 // default is to use the eventId as the partition key. 7637 KinesisParameters *KinesisParameters `type:"structure"` 7638 7639 // The Amazon Resource Name (ARN) of the IAM role to be used for this target 7640 // when the rule is triggered. If one rule triggers multiple targets, you can 7641 // use a different IAM role for each target. 7642 RoleArn *string `min:"1" type:"string"` 7643 7644 // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. 7645 RunCommandParameters *RunCommandParameters `type:"structure"` 7646 7647 // Contains the message group ID to use when the target is a FIFO queue. 7648 // 7649 // If you specify an SQS FIFO queue as a target, the queue must have content-based 7650 // deduplication enabled. 7651 SqsParameters *SqsParameters `type:"structure"` 7652} 7653 7654// String returns the string representation 7655func (s Target) String() string { 7656 return awsutil.Prettify(s) 7657} 7658 7659// GoString returns the string representation 7660func (s Target) GoString() string { 7661 return s.String() 7662} 7663 7664// Validate inspects the fields of the type to determine if they are valid. 7665func (s *Target) Validate() error { 7666 invalidParams := request.ErrInvalidParams{Context: "Target"} 7667 if s.Arn == nil { 7668 invalidParams.Add(request.NewErrParamRequired("Arn")) 7669 } 7670 if s.Arn != nil && len(*s.Arn) < 1 { 7671 invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) 7672 } 7673 if s.Id == nil { 7674 invalidParams.Add(request.NewErrParamRequired("Id")) 7675 } 7676 if s.Id != nil && len(*s.Id) < 1 { 7677 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 7678 } 7679 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 7680 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 7681 } 7682 if s.BatchParameters != nil { 7683 if err := s.BatchParameters.Validate(); err != nil { 7684 invalidParams.AddNested("BatchParameters", err.(request.ErrInvalidParams)) 7685 } 7686 } 7687 if s.EcsParameters != nil { 7688 if err := s.EcsParameters.Validate(); err != nil { 7689 invalidParams.AddNested("EcsParameters", err.(request.ErrInvalidParams)) 7690 } 7691 } 7692 if s.InputTransformer != nil { 7693 if err := s.InputTransformer.Validate(); err != nil { 7694 invalidParams.AddNested("InputTransformer", err.(request.ErrInvalidParams)) 7695 } 7696 } 7697 if s.KinesisParameters != nil { 7698 if err := s.KinesisParameters.Validate(); err != nil { 7699 invalidParams.AddNested("KinesisParameters", err.(request.ErrInvalidParams)) 7700 } 7701 } 7702 if s.RunCommandParameters != nil { 7703 if err := s.RunCommandParameters.Validate(); err != nil { 7704 invalidParams.AddNested("RunCommandParameters", err.(request.ErrInvalidParams)) 7705 } 7706 } 7707 7708 if invalidParams.Len() > 0 { 7709 return invalidParams 7710 } 7711 return nil 7712} 7713 7714// SetArn sets the Arn field's value. 7715func (s *Target) SetArn(v string) *Target { 7716 s.Arn = &v 7717 return s 7718} 7719 7720// SetBatchParameters sets the BatchParameters field's value. 7721func (s *Target) SetBatchParameters(v *BatchParameters) *Target { 7722 s.BatchParameters = v 7723 return s 7724} 7725 7726// SetEcsParameters sets the EcsParameters field's value. 7727func (s *Target) SetEcsParameters(v *EcsParameters) *Target { 7728 s.EcsParameters = v 7729 return s 7730} 7731 7732// SetId sets the Id field's value. 7733func (s *Target) SetId(v string) *Target { 7734 s.Id = &v 7735 return s 7736} 7737 7738// SetInput sets the Input field's value. 7739func (s *Target) SetInput(v string) *Target { 7740 s.Input = &v 7741 return s 7742} 7743 7744// SetInputPath sets the InputPath field's value. 7745func (s *Target) SetInputPath(v string) *Target { 7746 s.InputPath = &v 7747 return s 7748} 7749 7750// SetInputTransformer sets the InputTransformer field's value. 7751func (s *Target) SetInputTransformer(v *InputTransformer) *Target { 7752 s.InputTransformer = v 7753 return s 7754} 7755 7756// SetKinesisParameters sets the KinesisParameters field's value. 7757func (s *Target) SetKinesisParameters(v *KinesisParameters) *Target { 7758 s.KinesisParameters = v 7759 return s 7760} 7761 7762// SetRoleArn sets the RoleArn field's value. 7763func (s *Target) SetRoleArn(v string) *Target { 7764 s.RoleArn = &v 7765 return s 7766} 7767 7768// SetRunCommandParameters sets the RunCommandParameters field's value. 7769func (s *Target) SetRunCommandParameters(v *RunCommandParameters) *Target { 7770 s.RunCommandParameters = v 7771 return s 7772} 7773 7774// SetSqsParameters sets the SqsParameters field's value. 7775func (s *Target) SetSqsParameters(v *SqsParameters) *Target { 7776 s.SqsParameters = v 7777 return s 7778} 7779 7780type TestEventPatternInput struct { 7781 _ struct{} `type:"structure"` 7782 7783 // The event, in JSON format, to test against the event pattern. 7784 // 7785 // Event is a required field 7786 Event *string `type:"string" required:"true"` 7787 7788 // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) 7789 // in the Amazon EventBridge User Guide. 7790 // 7791 // EventPattern is a required field 7792 EventPattern *string `type:"string" required:"true"` 7793} 7794 7795// String returns the string representation 7796func (s TestEventPatternInput) String() string { 7797 return awsutil.Prettify(s) 7798} 7799 7800// GoString returns the string representation 7801func (s TestEventPatternInput) GoString() string { 7802 return s.String() 7803} 7804 7805// Validate inspects the fields of the type to determine if they are valid. 7806func (s *TestEventPatternInput) Validate() error { 7807 invalidParams := request.ErrInvalidParams{Context: "TestEventPatternInput"} 7808 if s.Event == nil { 7809 invalidParams.Add(request.NewErrParamRequired("Event")) 7810 } 7811 if s.EventPattern == nil { 7812 invalidParams.Add(request.NewErrParamRequired("EventPattern")) 7813 } 7814 7815 if invalidParams.Len() > 0 { 7816 return invalidParams 7817 } 7818 return nil 7819} 7820 7821// SetEvent sets the Event field's value. 7822func (s *TestEventPatternInput) SetEvent(v string) *TestEventPatternInput { 7823 s.Event = &v 7824 return s 7825} 7826 7827// SetEventPattern sets the EventPattern field's value. 7828func (s *TestEventPatternInput) SetEventPattern(v string) *TestEventPatternInput { 7829 s.EventPattern = &v 7830 return s 7831} 7832 7833type TestEventPatternOutput struct { 7834 _ struct{} `type:"structure"` 7835 7836 // Indicates whether the event matches the event pattern. 7837 Result *bool `type:"boolean"` 7838} 7839 7840// String returns the string representation 7841func (s TestEventPatternOutput) String() string { 7842 return awsutil.Prettify(s) 7843} 7844 7845// GoString returns the string representation 7846func (s TestEventPatternOutput) GoString() string { 7847 return s.String() 7848} 7849 7850// SetResult sets the Result field's value. 7851func (s *TestEventPatternOutput) SetResult(v bool) *TestEventPatternOutput { 7852 s.Result = &v 7853 return s 7854} 7855 7856type UntagResourceInput struct { 7857 _ struct{} `type:"structure"` 7858 7859 // The ARN of the EventBridge resource from which you are removing tags. 7860 // 7861 // ResourceARN is a required field 7862 ResourceARN *string `min:"1" type:"string" required:"true"` 7863 7864 // The list of tag keys to remove from the resource. 7865 // 7866 // TagKeys is a required field 7867 TagKeys []*string `type:"list" required:"true"` 7868} 7869 7870// String returns the string representation 7871func (s UntagResourceInput) String() string { 7872 return awsutil.Prettify(s) 7873} 7874 7875// GoString returns the string representation 7876func (s UntagResourceInput) GoString() string { 7877 return s.String() 7878} 7879 7880// Validate inspects the fields of the type to determine if they are valid. 7881func (s *UntagResourceInput) Validate() error { 7882 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 7883 if s.ResourceARN == nil { 7884 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 7885 } 7886 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 7887 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 7888 } 7889 if s.TagKeys == nil { 7890 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 7891 } 7892 7893 if invalidParams.Len() > 0 { 7894 return invalidParams 7895 } 7896 return nil 7897} 7898 7899// SetResourceARN sets the ResourceARN field's value. 7900func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 7901 s.ResourceARN = &v 7902 return s 7903} 7904 7905// SetTagKeys sets the TagKeys field's value. 7906func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 7907 s.TagKeys = v 7908 return s 7909} 7910 7911type UntagResourceOutput struct { 7912 _ struct{} `type:"structure"` 7913} 7914 7915// String returns the string representation 7916func (s UntagResourceOutput) String() string { 7917 return awsutil.Prettify(s) 7918} 7919 7920// GoString returns the string representation 7921func (s UntagResourceOutput) GoString() string { 7922 return s.String() 7923} 7924 7925const ( 7926 // AssignPublicIpEnabled is a AssignPublicIp enum value 7927 AssignPublicIpEnabled = "ENABLED" 7928 7929 // AssignPublicIpDisabled is a AssignPublicIp enum value 7930 AssignPublicIpDisabled = "DISABLED" 7931) 7932 7933const ( 7934 // EventSourceStatePending is a EventSourceState enum value 7935 EventSourceStatePending = "PENDING" 7936 7937 // EventSourceStateActive is a EventSourceState enum value 7938 EventSourceStateActive = "ACTIVE" 7939 7940 // EventSourceStateDeleted is a EventSourceState enum value 7941 EventSourceStateDeleted = "DELETED" 7942) 7943 7944const ( 7945 // LaunchTypeEc2 is a LaunchType enum value 7946 LaunchTypeEc2 = "EC2" 7947 7948 // LaunchTypeFargate is a LaunchType enum value 7949 LaunchTypeFargate = "FARGATE" 7950) 7951 7952const ( 7953 // RuleStateEnabled is a RuleState enum value 7954 RuleStateEnabled = "ENABLED" 7955 7956 // RuleStateDisabled is a RuleState enum value 7957 RuleStateDisabled = "DISABLED" 7958) 7959