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