1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// An Archive object that contains details about an archive. 10type Archive struct { 11 12 // The name of the archive. 13 ArchiveName *string 14 15 // The time stamp for the time that the archive was created. 16 CreationTime *time.Time 17 18 // The number of events in the archive. 19 EventCount int64 20 21 // The ARN of the event bus associated with the archive. Only events from this 22 // event bus are sent to the archive. 23 EventSourceArn *string 24 25 // The number of days to retain events in the archive before they are deleted. 26 RetentionDays *int32 27 28 // The size of the archive, in bytes. 29 SizeBytes int64 30 31 // The current state of the archive. 32 State ArchiveState 33 34 // A description for the reason that the archive is in the current state. 35 StateReason *string 36} 37 38// This structure specifies the VPC subnets and security groups for the task, and 39// whether a public IP address is to be used. This structure is relevant only for 40// ECS tasks that use the awsvpc network mode. 41type AwsVpcConfiguration struct { 42 43 // Specifies the subnets associated with the task. These subnets must all be in the 44 // same VPC. You can specify as many as 16 subnets. 45 // 46 // This member is required. 47 Subnets []string 48 49 // Specifies whether the task's elastic network interface receives a public IP 50 // address. You can specify ENABLED only when LaunchType in EcsParameters is set to 51 // FARGATE. 52 AssignPublicIp AssignPublicIp 53 54 // Specifies the security groups associated with the task. These security groups 55 // must all be in the same VPC. You can specify as many as five security groups. If 56 // you do not specify a security group, the default security group for the VPC is 57 // used. 58 SecurityGroups []string 59} 60 61// The array properties for the submitted job, such as the size of the array. The 62// array size can be between 2 and 10,000. If you specify array properties for a 63// job, it becomes an array job. This parameter is used only if the target is an 64// AWS Batch job. 65type BatchArrayProperties struct { 66 67 // The size of the array, if this is an array batch job. Valid values are integers 68 // between 2 and 10,000. 69 Size int32 70} 71 72// The custom parameters to be used when the target is an AWS Batch job. 73type BatchParameters struct { 74 75 // The ARN or name of the job definition to use if the event target is an AWS Batch 76 // job. This job definition must already exist. 77 // 78 // This member is required. 79 JobDefinition *string 80 81 // The name to use for this execution of the job, if the target is an AWS Batch 82 // job. 83 // 84 // This member is required. 85 JobName *string 86 87 // The array properties for the submitted job, such as the size of the array. The 88 // array size can be between 2 and 10,000. If you specify array properties for a 89 // job, it becomes an array job. This parameter is used only if the target is an 90 // AWS Batch job. 91 ArrayProperties *BatchArrayProperties 92 93 // The retry strategy to use for failed jobs, if the target is an AWS Batch job. 94 // The retry strategy is the number of times to retry the failed job execution. 95 // Valid values are 1–10. When you specify a retry strategy here, it overrides the 96 // retry strategy defined in the job definition. 97 RetryStrategy *BatchRetryStrategy 98} 99 100// The retry strategy to use for failed jobs, if the target is an AWS Batch job. If 101// you specify a retry strategy here, it overrides the retry strategy defined in 102// the job definition. 103type BatchRetryStrategy struct { 104 105 // The number of times to attempt to retry, if the job fails. Valid values are 106 // 1–10. 107 Attempts int32 108} 109 110// A JSON string which you can use to limit the event bus permissions you are 111// granting to only accounts that fulfill the condition. Currently, the only 112// supported condition is membership in a certain AWS organization. The string must 113// contain Type, Key, and Value fields. The Value field specifies the ID of the AWS 114// organization. Following is an example value for Condition: '{"Type" : 115// "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' 116type Condition struct { 117 118 // Specifies the key for the condition. Currently the only supported key is 119 // aws:PrincipalOrgID. 120 // 121 // This member is required. 122 Key *string 123 124 // Specifies the type of condition. Currently the only supported value is 125 // StringEquals. 126 // 127 // This member is required. 128 Type *string 129 130 // Specifies the value for the key. Currently, this must be the ID of the 131 // organization. 132 // 133 // This member is required. 134 Value *string 135} 136 137// A DeadLetterConfig object that contains information about a dead-letter queue 138// configuration. 139type DeadLetterConfig struct { 140 141 // The ARN of the SQS queue specified as the target for the dead-letter queue. 142 Arn *string 143} 144 145// The custom parameters to be used when the target is an Amazon ECS task. 146type EcsParameters struct { 147 148 // The ARN of the task definition to use if the event target is an Amazon ECS task. 149 // 150 // This member is required. 151 TaskDefinitionArn *string 152 153 // Specifies an ECS task group for the task. The maximum length is 255 characters. 154 Group *string 155 156 // Specifies the launch type on which your task is running. The launch type that 157 // you specify here must match one of the launch type (compatibilities) of the 158 // target task. The FARGATE value is supported only in the Regions where AWS 159 // Fargate with Amazon ECS is supported. For more information, see AWS Fargate on 160 // Amazon ECS 161 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) 162 // in the Amazon Elastic Container Service Developer Guide. 163 LaunchType LaunchType 164 165 // Use this structure if the ECS task uses the awsvpc network mode. This structure 166 // specifies the VPC subnets and security groups associated with the task, and 167 // whether a public IP address is to be used. This structure is required if 168 // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. If 169 // you specify NetworkConfiguration when the target ECS task does not use the 170 // awsvpc network mode, the task fails. 171 NetworkConfiguration *NetworkConfiguration 172 173 // Specifies the platform version for the task. Specify only the numeric portion of 174 // the platform version, such as 1.1.0. This structure is used only if LaunchType 175 // is FARGATE. For more information about valid platform versions, see AWS Fargate 176 // Platform Versions 177 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) 178 // in the Amazon Elastic Container Service Developer Guide. 179 PlatformVersion *string 180 181 // The number of tasks to create based on TaskDefinition. The default is 1. 182 TaskCount *int32 183} 184 185// An event bus receives events from a source and routes them to rules associated 186// with that event bus. Your account's default event bus receives rules from AWS 187// services. A custom event bus can receive rules from AWS services as well as your 188// custom applications and services. A partner event bus receives events from an 189// event source created by an SaaS partner. These events come from the partners 190// services or applications. 191type EventBus struct { 192 193 // The ARN of the event bus. 194 Arn *string 195 196 // The name of the event bus. 197 Name *string 198 199 // The permissions policy of the event bus, describing which other AWS accounts can 200 // write events to this event bus. 201 Policy *string 202} 203 204// A partner event source is created by an SaaS partner. If a customer creates a 205// partner event bus that matches this event source, that AWS account can receive 206// events from the partner's applications or services. 207type EventSource struct { 208 209 // The ARN of the event source. 210 Arn *string 211 212 // The name of the partner that created the event source. 213 CreatedBy *string 214 215 // The date and time the event source was created. 216 CreationTime *time.Time 217 218 // The date and time that the event source will expire, if the AWS account doesn't 219 // create a matching event bus for it. 220 ExpirationTime *time.Time 221 222 // The name of the event source. 223 Name *string 224 225 // The state of the event source. If it is ACTIVE, you have already created a 226 // matching event bus for this event source, and that event bus is active. If it is 227 // PENDING, either you haven't yet created a matching event bus, or that event bus 228 // is deactivated. If it is DELETED, you have created a matching event bus, but the 229 // event source has since been deleted. 230 State EventSourceState 231} 232 233// These are custom parameter to be used when the target is an API Gateway REST 234// APIs. 235type HttpParameters struct { 236 237 // The headers that need to be sent as part of request invoking the API Gateway 238 // REST API. 239 HeaderParameters map[string]string 240 241 // The path parameter values to be used to populate API Gateway REST API path 242 // wildcards ("*"). 243 PathParameterValues []string 244 245 // The query string keys/values that need to be sent as part of request invoking 246 // the API Gateway REST API. 247 QueryStringParameters map[string]string 248} 249 250// Contains the parameters needed for you to provide custom input to a target based 251// on one or more pieces of data extracted from the event. 252type InputTransformer struct { 253 254 // Input template where you specify placeholders that will be filled with the 255 // values of the keys from InputPathsMap to customize the data sent to the target. 256 // Enclose each InputPathsMaps value in brackets: <value> The InputTemplate must be 257 // valid JSON. If InputTemplate is a JSON object (surrounded by curly braces), the 258 // following restrictions apply: 259 // 260 // * The placeholder cannot be used as an object 261 // key. 262 // 263 // * Object values cannot include quote marks. 264 // 265 // The following example shows 266 // the syntax for using InputPathsMap and InputTemplate. "InputTransformer": 267 // 268 // { 269 // 270 // "InputPathsMap": {"instance": "$.detail.instance","status": 271 // "$.detail.status"}, 272 // 273 // "InputTemplate": " is in state " 274 // 275 // } To have the 276 // InputTemplate include quote marks within a JSON string, escape each quote marks 277 // with a slash, as in the following example: "InputTransformer": 278 // { 279 // 280 // 281 // "InputPathsMap": {"instance": "$.detail.instance","status": 282 // "$.detail.status"}, 283 // 284 // "InputTemplate": " is in state """ 285 // 286 // } 287 // 288 // This member is required. 289 InputTemplate *string 290 291 // Map of JSON paths to be extracted from the event. You can then insert these in 292 // the template in InputTemplate to produce the output you want to be sent to the 293 // target. InputPathsMap is an array key-value pairs, where each value is a valid 294 // JSON path. You can have as many as 10 key-value pairs. You must use JSON dot 295 // notation, not bracket notation. The keys cannot start with "AWS." 296 InputPathsMap map[string]string 297} 298 299// This object enables you to specify a JSON path to extract from the event and use 300// as the partition key for the Amazon Kinesis data stream, so that you can control 301// the shard to which the event goes. If you do not include this parameter, the 302// default is to use the eventId as the partition key. 303type KinesisParameters struct { 304 305 // The JSON path to be extracted from the event and used as the partition key. For 306 // more information, see Amazon Kinesis Streams Key Concepts 307 // (https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) 308 // in the Amazon Kinesis Streams Developer Guide. 309 // 310 // This member is required. 311 PartitionKeyPath *string 312} 313 314// This structure specifies the network configuration for an ECS task. 315type NetworkConfiguration struct { 316 317 // Use this structure to specify the VPC subnets and security groups for the task, 318 // and whether a public IP address is to be used. This structure is relevant only 319 // for ECS tasks that use the awsvpc network mode. 320 AwsvpcConfiguration *AwsVpcConfiguration 321} 322 323// A partner event source is created by an SaaS partner. If a customer creates a 324// partner event bus that matches this event source, that AWS account can receive 325// events from the partner's applications or services. 326type PartnerEventSource struct { 327 328 // The ARN of the partner event source. 329 Arn *string 330 331 // The name of the partner event source. 332 Name *string 333} 334 335// The AWS account that a partner event source has been offered to. 336type PartnerEventSourceAccount struct { 337 338 // The AWS account ID that the partner event source was offered to. 339 Account *string 340 341 // The date and time the event source was created. 342 CreationTime *time.Time 343 344 // The date and time that the event source will expire, if the AWS account doesn't 345 // create a matching event bus for it. 346 ExpirationTime *time.Time 347 348 // The state of the event source. If it is ACTIVE, you have already created a 349 // matching event bus for this event source, and that event bus is active. If it is 350 // PENDING, either you haven't yet created a matching event bus, or that event bus 351 // is deactivated. If it is DELETED, you have created a matching event bus, but the 352 // event source has since been deleted. 353 State EventSourceState 354} 355 356// Represents an event to be submitted. 357type PutEventsRequestEntry struct { 358 359 // A valid JSON string. There is no other schema imposed. The JSON string may 360 // contain fields and nested subobjects. 361 Detail *string 362 363 // Free-form string used to decide what fields to expect in the event detail. 364 DetailType *string 365 366 // The name or ARN of the event bus to receive the event. Only the rules that are 367 // associated with this event bus are used to match the event. If you omit this, 368 // the default event bus is used. 369 EventBusName *string 370 371 // AWS resources, identified by Amazon Resource Name (ARN), which the event 372 // primarily concerns. Any number, including zero, may be present. 373 Resources []string 374 375 // The source of the event. 376 Source *string 377 378 // The time stamp of the event, per RFC3339 379 // (https://www.rfc-editor.org/rfc/rfc3339.txt). If no time stamp is provided, the 380 // time stamp of the PutEvents call is used. 381 Time *time.Time 382} 383 384// Represents an event that failed to be submitted. 385type PutEventsResultEntry struct { 386 387 // The error code that indicates why the event submission failed. 388 ErrorCode *string 389 390 // The error message that explains why the event submission failed. 391 ErrorMessage *string 392 393 // The ID of the event. 394 EventId *string 395} 396 397// The details about an event generated by an SaaS partner. 398type PutPartnerEventsRequestEntry struct { 399 400 // A valid JSON string. There is no other schema imposed. The JSON string may 401 // contain fields and nested subobjects. 402 Detail *string 403 404 // A free-form string used to decide what fields to expect in the event detail. 405 DetailType *string 406 407 // AWS resources, identified by Amazon Resource Name (ARN), which the event 408 // primarily concerns. Any number, including zero, may be present. 409 Resources []string 410 411 // The event source that is generating the evntry. 412 Source *string 413 414 // The date and time of the event. 415 Time *time.Time 416} 417 418// Represents an event that a partner tried to generate, but failed. 419type PutPartnerEventsResultEntry struct { 420 421 // The error code that indicates why the event submission failed. 422 ErrorCode *string 423 424 // The error message that explains why the event submission failed. 425 ErrorMessage *string 426 427 // The ID of the event. 428 EventId *string 429} 430 431// Represents a target that failed to be added to a rule. 432type PutTargetsResultEntry struct { 433 434 // The error code that indicates why the target addition failed. If the value is 435 // ConcurrentModificationException, too many requests were made at the same time. 436 ErrorCode *string 437 438 // The error message that explains why the target addition failed. 439 ErrorMessage *string 440 441 // The ID of the target. 442 TargetId *string 443} 444 445// These are custom parameters to be used when the target is a Redshift cluster to 446// invoke the Redshift Data API ExecuteStatement based on EventBridge events. 447type RedshiftDataParameters struct { 448 449 // The name of the database. Required when authenticating using temporary 450 // credentials. 451 // 452 // This member is required. 453 Database *string 454 455 // The SQL statement text to run. 456 // 457 // This member is required. 458 Sql *string 459 460 // The database user name. Required when authenticating using temporary 461 // credentials. 462 DbUser *string 463 464 // The name or ARN of the secret that enables access to the database. Required when 465 // authenticating using AWS Secrets Manager. 466 SecretManagerArn *string 467 468 // The name of the SQL statement. You can name the SQL statement when you create it 469 // to identify the query. 470 StatementName *string 471 472 // Indicates whether to send an event back to EventBridge after the SQL statement 473 // runs. 474 WithEvent bool 475} 476 477// Represents a target that failed to be removed from a rule. 478type RemoveTargetsResultEntry struct { 479 480 // The error code that indicates why the target removal failed. If the value is 481 // ConcurrentModificationException, too many requests were made at the same time. 482 ErrorCode *string 483 484 // The error message that explains why the target removal failed. 485 ErrorMessage *string 486 487 // The ID of the target. 488 TargetId *string 489} 490 491// A Replay object that contains details about a replay. 492type Replay struct { 493 494 // A time stamp for the time to start replaying events. Any event with a creation 495 // time prior to the EventEndTime specified is replayed. 496 EventEndTime *time.Time 497 498 // A time stamp for the time that the last event was replayed. 499 EventLastReplayedTime *time.Time 500 501 // The ARN of the archive to replay event from. 502 EventSourceArn *string 503 504 // A time stamp for the time to start replaying events. This is determined by the 505 // time in the event as described in Time 506 // (https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time). 507 EventStartTime *time.Time 508 509 // A time stamp for the time that the replay completed. 510 ReplayEndTime *time.Time 511 512 // The name of the replay. 513 ReplayName *string 514 515 // A time stamp for the time that the replay started. 516 ReplayStartTime *time.Time 517 518 // The current state of the replay. 519 State ReplayState 520 521 // A description of why the replay is in the current state. 522 StateReason *string 523} 524 525// A ReplayDestination object that contains details about a replay. 526type ReplayDestination struct { 527 528 // The ARN of the event bus to replay event to. You can replay events only to the 529 // event bus specified to create the archive. 530 // 531 // This member is required. 532 Arn *string 533 534 // A list of ARNs for rules to replay events to. 535 FilterArns []string 536} 537 538// A RetryPolicy object that includes information about the retry policy settings. 539type RetryPolicy struct { 540 541 // The maximum amount of time, in seconds, to continue to make retry attempts. 542 MaximumEventAgeInSeconds *int32 543 544 // The maximum number of retry attempts to make before the request fails. Retry 545 // attempts continue until either the maximum number of attempts is made or until 546 // the duration of the MaximumEventAgeInSeconds is met. 547 MaximumRetryAttempts *int32 548} 549 550// Contains information about a rule in Amazon EventBridge. 551type Rule struct { 552 553 // The Amazon Resource Name (ARN) of the rule. 554 Arn *string 555 556 // The description of the rule. 557 Description *string 558 559 // The name or ARN of the event bus associated with the rule. If you omit this, the 560 // default event bus is used. 561 EventBusName *string 562 563 // The event pattern of the rule. For more information, see Events and Event 564 // Patterns 565 // (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) 566 // in the Amazon EventBridge User Guide. 567 EventPattern *string 568 569 // If the rule was created on behalf of your account by an AWS service, this field 570 // displays the principal name of the service that created the rule. 571 ManagedBy *string 572 573 // The name of the rule. 574 Name *string 575 576 // The Amazon Resource Name (ARN) of the role that is used for target invocation. 577 RoleArn *string 578 579 // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". 580 ScheduleExpression *string 581 582 // The state of the rule. 583 State RuleState 584} 585 586// This parameter contains the criteria (either InstanceIds or a tag) used to 587// specify which EC2 instances are to be sent the command. 588type RunCommandParameters struct { 589 590 // Currently, we support including only one RunCommandTarget block, which specifies 591 // either an array of InstanceIds or a tag. 592 // 593 // This member is required. 594 RunCommandTargets []RunCommandTarget 595} 596 597// Information about the EC2 instances that are to be sent the command, specified 598// as key-value pairs. Each RunCommandTarget block can include only one key, but 599// this key may specify multiple values. 600type RunCommandTarget struct { 601 602 // Can be either tag: tag-key or InstanceIds. 603 // 604 // This member is required. 605 Key *string 606 607 // If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, 608 // Values is a list of Amazon EC2 instance IDs. 609 // 610 // This member is required. 611 Values []string 612} 613 614// This structure includes the custom parameter to be used when the target is an 615// SQS FIFO queue. 616type SqsParameters struct { 617 618 // The FIFO message group ID to use as the target. 619 MessageGroupId *string 620} 621 622// A key-value pair associated with an AWS resource. In EventBridge, rules and 623// event buses support tagging. 624type Tag struct { 625 626 // A string you can use to assign a value. The combination of tag keys and values 627 // can help you organize and categorize your resources. 628 // 629 // This member is required. 630 Key *string 631 632 // The value for the specified tag key. 633 // 634 // This member is required. 635 Value *string 636} 637 638// Targets are the resources to be invoked when a rule is triggered. For a complete 639// list of services and resources that can be set as a target, see PutTargets. If 640// you are setting the event bus of another account as the target, and that account 641// granted permission to your account through an organization instead of directly 642// by the account ID, then you must specify a RoleArn with proper permissions in 643// the Target structure. For more information, see Sending and Receiving Events 644// Between AWS Accounts 645// (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) 646// in the Amazon EventBridge User Guide. 647type Target struct { 648 649 // The Amazon Resource Name (ARN) of the target. 650 // 651 // This member is required. 652 Arn *string 653 654 // The ID of the target. 655 // 656 // This member is required. 657 Id *string 658 659 // If the event target is an AWS Batch job, this contains the job definition, job 660 // name, and other parameters. For more information, see Jobs 661 // (https://docs.aws.amazon.com/batch/latest/userguide/jobs.html) in the AWS Batch 662 // User Guide. 663 BatchParameters *BatchParameters 664 665 // The DeadLetterConfig that defines the target queue to send dead-letter queue 666 // events to. 667 DeadLetterConfig *DeadLetterConfig 668 669 // Contains the Amazon ECS task definition and task count to be used, if the event 670 // target is an Amazon ECS task. For more information about Amazon ECS tasks, see 671 // Task Definitions 672 // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) 673 // in the Amazon EC2 Container Service Developer Guide. 674 EcsParameters *EcsParameters 675 676 // Contains the HTTP parameters to use when the target is a API Gateway REST 677 // endpoint. If you specify an API Gateway REST API as a target, you can use this 678 // parameter to specify headers, path parameter, query string keys/values as part 679 // of your target invoking request. 680 HttpParameters *HttpParameters 681 682 // Valid JSON text passed to the target. In this case, nothing from the event 683 // itself is passed to the target. For more information, see The JavaScript Object 684 // Notation (JSON) Data Interchange Format 685 // (http://www.rfc-editor.org/rfc/rfc7159.txt). 686 Input *string 687 688 // The value of the JSONPath that is used for extracting part of the matched event 689 // when passing it to the target. You must use JSON dot notation, not bracket 690 // notation. For more information about JSON paths, see JSONPath 691 // (http://goessner.net/articles/JsonPath/). 692 InputPath *string 693 694 // Settings to enable you to provide custom input to a target based on certain 695 // event data. You can extract one or more key-value pairs from the event and then 696 // use that data to send customized input to the target. 697 InputTransformer *InputTransformer 698 699 // The custom parameter you can use to control the shard assignment, when the 700 // target is a Kinesis data stream. If you do not include this parameter, the 701 // default is to use the eventId as the partition key. 702 KinesisParameters *KinesisParameters 703 704 // Contains the Redshift Data API parameters to use when the target is a Redshift 705 // cluster. If you specify a Redshift Cluster as a Target, you can use this to 706 // specify parameters to invoke the Redshift Data API ExecuteStatement based on 707 // EventBridge events. 708 RedshiftDataParameters *RedshiftDataParameters 709 710 // The RetryPolicy object that contains the retry policy configuration to use for 711 // the dead-letter queue. 712 RetryPolicy *RetryPolicy 713 714 // The Amazon Resource Name (ARN) of the IAM role to be used for this target when 715 // the rule is triggered. If one rule triggers multiple targets, you can use a 716 // different IAM role for each target. 717 RoleArn *string 718 719 // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. 720 RunCommandParameters *RunCommandParameters 721 722 // Contains the message group ID to use when the target is a FIFO queue. If you 723 // specify an SQS FIFO queue as a target, the queue must have content-based 724 // deduplication enabled. 725 SqsParameters *SqsParameters 726} 727